Page 6 of 6

Re: Tutorials: wallsets and custom monsters, objects, etc

Posted: Tue Mar 04, 2025 7:26 pm
by Sophia
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.

Re: Tutorials: wallsets and custom monsters, objects, etc

Posted: Wed Mar 05, 2025 9:36 am
by Ser Xav
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.