DFHack / df-structures

Dwarf Fortress data structure descriptions
https://github.com/DFHack/dfhack
114 stars 80 forks source link

Prepared meal FISH ingredients are weird. #162

Open milochristiansen opened 7 years ago

milochristiansen commented 7 years ago

Prepared meal ingredients made from FISH items do not work as expected. It seems like the material type field is a caste number and the material index field is the creature index. Reversing the fields (putting the type in the index field and the index in the type field) also works, but I think that is because a creature material type is the same as its creature index?

Would it be possible that these fields are unions or something?

Are there any other item types that cause this behaviour?

BenLubar commented 6 years ago

I believe that is the purpose of this attribute:

https://github.com/DFHack/df-structures/blob/589e71541f54fac4ee3c575530317a67affac9e6/df.item-raws.xml#L6-L7

lethosor commented 6 years ago

Is this something that needs to be changed, then?

PatrikLundell commented 5 years ago

FISH, FISH_RAW, and EGG behave the same. They're sort of compound objects rather than material in the way e.g. MEAT is (and I believe non vermin fish can be butchered to yield MEAT rather than FISH). Looking at the referenced file, REMAINS and VERMIN behave the same (although I don't think you can prepare meals from them, apart from Creepy Crawler MEAT after butchering). CORPSE and CORPSEPIECE are other compound object oddballs. I don't think there's a need to change anything. However, additional comments usually don't hurt (although they're frequently not read anyway)...