- 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.
23a:Cheating
This article is about an older version of DF. |
This page includes mods. The content is not part of normal DF as released. Changing game files can sometimes cause unexpected results, and should always be done with care and caution. |
Cheating is altering the game to make dwarf fortress easier. This is distinctly different from exploits. There are two main ways to alter the game: changing the game's raw source files (which are really just text files), and directly altering the game's memory (which requires special tools).
File Edits[edit]
The most common use of editing raw files is to get free items.
When changing the raw files, you may or may not need to create a new world in order for your changes to be reflected.
Generally speaking, modifications to an existing entry in a raw file don't require a new world. Altering existing creatures is an example of this.
Worlds created before the modifications were made won't be playable unless the previous version of the raw file is restored. Save your custom raw files if you want to continue playing your game at some future point.
Raw files are located in the "raw/objects" directory and are automatically compiled into files inside the "data/objects" folder, so you might want to clear out the latter folder to make sure everything updates correctly.
See also: Material token and Creature token for making your own custom cheats.
Creature Token Modifications[edit]
Modifying creature raw files does NOT require you to create a new world. If you want free items in your game without the hassle of planning your cheats when you create the world, the simplest way is to alter the creature files to make them drop the item on death.
You can also change the physical attributes of your dwarves.
Free Items: Changing the Loot[edit]
Missing one critical item for your impatient noble, or slavering fey dwarf, but there's no trader in sight? Have no fear, for you can make your enemies (or butcherable livestock) supply your needs!
Add something like this to their creature entries.
[ITEMCORPSE:ARMOR:ITEM_ARMOR_CHAINMAIL:ADAMANTINE] [ITEMCORPSE_QUALITY:5]
Note that you do not need to make a new world for this to work, and that you can even change this entry in-between saves on the same adventurer or fortress, which has immense and obvious cheating potential. You may want to take a look at the Item token page for a better general understanding of the ITEMCORPSE tag; ITEMCORPSE_QUALITY, on the other hand, simply ranges from 0 (no quality modifier) to 5 (masterpiece quality).
Note that, in this version, this does not allow specifying a material subtype, so this technique can only be used to create items made of glass, metal (including ores), obsidian (with USE_SHARPSTONE), and various other hardcoded materials (e.g. ash, potash, or pearlash) - it cannot be used to directly make items made of stone, gem, plant, or creature materials. It is, however, possible to create creature/plant items (such as meat, fish, seeds, bones, or shells) for the first 49 creatures/plants defined in the raws by specifying the material token with a matching index. For example, you could create "cow shells" by specifying [ITEMCORPSE:SHELL:NO_SUBTYPE:GEM_RARE] (since GEM_RARE is the 12th material type, and cows are the 12th creature defined in the raws), very useful if you have no shelled animals in your fortress area and your master crafter gets an unlucky Strange Mood.
Super-Fast Dwarves[edit]
If you believe your dwarves are a bit too slow, try opening the following creature token file...
\raw\objects\creature_standard.txt
...and adding [SPEED:1] (or SPEED:0 if you're up to some psychedelic light speed traveling) somewhere after [CREATURE:DWARF] but before the next [CREATURE] entry. This will make your dwarves do the majority of their actions super fast, including moving, digging and workshop actions.
This may, ironically, lower FPS when a high population is present, but no more than what doing many actions at once would.
Healing Nervous Injuries[edit]
In normal Dwarf Fortress, nervous injuries are permanent and will never heal, causing military dwarves to stop sparring and potentially crippling useful dwarves, depending on severity. Simple modifications to the creature raws will allow your dwarves to heal injuries to the nervous system, including the spine, neck, and brain. The never-healing property is governed by the [NERVOUS] token in certain body parts. Removing the [NERVOUS] token from the neck, upper, and lower spines in body_default.txt will allow these body parts to heal normally.
The brain is slightly more complicated, because it uses the [THOUGHT] token. Simply removing this token will knock all your dwarves (and any other creatures with a brain) unconscious until it is replaced. To allow the brain to heal, while keeping your dwarves functional, add the [THOUGHT] token to another body part. The heart is a good place to do this, as heart injuries are nearly always fatal anyway.
Note that simply removing the brackets from the NERVOUS and THOUGHT token is enough to "remove" the token from the body part, while retaining the information (to human viewers of the file) that the parts are nervous if you wish to revert the edit after that critical dwarf has healed.
Likewise, removing the [BREATHE] from the lungs can help them heal more quickly.
Savescumming[edit]
Savescumming refers to the practice of regularly backing up your saves so you can revert to one if your fortress crumbles to the last. As the documentation suggests doing this anyways (in case of save corruption), some might not consider this to be cheating.
Unlike in newer versions, killing dwarfort.exe from Task Manager is not safe and can easily result in the Fatal Error "Unit File Corrupted/Missing" (which is identical to the "Nemesis Unit Load Failed" error from later versions), as the data files for a given world are modified in-place during gameplay (rather than being staged to a temporary folder and then merged in when saving).
Memory Editing[edit]
Memory editing refers to using an external program to modify numbers within the game. This is at its most useful when choosing what to take with you, as you can potentially give yourself an unlimited number of embark points.
The utilities page has several tools that do specific memory hacks, such as to teleport a creature.
Editing the memory of a game has a possibility to cause the game to crash or misbehave, including corrupting of saves.
NOTE: WPE may be flagged as a virus because it injects a DLL, and certain viruses out there use similar techniques to steal sensitive information.
Various Memory Hacking Tools: | WPE Pro/PermEdit/Tsearch, ARTMONEY, Cheat Engine |
---|
Guide on how to edit the starting skills and points using TSearch: http://www.youtube.com/watch?v=boC-IxvkYsI