v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Quietust"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(→‎DFRawFunctions: add link to sources)
 
(169 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==About==
 
==About==
He's just this guy, you know?
+
Not your average Dwarf Fortress player, is interested in reverse-engineering the game in order to figure out ''exactly'' how things work. Has nearly completely documented disassemblies of versions 0.23.130.23a, 0.28.181.40d, and 0.31.25 (and is planning to do the same for 0.34.11, 0.47.05, and possibly additional versions in between), and has managed to locate (and fix) multiple bugs that still exist in the currently released version. Is a member of the DFHack development team and can be found on the DFHack Discord server as well as in the Bay 12 Forums.
  
==DFRawFunctions==
+
==Wiki Modifications==
'''DFRawFunctions''' is a MediaWiki extension designed for parsing Dwarf Fortress raws. The following parser functions are defined:
+
===Namespace Links===
* <nowiki>{{#df_raw:data|object|id|notfound}}</nowiki> - Searches through a raw file and returns raws for a specific object
+
This wiki previously made use of a [https://www.qmtpro.com/~quietust/misc/ns_link-1.17.0.diff MediaWiki patch] to automatically direct links from particular namespaces to other specific namespaces unless indicated otherwise - in this case, links in the "DF2012" and "DF2012 Talk" namespaces automatically pointed to "DF2012", "v0.31" and "v0.31 Talk" pointed to "v0.31", "40d" and "40d Talk" pointed to "40d", and "23a" and "23a Talk" pointed to "23a". This functionality has since been converted into an [https://github.com/DF-Wiki/NamespaceLinks extension].
**data - Usually the entire contents of a Dwarf Fortress raw.txt file
+
 
**object - The object type to search for.
+
===DFRawFunctions===
**id - The ID of the object you are searching for. Objects begin with "[object:id]" (e.g. [INORGANIC:SANDSTONE] or [CREATURE:DWARF])
+
'''DFRawFunctions''' is a MediaWiki extension designed for parsing Dwarf Fortress raws. Sources and documentation can be found [https://github.com/quietust/DFRawFunctions here].
**notfound - The string to be returned if the specified entity could not be located.
 
* <nowiki>{{#df_tag:data|type|offset|entry}}</nowiki> - Checks if a particular tag exists, optionally with a specific token at a specific offset. Returns 1 if found, otherwise returns nothing.
 
**data - The raws for a single object.
 
**type - The tag type you are searching for.
 
**offset - Optional, specifies an offset to check for a specific value.
 
**entry - Optional, specifies the actual value to look for at the above offset.
 
* <nowiki>{{#df_tagentry:data|type|offset|notfound|matches...}}</nowiki> - Finds the first tag of the specified type, with any number of specific tokens at specific offsets, and returns the token at the specified offset.
 
**data - The raws for a single object.
 
**type - The tag type you are searching for.
 
**offset - The offset of the token to be returned. Specify a pair of numbers, separated by colons, to return multiple tokens, also separated by colons.
 
**notfound - The string to be returned if the specified entity could not be located.
 
**matches - Zero or more match conditions. Match conditions are of the format "offset:value". Only the first tag which satisfies all match conditions will be returned.
 
* <nowiki>{{#df_tagvalue:data|type|notfound}}</nowiki> - Finds the first tag of the specified type and returns all of its values, separated by colons.
 
**data - The raws for a single object.
 
**type - The tag type you are searching for.
 
**notfound - The string to be returned if the specified entity could not be located.
 
* <nowiki>{{#df_foreachtag:data|type|string}}</nowiki> - Iterates across all tags of the specified type and outputs a string for each one
 
**data - The raws for a single object.
 
**type - The tag type you are searching for.
 
**string - A format string into which token values can be substituted using \1, \2, ..., \9. The first parameter is the tag name itself.
 
* <nowiki>{{#df_foreachtoken:data|offset|group|string}}</nowiki> - Iterates across a set of tokens in specific groups and outputs a string for each one
 
**data - A colon-separated list of values, usually the output from <nowiki>{{#df_tagvalue:...}}</nowiki>
 
**offset - How many tokens to ignore from the beginning of the list.
 
**group - How many tokens should be parsed at once.
 
**string - A format string into which token values can be substituted using \1, \2, ..., \9.
 
* <nowiki>{{#df_makelist:data|object|string|extracts...}}</nowiki> - Iterates across all objects in a single raw file and outputs a string for each one
 
**data - Usually the entire contents of a Dwarf Fortress raw.txt file
 
**object - The object type to iterate across.
 
**string - A format string into which values can be substituted using \1, \2, ..., \9.
 
**extracts - Zero or more token extraction parameters. Extraction parameters are of the format "type:offset:checkoffset:checkvalue", where the first matching tag of "type" will return the token at "offset" if the token at "checkoffset" has the value "checkvalue". If "checkoffset" is set to -1, the checkvalue is ignored.
 
***For material definitions, the format "STATE:type:state" can also be used, where "type" and "state" are fed into <nowiki>{{#df_statedesc:...}}</nowiki> below.
 
***The order in which the extraction parameters are defined will determine the substitution values used - the first will use \1, the second will use \2, etc.
 
* <nowiki>{{#df_statedesc:data|type|state}}</nowiki> - Parses a material definition and returns the name for a particular state.
 
**data - The raws for a single material.
 
**type - Either NAME or ADJ, to specify whether the noun or adjective form should be returned
 
**state - The state type whose name should be returned. Valid values are SOLID, POWDER, PASTE, PRESSED, LIQUID, and GAS.
 
* <nowiki>{{#mreplace:data|from|to|from|to|...}}</nowiki> - Performs multiple simple string replacements on the data specified.
 
* <nowiki>{{#delay:data}}</nowiki> - Returns "<nowiki>{{data}}</nowiki>", intended for delayed evaluation of templates and parser functions when used with <nowiki>{{#df_foreachtag}}</nowiki>, <nowiki>{{#df_foreachtoken}}</nowiki>, and <nowiki>{{#df_makelist}}</nowiki>.
 
* <nowiki>{{#eval:data}}</nowiki> - Evaluates all parser functions and template calls in the specified data. Intended for usage with <nowiki>{{#df_foreachtag}}</nowiki>, <nowiki>{{#df_foreachtoken}}</nowiki>, and <nowiki>{{#df_makelist}}</nowiki>.
 
Sources for DFRawFunctions can be found [http://www.qmtpro.com/~quietust/DFRawFunctions.txt here].
 
  
 
==Fortresses==
 
==Fortresses==
Line 54: Line 14:
 
* Tathtakunib, [http://mkv25.net/dfma/map-7349-wasprag Wasprag] - First megaproject as monument (23 Z-level clear glass pyramid filled with magma), tower-cap farm, [[giant cave spider]] silk farm, automatic obsidian factory implementation (see below).
 
* Tathtakunib, [http://mkv25.net/dfma/map-7349-wasprag Wasprag] - First megaproject as monument (23 Z-level clear glass pyramid filled with magma), tower-cap farm, [[giant cave spider]] silk farm, automatic obsidian factory implementation (see below).
 
* Naniratîs, [http://mkv25.net/dfma/map-7538-rhymestakes Rhymestakes] - First megaproject as actual fortress (47x47x16 cast obsidian tower), complete with self-destruct button.
 
* Naniratîs, [http://mkv25.net/dfma/map-7538-rhymestakes Rhymestakes] - First megaproject as actual fortress (47x47x16 cast obsidian tower), complete with self-destruct button.
 +
 +
===v0.23.130.23a===
 +
* Rigothral, Craftsilvers - First retro-fortress, included a magma flooding device.
 +
* Ceroltishak, Lenstyphoon - Second retro-fortress, used raws with all 40d creatures and plants imported.
  
 
===v0.31===
 
===v0.31===
Line 64: Line 28:
  
 
==Projects==
 
==Projects==
===Dwarf Manipulator===
+
===Dwarf Fortress 0.28.181.40d===
Just like Dwarf Therapist, but using a text-based interface (based on [http://www.bay12forums.com/smf/index.php?topic=53113.0 Valdemar's prototype]), and it's for Dwarf Fortress [[23a:Main Page|v0.23.130.23a]]. The only other tool available, Dwarf Foreman, was incapable of assigning labors for individual dwarves unless you gave each dwarf its own custom profession. Download [http://dffd.wimbli.com/file.php?id=2248 here].
+
Version [[40d:Main Page|0.28.181.40d]] was the last 3D release prior to the materials rewrite, and the last version to include the dwarven economy and several other features.
 +
 
 +
====EXE Patches====
 +
A few hex-edits to the game's executable to alter its behavior in beneficial ways and/or fix bugs. These are only for version 0.28.181.40d, '''NOT''' any of Baughn's OpenGL-optimized versions (such as 40d19).
 +
=====Bugfixes=====
 +
*Armorsmith strange moods incorrectly produce helmets using SHOES item type
 +
**0x2406B0 : 1A -> 1C
 +
**0x2406D6 : 1A -> 1C
 +
*Skilled siege engine operators fail to aim straight{{bug|6483}}
 +
**0x34301A : 4D 20 8B 55 24 8B 7D 1C 89 4C 24 2C 89 54 24 40 -> 4C 24 2C 8B 54 24 40 89 4D 20 89 55 24 89 7D 1C
 +
*Diplomats and Merchant Nobles don't bring bodyguards{{bug|5854}}
 +
**0x36C71A : 15 -> 08
 +
**0x36C724 : 85 -> 84
 +
**0x36D462 : 0E -> 08
 +
**0x36D46C : 85 -> 84
 +
*Invading thieves and lashers don't get upgraded equipment{{bug|3681}}
 +
**0x46D95C : 15 -> 1F
 +
**0x46D962 : 14 DB -> 33 DA
 +
**0x46D9C9 : 27 -> 26
 +
**0x46D9D0 : 8B CA 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 10 A3 0B 00 8B 4E 04 8B 14 B9 66 83 3A 28 0F 84 9B 00 00 00 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 EB A2 0B 00 8B 46 04 8B 0C B8 66 83 39 2A 74 7A 8B C8 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 C8 A2 0B 00 8B 56 04 8B 04 BA 66 83 38 2B 74 57 8B CA 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 A5 A2 0B 00 8B -> 66 83 38 27 0F 84 B8 00 00 00 66 83 38 28 0F 84 AE 00 00 00 66 83 38 29 0F 84 A4 00 00 00 66 83 38 2A 0F 84 9A 00 00 00 66 83 38 2B 0F 84 90 00 00 00 66 83 38 2C 0F 84 86 00 00 00 66 83 38 2D 0F 84 7C 00 00 00 66 83 38 33 74 76 66 83 38 34 74 70 66 83 38 35 74 6A 66 83 38 36 74 64 E9 A0 00 00 00 00 03 01 03 01 03 01 03 01 03 01 03 01 03 01 03 01 03 01 03 01 02 03 03 01 03 03 02 02 03 03 01
 +
*Temperature safety checks broken{{bug|4573}}
 +
**0x50549A : 62 DF -> 42 E0
 +
**0x5054A4 : C7 -> CF
 +
**0x5054A6 : 56 DF FD FF -> 8C 00 00 00
 +
**0x5054C2 : 3A DF -> 9A DD
 +
**0x5054D2 : 2A DF -> 7A DE
 +
**0x505536 = B8 10 F8 56 01 E9 50 E1 FD FF
 +
*Sheriff doesn't get unhappy thoughts from insufficient jails{{bug|5844}}
 +
**0x3544C2 : 74 -> 75
 +
*Mayor and Sheriff don't get unhappy thoughts from insufficient fortress guards{{bug|5844}}
 +
**0x354372 : 84 -> 85
 +
*Baron doesn't get unhappy thoughts from insufficient royal guards{{bug|5844}}
 +
**0x3541EB : 84 -> 85
 +
*Siegers try and fail to renew campfires{{bug|6482}}
 +
**0x1800D7 : E8 A4 8D F1 FF 8B 10 -> 66 8B 5C 24 18 89 C2
 +
*Vermin fish in aquariums cancel updates of remaining vermin{{bug|6116}}
 +
**0x23BD2F : 19 -> 08
 +
*Art images of creatures are not valued properly by civilizations{{bug|6440}}
 +
**0x3032DC : 4E -> 49
 +
*Pikemasters are given skill levels in Axe instead of Pike{{bug|3273}}
 +
**0x273E0 : 27 -> 33
 +
*Failed merchant visits do not save their results correctly in history
 +
**0x3778D8 : 10 -> 28
 +
**0x3778DE : 0C -> 24
 +
**0x3778EB : 10 -> 28
 +
**0x3778F1 : 0C -> 24
 +
**0x377900 : 10 -> 28
 +
**0x377906 : 0C -> 24
 +
**0x377915 : 10 -> 28
 +
**0x37791B : 0C -> 24
 +
**0x37792F : 10 -> 28
 +
**0x377935 : 0C -> 24
 +
*Placing designations causes things to happen in the background{{bug|1697}}
 +
**0x111E9F : F6 -> C0
 +
*Human civilizations always send Guild Representatives, never Merchant Barons/Princes
 +
**0x357740 : 57 -> 56
 +
*[[40d:Magma flow|Magma flow]] tiles at the bottom of [[40d:magma pipe|magma pipe]]s don't animate like they did in older versions
 +
**0x503630 : 0F 94 C1 -> 90 89 F1
 +
*Dead shrubs render with the "live shrub" tile
 +
**0x503866 : 88 -> 89
 +
*All crops reported as unplantable at the end of Winter{{bug|7747}}
 +
**0x59719 : 3C 03 7D 0A -> FE C0 24 03
 +
**0x59723 : 0D -> 0C
 +
 
 +
=====Improvements=====
 +
*Allow fortress mode attacks from Semi-megabeasts as well as full Megabeasts
 +
**0x372040 : 0F -> 10
 +
**0x372049 : 8A 42 0F C0 E8 07 3A C3 -> 66 8B 42 0F 66 A9 80 01
 +
*Prevent soldiers from becoming Champions, instead staying as Elite Soldiers as they do in later versions
 +
**0x46AFC9 : 0F 84 -> 90 E9
 +
*Make Herbalists drop gathered shrubs on the ground (instead of hauling them back to a stockpile)
 +
**0x4728AA : FF 6A FF 6A 00 55 -> 01 90 90 90 8B CD
 +
**0x4728B3 : 39 C1 -> 99 C3
 +
*Make Farmers drop gathered crops on the farm plot (instead of hauling them back to a stockpile)
 +
**0x346060 : FF 6A FF 6A 00 53 -> 01 90 90 90 8B CB
 +
**0x346069 : 83 89 -> E3 8B
 +
*Make the "Dwarves Stay Inside" order check for "Inside" tiles rather than "Subterranean" ones
 +
**0x1E6881 : 80 00 -> 00 01
 +
**0x1E6885 : 84 -> 85
 +
**0x1E7E8C : 80 00 -> 00 01
 +
**0x1E7E8F : 75 -> 74
 +
**0x2FC4B7 : 80 00 -> 00 01
 +
**0x2FC4BA : 75 -> 74
 +
**0x4BA08C : 80 00 -> 00 01
 +
**0x4BA08F : 75 -> 74
 +
**0x4BA14C : 80 00 -> 00 01
 +
**0x4BA14F : 74 -> 75
 +
**0x4E2C70 : 80 00 -> 00 01
 +
**0x4E2C73 : 74 -> 75
 +
 
 +
====DFHack-40d====
 +
A port of modern DFHack for Dwarf Fortress version 0.28.181.40d ('''NOT''' any of Baughn's OpenGL-optimized versions, such as 40d19), including most of the common (and meaningful) DFHack plugins along with Lua scripting. Not yet complete, but sources can be found [https://github.com/quietust/dfhack-40d/ here] if you want to play around with it.
 +
 
 +
Note that this version does '''not''' load automatically on startup - instead, you must run a separate "dfhack.exe" loader to load the DLL and inject the necessary hooks.
 +
 
 +
However, the following binary patches can be applied in order to make DFHack load automatically on startup:
 +
* 0x118CF1: FB 74 0C -> 37 52 45
 +
* 0x118F47: 05 FB 19 -> 60 50 45
 +
* 0x11905D: 4F 36 00 -> 85 4F 45
 +
* 0x259027: 33 DB 38 1D 44 -> E9 98 4F 31 00
 +
* 0x56DF2C: 00 00 00 ... 00 00 00 ->
 +
<nowiki>                                              53 56 68 B8
 +
          AF 9F 00 FF 15 A0 E0 96  00 85 C0 74 6A 89 C6 6A
 +
          0C E8 DA 9D FB FF 83 C4  04 85 C0 74 5A 89 C3 68
 +
          D0 AF 9F 00 56 FF 15 70  E1 96 00 89 03 68 E0 AF
 +
          9F 00 56 FF 15 70 E1 96  00 89 43 04 68 F0 AF 9F
 +
          00 56 FF 15 70 E1 96 00  89 43 08 68 C4 AF 9F 00
 +
          56 FF 15 70 E1 96 00 85  C0 74 06 FF D0 84 C0 74
 +
          0D 89 1D 0C CB 9F 00 5E  5B E9 52 22 C7 FF 53 E8
 +
          BE 9A FB FF 83 C4 04 31  DB EB E6 53 8B 1D 0C CB
 +
          9F 00 85 DB 74 08 8B 03  85 C0 74 02 FF D0 5B E9
 +
          8C AA D4 FF 51 8B 1D 0C  CB 9F 00 85 DB 74 09 8B
 +
          43 04 85 C0 74 02 FF D0  59 31 DB 38 1D 44 72 78
 +
          01 E9 49 B0 CE FF 53 8B  1D 0C CB 9F 00 85 DB 74
 +
          09 8B 43 08 85 C0 74 02  FF D0 5B E9 B0 E6 BA FF</nowiki>
 +
* 0x5FAFB8: 00 00 00 ... 00 00 00 ->
 +
<nowiki>                                  64 66 68 61 63 6B 2E 64
 +
          6C 6C 00 00 64 66 68 61  63 6B 49 6E 69 74 00 00
 +
          64 66 68 61 63 6B 55 70  64 61 74 65 00 00 00 00
 +
          64 66 68 61 63 6B 52 65  6E 64 65 72 00 00 00 00
 +
          64 66 68 61 63 6B 55 6E  6C 6F 61 64</nowiki>
 +
 
 +
===Dwarf Fortress 0.23.130.23a===
 +
Version [[23a:Main Page|0.23.130.23a]] was quite different from the game as it exists today - it lacked many of the features present in the game today, but it had numerous gameplay elements that have since been discarded.
 +
 
 +
====Utilities====
 +
* [http://dffd.wimbli.com/file.php?id=2248 Dwarf Manipulator] - the predecessor of the well-known DFHack plugin (based on [http://www.bay12forums.com/smf/index.php?topic=53113.0 Valdemar's prototype]), implemented as a standalone console application specifically for 23a. The only other tool available, Dwarf Foreman, was incapable of assigning labors for individual dwarves unless you gave each dwarf its own custom profession. Also available within DFHack-23a.
 +
* [http://dffd.wimbli.com/file.php?id=2380 2D Forbidder] - a tool which allows manually forbidding/reclaiming, chasming, or melting the currently viewed item, almost just like in the 3D version. Also incorporated into DFHack-23a.
 +
* [http://dffd.wimbli.com/file.php?id=2848 2D Autoforbid] - a tool which automatically forbids items carried in the inventories of foreign units.
 +
 
 +
====EXE Patches====
 +
A few hex-edits to the game's executable to alter its behavior in beneficial ways and/or fix bugs. All of these patches are available in the [https://github.com/quietust/dfhack-23a/tree/master/patches DFHack-23a repository] (though some are grouped together in the same files) and can be applied with the standard DFHack "binpatch.exe" utility:
 +
=====Bugfixes=====
 +
*Artifact holders never drop/hide their artifacts
 +
**0x14079B : 8A -> 8B
 +
**0x1407A1 : B0 FE C2 04 00 90 90 90 -> B8 FE FF FF FF C2 04 00
 +
**0x0B5430 : B0 FE C2 04 00 90 90 90 -> B8 FE FF FF FF C2 04 00
 +
**0x15E23D : C0 FE C2 04 00 90 90 90 -> E0 01 83 C0 FE C2 04 00
 +
**0x1E8015 : 0F BE C0 -> 90 90 90
 +
*Sheriff doesn't get unhappy thoughts from insufficient jails {{bug|5844}}
 +
**0x2344E2 : 74 -> 75
 +
*Mayor and Sheriff don't get unhappy thoughts from insufficient fortress guards {{bug|5844}}
 +
**0x23448B : 74 -> 75
 +
*Baron doesn't get unhappy thoughts from insufficient royal guards {{bug|5844}}
 +
**0x234425 : 84 -> 85
 +
*Nobles don't get thoughts about tomb quality {{bug|5843}}
 +
**0x2AF633 : 54 -> 60
 +
**0x2BCEF3 : 8B 54 24 3C 8B F0 -> 90 E9 61 17 09 00
 +
**0x34E65A = 8B 94 24 70 01 00 00 89 C6 E9 91 E8 F6 FF
 +
*Waterfall Z-coordinates are uninitialized, may not generate mist properly. Must generate new fortress for this to take effect.
 +
**0x28A90E : 66 -> 90
 +
*[000107] Dwarves wandering near magma furnaces stop on magma flow tiles and get stuck (a.k.a. "[[Boatmurdered|Sankis]] has suddenly decided to try and drink out of the lava river"). Must rebuild furnaces for fix to take effect.
 +
**0x016EF0 : A5 6E 41 -> 68 E6 74
 +
**0x34E668 = 83 7C 24 18 01 0F 85 A0 85 CC FF 8B 44 24 1C 85 C0 0F 85 94 85 CC FF E9 30 88 CC FF
 +
*[000098] Improved items cannot be used for general jobs
 +
**0x0F6C04 : D7 05 -> 00 00
 +
**0x0F74DC : AB 03 -> 00 00
 +
**0x107C03 : D3 02 -> 00 00
 +
**0x108231 : D0 02 -> 00 00
 +
**0x1087B7 : 17 04 -> 00 00
 +
**0x108EA3 : FD 03 -> 00 00
 +
*Trap components ignore MATERIAL_SIZE for construction, instead always using 2 bars
 +
**0x0F82C1 : 23 -> 05
 +
*[000082, 000093, 000285] Builders get stuck when constructing statues, windows, and wells
 +
**0x0F64D7 : 12 0F 84 52 01 -> 0F 0F 8C 12 00
 +
**0x0F64EB : 84 -> 8E
 +
**0x0F7E9F : 12 0F 84 41 01 -> 0F 0F 8C 12 00
 +
**0x0F7EB3 : 84 -> 8E
 +
*[000901] All artifact gauntlets are right-handed
 +
**0x12DD09 : 01 -> 02
 +
*Vermin fish in aquariums/ponds cancel updates of remaining vermin {{bug|6116}}
 +
**0x169D12 : DD -> D6
 +
**0x169D29 : C6 -> BF
 +
*Vermin can only escape from artifact containers {{bug|6117}}
 +
**0x169B1B : 84 -> 85
 +
*Pregnant dwarves have miscarriages when Hungry instead of when Starving or Dehydrated
 +
**0x2BD3CF : 81 F9 50 C3 00 -> 90 E9 AF 12 09
 +
**0x34E684 = 8B 8D 8C 03 00 00 81 F9 50 C3 00 00 E9 40 ED F6 FF
 +
*Giant cave spider web Z-coordinates are uninitialized, may not appear properly. Must encounter new spiders for this to take effect.
 +
**0x249EDD : BB 10 00 00 00 -> 66 89 6B 20 90
 +
**0x249EE5 : 94 01 00 -> AC 47 10
 +
**0x34E695 = BB 10 00 00 00 E9 DE B9 EF FF
 +
*Art images of creatures are not valued properly by civilizations {{bug|6440}}
 +
**0x1F3FBA : 43 -> 41
 +
*Game crashes at beginning of season if the Mayor has received more than 6 Guild requests {{bug|6449}}
 +
**0x2CB95A : 82 -> 81
 +
*Savage river fish are never selected for region populations
 +
**0x2F74F6 : 45 -> 22
 +
**0x2F7517 : 75 -> EB
 +
*Armorsmith strange moods incorrectly produce helmets using SHOES item type
 +
**0x171ED7 : 0F 95 C0 84 C0 -> BD 1D 00 00 00
 +
*Low-intensity noises override louder ones when sleeping
 +
**0x220839 : 81 -> 89
 +
**0x22083F : 09 78 20 8B 15 EC B3 AC 00 8B 04 B2 8B 80 98 02 00 -> 8B 51 20 66 81 E2 80 01 66 81 FA 80 01 74 0E 8D 40
 +
**0x220853 : 60 -> 61
 +
**0x220857 : A1 EC B3 AC 00 -> 66 09 79 20 90
 +
**0x220876 : 09 68 20 A1 EC B3 AC 00 8B 0C B0 8B 81 -> F7 40 20 80 01 75 10 66 09 68 20 8B 82
 +
*Demands expire too soon
 +
**0x2B45A1 : 8B 4C 24 34 66 8B 54 -> 31 C0 89 42 0C 8B 4C
 +
**0x2B45AC : 51 -> 4A
 +
*Weapons stores in Human towns use armor materials
 +
**0x096EFF : 0E -> 0B
 +
*Metal chests cannot be melted {{bug|2493}}
 +
**0x226817 : E8 44 FD FD FF -> 89 74 24 4C 5E
 +
**0x226894 : E8 87 6F FC FF -> E9 06 7E 12 00
 +
**0x34E69F = 8B 4C 24 48 51 89 D9 E8 B5 7E EB FF E8 70 F1 E9 FF E9 E4 81 ED FF
 +
*[BIOME_ANY_TROPICAL] puts trees in temperate swamps and marshes instead of tropical ones
 +
**0x218D26 : 06 -> 0A
 +
**0x218D64 : 07 -> 0B
 +
**0x218DDC : 08 -> 0D
 +
**0x218E19 : 09 -> 0E
 +
*Human caravans bring mill powders in stacks of 1 instead of 10
 +
**0x25188B : 8B 6F 10 -> B0 0A 90
 +
**0x25188F : 81 CD 00 C0 00 00 -> 66 81 4F 10 00 C0
 +
**0x251897 : 89 6F 10 -> 88 47 3C
 +
*Human caravans bring extracts in stacks of 1 instead of 10
 +
**0x251A6F : 8B 5D 10 56 80 CF C0 -> 80 4D 11 C0 B0 0A 56
 +
**0x251A78 : 89 5D 10 -> 88 45 3C
 +
*Prepared meal values do not take their ingredients into account
 +
**0x35D44C : 90 66 5E -> E0 29 5F
 +
*Some 2D distance calculations incorrectly pass Z-coordinate distance as "mode" flag, potentially causing odd behavior in Adventurer mode
 +
**0x099C4F : 2A D3 -> 31 D2
 +
**0x099D7D : 2A D3 -> 31 D2
 +
**0x0ECA1A : 2A D1 -> 31 D2
 +
**0x0FD472 : 2A D1 -> 31 D2
 +
**0x1023B8 : 2A C8 -> 31 C9
 +
**0x104EC9 : 2A 51 0A -> 31 D2 90
 +
**0x105BD0 : 2A 4A 08 -> 31 C9 90
 +
**0x10714B : 2A 51 1C -> 31 D2 90
 +
**0x2D096F : 2A D0 -> 31 D2
 +
**0x2D0A9D : 2A D3 -> 31 D2
 +
*Pikemasters are given skill levels in Axe instead of Pike{{bug|3273}}
 +
**0x2A5144 : 2A -> 36
 +
*Entity recipes trigger discoveries incorrectly{{bug|6472}}
 +
**0x0C02C7 : 18 -> 08
 +
**0x251E78 : 04 -> 02
 +
**0x251EAB : 08 -> 06
 +
**0x252164 : 04 -> 02
 +
**0x252498 : 9B 21 65 -> B5 E6 74
 +
**0x34E6B5 = 66 8B 45 06 E9 DD 3A F0 FF
 +
*Siegers try and fail to renew campfires{{bug|6482}}
 +
**0x0E4157 : 57 53 56 B9 78 B2 -> 3C 7E 75 09 EB 0F
 +
**0x0E449E : 38 -> 30
 +
*Dwarves get both "old clothing" and "tattered clothing" thoughts when their clothing reaches wear level 2.
 +
**0x2BCC76 : 05 -> 12
 +
**0x2BCC78 : 74 0F EB 1A -> 75 1C 6A 00
 +
**0x2BCC7D : 00 -> FF
 +
**0x2BCC7F : FF 6A 68 8B CD E8 87 32 FF FF -> 69 89 E9 E8 89 32 FF FF EB 0D
 +
**0x2BCC8E : 69 -> 68
 +
*Skilled siege engine operators fail to aim straight{{bug|6483}}
 +
**0x225E20 : 4E 20 8B 56 24 8B 7E 1C 89 4C 24 30 89 54 24 2C -> 4C 24 30 8B 54 24 2C 89 7E 1C 89 4E 20 89 56 24
 +
*Invading thieves and lashers don't get upgraded equipment
 +
**0x2AE329 : 15 -> 1F
 +
**0x2AE341 : 8B 99 34 04 00 00 56 33 FF 33 F6 -> 56 31 FF 31 F6 8B 99 34 04 00 00
 +
**0x2AE36B : 66 3D 2A 00 74 30 66 3D 2B 00 74 2A 66 3D 2D 00 74 24 66 3D 2E 00 74 1E 66 3D 38 00 74 18 66 3D 36 00 74 12 66 3D 2F 00 74 0C 66 3D 30 00 74 06 66 3D 29 00 75 0A -> 0F B7 C0 83 C0 D7 83 F8 10 77 35 31 DB 9A 98 90 E3 6A 00 FF 24 9D 88 E3 6A 00 90 90 90 A1 E3 6A 00 AB E3 6A 00 00 00 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00
 +
**0x2AE3AD : 9E -> 98
 +
**0x2AE3F6 : 90 90 90 90 90 90 90 90 90 90 -> 03 03 01 03 03 02 02 03 03 01
 +
*Some jobs will attempt to use forbidden items
 +
**0x0F6B9D : 04 -> 0C
 +
**0x0F7493 : 04 -> 0C
 +
**0x107BC3 : 04 -> 0C
 +
**0x1081F1 : 04 -> 0C
 +
**0x108771 : 04 -> 0C
 +
*Failed merchant visits do not save their results correctly in history
 +
**0x24EE49 : 10 -> 28
 +
**0x24EE69 : 0C -> 24
 +
**0x24EE82 : 10 -> 28
 +
**0x24EE9E : 0C -> 24
 +
**0x24EEB6 : 10 -> 28
 +
**0x24EED2 : 0C -> 24
 +
**0x24EEEA : 10 -> 28
 +
**0x24EF06 : 0C -> 24
 +
**0x24EF25 : 10 -> 28
 +
**0x24EF41 : 0C -> 24
 +
 
 +
=====Improvements=====
 +
*Disable usage of small-block heap to improve performance - '''REQUIRED''' for DFHack
 +
**0x3A3B04 : F8 03 -> 00 00
 +
*Force serialized heap access - '''REQUIRED''' for DFHack
 +
**0x31E74F : 94 -> 95
 +
*Don't over-allocate memory blocks
 +
**0x31C306 : 0F -> 00
 +
**0x31C309 : F0 -> FF
 +
*Partially disable save file encryption (reduces disk usage while maintaining compatibility)
 +
**0x10CFA9 : E8 A2 52 17 00 68 FF FF FF 7F E8 18 52 17 00 -> 68 C4 09 00 00 6A 00 51 E8 5A 5C 21 00 31 C0
 +
**0x10CFBB : 14 -> 1C
 +
**0x10CFC2 : B8 -> C0
 +
**0x10CFD8 : 10 -> 18
 +
*Display detailed history info in Fortress Mode
 +
**0x313ECA : 8B 54 24 7C -> 66 BA 01 00
 +
**0x3140A4 : 8B 44 24 7C -> 66 B8 01 00
 +
**0x3140D4 : E5 06 -> 00 00
 +
*Raise artifact limit from 18 to 37.
 +
**0x12AA87 : 03 -> 02 (change to 01 for up to 75 artifacts)
 +
*Increase mining success rate for gems and coal - 100% for Legendary miners.
 +
**0x22B3D7 : 02 -> 01
 +
*Disable "Too Deep" ending from mining raw adamantine.
 +
**0x2332D7 : 0F 8E -> 90 E9
 +
*Force nervous artifact holders to always drop their artifacts instead of hiding them or becoming obssessed with them.  Requires the corresponding bugfix above.
 +
**0x0A721F : 0F 84 B1 03 -> 90 E9 22 02
 +
*Potentially allow mechanisms to be made from normal metals (would require further modding with DFHack)
 +
**0x0F82C0 : 22 -> 05
 +
**0x0F835B : 09 -> 00
 +
**0x0F8423 : 0D -> 0A
 +
*Increase subterranean animal diversity during embark. May result in some types of subterranean creatures being more common than otherwise (due to having duplicate entries).
 +
**0x287CE1 : 05 07 00 66 A3 FA 03 A9 -> A3 FC 03 A9 00 66 05 07
 +
**0x287CEB : 8B 4E 10 66 89 0D FC 03 A9 -> A3 FA 03 A9 00 BB 01 00 00
 +
**0x287D8A : 55 -> 53
 +
* Make caravans bring drink barrels filled to 25 instead of 20
 +
**0x251511 : 14 -> 19
 +
* Increase caravan capacity - pack animals from 100Γ to 200Γ, wagons from 500Γ to 1500Γ.
 +
**0x237B26 : F4 01 -> DC 05
 +
**0x237B75 : 64 -> C8
 +
**0x238A04 : 64 -> C8
 +
**0x238A43 : 8B 08 83 C1 64 89 08 -> 81 00 C8 00 00 00 90
 +
**0x2395F1 : 64 -> C8
 +
**0x239630 : 8B 38 83 C7 64 89 38 -> 81 00 C8 00 00 00 90
 +
**0x0F9BF4 : 70 FE -> EC FA
 +
**0x0F9CC3 : 70 FE -> EC FA
 +
* Disable VSync on program startup, increasing framerate
 +
**0x0B7D60 : 5C FE FF FF -> 62 71 29 00
 +
**0x34EEC6 = 51 56 8B 35 C8 F0 74 00 68 B8 1D 78 00 FF 15 0C F1 74 00 85 C0 74 4E 89 C6 68 6C 2F 78 00 56 FF 15 C8 F0 74 00 85 C0 74 3C 68 03 1F 00 00 FF D0 85 C0 74 31 68 78 2F 78 00 50 E8 7B E6 FC FF 83 C4 08 85 C0 74 1F 68 90 2F 78 00 56 FF 15 C8 F0 74 00 85 C0 74 0F 68 A4 2F 78 00 FF D0 85 C0 74 04 6A 00 FF D0 5E 59 E9 8E 8C D6 FF
 +
**0x382F6C = 67 6C 47 65 74 53 74 72 69 6E 67 00 57 47 4C 5F 45 58 54 5F 73 77 61 70 5F 63 6F 6E 74 72 6F 6C 00 00 00 00 77 67 6C 47 65 74 50 72 6F 63 41 64 64 72 65 73 73 00 00 00 77 67 6C 53 77 61 70 49 6E 74 65 72 76 61 6C 45 58 54
 +
*Allow fortress mode attacks from Semi-megabeasts as well as full Megabeasts
 +
**0x0248F1B : E8 80 76 DC FF -> 8A 42 10 24 30
 +
*Prevent married dwarves (especially the Baron, Count, and Duke) from having [[23a:children|children]] (due to there being no child cap)
 +
**0x0FEADD : 0F 85 -> 90 E9
 +
*Prevent [[23a:wagon|wagon]]s from waiting for creatures to move aside
 +
**0x21DF9F : A4 -> 00
 +
**0x21E130 : 86 -> 00
 +
**0x21E296 : 93 -> 00
 +
*Allow milking of tame purring maggots (instead of only "live" ones)
 +
**0x0F16A1 : 18 -> 58
 +
**0x22E93C : FF 10 83 F8 34 75 -> E9 24 02 00 00 74
 +
**0x22EB65 : 90 90 90 90 90 90 90 90 90 90 90 -> FF 90 B0 00 00 00 E9 D1 FD FF FF
 +
**0x35FA44 : 40 54 4B -> 50 28 5E
 +
*Make Herbalists drop gathered shrubs on the ground (instead of hauling them back to a stockpile)
 +
**0x2B22F8 : FF -> 01
 +
**0x2B22FA : FF -> 00
 +
**0x2B22FC : 00 -> 01
 +
**0x2B22FF : ED B6 -> AD BD
 +
*Make Farmers drop gathered crops on the farm plot (instead of hauling them back to a stockpile)
 +
**0x228A28 : FF -> 01
 +
**0x228A2A : FF -> 00
 +
**0x228A2C : 00 -> 01
 +
**0x228A31 : BB 4F -> 7B 56
 +
*Make Fisherdwarves drop caught fish on the ground (instead of hauling them back to a stockpile)
 +
**0x2B10CE : FF 6A FF 57 -> 01 57 6A 01
 +
**0x2B10D4 : 18 C9 -> D8 CF
 +
**0x2B13E1 : FF 6A FF 57 -> 01 57 6A 01
 +
**0x2B13E7 : 05 C6 -> C5 CC
 +
 
 +
====DFHack-23a====
 +
The same as DFHack-40d, but for Dwarf Fortress version 0.23.130.23a. Compared to DFHack-40d, even less is available (for obvious reasons), but sources can be found [https://github.com/quietust/dfhack-23a/ here] if you want to play around with it.
 +
 
 +
In order to use this, you must apply all of the binary patches above which are marked as "'''REQUIRED''' for DFHack".
 +
 
 +
Binary patch for auto-loading on startup:
 +
* 0x0B7D0B: 41 C6 05 -> 23 72 29
 +
* 0x0B7E62: DA C4 05 -> 4B 71 29
 +
* 0x0B7F35: 77 31 00 -> AD 70 29
 +
* 0x17E426: D6 FA FF FF -> A0 0B 1D 00
 +
* 0x34EF32: 00 00 00 ... 00 00 00 ->
 +
<nowiki>                53 56 68 B8 2F 78  00 FF 15 74 F0 74 00 85
 +
          C0 74 6A 89 C6 6A 0C E8  9B D8 FC FF 83 C4 04 85
 +
          C0 74 5A 89 C3 68 D0 2F  78 00 56 FF 15 C8 F0 74
 +
          00 89 03 68 E0 2F 78 00  56 FF 15 C8 F0 74 00 89
 +
          43 04 68 F0 2F 78 00 56  FF 15 C8 F0 74 00 89 43
 +
          08 68 C4 2F 78 00 56 FF  15 C8 F0 74 00 85 C0 74
 +
          06 FF D0 84 C0 74 0D 89  1D FC 43 7A 00 5E 5B E9
 +
          AC 53 DC FF 53 E8 32 D8  FC FF 83 C4 04 31 DB EB
 +
          E6 53 8B 1D FC 43 7A 00  85 DB 74 08 8B 03 85 C0
 +
          74 02 FF D0 5B E9 76 53  DC FF 51 53 8B 1D FC 43
 +
          7A 00 85 DB 74 09 8B 43  04 85 C0 74 02 FF D0 5B
 +
          59 E9 1A EF E2 FF 53 8B  1D FC 43 7A 00 85 DB 74
 +
          09 8B 43 08 85 C0 74 02  FF D0 5B E9 B0 C0 D6 FF</nowiki>
 +
*0x382FB8: 00 00 00 ... 00 00 00 ->
 +
<nowiki>                                  64 66 68 61 63 6B 2E 64
 +
          6C 6C 00 00 64 66 68 61  63 6B 49 6E 69 74 00 00
 +
          64 66 68 61 63 6B 55 70  64 61 74 65 00 00 00 00
 +
          64 66 68 61 63 6B 52 65  6E 64 65 72 00 00 00 00
 +
          64 66 68 61 63 6B 55 6E  6C 6F 61 64</nowiki>
 +
 
 +
===Scripts===
 +
====Generated Raws Extractor====
 +
Run [[User:Quietust/rawextract.php|rawextract.php]] or [[User:Quietust/rawextract.pl|rawextract.pl]] and specify your save directory as a parameter (or omit it to use the current working directory) and all generated raws (titans, forgotten beasts, demons, night creatures, inorganics, interactions, etc.) will be written to files in the current directory, named by the object ID. Works with both compressed and uncompressed worlds, with or without active saves, from Dwarf Fortress versions 0.31.01 and later.
  
===2D Forbidder===
+
====Body Parser====
A tool for Dwarf Fortress [[23a:Main Page|v0.23.130.23a]] which allows manually forbidding/reclaiming, chasming, or melting the currently viewed item, almost just like in the 3D version. Download [http://dffd.wimbli.com/file.php?id=2380 here].
+
Run [[User:Quietust/parsebody.php|parsebody.php]] from either your save directory or the game's root directory (only supports 0.47.05 or earlier) and all creature bodies will be examined for consistency. Warnings about unconnected shoulders, elbows, wrists, hips, knees, and ankles are to be expected on armless/legless creatures{{bug|4095}}, but others may indicate fundamental problems in your creature definitions.
  
===2D Autoforbid===
+
====23a Text Utility====
A tool for Dwarf Fortress [[23a:Main Page|v0.23.130.23a]] which automatically forbids items carried in the inventories of foreign units. Download [http://dffd.wimbli.com/file.php?id=2848 here].
+
Run [[User:Quietust/wtf23a.php|wtf23a.php]] and specify a command, input file, and output file in order to manipulate the various data files used by Dwarf Fortress version 0.23.130.23a and older.
  
===Forgotten Beast Extractor===
+
====Kobold Name Generator====
Run [[User:Quietust/beastextract.php|this PHP script]] and specify your save directory as a parameter (or omit it to use the current working directory) and all generated beast raws (titans, forgotten beasts, demons, and night creatures) will be written to files in the current directory, named by the creature's ID. Works with both compressed and uncompressed worlds, with or without active saves.
+
Run [[User:Quietust/utterance.py|utterance.py]] to generate a random selection of [[Kobold]] names, using the exact same logic as in vanilla Dwarf Fortress.
  
 
===Automatic Obsidian Factory Plans===
 
===Automatic Obsidian Factory Plans===
 
See [[User:Quietust/Obsidian|here]] for more information.
 
See [[User:Quietust/Obsidian|here]] for more information.

Latest revision as of 22:40, 16 October 2024

About[edit]

Not your average Dwarf Fortress player, is interested in reverse-engineering the game in order to figure out exactly how things work. Has nearly completely documented disassemblies of versions 0.23.130.23a, 0.28.181.40d, and 0.31.25 (and is planning to do the same for 0.34.11, 0.47.05, and possibly additional versions in between), and has managed to locate (and fix) multiple bugs that still exist in the currently released version. Is a member of the DFHack development team and can be found on the DFHack Discord server as well as in the Bay 12 Forums.

Wiki Modifications[edit]

Namespace Links[edit]

This wiki previously made use of a MediaWiki patch to automatically direct links from particular namespaces to other specific namespaces unless indicated otherwise - in this case, links in the "DF2012" and "DF2012 Talk" namespaces automatically pointed to "DF2012", "v0.31" and "v0.31 Talk" pointed to "v0.31", "40d" and "40d Talk" pointed to "40d", and "23a" and "23a Talk" pointed to "23a". This functionality has since been converted into an extension.

DFRawFunctions[edit]

DFRawFunctions is a MediaWiki extension designed for parsing Dwarf Fortress raws. Sources and documentation can be found here.

Fortresses[edit]

v0.28.181.40d[edit]

  • Urdimzatam, Towerclouted - First successful fortress; no real megaprojects to speak of.
  • Tathtakunib, Wasprag - First megaproject as monument (23 Z-level clear glass pyramid filled with magma), tower-cap farm, giant cave spider silk farm, automatic obsidian factory implementation (see below).
  • Naniratîs, Rhymestakes - First megaproject as actual fortress (47x47x16 cast obsidian tower), complete with self-destruct button.

v0.23.130.23a[edit]

  • Rigothral, Craftsilvers - First retro-fortress, included a magma flooding device.
  • Ceroltishak, Lenstyphoon - Second retro-fortress, used raws with all 40d creatures and plants imported.

v0.31[edit]

  • Ashmônèrith, Shadelabors - First fortress in version 0.31.
  • Sobìrilral, Releasetreaty - Second fortress in version 0.31. Used a spiral ramp for access until it turned out to be significantly slower than just using stairs.

Wiki[edit]

  • Mostly casual editor, updating article content as well as fixing formatting
  • Owner of the bot QuietBot - if you need to run a series of repetitive but predictable tasks, post a message here.

Projects[edit]

Dwarf Fortress 0.28.181.40d[edit]

Version 0.28.181.40d was the last 3D release prior to the materials rewrite, and the last version to include the dwarven economy and several other features.

EXE Patches[edit]

A few hex-edits to the game's executable to alter its behavior in beneficial ways and/or fix bugs. These are only for version 0.28.181.40d, NOT any of Baughn's OpenGL-optimized versions (such as 40d19).

Bugfixes[edit]
  • Armorsmith strange moods incorrectly produce helmets using SHOES item type
    • 0x2406B0 : 1A -> 1C
    • 0x2406D6 : 1A -> 1C
  • Skilled siege engine operators fail to aim straightBug:6483
    • 0x34301A : 4D 20 8B 55 24 8B 7D 1C 89 4C 24 2C 89 54 24 40 -> 4C 24 2C 8B 54 24 40 89 4D 20 89 55 24 89 7D 1C
  • Diplomats and Merchant Nobles don't bring bodyguardsBug:5854
    • 0x36C71A : 15 -> 08
    • 0x36C724 : 85 -> 84
    • 0x36D462 : 0E -> 08
    • 0x36D46C : 85 -> 84
  • Invading thieves and lashers don't get upgraded equipmentBug:3681
    • 0x46D95C : 15 -> 1F
    • 0x46D962 : 14 DB -> 33 DA
    • 0x46D9C9 : 27 -> 26
    • 0x46D9D0 : 8B CA 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 10 A3 0B 00 8B 4E 04 8B 14 B9 66 83 3A 28 0F 84 9B 00 00 00 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 EB A2 0B 00 8B 46 04 8B 0C B8 66 83 39 2A 74 7A 8B C8 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 C8 A2 0B 00 8B 56 04 8B 04 BA 66 83 38 2B 74 57 8B CA 85 C9 74 0C 8B 46 08 2B C1 C1 F8 02 3B F8 72 05 E8 A5 A2 0B 00 8B -> 66 83 38 27 0F 84 B8 00 00 00 66 83 38 28 0F 84 AE 00 00 00 66 83 38 29 0F 84 A4 00 00 00 66 83 38 2A 0F 84 9A 00 00 00 66 83 38 2B 0F 84 90 00 00 00 66 83 38 2C 0F 84 86 00 00 00 66 83 38 2D 0F 84 7C 00 00 00 66 83 38 33 74 76 66 83 38 34 74 70 66 83 38 35 74 6A 66 83 38 36 74 64 E9 A0 00 00 00 00 03 01 03 01 03 01 03 01 03 01 03 01 03 01 03 01 03 01 03 01 02 03 03 01 03 03 02 02 03 03 01
  • Temperature safety checks brokenBug:4573
    • 0x50549A : 62 DF -> 42 E0
    • 0x5054A4 : C7 -> CF
    • 0x5054A6 : 56 DF FD FF -> 8C 00 00 00
    • 0x5054C2 : 3A DF -> 9A DD
    • 0x5054D2 : 2A DF -> 7A DE
    • 0x505536 = B8 10 F8 56 01 E9 50 E1 FD FF
  • Sheriff doesn't get unhappy thoughts from insufficient jailsBug:5844
    • 0x3544C2 : 74 -> 75
  • Mayor and Sheriff don't get unhappy thoughts from insufficient fortress guardsBug:5844
    • 0x354372 : 84 -> 85
  • Baron doesn't get unhappy thoughts from insufficient royal guardsBug:5844
    • 0x3541EB : 84 -> 85
  • Siegers try and fail to renew campfiresBug:6482
    • 0x1800D7 : E8 A4 8D F1 FF 8B 10 -> 66 8B 5C 24 18 89 C2
  • Vermin fish in aquariums cancel updates of remaining verminBug:6116
    • 0x23BD2F : 19 -> 08
  • Art images of creatures are not valued properly by civilizationsBug:6440
    • 0x3032DC : 4E -> 49
  • Pikemasters are given skill levels in Axe instead of PikeBug:3273
    • 0x273E0 : 27 -> 33
  • Failed merchant visits do not save their results correctly in history
    • 0x3778D8 : 10 -> 28
    • 0x3778DE : 0C -> 24
    • 0x3778EB : 10 -> 28
    • 0x3778F1 : 0C -> 24
    • 0x377900 : 10 -> 28
    • 0x377906 : 0C -> 24
    • 0x377915 : 10 -> 28
    • 0x37791B : 0C -> 24
    • 0x37792F : 10 -> 28
    • 0x377935 : 0C -> 24
  • Placing designations causes things to happen in the backgroundBug:1697
    • 0x111E9F : F6 -> C0
  • Human civilizations always send Guild Representatives, never Merchant Barons/Princes
    • 0x357740 : 57 -> 56
  • Magma flow tiles at the bottom of magma pipes don't animate like they did in older versions
    • 0x503630 : 0F 94 C1 -> 90 89 F1
  • Dead shrubs render with the "live shrub" tile
    • 0x503866 : 88 -> 89
  • All crops reported as unplantable at the end of WinterBug:7747
    • 0x59719 : 3C 03 7D 0A -> FE C0 24 03
    • 0x59723 : 0D -> 0C
Improvements[edit]
  • Allow fortress mode attacks from Semi-megabeasts as well as full Megabeasts
    • 0x372040 : 0F -> 10
    • 0x372049 : 8A 42 0F C0 E8 07 3A C3 -> 66 8B 42 0F 66 A9 80 01
  • Prevent soldiers from becoming Champions, instead staying as Elite Soldiers as they do in later versions
    • 0x46AFC9 : 0F 84 -> 90 E9
  • Make Herbalists drop gathered shrubs on the ground (instead of hauling them back to a stockpile)
    • 0x4728AA : FF 6A FF 6A 00 55 -> 01 90 90 90 8B CD
    • 0x4728B3 : 39 C1 -> 99 C3
  • Make Farmers drop gathered crops on the farm plot (instead of hauling them back to a stockpile)
    • 0x346060 : FF 6A FF 6A 00 53 -> 01 90 90 90 8B CB
    • 0x346069 : 83 89 -> E3 8B
  • Make the "Dwarves Stay Inside" order check for "Inside" tiles rather than "Subterranean" ones
    • 0x1E6881 : 80 00 -> 00 01
    • 0x1E6885 : 84 -> 85
    • 0x1E7E8C : 80 00 -> 00 01
    • 0x1E7E8F : 75 -> 74
    • 0x2FC4B7 : 80 00 -> 00 01
    • 0x2FC4BA : 75 -> 74
    • 0x4BA08C : 80 00 -> 00 01
    • 0x4BA08F : 75 -> 74
    • 0x4BA14C : 80 00 -> 00 01
    • 0x4BA14F : 74 -> 75
    • 0x4E2C70 : 80 00 -> 00 01
    • 0x4E2C73 : 74 -> 75

DFHack-40d[edit]

A port of modern DFHack for Dwarf Fortress version 0.28.181.40d (NOT any of Baughn's OpenGL-optimized versions, such as 40d19), including most of the common (and meaningful) DFHack plugins along with Lua scripting. Not yet complete, but sources can be found here if you want to play around with it.

Note that this version does not load automatically on startup - instead, you must run a separate "dfhack.exe" loader to load the DLL and inject the necessary hooks.

However, the following binary patches can be applied in order to make DFHack load automatically on startup:

  • 0x118CF1: FB 74 0C -> 37 52 45
  • 0x118F47: 05 FB 19 -> 60 50 45
  • 0x11905D: 4F 36 00 -> 85 4F 45
  • 0x259027: 33 DB 38 1D 44 -> E9 98 4F 31 00
  • 0x56DF2C: 00 00 00 ... 00 00 00 ->
                                               53 56 68 B8
          AF 9F 00 FF 15 A0 E0 96  00 85 C0 74 6A 89 C6 6A
          0C E8 DA 9D FB FF 83 C4  04 85 C0 74 5A 89 C3 68
          D0 AF 9F 00 56 FF 15 70  E1 96 00 89 03 68 E0 AF
          9F 00 56 FF 15 70 E1 96  00 89 43 04 68 F0 AF 9F
          00 56 FF 15 70 E1 96 00  89 43 08 68 C4 AF 9F 00
          56 FF 15 70 E1 96 00 85  C0 74 06 FF D0 84 C0 74
          0D 89 1D 0C CB 9F 00 5E  5B E9 52 22 C7 FF 53 E8
          BE 9A FB FF 83 C4 04 31  DB EB E6 53 8B 1D 0C CB
          9F 00 85 DB 74 08 8B 03  85 C0 74 02 FF D0 5B E9
          8C AA D4 FF 51 8B 1D 0C  CB 9F 00 85 DB 74 09 8B
          43 04 85 C0 74 02 FF D0  59 31 DB 38 1D 44 72 78
          01 E9 49 B0 CE FF 53 8B  1D 0C CB 9F 00 85 DB 74
          09 8B 43 08 85 C0 74 02  FF D0 5B E9 B0 E6 BA FF
  • 0x5FAFB8: 00 00 00 ... 00 00 00 ->
                                   64 66 68 61 63 6B 2E 64
          6C 6C 00 00 64 66 68 61  63 6B 49 6E 69 74 00 00
          64 66 68 61 63 6B 55 70  64 61 74 65 00 00 00 00
          64 66 68 61 63 6B 52 65  6E 64 65 72 00 00 00 00
          64 66 68 61 63 6B 55 6E  6C 6F 61 64

Dwarf Fortress 0.23.130.23a[edit]

Version 0.23.130.23a was quite different from the game as it exists today - it lacked many of the features present in the game today, but it had numerous gameplay elements that have since been discarded.

Utilities[edit]

  • Dwarf Manipulator - the predecessor of the well-known DFHack plugin (based on Valdemar's prototype), implemented as a standalone console application specifically for 23a. The only other tool available, Dwarf Foreman, was incapable of assigning labors for individual dwarves unless you gave each dwarf its own custom profession. Also available within DFHack-23a.
  • 2D Forbidder - a tool which allows manually forbidding/reclaiming, chasming, or melting the currently viewed item, almost just like in the 3D version. Also incorporated into DFHack-23a.
  • 2D Autoforbid - a tool which automatically forbids items carried in the inventories of foreign units.

EXE Patches[edit]

A few hex-edits to the game's executable to alter its behavior in beneficial ways and/or fix bugs. All of these patches are available in the DFHack-23a repository (though some are grouped together in the same files) and can be applied with the standard DFHack "binpatch.exe" utility:

Bugfixes[edit]
  • Artifact holders never drop/hide their artifacts
    • 0x14079B : 8A -> 8B
    • 0x1407A1 : B0 FE C2 04 00 90 90 90 -> B8 FE FF FF FF C2 04 00
    • 0x0B5430 : B0 FE C2 04 00 90 90 90 -> B8 FE FF FF FF C2 04 00
    • 0x15E23D : C0 FE C2 04 00 90 90 90 -> E0 01 83 C0 FE C2 04 00
    • 0x1E8015 : 0F BE C0 -> 90 90 90
  • Sheriff doesn't get unhappy thoughts from insufficient jails Bug:5844
    • 0x2344E2 : 74 -> 75
  • Mayor and Sheriff don't get unhappy thoughts from insufficient fortress guards Bug:5844
    • 0x23448B : 74 -> 75
  • Baron doesn't get unhappy thoughts from insufficient royal guards Bug:5844
    • 0x234425 : 84 -> 85
  • Nobles don't get thoughts about tomb quality Bug:5843
    • 0x2AF633 : 54 -> 60
    • 0x2BCEF3 : 8B 54 24 3C 8B F0 -> 90 E9 61 17 09 00
    • 0x34E65A = 8B 94 24 70 01 00 00 89 C6 E9 91 E8 F6 FF
  • Waterfall Z-coordinates are uninitialized, may not generate mist properly. Must generate new fortress for this to take effect.
    • 0x28A90E : 66 -> 90
  • [000107] Dwarves wandering near magma furnaces stop on magma flow tiles and get stuck (a.k.a. "Sankis has suddenly decided to try and drink out of the lava river"). Must rebuild furnaces for fix to take effect.
    • 0x016EF0 : A5 6E 41 -> 68 E6 74
    • 0x34E668 = 83 7C 24 18 01 0F 85 A0 85 CC FF 8B 44 24 1C 85 C0 0F 85 94 85 CC FF E9 30 88 CC FF
  • [000098] Improved items cannot be used for general jobs
    • 0x0F6C04 : D7 05 -> 00 00
    • 0x0F74DC : AB 03 -> 00 00
    • 0x107C03 : D3 02 -> 00 00
    • 0x108231 : D0 02 -> 00 00
    • 0x1087B7 : 17 04 -> 00 00
    • 0x108EA3 : FD 03 -> 00 00
  • Trap components ignore MATERIAL_SIZE for construction, instead always using 2 bars
    • 0x0F82C1 : 23 -> 05
  • [000082, 000093, 000285] Builders get stuck when constructing statues, windows, and wells
    • 0x0F64D7 : 12 0F 84 52 01 -> 0F 0F 8C 12 00
    • 0x0F64EB : 84 -> 8E
    • 0x0F7E9F : 12 0F 84 41 01 -> 0F 0F 8C 12 00
    • 0x0F7EB3 : 84 -> 8E
  • [000901] All artifact gauntlets are right-handed
    • 0x12DD09 : 01 -> 02
  • Vermin fish in aquariums/ponds cancel updates of remaining vermin Bug:6116
    • 0x169D12 : DD -> D6
    • 0x169D29 : C6 -> BF
  • Vermin can only escape from artifact containers Bug:6117
    • 0x169B1B : 84 -> 85
  • Pregnant dwarves have miscarriages when Hungry instead of when Starving or Dehydrated
    • 0x2BD3CF : 81 F9 50 C3 00 -> 90 E9 AF 12 09
    • 0x34E684 = 8B 8D 8C 03 00 00 81 F9 50 C3 00 00 E9 40 ED F6 FF
  • Giant cave spider web Z-coordinates are uninitialized, may not appear properly. Must encounter new spiders for this to take effect.
    • 0x249EDD : BB 10 00 00 00 -> 66 89 6B 20 90
    • 0x249EE5 : 94 01 00 -> AC 47 10
    • 0x34E695 = BB 10 00 00 00 E9 DE B9 EF FF
  • Art images of creatures are not valued properly by civilizations Bug:6440
    • 0x1F3FBA : 43 -> 41
  • Game crashes at beginning of season if the Mayor has received more than 6 Guild requests Bug:6449
    • 0x2CB95A : 82 -> 81
  • Savage river fish are never selected for region populations
    • 0x2F74F6 : 45 -> 22
    • 0x2F7517 : 75 -> EB
  • Armorsmith strange moods incorrectly produce helmets using SHOES item type
    • 0x171ED7 : 0F 95 C0 84 C0 -> BD 1D 00 00 00
  • Low-intensity noises override louder ones when sleeping
    • 0x220839 : 81 -> 89
    • 0x22083F : 09 78 20 8B 15 EC B3 AC 00 8B 04 B2 8B 80 98 02 00 -> 8B 51 20 66 81 E2 80 01 66 81 FA 80 01 74 0E 8D 40
    • 0x220853 : 60 -> 61
    • 0x220857 : A1 EC B3 AC 00 -> 66 09 79 20 90
    • 0x220876 : 09 68 20 A1 EC B3 AC 00 8B 0C B0 8B 81 -> F7 40 20 80 01 75 10 66 09 68 20 8B 82
  • Demands expire too soon
    • 0x2B45A1 : 8B 4C 24 34 66 8B 54 -> 31 C0 89 42 0C 8B 4C
    • 0x2B45AC : 51 -> 4A
  • Weapons stores in Human towns use armor materials
    • 0x096EFF : 0E -> 0B
  • Metal chests cannot be melted Bug:2493
    • 0x226817 : E8 44 FD FD FF -> 89 74 24 4C 5E
    • 0x226894 : E8 87 6F FC FF -> E9 06 7E 12 00
    • 0x34E69F = 8B 4C 24 48 51 89 D9 E8 B5 7E EB FF E8 70 F1 E9 FF E9 E4 81 ED FF
  • [BIOME_ANY_TROPICAL] puts trees in temperate swamps and marshes instead of tropical ones
    • 0x218D26 : 06 -> 0A
    • 0x218D64 : 07 -> 0B
    • 0x218DDC : 08 -> 0D
    • 0x218E19 : 09 -> 0E
  • Human caravans bring mill powders in stacks of 1 instead of 10
    • 0x25188B : 8B 6F 10 -> B0 0A 90
    • 0x25188F : 81 CD 00 C0 00 00 -> 66 81 4F 10 00 C0
    • 0x251897 : 89 6F 10 -> 88 47 3C
  • Human caravans bring extracts in stacks of 1 instead of 10
    • 0x251A6F : 8B 5D 10 56 80 CF C0 -> 80 4D 11 C0 B0 0A 56
    • 0x251A78 : 89 5D 10 -> 88 45 3C
  • Prepared meal values do not take their ingredients into account
    • 0x35D44C : 90 66 5E -> E0 29 5F
  • Some 2D distance calculations incorrectly pass Z-coordinate distance as "mode" flag, potentially causing odd behavior in Adventurer mode
    • 0x099C4F : 2A D3 -> 31 D2
    • 0x099D7D : 2A D3 -> 31 D2
    • 0x0ECA1A : 2A D1 -> 31 D2
    • 0x0FD472 : 2A D1 -> 31 D2
    • 0x1023B8 : 2A C8 -> 31 C9
    • 0x104EC9 : 2A 51 0A -> 31 D2 90
    • 0x105BD0 : 2A 4A 08 -> 31 C9 90
    • 0x10714B : 2A 51 1C -> 31 D2 90
    • 0x2D096F : 2A D0 -> 31 D2
    • 0x2D0A9D : 2A D3 -> 31 D2
  • Pikemasters are given skill levels in Axe instead of PikeBug:3273
    • 0x2A5144 : 2A -> 36
  • Entity recipes trigger discoveries incorrectlyBug:6472
    • 0x0C02C7 : 18 -> 08
    • 0x251E78 : 04 -> 02
    • 0x251EAB : 08 -> 06
    • 0x252164 : 04 -> 02
    • 0x252498 : 9B 21 65 -> B5 E6 74
    • 0x34E6B5 = 66 8B 45 06 E9 DD 3A F0 FF
  • Siegers try and fail to renew campfiresBug:6482
    • 0x0E4157 : 57 53 56 B9 78 B2 -> 3C 7E 75 09 EB 0F
    • 0x0E449E : 38 -> 30
  • Dwarves get both "old clothing" and "tattered clothing" thoughts when their clothing reaches wear level 2.
    • 0x2BCC76 : 05 -> 12
    • 0x2BCC78 : 74 0F EB 1A -> 75 1C 6A 00
    • 0x2BCC7D : 00 -> FF
    • 0x2BCC7F : FF 6A 68 8B CD E8 87 32 FF FF -> 69 89 E9 E8 89 32 FF FF EB 0D
    • 0x2BCC8E : 69 -> 68
  • Skilled siege engine operators fail to aim straightBug:6483
    • 0x225E20 : 4E 20 8B 56 24 8B 7E 1C 89 4C 24 30 89 54 24 2C -> 4C 24 30 8B 54 24 2C 89 7E 1C 89 4E 20 89 56 24
  • Invading thieves and lashers don't get upgraded equipment
    • 0x2AE329 : 15 -> 1F
    • 0x2AE341 : 8B 99 34 04 00 00 56 33 FF 33 F6 -> 56 31 FF 31 F6 8B 99 34 04 00 00
    • 0x2AE36B : 66 3D 2A 00 74 30 66 3D 2B 00 74 2A 66 3D 2D 00 74 24 66 3D 2E 00 74 1E 66 3D 38 00 74 18 66 3D 36 00 74 12 66 3D 2F 00 74 0C 66 3D 30 00 74 06 66 3D 29 00 75 0A -> 0F B7 C0 83 C0 D7 83 F8 10 77 35 31 DB 9A 98 90 E3 6A 00 FF 24 9D 88 E3 6A 00 90 90 90 A1 E3 6A 00 AB E3 6A 00 00 00 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00
    • 0x2AE3AD : 9E -> 98
    • 0x2AE3F6 : 90 90 90 90 90 90 90 90 90 90 -> 03 03 01 03 03 02 02 03 03 01
  • Some jobs will attempt to use forbidden items
    • 0x0F6B9D : 04 -> 0C
    • 0x0F7493 : 04 -> 0C
    • 0x107BC3 : 04 -> 0C
    • 0x1081F1 : 04 -> 0C
    • 0x108771 : 04 -> 0C
  • Failed merchant visits do not save their results correctly in history
    • 0x24EE49 : 10 -> 28
    • 0x24EE69 : 0C -> 24
    • 0x24EE82 : 10 -> 28
    • 0x24EE9E : 0C -> 24
    • 0x24EEB6 : 10 -> 28
    • 0x24EED2 : 0C -> 24
    • 0x24EEEA : 10 -> 28
    • 0x24EF06 : 0C -> 24
    • 0x24EF25 : 10 -> 28
    • 0x24EF41 : 0C -> 24
Improvements[edit]
  • Disable usage of small-block heap to improve performance - REQUIRED for DFHack
    • 0x3A3B04 : F8 03 -> 00 00
  • Force serialized heap access - REQUIRED for DFHack
    • 0x31E74F : 94 -> 95
  • Don't over-allocate memory blocks
    • 0x31C306 : 0F -> 00
    • 0x31C309 : F0 -> FF
  • Partially disable save file encryption (reduces disk usage while maintaining compatibility)
    • 0x10CFA9 : E8 A2 52 17 00 68 FF FF FF 7F E8 18 52 17 00 -> 68 C4 09 00 00 6A 00 51 E8 5A 5C 21 00 31 C0
    • 0x10CFBB : 14 -> 1C
    • 0x10CFC2 : B8 -> C0
    • 0x10CFD8 : 10 -> 18
  • Display detailed history info in Fortress Mode
    • 0x313ECA : 8B 54 24 7C -> 66 BA 01 00
    • 0x3140A4 : 8B 44 24 7C -> 66 B8 01 00
    • 0x3140D4 : E5 06 -> 00 00
  • Raise artifact limit from 18 to 37.
    • 0x12AA87 : 03 -> 02 (change to 01 for up to 75 artifacts)
  • Increase mining success rate for gems and coal - 100% for Legendary miners.
    • 0x22B3D7 : 02 -> 01
  • Disable "Too Deep" ending from mining raw adamantine.
    • 0x2332D7 : 0F 8E -> 90 E9
  • Force nervous artifact holders to always drop their artifacts instead of hiding them or becoming obssessed with them. Requires the corresponding bugfix above.
    • 0x0A721F : 0F 84 B1 03 -> 90 E9 22 02
  • Potentially allow mechanisms to be made from normal metals (would require further modding with DFHack)
    • 0x0F82C0 : 22 -> 05
    • 0x0F835B : 09 -> 00
    • 0x0F8423 : 0D -> 0A
  • Increase subterranean animal diversity during embark. May result in some types of subterranean creatures being more common than otherwise (due to having duplicate entries).
    • 0x287CE1 : 05 07 00 66 A3 FA 03 A9 -> A3 FC 03 A9 00 66 05 07
    • 0x287CEB : 8B 4E 10 66 89 0D FC 03 A9 -> A3 FA 03 A9 00 BB 01 00 00
    • 0x287D8A : 55 -> 53
  • Make caravans bring drink barrels filled to 25 instead of 20
    • 0x251511 : 14 -> 19
  • Increase caravan capacity - pack animals from 100Γ to 200Γ, wagons from 500Γ to 1500Γ.
    • 0x237B26 : F4 01 -> DC 05
    • 0x237B75 : 64 -> C8
    • 0x238A04 : 64 -> C8
    • 0x238A43 : 8B 08 83 C1 64 89 08 -> 81 00 C8 00 00 00 90
    • 0x2395F1 : 64 -> C8
    • 0x239630 : 8B 38 83 C7 64 89 38 -> 81 00 C8 00 00 00 90
    • 0x0F9BF4 : 70 FE -> EC FA
    • 0x0F9CC3 : 70 FE -> EC FA
  • Disable VSync on program startup, increasing framerate
    • 0x0B7D60 : 5C FE FF FF -> 62 71 29 00
    • 0x34EEC6 = 51 56 8B 35 C8 F0 74 00 68 B8 1D 78 00 FF 15 0C F1 74 00 85 C0 74 4E 89 C6 68 6C 2F 78 00 56 FF 15 C8 F0 74 00 85 C0 74 3C 68 03 1F 00 00 FF D0 85 C0 74 31 68 78 2F 78 00 50 E8 7B E6 FC FF 83 C4 08 85 C0 74 1F 68 90 2F 78 00 56 FF 15 C8 F0 74 00 85 C0 74 0F 68 A4 2F 78 00 FF D0 85 C0 74 04 6A 00 FF D0 5E 59 E9 8E 8C D6 FF
    • 0x382F6C = 67 6C 47 65 74 53 74 72 69 6E 67 00 57 47 4C 5F 45 58 54 5F 73 77 61 70 5F 63 6F 6E 74 72 6F 6C 00 00 00 00 77 67 6C 47 65 74 50 72 6F 63 41 64 64 72 65 73 73 00 00 00 77 67 6C 53 77 61 70 49 6E 74 65 72 76 61 6C 45 58 54
  • Allow fortress mode attacks from Semi-megabeasts as well as full Megabeasts
    • 0x0248F1B : E8 80 76 DC FF -> 8A 42 10 24 30
  • Prevent married dwarves (especially the Baron, Count, and Duke) from having children (due to there being no child cap)
    • 0x0FEADD : 0F 85 -> 90 E9
  • Prevent wagons from waiting for creatures to move aside
    • 0x21DF9F : A4 -> 00
    • 0x21E130 : 86 -> 00
    • 0x21E296 : 93 -> 00
  • Allow milking of tame purring maggots (instead of only "live" ones)
    • 0x0F16A1 : 18 -> 58
    • 0x22E93C : FF 10 83 F8 34 75 -> E9 24 02 00 00 74
    • 0x22EB65 : 90 90 90 90 90 90 90 90 90 90 90 -> FF 90 B0 00 00 00 E9 D1 FD FF FF
    • 0x35FA44 : 40 54 4B -> 50 28 5E
  • Make Herbalists drop gathered shrubs on the ground (instead of hauling them back to a stockpile)
    • 0x2B22F8 : FF -> 01
    • 0x2B22FA : FF -> 00
    • 0x2B22FC : 00 -> 01
    • 0x2B22FF : ED B6 -> AD BD
  • Make Farmers drop gathered crops on the farm plot (instead of hauling them back to a stockpile)
    • 0x228A28 : FF -> 01
    • 0x228A2A : FF -> 00
    • 0x228A2C : 00 -> 01
    • 0x228A31 : BB 4F -> 7B 56
  • Make Fisherdwarves drop caught fish on the ground (instead of hauling them back to a stockpile)
    • 0x2B10CE : FF 6A FF 57 -> 01 57 6A 01
    • 0x2B10D4 : 18 C9 -> D8 CF
    • 0x2B13E1 : FF 6A FF 57 -> 01 57 6A 01
    • 0x2B13E7 : 05 C6 -> C5 CC

DFHack-23a[edit]

The same as DFHack-40d, but for Dwarf Fortress version 0.23.130.23a. Compared to DFHack-40d, even less is available (for obvious reasons), but sources can be found here if you want to play around with it.

In order to use this, you must apply all of the binary patches above which are marked as "REQUIRED for DFHack".

Binary patch for auto-loading on startup:

  • 0x0B7D0B: 41 C6 05 -> 23 72 29
  • 0x0B7E62: DA C4 05 -> 4B 71 29
  • 0x0B7F35: 77 31 00 -> AD 70 29
  • 0x17E426: D6 FA FF FF -> A0 0B 1D 00
  • 0x34EF32: 00 00 00 ... 00 00 00 ->
                53 56 68 B8 2F 78  00 FF 15 74 F0 74 00 85
          C0 74 6A 89 C6 6A 0C E8  9B D8 FC FF 83 C4 04 85
          C0 74 5A 89 C3 68 D0 2F  78 00 56 FF 15 C8 F0 74
          00 89 03 68 E0 2F 78 00  56 FF 15 C8 F0 74 00 89
          43 04 68 F0 2F 78 00 56  FF 15 C8 F0 74 00 89 43
          08 68 C4 2F 78 00 56 FF  15 C8 F0 74 00 85 C0 74
          06 FF D0 84 C0 74 0D 89  1D FC 43 7A 00 5E 5B E9
          AC 53 DC FF 53 E8 32 D8  FC FF 83 C4 04 31 DB EB
          E6 53 8B 1D FC 43 7A 00  85 DB 74 08 8B 03 85 C0
          74 02 FF D0 5B E9 76 53  DC FF 51 53 8B 1D FC 43
          7A 00 85 DB 74 09 8B 43  04 85 C0 74 02 FF D0 5B
          59 E9 1A EF E2 FF 53 8B  1D FC 43 7A 00 85 DB 74
          09 8B 43 08 85 C0 74 02  FF D0 5B E9 B0 C0 D6 FF
  • 0x382FB8: 00 00 00 ... 00 00 00 ->
                                   64 66 68 61 63 6B 2E 64
          6C 6C 00 00 64 66 68 61  63 6B 49 6E 69 74 00 00
          64 66 68 61 63 6B 55 70  64 61 74 65 00 00 00 00
          64 66 68 61 63 6B 52 65  6E 64 65 72 00 00 00 00
          64 66 68 61 63 6B 55 6E  6C 6F 61 64

Scripts[edit]

Generated Raws Extractor[edit]

Run rawextract.php or rawextract.pl and specify your save directory as a parameter (or omit it to use the current working directory) and all generated raws (titans, forgotten beasts, demons, night creatures, inorganics, interactions, etc.) will be written to files in the current directory, named by the object ID. Works with both compressed and uncompressed worlds, with or without active saves, from Dwarf Fortress versions 0.31.01 and later.

Body Parser[edit]

Run parsebody.php from either your save directory or the game's root directory (only supports 0.47.05 or earlier) and all creature bodies will be examined for consistency. Warnings about unconnected shoulders, elbows, wrists, hips, knees, and ankles are to be expected on armless/legless creaturesBug:4095, but others may indicate fundamental problems in your creature definitions.

23a Text Utility[edit]

Run wtf23a.php and specify a command, input file, and output file in order to manipulate the various data files used by Dwarf Fortress version 0.23.130.23a and older.

Kobold Name Generator[edit]

Run utterance.py to generate a random selection of Kobold names, using the exact same logic as in vanilla Dwarf Fortress.

Automatic Obsidian Factory Plans[edit]

See here for more information.