Is there a mod that boosts the seemingly hardcoded mana cap?

Yvori

Terrarian
I've noticed an interesting issue while playing the modpack I have set up currently. It appears that by default, Terraria can't actually increase your mana over the 600 mark, even if you have boosts that should put it over. My current character setup gives the following boosts:
+200 - Base Mana from Mana Stars
+200 - Mana Fruits from Elements Awoken
+100 - Ethereal Shell from Elements Awoken
+060 - Energy Geode from Elements Awoken
+060 - Spectre Mask Set
+050 - Mages Focus from Elements Awoken
+050 - Relic of Progenitus from Loot Craze
=720 - Total Mana without buffs
But my mana shows 600/600 and using any item will take it below 600 so it's not like it just isn't showing, the mana is actually physically capped.
Now, obviously, with things like the Mana Flower, this isn't a major issue at all, but I feel like I'm getting ripped off for 120 mana.

Are there any mods out there that boost the mana cap past 600? Preferably mods which don't add a bunch of other content. Life can seemingly go as high as you can make it with mods, so I don't get why there's an arbitrary cap on Mana. It seems kind of annoying and counterintuitive.
 
So, there are two stats that control the maximum mana a player can have. statManaMax is increased by mana stars and it's capped at 200. statManaMax2 is what you get from everything else, and it's capped at 400. These caps are defined in Player.Update, where if statManaMax(2) is too high, it gets set back down to the cap.

There was a conversation about removing the 400 cap over here: Request for mana uncap hook/tml change · Issue #338 · blushiemagic/tModLoader But it got shot down along with the other suggestions there.

Though, patching this out with Harmony or something would actually be pretty simple. So, I can do that if you want. :)

EDIT
Here you go: DRKV333/ManaUnbound
It should also appear on the mod browser eventually...
 
Last edited:
So, there are two stats that control the maximum mana a player can have. statManaMax is increased by mana stars and it's capped at 200. statManaMax2 is what you get from everything else, and it's capped at 400. These caps are defined in Player.Update, where if statManaMax(2) is too high, it gets set back down to the cap.

There was a conversation about removing the 400 cap over here: Request for mana uncap hook/tml change · Issue #338 · blushiemagic/tModLoader But it got shot down along with the other suggestions there.

Though, patching this out with Harmony or something would actually be pretty simple. So, I can do that if you want. :)

EDIT
Here you go: DRKV333/ManaUnbound
It should also appear on the mod browser eventually...
Thank you very much!
I do wonder though, what will happen with the star UI render when it reaches the bottom of the screen? Will it just go offscreen or will there be issues?
 
Thank you very much!
I do wonder though, what will happen with the star UI render when it reaches the bottom of the screen? Will it just go offscreen or will there be issues?
I tested it with the setup you gave in the first post, and it didn't have any major problems, the stars just went offscreen. I think the UI system should be able to generally handle offscreen stuff fine, but you never know. If you push your mana cap too far it might start causing issues...
 
@DRKV
Honestly I still wonder why you still use harmony as it will be more than likely to break with 0.11 that will have terraria hook instead. It's also much more simple to use than harmony if you ask me. Tough still nice job on those mod!
 
@DRKV
Honestly I still wonder why you still use harmony as it will be more than likely to break with 0.11 that will have terraria hook instead. It's also much more simple to use than harmony if you ask me. Tough still nice job on those mod!
Honestly, when I started messing with this stuff I didn't know that thing existed. :p Also I don't really want to have all of my mods depend on another mod. MonoMod will only break my stuff if some other mods try to patch the same methods. So far I haven't had anyone complain about incompatibility with other mods, so I think I'll be good for a while. Once 0.11 comes out I'll of course still update all of mods to use the built-in MonoMod. (Though, mods that use terraria hooks will probably need an update as well.)
 
Honestly, when I started messing with this stuff I didn't know that thing existed. :p Also I don't really want to have all of my mods depend on another mod. MonoMod will only break my stuff if some other mods try to patch the same methods. So far I haven't had anyone complain about incompatibility with other mods, so I think I'll be good for a while. Once 0.11 comes out I'll of course still update all of mods to use the built-in MonoMod. (Though, mods that use terraria hooks will probably need an update as well.)
Well, the main reason why I point this out here is because I'm actually patching the PlayerUpdate on my liquid API mod which use TerrariaHook (the built in one), which was previously done on pure raw method pointer swapping.
 
Back
Top Bottom