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 1: Line 1:
{{av}}{{Quality|Masterwork}}
+
{{av}}
  
This is intended to be an easy guide for general newbies on how to both edit and add civilizations, creatures, objects, and so on in Dwarf Fortress, both [[Adventure_Mode|adventurer]] and [[Dwarf Fortress Mode|fortress]] modes, without breaking anything too much. Generally breaking stuff is fine! Just always back up your work & the originals, and be patient at having to [[World generation|generate new worlds]] over and over.  
+
 
 +
This is intended to be an easy guide for general newbies on how to both edit and add civilizations, creatures, objects, and so on in Dwarf Fortress, both {{l|Adventure_Mode|adventurer}} and {{l|Dwarf_Fortress_Mode|fortress}} modes, without breaking anything too much. Generally breaking stuff is fine! Just always back up your work & the originals, and be patient at having to {{l|World_Generation|generate new worlds}} over and over.  
  
 
This guide was edited for version 0.27.176.39c and may not be accurate for later versions, particularly the examples.
 
This guide was edited for version 0.27.176.39c and may not be accurate for later versions, particularly the examples.
Line 11: Line 12:
 
== Basics of DF modding ==
 
== Basics of DF modding ==
  
All of the data you can edit are stored in the \raw\ folder wherever you saved your DF executable. The raw folder contains two subfolders: graphics (where you insert [[Tilesets|graphic packs]] to make custom tiles), and objects, which contains all the data for generally everything in the game that is not hardcoded. Quite a lot is not hardcoded, so you can edit a wide variety of things in the game.  
+
All of the data you can edit are stored in the \raw\ folder wherever you saved your DF executable. The raw folder contains two subfolders: graphics (where you insert {{l|Object_Tilesets|graphic packs}} to make custom tiles), and objects, which contains all the data for generally everything in the game that is not hardcoded. Quite a lot is not hardcoded, so you can edit a wide variety of things in the game.  
  
 
Editing the [[Raw file|raw text files]] is easy and simple. When you go into the \raw\objects folder you will see a wide variety of text files. When you are modding your game, you can either change existing files or add your own. I personally find it easier just to edit the existing ones in a new \DF\ game folder. When you are changing a token you can simply change the values - these are the numbers/strings after the : in a token entry. For example, [CREATURE:DWARF] is a token in the entity text file, which determines what creatures are used for dwarven civilizations. Simply open the text file, edit what you want, save and close, and generate a new world after you're done editing what you want.
 
Editing the [[Raw file|raw text files]] is easy and simple. When you go into the \raw\objects folder you will see a wide variety of text files. When you are modding your game, you can either change existing files or add your own. I personally find it easier just to edit the existing ones in a new \DF\ game folder. When you are changing a token you can simply change the values - these are the numbers/strings after the : in a token entry. For example, [CREATURE:DWARF] is a token in the entity text file, which determines what creatures are used for dwarven civilizations. Simply open the text file, edit what you want, save and close, and generate a new world after you're done editing what you want.
Line 37: Line 38:
 
     [CREATURE:CREATURETYPE]
 
     [CREATURE:CREATURETYPE]
 
     [TRANSLATION:LANGUAGETYPE]
 
     [TRANSLATION:LANGUAGETYPE]
     [BIOME_SUPPORT:BIOMETOKEN:FREQUENCY]
+
     [BIOME_SUPPORT:BIOMETOKEN:FREQENCY]
 
     ...[OTHER TAGS]...
 
     ...[OTHER TAGS]...
  
Line 52: Line 53:
 
'[BIOME_SUPPORT:]' defines biomes that civs will appear in. The 'FREQUENCY' value determines the likelyhood of them appearing there: generally 1 for not very often, up to 3 for very often (ie. dwarves in mountains).
 
'[BIOME_SUPPORT:]' defines biomes that civs will appear in. The 'FREQUENCY' value determines the likelyhood of them appearing there: generally 1 for not very often, up to 3 for very often (ie. dwarves in mountains).
  
