0.44.05-r2
Installation instructions
Please use Update 1 instead. 0.44.05-r2 does not work correctly on Linux or Mac OS X.
Changes since the previous version
DFHack compatibility
df-ai makes a lot of assumptions about Dwarf Fortress's behavior, but some of those assumptions can be incorrect when other DFHack plugins or scripts are enabled. This update fixes many of the most common incompatibilities.
- Unexpected DFHack viewscreens are now logged, just like unexpected Dwarf Fortress viewscreens.
fix/merchants
- Fixed a soft lock when a guild representative arrives at the trade depot. (#39)warn-starving
- Fixed a soft lock when this script was run while a dwarf or a visitor was starving or dehydrated. (#37)gui/extended-status
- Fixed a soft lock when updating stocks (if JSON events are enabled), or when convicting a dwarf of a crime. (#37)gui/load-screen
- Fixed a soft lock when embarking. (#41)
Exclusive mode
Exclusive mode allows df-ai to show what it is doing by pressing at most one key per frame.
- Game over state is detected and handled during exclusive mode contexts.
- Exclusive mode contexts can now be queued to run as soon as possible instead of only one exclusive context being allowed at a time.
- Fixed an edge case where exclusive mode could exit early.
- Embarking now detects and handles some DFHack viewscreens. See the DFHack compatibility section for details.
- Manager orders are now entered in exclusive mode.
- The AI can enter some orders that aren't normally able to be entered through this interface. For example, engraving slabs is not usually possible through manager orders. However, cheating here is a lot easier than implementing a separate job management system just for slabs, and doesn't significantly change gameplay or make it less difficult.
- The list of manager orders is filtered by entering the first word of the order, or in the case of some common words, a later word, before selecting it. Care has been taken to handle cases like slabbing where non-ASCII characters may be in the first word.
- See the Military management section for more changes related to exclusive mode.
Lockstep improvements
Lockstep mode has had some stability improvements and should crash or hang much less often. In addition, disabling lockstep mode is now possible without restarting the game.
- Lockstep mode no longer takes over if the intro video is playing.
- Lockstep mode will stop recording a CMV when entered or exited.
- It will immediately start a new recording if
record_movie
is enabled indfhack-config/df-ai.json
. - The first CMV recorded in a lockstep-enabled session includes the console output.
- A CMV that is recording when lockstep mode exits is no longer corrupted.
- It will immediately start a new recording if
unload df-ai
anddisable df-ai
no longer happen immediately if lockstep mode is enabled. Lockstep mode will shut down before the plugin is unloaded or disabled.disable df-ai
while in lockstep mode will automatically try again after lockstep mode exits.- There should no longer be a crash when exiting the game during lockstep mode, such as when
no_quit
is set to false. - CMV files produced in lockstep mode do not contain a sound header, so they are about 12 kilobytes smaller per file. The limit per file remains at around 5 megabytes.
Military management
Military management has always been a weak point of df-ai. This update improves the handling of some situations where a fortress could die slowly if nothing was done to change the status quo.
- Citizens will be dismissed from the military if there are fewer than 1 civilian for every 3 soldiers.
- This mirrors the already-existing rule to draft new soldiers so that there is at least 1 soldier for every 3 civilians.
- Soldiers with more total skill experience will be dismissed before soldiers with less experience overall, which also mirrors the logic used to draft new soldiers.
- Squad leaders with subordinates and non-citizen residents are never dismissed from the military.
- Mercenaries recruited through the tavern are now drafted into the military as soon as possible.
- Soldier management now uses an exclusive context:
- If a squad has space for a soldier, they are added to the squad's first available slot.
- New squads will be created in this order: ranged, melee, melee.
- If an appropriate uniform does not exist, one will be created. The AI uses metal armor and a shield for both melee and ranged squads.
- Squad kill orders now use an exclusive context and should no longer disappear when there is an incompatibility between df-ai's logic and Dwarf Fortress's logic.
- Squad kill orders now report a reason for being added or removed in the log.
Blueprint/Plan
A small change was made to the blueprint system to improve the speed of the initial setup of fortresses.
- The
dig_immediate
mode now pauses all other build queues until digging is completed in addition to not waiting in the queue itself. - The default legacy plan now builds five rooms before any of the living space such as bedrooms and dining rooms:
- Masons' workshop
- Carpenters' workshop
- Farm plot (food)
- Farm plot (cloth)
- Garbage dump