DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.84k stars 463 forks source link

`makeown` should clear `enemy.army_controller_id` #4753

Open ab9rf opened 4 days ago

ab9rf commented 4 days ago

Based on this comment on discord, I did some code searches in 50.13 and discovered that, in at least some situations, when a unit is joined to a site its army_controller_id is set to -1 to indicate that it is no longer a part of an "army". makeown should probably do this. This appears to affect hostility determinations, based on other observations made in discord.

It may also be necessary to remove the unit and the unit's histfig from the army itself; whether this is needed requires further research.

Crystalwarrior commented 4 days ago

Further research should also be done on what would get the "Expel" button to appear, because it appeared for intelligent wilderness creatures I makeown-ed, but not the goblin snatchers.