You can find many details about the rest of the civilization tokens [[Entity token|here]]. The important ones are the CIV_CONTROLLABLE token, which lets you control the civ in dwarf fortress mode and the INDIV_CONTROLLABLE and ADVENTURE_TIER tokens which lets you play the civ in adventure mode via the PLAY NOW! command. Remember that ADVENTURE_TIER must be in order, so if you are adding a new playable race you must set its tier 1 higher (4).
+
You can find many details about the rest of the civilization tokens {{l|Entity token|here}}. The important ones are the CIV_CONTROLLABLE token, which lets you control the civ in dwarf fortress mode and the INDIV_CONTROLLABLE and ADVENTURE_TIER tokens which lets you play the civ in adventure mode via the PLAY NOW! command. Remember that ADVENTURE_TIER must be in order, so if you are adding a new playable race you must set its tier 1 higher (4).
  
 
If you have more than one civ with the [CIV_CONTROLLABLE] token, groups belonging to that civ will appear in the group selection section on the embark screen, although it is not immediately obvious what species each group may be. While this can be determined from legends mode, experimentation suggests that the topmost species in the 'neighbors' section of the embark screen is the same as the currently selected species: If your group is dwarven, dwarves will be topmost, whilst (say) elves will be topmost if your chosen group is elven. By default, the game seems to choose a group (and therefore a species if there is more than one) at random.  
 
If you have more than one civ with the [CIV_CONTROLLABLE] token, groups belonging to that civ will appear in the group selection section on the embark screen, although it is not immediately obvious what species each group may be. While this can be determined from legends mode, experimentation suggests that the topmost species in the 'neighbors' section of the embark screen is the same as the currently selected species: If your group is dwarven, dwarves will be topmost, whilst (say) elves will be topmost if your chosen group is elven. By default, the game seems to choose a group (and therefore a species if there is more than one) at random.  
Line 80: Line 81:
 
Creature modding is great fun. Essentially you can change nearly any aspect of a creature or completely make your own from scratch. You can either add a new creature to the bottom of an existing creature_thing.txt file or make your own file; just be sure to add the name of the file (without the txt) to the top of it. For example, I tend to use a 'creature_newbies.txt' file myself.
 
Creature modding is great fun. Essentially you can change nearly any aspect of a creature or completely make your own from scratch. You can either add a new creature to the bottom of an existing creature_thing.txt file or make your own file; just be sure to add the name of the file (without the txt) to the top of it. For example, I tend to use a 'creature_newbies.txt' file myself.
  
Modding creatures is exactly similar to modding civs: just a matter of editing, adding, or removing tokens, enclosed in square brackets underneath the creature's [CREATURE:] header. The creature entries contain all the information about each specific creature in the game, from animals to dwarves to goblins to even caravan wagons. Much of the data of a creature is quite self-explanatory; you can find a list of every creature token [[Creature token|here]].
+
Modding creatures is exactly similar to modding civs: just a matter of editing, adding, or removing tokens, enclosed in square brackets underneath the creature's [CREATURE:] header. The creature entries contain all the information about each specific creature in the game, from animals to dwarves to goblins to even caravan wagons. Much of the data of a creature is quite self-explanatory; you can find a list of every creature token {{l|Creature_Tokens|here}}.
  
There're some tokens which use temperature values. Dwarf Fortress has it's own temperature scale for this. [[Temperature scale|DF temperature scale]].
+
There're some tokens which use temperature values. Dwarf Fortress has it's own temperature scale for this. {{l|Temperature scale|DF temperature scale}}.
  
 
Note: If you add a butcherable creature to the game such as a domestic animal, people will automatically wander around wearing its fur or skin as leather items when you are in the game, assuming the creature comes from the civ's biome (natural area). So don't be surprised to see 'duck leather armor' or something if you add ducks. Also note if you add a species that has a naturally high body temperature (magma snakes for example) and set it butcherable, people will automatically be generated wearing their skins.. and then since the skins have a naturally high temperature too they tend to burst into flame immediately because they were wearing a +magma snake leather sock+. Woops.
 
Note: If you add a butcherable creature to the game such as a domestic animal, people will automatically wander around wearing its fur or skin as leather items when you are in the game, assuming the creature comes from the civ's biome (natural area). So don't be surprised to see 'duck leather armor' or something if you add ducks. Also note if you add a species that has a naturally high body temperature (magma snakes for example) and set it butcherable, people will automatically be generated wearing their skins.. and then since the skins have a naturally high temperature too they tend to burst into flame immediately because they were wearing a +magma snake leather sock+. Woops.
Line 92: Line 93:
 
