Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001416Dwarf FortressDwarf Mode -- Moodspublic2010-04-21 19:582014-12-31 13:08
Reporternirreln 
Assigned ToToady One 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformPCOSWindowsOS Version7
Product Version0.31.03 
Target VersionFixed in Version0.40.24 
Summary0001416: Moody dwarves claim workshops outside their burrow, haul infinite number of items, never start construction
DescriptionSee this thread http://www.bay12forums.com/smf/index.php?topic=54959.0 [^] for the full description. The net resault is something like the elborate forbidding trick use in pervious versions, also if the moody dwarf is assigned to a burrow with no stockpiles of required items the dwarf will sit on the workshop until death/insanity.
Steps To ReproduceSee the bay12 forum thread. http://www.bay12forums.com/smf/index.php?topic=54959.0 [^]
TagsArtifact, binary patch, burrow, burrows, mood, planepacked, stockpile
Attached Files

- Relationships
related to 0001084resolvedToady One Child making artifact, continues gathering materials forever! 
has duplicate 0002565resolvedFootkerchief Moody dwarf assigned to burrow collects materials forever. 
has duplicate 0002569resolvedFootkerchief Armorsmith created an iron shield out of 100+ copper&iron bars. Very many images and decorations on shield. Value: 1047600 
has duplicate 0003761resolvedLogical2u Never ending strange; keeps grabbing materials 
has duplicate 0003343resolvedLogical2u Moody dwarf assigned to burrow collects one material infinitely until un-assigned from burrow. 
has duplicate 0001587resolvedLogical2u Dwarves that go into a mood endlessly pick up wood and bring it back to the workshop they claimed. 

-  Notes
(0007214)
Mazka (reporter)
2010-05-23 00:24

Also happened with moody mason. Originally he might have had a different burrow, or no burrow at all.
After being possessed I assigned a stockpile burrow (to pick up native gold) and he kept on hauling gold to workshop.
When the amount of stone grew to ridiculous amounts, I deleted the burrow and he started working right away.
Workshop was not included in original burrow.
(0022570)
ag (reporter)
2012-05-17 08:38
edited on: 2012-05-17 08:39

OK, I hit this same very problem with my new DFHack api for creating buildings and constructions, and investigated it. Here are the results:

In order to reuse item selection logic from DF, instead of selecting all items beforehand like the game does, I create the construct building job in a fashion similar to workshop jobs, so that it selects materials on the fly. It appears to work quite fine, except when the building is hanging over space; in that case it behaves exactly like strange moods in this bug.

The cause of the problem is that when the code re-checks items already in the holder building agains the item filter, it tests if the unit can path to the item - and both in the burrow and hanging building cases it cannot. Consequently the item quantity check fails, and it selects a new similar item to bring.

This should be fixed by omitting to fill in the unit and position fields of the internal structure used for matching items until after the items within the building have been processed, i.e. changing:

filter.building = building;
filter.unit = unit;
filter.job = job;
filter.pos = unit->pos;

for (...building->items...) ...

etc

to:

filter.building = building;
filter.job = job;

for (...building->items...) ...

filter.unit = unit;
filter.pos = unit->pos;

Of course, I don't have the full code and it might have some other negative effects, but manually clearing those fields in the debugger helps.

(0022748)
Quietust (reporter)
2012-05-27 17:26

The fact that the path test fails and causes another item to be selected is obviously only part of the problem - the big problem is that the original item remains attached to the job and is thus incorporated into it when the job finally finishes.
(0022750)
ag (reporter)
2012-05-27 20:41

If the unit doesn't cancel the job, it should be assumed that it can path to the building for the purpose of items too; otherwise it doesn't make any sense.
(0029254)
Kanddak (reporter)
2014-08-18 13:57
edited on: 2014-08-18 14:11

Still present in 0.40.08. A potter with novice mechanic got a mood, claimed a mechanic workshop in the masonry burrow, and proceeded to haul tons of gypsum out of the kiln input stockpile in the glass/pottery burrow. Removing him as a citizen of the glass/pottery burrow let him accept the stone he had and collect the rest of his mood materials.


- Issue History
Date Modified Username Field Change
2010-04-21 19:58 nirreln New Issue
2010-04-21 19:59 nirreln Tag Attached: Artifact
2010-04-21 19:59 nirreln Tag Attached: burrows
2010-04-21 19:59 nirreln Tag Attached: stockpile
2010-04-21 20:00 nirreln Tag Attached: mood
2010-04-27 14:50 Footkerchief Summary Moody dwarfs unable to use claimed workshops outside of assigned burrows but still haul items from stock piles in their burrow => Moody dwarves claim workshops outside their burrow, bring infinite number of items, never start construction
2010-04-27 14:50 Footkerchief Tag Attached: planepacked
2010-04-27 14:51 Footkerchief Summary Moody dwarves claim workshops outside their burrow, bring infinite number of items, never start construction => Moody dwarves claim workshops outside their burrow, haul infinite number of items, never start construction
2010-05-23 00:24 Mazka Note Added: 0007214
2010-07-08 06:06 Footkerchief Relationship added has duplicate 0002565
2010-07-08 06:07 Footkerchief Relationship added has duplicate 0002569
2010-07-08 06:07 Footkerchief Relationship added related to 0001084
2010-07-17 15:48 Khym Chanur Issue Monitored: Khym Chanur
2011-02-05 17:34 Logical2u Relationship added has duplicate 0003761
2011-02-05 17:34 Logical2u Relationship added has duplicate 0003343
2011-02-05 17:34 Logical2u Relationship added has duplicate 0001587
2011-02-05 17:34 Logical2u Issue Monitored: Footkerchief
2011-10-27 01:25 Kogut Tag Attached: burrow
2012-05-17 08:38 ag Note Added: 0022570
2012-05-17 08:39 ag Note Edited: 0022570 View Revisions
2012-05-17 08:39 ag Note Edited: 0022570 View Revisions
2012-05-17 08:39 ag Note Edited: 0022570 View Revisions
2012-05-17 23:06 ag Issue Monitored: ag
2012-05-27 17:26 Quietust Note Added: 0022748
2012-05-27 20:41 ag Note Added: 0022750
2014-01-27 13:31 Footkerchief Tag Attached: binary patch
2014-03-25 13:27 Dwarfu Assigned To => Dwarfu
2014-03-25 13:27 Dwarfu Status new => acknowledged
2014-08-02 11:33 Dwarfu Status acknowledged => confirmed
2014-08-18 13:57 Kanddak Note Added: 0029254
2014-08-18 14:09 Talvieno Issue Monitored: Talvieno
2014-08-18 14:11 Kanddak Note Edited: 0029254 View Revisions
2014-12-31 13:08 Toady One Status confirmed => resolved
2014-12-31 13:08 Toady One Fixed in Version => Next Version
2014-12-31 13:08 Toady One Resolution open => fixed
2014-12-31 13:08 Toady One Assigned To Dwarfu => Toady One


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker