Page 1 of 1

[2.0.12] LuaEntity.max_health to include evolution scaling factor

Posted: Wed Oct 30, 2024 4:52 pm
by Mylon
Problem: When evolution has increased a spawner's max health, there's no reliable way to get it's real max health. LuaEntity.max_health is equal to LuaEntity.prototype.max_health (assuming normal quality)

Observed behavior:

Code: Select all

/c game.player.surface.pollute({0,0}, 1000000000) --This sets evolution to 1
/c game.print(game.player.selected.max_health)
> 350
Expected behavior:
3500

Solution: Update LuaEntity.max_health to include the evolution scaling factor, if appropriate.

Alternate solution: Expose LuaForce Evolution Health Scaling.

Re: [2.0.12] LuaEntity.max_health to include evolution scaling factor

Posted: Wed Oct 30, 2024 5:07 pm
by Oarc
+1 for the alternate solution as well.

I need a way to adjust the the health scaling too (to make spawners without the scaling, or with different scaling).

Re: [2.0.12] LuaEntity.max_health to include evolution scaling factor

Posted: Sun Nov 03, 2024 2:46 pm
by boskid
I am considering this to be a bug report, which is now fixed for 2.0.15.