Module Questions
Moderator: Moderator
Module Questions
I've noticed that in the Example Module all actors start out with 100 HP regardless of their max life. Is there a way to fix it?
Re: Module Questions
Looks like a bug. The tooltip shows 100 only for the first turn of a new dungeon. After that it updates and properly shows 6, 7, etc.
I'd guess the actor's life init() is being called before the Kobold descriptor gets a chance to run and process the proper life value.
Inside ActorLife.init():
So if no t.max_life value is available, it defaults to 100.
After the first turn the max_life descriptor had a chance to update the enemies real max life, so the tooltip fixes itself.
As for how to fix it? Hmm maybe force an update of the hp values in the tooltip. Or dig around in the engine code. Now I'm curious if this bug occurs in vanilla ToME. But alas, lunch break is over back to work. Good luck.
I'd guess the actor's life init() is being called before the Kobold descriptor gets a chance to run and process the proper life value.
Code: Select all
engine.interface.ActorLife.init(self, t)
Code: Select all
self.max_life = t.max_life or 100
After the first turn the max_life descriptor had a chance to update the enemies real max life, so the tooltip fixes itself.
As for how to fix it? Hmm maybe force an update of the hp values in the tooltip. Or dig around in the engine code. Now I'm curious if this bug occurs in vanilla ToME. But alas, lunch break is over back to work. Good luck.