Mantis Bug Tracker

View Revisions: Issue #5818 Back to Issue ]
Summary 0005818: Jobs using casts, tools, slabs, or food storage containers look too hard for items
Revision 2012-04-17 14:59 by Footkerchief
Additional Information The very last field in the "job" structure is a vector of "job item" descriptor structures, and within that "job item" structure is a numeric field (immediately between the quantity and the 2nd set of flags) which indicates the item group to search. When the job actually searches for matching items, a separate function translates that numeric field into an offset into the list of item vectors, and that function is missing cases for ORTHOPEDIC_CAST (14), TOOL (124), SLAB (125), and FOOD_STORAGE (127), causing them to default to the first entry (which contains all items).

This was first observed in version 0.31.25 by one of the DFHack developers, and I've confirmed that it still appears to be the case in version 0.34.07 (though the case for BOOK is correctly present).
Revision 2012-04-17 14:59 by Footkerchief
Description Analysis of Dwarf Fortress's data structures for handling jobs and the items they request seems to suggest that jobs which request items of type ORTHOPEDIC_CAST (none?), TOOL (possibly custom reactions), SLAB (engraving memorials?), or the category tag FOOD_STORAGE (brewing drinks) are searching for those items within the global list of all items in the entire fortress instead of the approx. 129 other filtered item lists, potentially adding a significant delay if there are a lot of items in the fortress (and the earliest matching items are near the end of that list).
Revision 2012-04-17 13:45 by Footkerchief
Additional Information The very last field in the "job" structure is a vector of "job item" descriptor structures, and within that "job item" structure is a numeric field (immediately between the quantity and the 2nd set of flags) which indicates the item group to search. When the job actually searches for matching items, a separate function translates that numeric field into an offset into the list of item vectors, and that function is missing cases for ORTHOPEDIC_CAST (0000014), TOOL (0000124), SLAB (0000125), and FOOD_STORAGE (0000127), causing them to default to the first entry (which contains all items).

This was first observed in version 0.31.25 by one of the DFHack developers, and I've confirmed that it still appears to be the case in version 0.34.07 (though the case for BOOK is correctly present).
Revision 2012-04-17 13:45 by Footkerchief
Description Analysis of Dwarf Fortress's data structures for handling jobs and the items they request seems to suggest that jobs which request items of type ORTHOPEDIC_CAST (none?), TOOL (possibly custom reactions), SLAB (engraving memorials?), or the category tag FOOD_STORAGE (brewing drinks) are searching for those items within the global list of all items in the entire fortress instead of the 0000102:0000129 other filtered item lists, potentially adding a significant delay if there are a lot of items in the fortress (and the earliest matching items are near the end of that list).


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker