tModLoader

tModLoader

TerRoguelike
9+ Loop Boss Health Overflow
Hello, I've been playing this mod for a bit and reached 9th loop.
Since the enemies health exponentially grow for each loop passed, foes at the higher loop have tremendous amount of health, especially for bosses.
Interestingly, the Moon Lord had "-2111501117" Health at the 9th loop,which is probably due to the 32-bit signed integer overflow; and the TBoC had 2147483647 Health, which is exactly same as 32-bit integer maximum value.
< >
Showing 1-4 of 4 comments
tepk2924 14 Apr @ 6:16am 
By the way, the Moon Lord did not actually get instakilled. During the fight, the health point value went from -2111501117 to positive value, then went all the ways down to 0 then died.
I guess that the value had reached -2147483648, "underflowing" up to 2147483647, then went down to 0. (In this case the actual health was 2183466179.)
Last edited by tepk2924; 14 Apr @ 6:20am
AquaSG  [developer] 14 Apr @ 2:34pm 
In the case of moon lord, it is 4 hp bars total adding up to the total value. Each individual npc can have up to the interger limit of hp, it's just that adding them all together and displaying it on the bar results in an overflow.
AquaSG  [developer] 14 Apr @ 2:37pm 
I sort of just left it in because it was funny and there's some joy to be found from the player by going so far in the game to break the UI, but I can just change the healthbar ui values to 64 bit intergers.
tepk2924 15 Apr @ 10:41pm 
just leave it be broken as before because it is funny lol
< >
Showing 1-4 of 4 comments
Per page: 1530 50