Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0011808Dwarf FortressDwarf Mode -- Militarypublic2021-09-23 17:562021-10-08 18:12
Desktop (DF Classic)Windows 8.1
0011808: Captured dwarves rescued by conquering become stuck as "Prisoner" profession, can't be enlisted in military
When you conquer a site holding prisoners from your fortress, they are still listed as prisoners when viewing the captured site in the Civilizations screen, and in the missing people menu. They also appear in the "Request Workers" menu, allowing you to bring them back to your fortress. However, upon return, the dwarfs have the job title "Prisoner" and cannot be (re)enlisted in the military. They seem to behave normally otherwise.

I have provided saves from both before conquering the site, and after conquering and recalling the prisoners back to my fort (both in the same zip): https://dffd.bay12games.com/file.php?id=15679 [^]

While this is reproducible in my save, I have not tested it in another world. If this doesn't happen elsewhere, it may involve the fact that the conquered fort in question was a lone fort without a parent civilization. (Mission reports call it "an unknown civilization", and its symbol doesn't appear elsewhere on the world map.)
In general:
1. Get some of your military captured on a mission
2. Conquer the site
3. Request that the prisoners return to your fortress

Using my save:
1. Load "before_conquer" save file
2. Conquer the site "Ivorycolor" just to the northwest of my fortress, which already has 27 prisoners. I accomplished this by enlisting a large civilian army and demanding surrender, since they have captured my best military dwarfs.
3. Once conquered, the site will still list my dwarfs as prisoners, but they appear in the Request Workers list. Requesting the entire list results in the occupying force returning normally, and the imprisoned dwarfs returning with the "Prisoner" profession and inability to join the military.
Likely unrelated, but the ninth dwarf in the Copper Spikes squad always remains in the military squad when sent to occupy the site, permanently listed as "traveling". When returning with the other requested dwarfs, they maintain their assignment.
No tags attached.
Issue History
2021-09-23 17:56sbotNew Issue
2021-09-23 23:48sbotNote Added: 0041154
2021-10-08 18:12sbotNote Added: 0041161
2021-10-08 18:13sbotNote Edited: 0041161bug_revision_view_page.php?bugnote_id=0041161#r16753

2021-09-23 23:48   
I did some more investigating and have some additional information.

- The "prisoner" dwarves actually have "is a prisoner of The Teal Tenacity" in their bio, in the dark blue section where their memberships are.

- I downloaded DFHack (*after* posting this bug report, I had never used it prior) and used the gui/gm-editor command to see if there was a prisoner flag or something I could change to get the dwarves enlistable again. In the dwarf's historical_figure entity, under "entity_links", all of the glitched dwarves have a "histfig_entity_link_prisonerst" entry. Erasing this entry seems to immediately return the dwarves to normal.

I have not played on yet to see if this corrupts the save or breaks something else, but if anyone else's legendary military is forced into "retirement" by this glitch it might be worth a try.
2021-10-08 18:12   
(edited on: 2021-10-08 18:13)
I have continued playing the save which I fixed using DFHack for several in-game years, and have encountered no crashes or other weirdness since, with one unrelated exception. The procedure I described in my previous note seems to be a safe way to recover a save if anyone else runs into it (but backup your save first!)
The dwarf stuck in their squad that I mentioned in the Additional Information section could not be removed from that squad, and even became assigned to two squads when I tried moving them to another one. With or without the DFHack fix for the prisoners, the game eventually crashes (the length of time varies up to about a half hour for me) unless the squad is deleted. I am guessing that this is unrelated to the prisoner thing, and possibly an example of bug https://www.bay12games.com/dwarves/mantisbt/view.php?id=11759 [^] or https://www.bay12games.com/dwarves/mantisbt/view.php?id=10369. [^]