Can't overwrite stats for NPCs with a base

Moderator: Moderator

Post Reply
Message
Author
Zonk
Sher'Tul
Posts: 1067
Joined: Sat Mar 01, 2003 4:01 pm

Can't overwrite stats for NPCs with a base

#1 Post by Zonk »

If you have a base NPC with set stats - as in, stats = {...} - and it is inherited to create a more detailed NPC type(say gigantic sandworm tunnelers, using BASE_NPC_SANDWORM as a base), then the latter can't have its own stats.

The stats = {...} string in the non-base entry seems to be neither overwritten nor added, but simply ignored.
ToME online profile: http://te4.org/users/zonk
Addons (most likely obsolete): Wights, Trolls, Starting prodigy, Alternate save/resistance system

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Can't overwrite stats for NPCs with a base

#2 Post by Grey »

I had the same problem myself. Had to give every monster with variant stats its own base type, otherwise the stats would go to the basetype stats. If the basetype stats weren't defined then it would go to the default actor stats.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Zonk
Sher'Tul
Posts: 1067
Joined: Sat Mar 01, 2003 4:01 pm

Re: Can't overwrite stats for NPCs with a base

#3 Post by Zonk »

While testing out some new monsters, noticed this still happens.
Like Grey says, there IS a way to work through it, but it's a bit awkard so if it could be fixed...
ToME online profile: http://te4.org/users/zonk
Addons (most likely obsolete): Wights, Trolls, Starting prodigy, Alternate save/resistance system

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: Can't overwrite stats for NPCs with a base

#4 Post by edge2054 »

Bumping :)

There's a better work around though if Darkgod can't get this fixed.

Just don't use stats and define everything in a combat table like...

Code: Select all

combat = { strength = 10 }
It's a bit more work, you'll have to build your own functions for calling stats and what not but it would probably work for most simple modules.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Can't overwrite stats for NPCs with a base

#5 Post by darkgod »

fixed
[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 ;)

Post Reply