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.

Editing 40d:Modding guide

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "40d"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 18: Line 18:
  
 
Every text file uses what are called "tokens", also called "flags". They are essentially attributes that you can add or remove or edit for any particular object in the game, that change the way the object works or acts. Most of the actual effects are hardcoded: for example, giving a creature such as a moose the [EVIL] creature token will make it only appear in evil maps, or giving it [BONECARN] will make it chow down on bones.
 
Every text file uses what are called "tokens", also called "flags". They are essentially attributes that you can add or remove or edit for any particular object in the game, that change the way the object works or acts. Most of the actual effects are hardcoded: for example, giving a creature such as a moose the [EVIL] creature token will make it only appear in evil maps, or giving it [BONECARN] will make it chow down on bones.
 +
 +
 +
  
 
A few key things to remember when modding the text files:
 
A few key things to remember when modding the text files:
  
 
* Always back up the default text files you plan on editing. This way, if your game crashes (due to say, a typo that you can't find) you can simply copy-paste it back in for a 'vanilla' DF.
 
* Always back up the default text files you plan on editing. This way, if your game crashes (due to say, a typo that you can't find) you can simply copy-paste it back in for a 'vanilla' DF.
* You do not need to delete old saves; simply create a new world using your modded files and things should run fine. Just don't try to play a "non-modded" world with modded files! Should you desire to go back to your old sites, make sure you revert to the raw files used for the creation of that world.  
+
* You do not need to delete old saves; simply create a new world using your modded files and things should run just fine. Just don't try to play a "non-modded" world with modded files! Should you desire to go back to your old sites, just make sure you revert to the raw files used for the creation of that world.  
 
* In general it's better to make whole new text files for new stuff you're adding rather than editing the existing ones by tagging them onto the bottom. This allows you to keep track of them easier and keeps them all in one place so there's less messing about with tons of files.
 
* In general it's better to make whole new text files for new stuff you're adding rather than editing the existing ones by tagging them onto the bottom. This allows you to keep track of them easier and keeps them all in one place so there's less messing about with tons of files.
 
* The absolute easiest way to add an entirely new creature/entity/etc is to simply copy-paste an existing one and rename it, then edit the various tokens appropriately.
 
* The absolute easiest way to add an entirely new creature/entity/etc is to simply copy-paste an existing one and rename it, then edit the various tokens appropriately.

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)