0.43.05-r2
Installation instructions
- Download and extract Dwarf Fortress 0.43.05.
Windows (32-bit) - Linux (32-bit) - Mac OS X (32-bit) - Install DFHack 0.43.05-r2.
- Place the
df-ai.plug.*
file inhack/plugins
. - Enter
enable df-ai
into the DFHack console.
Changes since the previous version
Lockstep Mode
Lockstep mode replaces the entire event loop of Dwarf Fortress, making Dwarf Fortress run inside df-ai instead of the other way around. This allows df-ai to make the game think it's running at the default frame rate regardless of how fast the game is actually running, and add information about what the AI is thinking to the recorded CMV files.
- Enable or disable lockstep mode at any time using
ai enable lockstep
orai disable lockstep
. - Lockstep mode is saved in
df-ai-config.json
, so it can also be toggled in that file if Dwarf Fortress is not running. - Dwarf Fortress will ignore all input while lockstep mode is active, but DFHack commands will work normally.
- Lockstep mode does not work with
[PRINT_MODE:TEXT]
, so Linux and Mac users that want headless df-ai will need Xvfb or a similar program and[PRINT_MODE:2D]
. - Lockstep mode modifies code in memory when it is enabled or disabled, so there is a risk of crashing Dwarf Fortress. However, there should not be any higher risk of crashing when not in the middle of toggling lockstep mode.
- Lockstep mode pretends to run at 100 simulation frames per second.
- Lockstep mode pretends to run at 50 graphical frames per second during gameplay and 100 graphical frames per second when menus are open.
- I say "pretends" because lockstep mode will run as fast as the resources given to Dwarf Fortress will allow it to run.
- If a CMV is already being recorded when lockstep mode is enabled, the console will not be displayed. To avoid this, restart Dwarf Fortress after enabling lockstep, or enable lockstep in
df-ai-config.json
before starting Dwarf Fortress.
Trading
df-ai now attempts to trade with merchants! Currently, the goods offered and requested are from a hard-coded list, but this may be extended in the future. This is also the first use of the "exclusive" mode in df-ai, where the AI can stop everything it's doing to focus on menus. Watch it in action!
- When a caravan arrives, dwarves are ordered to bring all prepared meals and food storage containers containing exclusively prepared meals to the depot.
- The broker is tracked, and if they are taking too long to arrive, other dwarves will be requested instead.
- If the trade goods take too long to arrive at the depot, trading will happen before all the goods have arrived.
- The dwarves will trade for (in order, from "need" to "would be nice to have"):
- Logs
- Anvils (only if none are available and a forge is waiting to be built)
- Books and other items containing writing
- Musical instruments
- The rest:
- Boulders
- Bars (metal, ash, soap, etc.)
- Cloth
- Leather
- Thread
- Cooking ingredients
- The AI does not attempt to handle modded worlds where multiple civilizations can arrive during the same season to trade. In this case, some caravans may be ignored, depending on the timing of arrival and departure.
- The AI will attempt to please civilizations opposed to plant murder, but wood products such as soap, certain types of glass, and decorations are not handled.
- Civilizations opposed to animal murder are also handled, but this has no effect in unmodded worlds.
- The AI will attempt to give the trader a good deal, starting with offering at least 110% of the requested value, and adding offerings or removing requests each time the trade is declined. Counter-offers are accepted immediately.
Fortress Layout
This update fixes several bugs that could ruin or halt the progress of a fortress. Steps have been taken to streamline the fortress building process and to make the AI more efficient.
- Fixed some cases where the AI would try to dig a room that was not connected to any room the dwarves could access and get stuck.
- The AI will no longer attempt to patch the floors it removed from the well.
- Room, furniture, and item types are now identified internally by numbers instead of text. This will make the AI faster as well as reduce the chance of bugs related to typos.
- Farms can now be built in places with trees or shrubs. The plants will be removed before the farm is built.
- Furniture-related tasks have been split into a separate queue, so having a large migrant wave no longer slows down workshop building by requesting a large amount of furniture.
- Claimed bedrooms, noble rooms, rooms being built while idle, and cavern exploration no longer count towards the limits of other room types being built.
- Rooms that are planned but not yet ready to be dug are highlighted in blue instead of yellow.
- Room priority has been modified. For example, the trade depot will now be built much earlier and the library and temple will be built much later.
- Certain rooms will be smoothed and then engraved when the AI is idle.
- Walls will no longer be smoothed if they are to be removed later.
- The dwarves will keep the pitting tower free of trees and other objects that could break the fall of its victims.
- Added an additional level below the fortress for food storage.
- The trade depot now has ramps on the eastern side if it is to the east of the fort entrance.
- Fixed some cases where aqueduct tunnels would not line up, causing flooding and death.
- Custom workshops and furnaces can now be built if you edit the floorplan manually.
Other Changes
- The camera position will be saved in more situations, most noticeably when migrants arrive.
- AI camera control can now be enabled and disabled while the game is running with
ai enable camera
andai disable camera
. - The AI no longer freezes when the outpost liaison greets a land-holding dwarf.
- Unpausing now happens after a specific number of frames, not an amount of real time.
- The AI is less interested in watching people sleep.
- Dwarves will now remove clothing from goblins even if they are outside.
- The embark information screens will now be displayed before confirming the embark location.
- Immigrant mothers will still drop their babies on the floor, but now they'll go back to pick them up. (See Dwarf Fortress bug 0005551.)
- Book bindings will be made, and library books will now be bound.
- Toys will be made for the children to play with.
- Above-ground farm plots will now consider biome when deciding what plants to grow.