tModLoader

tModLoader

TerRoguelike
tepk2924 4 月 14 日 上午 6:11
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.
< >
正在显示第 1 - 4 条,共 4 条留言
tepk2924 4 月 14 日 上午 6:16 
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.)
最后由 tepk2924 编辑于; 4 月 14 日 上午 6:20
AquaSG  [开发者] 4 月 14 日 下午 2:34 
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  [开发者] 4 月 14 日 下午 2:37 
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 4 月 15 日 下午 10:41 
just leave it be broken as before because it is funny lol
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50