I've noticed that creatures in my fledgling module are created with 100 life, presumably because engine.interface.ActorLife defaults max_life and life to 100 before the player's birth descriptors or NPCs' initialization code correctly set max_life.
I found that I can fix this by just adding an additional "life = " line to the birth descriptors and NPC definitions, and I saw where Startide uses a resolvers.life (presumably to fix this same problem), but is there a cleaner way of handling this? I couldn't see how ToME itself addresses it.
Starting life
Moderator: Moderator
Re: Starting life
In your actor init fucntion you can simply set self.life = self.max_life
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Starting life
It looks like Actor's init is called before resolving and birth descriptors take place, so max_life doesn't yet have its final value.
I finally saw where ToME defines a resetToMax function that's called (indirectly) by resolveLevel, so I'm taking a similar approach.
Thanks.
I finally saw where ToME defines a resetToMax function that's called (indirectly) by resolveLevel, so I'm taking a similar approach.
Thanks.