Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: IndigoFenix on March 31, 2023, 05:22:20 am

Title: Order-dependent error in creature raws...anyone ever see something like this?
Post by: IndigoFenix on March 31, 2023, 05:22:20 am
To the best of my knowledge, the order of creatures in raws is generally supposed to be irrelevant, except when COPY_TAGS_FROM gets involved.

But I'm experiencing a really weird bug where I get "undefined local creature material set to default" in the error log...and the specific creature it is associated with depends on the number of creatures before it in the raws. If I delete a creature or two, the creature with the bug gets moved up accordingly. This also happens if I move some earlier files later in the alphabetized list (by adding a "z" in their name). None of these creatures actually has anything wrong with them independently.

Note that this is a highly elaborate mod with a lot of creatures cross-referencing materials in other creatures, so unexpected behaviors that weren't accounted for might be expected. But this isn't an uncommon practice in the more complex mods out there, so maybe someone else has seen something like this. There are also worldgen crashes which might be related to whatever is going on here.
Title: Re: Order-dependent error in creature raws...anyone ever see something like this?
Post by: Putnam on March 31, 2023, 07:31:10 pm
Post the mod as it is right now. This is really good data, likely a parser bug that can easily be found with breakpoints etc.
Title: Re: Order-dependent error in creature raws...anyone ever see something like this?
Post by: IndigoFenix on April 01, 2023, 12:40:11 pm
Sure, thanks!

I uploaded it to the Steam workshop here:

https://steamcommunity.com/sharedfiles/filedetails/?id=2956037558 (https://steamcommunity.com/sharedfiles/filedetails/?id=2956037558)