DFHack / df-structures

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

item_flags2 bit 3 (unk_book) and building_flags bit 7 seem to identify items/buildings tied to 'Locations' #576

Closed Cubittus closed 4 months ago

Cubittus commented 1 year ago

item_flags2 bit 3

(This was last looked at in issue #251)

I noticed a cave spider thread with this unk_book flag set and thought it odd. It was in a coffer in my hospital. I checked other threads in stockpiles and the bit was clear.

I found these other items have the flag set (via gm-editor):

These items do not have the flag set:

It seems to be set when an item is allocaed to and stored for use in a zone that is part of a named Location.

I suspect one use of this flag is to hide items from the Move to Depot screen.

building_flags bit 7

(Also mentioned in #532)

This led me to look at chests that are built in Locations and I noticed they all had bit 7 set in the building_flags.

Further investigation shows these buildings have the flag set:

These buildings do not:

Summary

Both these bits seem to correlated with an item or building that belongs to a named Location. I propose these bits are both named in_location

quietust commented 4 months ago

item_flags2 bit 3 is now "location_reserved" building_flags bit 7 is now "did_location_value"

Both names come directly from Toady