Prevent NPCs from healing?

nadeauhugo

Author of FOT mod THE SUM
Modder
I'll may be in need of help again with some hex verification and edit...

I noticed a very annoying bug with broken electric systems in my mod, that strangely "repair themselves", so quickly even that they simply never appear to be broken when my maps are visited for the first time... That made me realize that entities (in this case turrets) heal themselves over time, even though their entity healing rate is fixed to 0. If I fix it to -1, it dies. What can I do? Could somebody check using hex edit which process is triggered to heal entities and find a way to stop that for NPC only?
 
Last edited:
Okay... I might have found a satisfying solution for now.

I tested all possible actor entities, from "object" to "apc" vehicule, and all of them heal or hurt themselves according to their healing rate being 0 and more or less than 0. It seems that no entity can keep a stable level of hitpoints other than 100% indefinitely, meaning that if you plan on modding Tactics and want the party have to heal someone in order to complete a quest, you should be taking that into consideration, otherwise there is a chance that the character you want to heal get healed before you reach him.

While assigning a very high ammount of life points to my electric boxes (600 / 1000) and a heal rate of -1, I was able to "stabilize" a bit their decay to many many months. I also created new electric boxes that are designed to be working from the begining of the game with (1000 / 1000 hitpoints) and a healing rate of 0. It is satisfactory for me at this point.
 
I wonder if the game is setting a minimum "cap" of heal rate 1. That wouldn't explain the negative value, though, unless the cap setting only checked for 0.

On my list is to find the routine that handles "passage of time" when entering a new mission map. I know this is done after load, as I've seen the GUI show characters at their original health for just an instant prior to being healed. Once I find this, I can probably a) set a hook to allow overriding it, and b) call it so that it can be exploited from scripts (e.g. to implement a "rest" feature).
 
Oh very interesting, the moment when the healing was taking place was a mystery to me... that totally make sense, other ways would consume humongous ressources... I guess yess that with this feature already on your list, the problem will be solved. And yess, for high CON characters, or just for player that want to make use of the bonus to healing rate perk, a rest button would really come in handy..!
 
Back
Top