DF v0.42 information
  • Saves from v0.40.24 are compatible with v0.42.06! We will not be migrating to a new namespace, although the current "DF2014" namespace may be renamed to "v0.42" in the near future.
  • Please mark all v0.42-specific articles/sections with {{new in v0.42}}. For short v0.42-specific information, you can use {{version|0.42.01}}.
Updated 14:38, 30 December 2015 (UTC). This notice may be cached—the current version can be found here.

User:Quietust

From Dwarf Fortress Wiki
Jump to: navigation, search

Contents

[edit] About

Not your average Dwarf Fortress player, is interested in reverse-engineering the game in order to figure out exactly how things work. Has a nearly completely documented disassembly of version 0.23.130.23a (because the freely available IDA Pro 5.0 doesn't work as well with newer versions) and 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 in the #dfhack IRC channel on Freenode as well as in the Bay 12 Forums.

[edit] Wiki Modifications

[edit] Namespace Links

This wiki currently makes use of a MediaWiki patch which automatically directs links from particular namespaces to other specific namespaces unless indicated otherwise - in this case, links in the "DF2012" and "DF2012 Talk" namespaces automatically point to "DF2012", "v0.31" and "v0.31 Talk" point to "v0.31", "40d" and "40d Talk" point to "40d", and "23a" and "23a Talk" point to "23a".

[edit] DFRawFunctions

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

[edit] Fortresses

[edit] v0.28.181.40d

  • 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.

[edit] 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.

[edit] v0.31

  • 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.

[edit] Wiki

  • 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.

[edit] Projects

[edit] Dwarf Fortress 0.23.130.23a

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.

[edit] Dwarf Manipulator

Just like Dwarf Therapist, but using a text-based interface (based on Valdemar's prototype). 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 here. Also available as a DFHack plugin.

[edit] 2D Forbidder

A tool which allows manually forbidding/reclaiming, chasming, or melting the currently viewed item, almost just like in the 3D version. Download here. Also available as a DFHack-23a plugin.

[edit] 2D Autoforbid

A tool which automatically forbids items carried in the inventories of foreign units. Download here.

[edit] 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 DFHack-23a repository (though some are grouped together in the same files) and can be applied with the standard DFHack "binpatch.exe" utility:

[edit] 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
    • 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
    • 0x169D28 : 85 C6 -> 84 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
  • Effects attached to jobs do not save correctly (in practice, never happens, since effects never get attached to jobs in this version)
    • 0x0B6ED1 : 56 -> 76
    • 0x0B6ED5 : 52 -> 56
    • 0x0B6EE0 : 46 04 -> 06 90
  • 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
    • 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
    • 0x0E4159 : 56 B9 78 B2 AC 00 E8 EC B2 21 -> 74 11 3C 7E 74 0D E9 14 03 00
    • 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
[edit] 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

[edit] 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 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

[edit] 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 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

[edit] Scripts

[edit] Generated Raws Extractor

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.

[edit] Body Parser

Run parsebody.php and specify your save directory as a parameter (or omit it to use the current working directory) 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.

[edit] 23a Text Utility

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.

[edit] Automatic Obsidian Factory Plans

See here for more information.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Advertisement