Tutorials: wallsets and custom monsters, objects, etc
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

- Sophia
- Concise and Honest
- Posts: 4306
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Tutorials: wallsets and custom monsters, objects, etc
The reason just setting the definition to nil doesn't work is that obj has a metatable that appends every newly created archetype's key to a hidden array as soon as it is created. Iterating over a Lua table has no particular order, so doing it this way ensures that you can iterate over archetypes in the order they're listed in objects.lua, which is usually what people are expecting to happen, and (since I was also expecting it to work this way!) got rid of a bunch of insidious bugs in early versions of DSB that didn't do it this way. When you nil the entry in obj the hidden entry still exists and DSB gets confused. I could probably fix this, if it's actually something people care about.
- Ser Xav
- Lo Master
- Posts: 449
- Joined: Mon Jan 21, 2013 10:58 pm
- Location: I see walls stretching off into the darkness...
Re: Tutorials: wallsets and custom monsters, objects, etc
Ok, thanks, so sounds like not possible to suppress? I'll have a go at the custom class, thanks. Should be relatively easy to do this I think.