- 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.
40d: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, such as gems, adamantine, or flux.
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 reactions or 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.
Attempting to play worlds not generated with identical reaction additions will fail on load.
Raw files are located in the raw/objects directory
See also: Material token, Creature token, Matgloss token, and Reactions for making your own custom cheats.
Reaction Additions[edit]
Recipes for the Smelter are stored in the file reaction_standard.txt. Adding entries to this list will allow your dwarves to make whatever items they need, as easy as smelting iron ore into iron! This is recommended if you want a lot of items very quickly, but additions you make will not take effect until you start a new world.
Note that if you edit an existing reaction entry (leaving the [REACTION:NAME] line unchanged) rather than add a new one, you will not need to generate a new world.
Easy Rough Gems[edit]
[REACTION:FREE_GEMS22][NAME: make (insert gem name)][SMELTER][PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:(insert gem name)]
It's really easy. All you have to do is take the name of the gem from stonegem matgloss and put it in the name and at the end of the product. Take all of that and paste it into the reaction_standard. Create a new world and poof! Your smelter will spit out gems of that type.
For convience, here are all the precious gems in the game.
[REACTION:FREE_GEMS1] [NAME: make DIAMOND_LY] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_LY] [REACTION:FREE_GEMS2] [NAME: make DIAMOND_FY] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_FY] [REACTION:FREE_GEMS3] [NAME: make EMERALD] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:EMERALD] [REACTION:FREE_GEMS4] [NAME: make RUBY] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:RUBY] [REACTION:FREE_GEMS5] [NAME: make SAPPHIRE] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:SAPPHIRE] [REACTION:FREE_GEMS6] [NAME: make DIAMOND_CLEAR] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_CLEAR] [REACTION:FREE_GEMS7] [NAME: make DIAMOND_RED] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_RED] [REACTION:FREE_GEMS8] [NAME: make DIAMOND_GREEN] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_GREEN] [REACTION:FREE_GEMS11] [NAME: make DIAMOND_BLUE] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_BLUE] [REACTION:FREE_GEMS33] [NAME: make DIAMOND_YELLOW] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_YELLOW] [REACTION:FREE_GEMS44] [NAME: make DIAMOND_BLACK] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:DIAMOND_BLACK] [REACTION:FREE_GEMS55] [NAME: make RUBY_STAR] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:RUBY_STAR] [REACTION:FREE_GEMS56] [NAME: make SAPPHIRE_STAR] [SMELTER] [PRODUCT:100:10:ROUGH:NO_SUBTYPE:STONE:SAPPHIRE_STAR]
Easy Adamantine[edit]
To get free adamantine wafers, add this to your reaction_standard.
[REACTION:F_ADAMANTINE_WAFERS] [NAME:create adamantine wafers] [SMELTER] [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:ADAMANTINE]
For adamantine thread it would be;
[REACTION:F_ADAMANTINE_THREAD] [NAME:create adamantine thread] [SMELTER] [PRODUCT:100:1:THREAD:NO_SUBTYPE:METAL:ADAMANTINE]
Make Stone Into Logs[edit]
Add this:
[REACTION:FREE_WOOD] [NAME:stone to wood] [SMELTER] [REAGENT:1:STONE:NO_SUBTYPE:STONE:NO_MATGLOSS] [PRODUCT:100:1:WOOD:NO_SUBTYPE:WOOD:OAK]
to reaction_standard.txt.
Easy Flux, Sand, and Ore[edit]
Add
[REACTION_CLASS:FLUX]
to any stone you have to turn it into a flux. This is in matgloss_stone_mineral.txt or stone_mineral_layer.txt. Or, add
[METAL_ORE:{metal name}:100]
to turn it into a valuable ore. To reduce the exploit-ness of it, reduce the percentage from 100 to 20 or so. It also bears noting that the metal can easily be an alloy, like steel or brass. Likewise, open matgloss_stone_soil.txt and add
[SOIL_SAND]
to any soil to turn it into sand suitable for making glass with.
None of these cheats require creating a new world. Turn peat into glass, basalt into platinum, and combine iron, diorite, and coal to make steel.
Easy Metal[edit]
Open reaction_standard.txt and change any reactions you like. Remove the line reading
[FUEL]
to make them require no fuel. Remove the line(s) headed with
[REAGENT:whatever]
to make them require no reagents. For examples, here are the edited reactions for steel and adamantine.
[REACTION:ADAMANTINE_WAFERS] [NAME:make adamantine wafers] [SMELTER] [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:ADAMANTINE]
[REACTION:STEEL_MAKING] [NAME:make steel bars] [SMELTER] [PRODUCT:100:2:BAR:NO_SUBTYPE:METAL:STEEL]
These cheats do not require a new world (because they only modify existing reactions), and allow my smelters to create steel and adamantine from nothing. It's probably easier, though, to mod some bulk stone into the ore you need and go from there.
Ultimate Smelter Cheat[edit]
Since it's easy enough to alter smelter reactions, one can build a single multi-purpose reaction as follows:
[REACTION:CHEAT_HORRIBLY] [NAME:prospect bulk stone] [SMELTER][FUEL] [REAGENT:1:REACTION_CLASS:JUNK] [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:COPPER]
where any bulk stone you want to destroy is labeled REACTION_CLASS:JUNK, and PRODUCT is whatever you want; turtle shells, rough rock crystals, platinum, whatever you need. No need to make lots of reactions just for gems, no need to modify existing reactions.
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:METAL: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 (and by highly likely extension, 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).
Another example:
[ITEMCORPSE:SHELL:NO_SUBTYPE:TURTLE:TURTLE]
Adding this to, say, a horse, will make that horse drop turtle shells on death; very useful if you have no shelled animals in your fortress area and your mastercrafter 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. *NEW RELEASE EDIT* Find [HOMEOTHERM:#####] and add [SPEED:###] edit the "#" and replace with desired value ((found by looking at creature fairy) edit if needed)
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.
Larger Caravans[edit]
The [TRADE_CAPACITY] tag found in trade animal and wagon entries is followed by a number governing the maximum weight a creature can carry. Because caravans enter your map burdened with as many goods as possible, increasing this number by two or twenty-fold results in a corresponding increase in (Gold Bars).
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. This can be toggled to be done automatically in the init file, so some might not consider this to be cheating.
Another method to save scum is open up task manager (ctrl+alt+delete) and open the Processes tab, and then selecting dwarfort.exe and clicking on end task. This will cause Dwarf Fortress to close, reverting to the last saved game.
On Linux, since the game binary (named dwarfort.exe) is launched via a script wrapper (named df), simply closing the launched script does not work as the actual game will continue to run. However, closing dwarfort.exe is possible in a number of ways:
using a (graphical) process monitor - for instance in Gnome, launching System Monitor, choosing the Processes tab, right-clicking on dwarfort.exe and choosing Kill Process (as opposite to End process);
closing the terminal or terminal tab (if launched from a terminal) thus ending the whole process sub-tree (shell, launch script and game);
typing in a terminal
killall -9 dwarfort.exe
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 give yourself an unlimited number of points. What doesn't work in the new version is giving your starting dwarves tons of prof skills, since there now is a limit in how many skills they can start with. You can still start your dwarves with all proficient skills, but you need to change the [skill limit value] (What?) first on every dwarf you want to do this with, also when editing the memory values with such programs as CheatEngine in adventure mode your point value is 4bytes but in fortress you have to change the search to 2bytes only for hex editors though
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