[[User:Deon#How_to|How to add a new creature.]]
 
[[User:Deon#How_to|How to add a new creature.]]
  
If you make a totally new creature, feel free to add it [[Modification:New creatures|here]] along with any additional information.
+
If you make a totally new creature, feel free to add it to this link along with any additional information.
 
+
{{l|Created_Creatures}}
  
 
== Modding items ==
 
== Modding items ==
Line 460: Line 461:
  
  
This is largely a copy of the regular dwarves, but with several differences: [LIKES_FIGHTING] will give them happy thoughts when they have fought something, [NOCTURNAL] means they like nights rather than days, and [EVIL] means on the adventurer map their fortresses will tend to end up on evil tiles rather than good ones. Otherwise, they are exactly the same as regular dwarves. To make them extra evil, add [BONECARN] somewhere in there and they can eat bones (they'll actually haul them from your refuse pit to the dining table, yum), but will sometimes (though rarely) choke to death on them{{verify}}. Bear in mind that [BONECARN] implies [CARNIVORE], so they won't eat vegetables making the game much harder. Also, they do not require booze to stay happy (though will happily drink it anyway if they have to).
+
This is largely a copy of the regular dwarves, but with several differences: [LIKES_FIGHTING] will give them happy thoughts when they have fought something, [NOCTURNAL] means they like nights rather than days, and [EVIL] means on the adventurer map their fortresses will tend to end up on evil tiles rather than good ones. Otherwise, they are exactly the same as regular dwarves. To make them extra evil, add [BONECARN] somewhere in there and they can eat bones (they'll actually haul them from your refuse pit to the dining table, yum), but will sometimes (though rarely) choke to death on them. Bear in mind that [BONECARN] implies [CARNIVORE], so they won't eat vegetables making the game much harder. Also, they do not require booze to stay happy (though will happily drink it anyway if they have to).
  
 
There! That's all we need to do in order to add our civilization. Just create a new world and they'll be there: however, when you go to adventurer mode, all (or none) of your dwarf entries might be replaced with dark dwarves, so it's really a matter of luck. When you start a new fortress, there will be a 50-50 chance of playing either as dwarves or dark dwarves. The easiest way to tell if a civ is a dark dwarven is if the name is rather unpleasant. 'The Fortress of Rapes' for example would probably not be a standard dwarven one. Remove [CIV_CONTROLLABLE] from the standard dwarves if you only want to play as dark.
 
There! That's all we need to do in order to add our civilization. Just create a new world and they'll be there: however, when you go to adventurer mode, all (or none) of your dwarf entries might be replaced with dark dwarves, so it's really a matter of luck. When you start a new fortress, there will be a 50-50 chance of playing either as dwarves or dark dwarves. The easiest way to tell if a civ is a dark dwarven is if the name is rather unpleasant. 'The Fortress of Rapes' for example would probably not be a standard dwarven one. Remove [CIV_CONTROLLABLE] from the standard dwarves if you only want to play as dark.
Line 466: Line 467:
 
== Example two: "Arachnid" playable creature ==
 
== Example two: "Arachnid" playable creature ==
  
This time, we're going to add a new playable creature to adventurer mode, but not playable in fortress mode. An 'arachnid' is a large, powerful, evil half-elf, half-spider (no copyright violations here!): they are too big to wear standard equipment and are quite nasty enough without it anyway. The downside to playing them is that since they do not form standard civilizations, you cannot start them at a specific location nor will they have any weapon, armor, or [[wrestling]] skills to start out.
+
This time, we're going to add a new playable creature to adventurer mode, but not playable in fortress mode. An 'arachnid' is a large, powerful, evil half-elf, half-spider (no copyright violations here!): they are too big to wear standard equipment and are quite nasty enough without it anyway. The downside to playing them is that since they do not form standard civilizations, you cannot start them at a specific location nor will they have any weapon, armor, or {{l|wrestling}} skills to start out.
  
 
First off, we need to add a civilization entry in entity_default.txt. Open it up and add this to the top of the file:
 
First off, we need to add a civilization entry in entity_default.txt. Open it up and add this to the top of the file:
Line 633: Line 634:
 
For version 0.40d
 
For version 0.40d
  
{{Category|Modding}}
+
 
 +
 
 +
[[Category:Modding]]
 
[[Category:Guides]]
 
[[Category:Guides]]

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)