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 Modding
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
If you are creating a redirect to the current version's page, do not use any namespace. For example: use #REDIRECT [[Cat]], not #REDIRECT [[Main:Cat]] or #REDIRECT [[cv:Cat]]. See DF:Versions for more information.
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: | ||
− | + | {{Quality|Exceptional|14:13, 7 November 2013 (UTC)}} | |
− | {{Quality| | ||
{{av}} | {{av}} | ||
+ | {{catbox|DF2014:Modding}} | ||
+ | |||
{{For/see|a list of Dwarf Fortress mods|[[List of mods]]}} | {{For/see|a list of Dwarf Fortress mods|[[List of mods]]}} | ||
− | + | ||
− | '''Modding''' | + | '''Modding''' refers to modifying the game's files. ''Dwarf Fortress'' is remarkably moddable. |
== Resource Overview== | == Resource Overview== | ||
− | + | This section serves as a portal to all modding-related pages on the wiki. | |
− | + | Game data documentation: | |
− | |||
− | |||
− | + | * [[Raw file]] | |
− | * [[ | + | * [[Token]] |
− | * [ | + | * [[Graphics]] |
− | * [[ | + | * [[Speech file]] |
+ | * [[Dipscript]] | ||
− | * [ | + | Tools & Utilities |
− | * [[ | + | * [http://www.bay12forums.com/smf/index.php?board=13.0 Official bay12 Forum for modding] |
− | + | * [[Utilities#Modding tools]] | |
* [[Character table]] | * [[Character table]] | ||
− | + | Guides: | |
− | + | * [[#Guide|Guide to Modding]] | |
− | + | * [[Memory hacking]], [[Main:Offset Finding Methods|Offset Finding Methods]] | |
− | * | + | * [[Category:DF2014:Modding Examples]] |
− | |||
− | |||
− | |||
− | |||
− | * | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Game Files: | |
+ | * Gameplay settings: [[announcements.txt]] • [[d_init.txt]] | ||
+ | * Settings: [[colors.txt]] • [[init.txt]] • [[interface.txt]] | ||
+ | * Log files: [[errorlog.txt]] • [[gamelog.txt]] | ||
+ | * [[Saved game folder]] <!-- with steam the savegame, setting and mod folders will detach from the game folder [[Mod Structure]]--> | ||
− | + | Miscellaneous | |
− | + | * Development: [[DF2014:Release information|Release information]] • [[Main:Dwarf_Fortress_Talk|Developer diaries]] • [[Main:Dwarf_Fortress_Development|Roadmap]] | |
+ | * [[Main:Screenshot|Screenshot]] | ||
== Guide == | == Guide == | ||
Line 63: | Line 46: | ||
=== Token reference === | === Token reference === | ||
+ | |||
It's always good to refer to tokens on the wiki. Even experienced modders have to look up tokens! A list of articles about tokens can be found [[Token|here]]. | It's always good to refer to tokens on the wiki. Even experienced modders have to look up tokens! A list of articles about tokens can be found [[Token|here]]. | ||
=== Basics of DF modding === | === Basics of DF modding === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | All the base data that can be edited by prospective modders can be found in the \raw\ folder. This folder contains two subfolders: "graphics" (where you insert [[Graphics set repository|graphics sets]]), and "objects", which contains all the data for, generally, everything in the game that is not hardcoded. | |
− | + | Within the \raw\objects folder are a large number of text files - these are the [[raw file|raw files]], and editing them is quite easy - you can also create your own if you wish. For now, take a look at one of the existing files. For example, if you open creature_standard.txt, it should look something like this: | |
{{code| | {{code| | ||
Line 99: | Line 69: | ||
}} | }} | ||
− | As you can see, each file comprises a header string stating the file name, a second header stating the type of object data it contains, followed by the contents of the file itself. These are all necessary elements of the file, and without them, the file will be ignored by the game. | + | As you can see, each file comprises a header string stating the file name, a second header stating the type of object data it contains, followed by the contents of the file itself. These are all necessary elements of the file, and without them, the file will be ignored by the game. You may have also noticed the file naming scheme - this is also important; files containing creatures have names starting with "creature_", entity file names must begin with "entity_", etc.. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Below the headers, there begins a list of entries. Each entry is made up of its own header (in this case, "[CREATURE:DWARF]"), again stating the type of object, and then the object's unique identifier - if an identifier isn't unique, the game will mess up and you'll get some serious, and potentially very trippy, errors. ([[Duplicated raws|For example...]]) Below that, we have the body of the entry, which determines the entry's specific properties. | Below the headers, there begins a list of entries. Each entry is made up of its own header (in this case, "[CREATURE:DWARF]"), again stating the type of object, and then the object's unique identifier - if an identifier isn't unique, the game will mess up and you'll get some serious, and potentially very trippy, errors. ([[Duplicated raws|For example...]]) Below that, we have the body of the entry, which determines the entry's specific properties. | ||
Line 113: | Line 77: | ||
Before we continue, a few key things to remember when modding the raw files: | Before we continue, a few key things to remember when modding the raw files: | ||
− | * Try to avoid modifying the existing raw files when | + | * Try to avoid modifying the existing raw files when adding objects. It makes removing mods far easier. |
− | * When adding files, | + | * When adding files, all you need to include to ensure proper references are maintained is the token identifiers. The game will load up all *.txt files in the raw folder, and searches through them by tokens. For example, you can add a new pair of leather boots and not even have to add it to the item_shoes.txt file, but rather make your own file, say item_shoes_new.txt and ensure you have the token listed, ex. [ITEM_SHOES:ITEM_SHOES_BOOTS_NEW]. |
− | * When a new world is generated, the | + | * If you want to edit an already-existing creature, always back up the files you plan on editing to a different location. Since v0.31.22, the game no longer loads backup files with an extension other than ".txt", but duplicate entries are still a very bad thing. |
− | * There's nothing stopping you from just copying an existing creature/entity/whatever, changing the identifier, and modifying it. This can save you a lot of time, especially when it comes to entities. | + | * When a new world is generated, all the raw files get copied into a \raw\ folder within the applicable save folder. If you want to change something within a world that's already been generated, you'll have to edit those files, not the ones in ~DF\raw\objects. |
− | + | * There's nothing stopping you from just copying an existing creature/entity/whatever, changing the identifier, and modifying it. This can save you a lot of time, especially when it comes to entities... which are coincidentally what we'll be talking about next. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Modding civilizations (entities) === | === Modding civilizations (entities) === | ||
− | Entities - the objects that determine how civilizations work - are stored in | + | Entities - the objects that determine how civilizations work - are stored in entity_default.txt (though, like all other files, you may add more). They follow the same format as any other raw file: |
{{code| | {{code| | ||
Line 177: | Line 102: | ||
Most of the time, it doesn't matter which order these tokens are in or where they're placed so long as they're below the "ENTITY:" identifier, but there are some important exceptions in the case of other files, especially creatures, which can contain a lot of "nested" tokens. | Most of the time, it doesn't matter which order these tokens are in or where they're placed so long as they're below the "ENTITY:" identifier, but there are some important exceptions in the case of other files, especially creatures, which can contain a lot of "nested" tokens. | ||
− | "[CREATURE:]" links the civilization with a specific creature defined in a creature file. This is the creature that'll be making up the entity's population, and, therefore, the creature you'll be playing as in fortress or adventure mode if the entity is a playable one. For example, if you wanted to do something silly, you could switch the "CREATURE:DWARF" entry in entity_default.txt with "CREATURE:ELF" and you would be marching elves around in fortress mode, although they would still use dwarven technology, language and names and so forth. Oh, and before you get any funny ideas - it ''is'' possible to define more than one creature for a civ, but that won't work in quite the way you probably expect; | + | "[CREATURE:]" links the civilization with a specific creature defined in a creature file. This is the creature that'll be making up the entity's population, and, therefore, the creature you'll be playing as in fortress or adventure mode if the entity is a playable one. For example, if you wanted to do something silly, you could switch the "CREATURE:DWARF" entry in entity_default.txt with "CREATURE:ELF" and you would be marching elves around in fortress mode, although they would still use dwarven technology, language and names and so forth. Oh, and before you get any funny ideas - it ''is'' possible to define more than one creature for a civ, but that won't work in quite the way you probably expect; later on, in the creature section, you'll learn about castes, which will provide a much more viable alternative, so try to bear with us until then. |
"[TRANSLATION:]" defines the language file that the entity will be using, which will determine what their untranslated words are for things. This doesn't determine which words they use for naming things, only the way those words are spelled. The default language files are HUMAN, DWARF, ELF, and GOBLIN. | "[TRANSLATION:]" defines the language file that the entity will be using, which will determine what their untranslated words are for things. This doesn't determine which words they use for naming things, only the way those words are spelled. The default language files are HUMAN, DWARF, ELF, and GOBLIN. | ||
Line 199: | Line 124: | ||
You can find many details about the rest of the civilization tokens [[entity token|here]]. | You can find many details about the rest of the civilization tokens [[entity token|here]]. | ||
− | Besides those mentioned, some fundamental ones are the | + | Besides those mentioned, some fundamental ones are the SITE_CONTROLLABLE token, which lets you control the civ in fortress mode, the OUTSIDER_CONTROLLABLE token, which allows you to play in adventure mode as an outsider, and the ALL_MAIN_POPS_CONTROLLABLE token, which allows you to play a civ native (non-outsider) in adventure mode. Other tokens that you should pay attention to are START_BIOME and the ones regarding sites, but in general, you can just run through the aforementioned list and add or remove what you want. |
− | If you have more than one civ with the | + | If you have more than one civ with the SITE_CONTROLLABLE token, all the available civs from those entities will appear in the group selection section on the embark screen. It may not be immediately obvious from which species each civ may be - while this can be determined from legends mode, the topmost species in the "neighbors" display in the embark screen is always 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 civ (and therefore a species if there is more than one) at random. |
You can also attempt to discern the civ yourself by the names it uses - this is the realm of "symbols", collections of words centered around a specific concept. The civ will use the words comprising whatever symbols are applicable to it for various things. This association might be a little confusing at first, so, let's refer to the DWARF entity: | You can also attempt to discern the civ yourself by the names it uses - this is the realm of "symbols", collections of words centered around a specific concept. The civ will use the words comprising whatever symbols are applicable to it for various things. This association might be a little confusing at first, so, let's refer to the DWARF entity: | ||
Line 244: | Line 169: | ||
An easy method of creating a civilization is just to copy-paste a similar one to the bottom of the entity_default.txt file and edit things to your liking. Remember to always change the civ's "ENTITY:" identifier! This can be anything, so long as it's not already existing. | An easy method of creating a civilization is just to copy-paste a similar one to the bottom of the entity_default.txt file and edit things to your liking. Remember to always change the civ's "ENTITY:" identifier! This can be anything, so long as it's not already existing. | ||
− | At the end of some of the default entries you'll find a list of positions, both ones that'll directly affect you in fort mode (such as nobles) and ones that'll primarily affect worldgen and adventure mode. A list of the tokens applicable to positions can be found [[position token|here]]; they don't require a great deal of explanation | + | At the end of some of the default entries you'll find a list of positions, both ones that'll directly affect you in fort mode (such as nobles) and ones that'll primarily affect worldgen and adventure mode. A list of the tokens applicable to positions can be found [[position token|here]]; they don't require a great deal of explanation. |
==== Trade ==== | ==== Trade ==== | ||
Line 251: | Line 176: | ||
* [[Entity token#ACTIVE_SEASON|[ACTIVE_SEASON]]] - Defines the seasons when an entity may visit your fortress. | * [[Entity token#ACTIVE_SEASON|[ACTIVE_SEASON]]] - Defines the seasons when an entity may visit your fortress. | ||
* [[Entity token#PROGRESS_TRIGGER_POPULATION|[PROGRESS_TRIGGER_*]]] - Defines the triggers which control when an entity will become interested in your fortress. | * [[Entity token#PROGRESS_TRIGGER_POPULATION|[PROGRESS_TRIGGER_*]]] - Defines the triggers which control when an entity will become interested in your fortress. | ||
− | * [[Entity token#COMMON_DOMESTIC_PACK|[COMMON_DOMESTIC_PACK]]] - Allows the civilization to use domestic pack animals. If an entity lacks pack animals ( | + | * [[Entity token#COMMON_DOMESTIC_PACK|[COMMON_DOMESTIC_PACK]]] - Allows the civilization to use domestic pack animals. If an entity lacks pack animals (pr ability to pull wagons), it will be unable to send caravans (showing as {{DFtext|No Trade|6:1}} at the [[embark]] screen), unless it has domesticated any suitable animal species. |
* [[Entity token#COMMON_DOMESTIC_PULL|[COMMON_DOMESTIC_PULL]]] - Allows the civilization to use domestic animals to pull [[wagon]]s, assuming their [[Ethic#KILL_PLANT|KILL_PLANT ethic]] permits them to use wagons in the first place. | * [[Entity token#COMMON_DOMESTIC_PULL|[COMMON_DOMESTIC_PULL]]] - Allows the civilization to use domestic animals to pull [[wagon]]s, assuming their [[Ethic#KILL_PLANT|KILL_PLANT ethic]] permits them to use wagons in the first place. | ||
* [[Entity token#MERCHANT_BODYGUARDS|[MERCHANT_BODYGUARDS]]] - Caravan will be guarded by [[soldier]]s. | * [[Entity token#MERCHANT_BODYGUARDS|[MERCHANT_BODYGUARDS]]] - Caravan will be guarded by [[soldier]]s. | ||
Line 391: | Line 316: | ||
This can save you a lot of time and space if you're making lots of changes common to many creatures. In general, if you're making a creature that's fleshy or chitinous, there are detail plans already included in the game to help you out. You should only have to resort to declaring tissues individually (like our bronze colossus) if you're doing something really out-of-the-ordinary. | This can save you a lot of time and space if you're making lots of changes common to many creatures. In general, if you're making a creature that's fleshy or chitinous, there are detail plans already included in the game to help you out. You should only have to resort to declaring tissues individually (like our bronze colossus) if you're doing something really out-of-the-ordinary. | ||
− | Another great thing about templates (and so, detail plans) is that they can be modified after being declared. Let's say we wanted our dwarves to be perpetually on fire (don't ask). We | + | Another great thing about templates (and so, detail plans) is that they can be modified after being declared. Let's say we wanted our dwarves to be perpetually on fire (don't ask). We declare the body stuff normally: |
{{code| | {{code| | ||
Line 403: | Line 328: | ||
}} | }} | ||
− | We then | + | We then select the appropriate material: |
{{code| | {{code| | ||
− | [ | + | ... |
+ | [BODY:HUMANOID:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:HUMANOID_JOINTS: | ||
+ | THROAT:NECK:SPINE:BRAIN:SKULL:5FINGERS:5TOES:MOUTH:FACIAL_FEATURES:TEETH:RIBCAGE] | ||
+ | [BODY_DETAIL_PLAN:STANDARD_MATERIALS] | ||
+ | [BODY_DETAIL_PLAN:STANDARD_TISSUES] | ||
+ | [BODY_DETAIL_PLAN:VERTEBRATE_TISSUE_LAYERS:SKIN:FAT:MUSCLE:BONE:CARTILAGE] | ||
[SELECT_MATERIAL:SKIN] | [SELECT_MATERIAL:SKIN] | ||
[MAT_FIXED_TEMP:10600] | [MAT_FIXED_TEMP:10600] | ||
Line 415: | Line 345: | ||
{{code| | {{code| | ||
− | [ | + | ... |
+ | [BODY:HUMANOID:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:HUMANOID_JOINTS: | ||
+ | THROAT:NECK:SPINE:BRAIN:SKULL:5FINGERS:5TOES:MOUTH:FACIAL_FEATURES:TEETH:RIBCAGE] | ||
+ | [BODY_DETAIL_PLAN:STANDARD_MATERIALS] | ||
+ | [BODY_DETAIL_PLAN:STANDARD_TISSUES] | ||
+ | [BODY_DETAIL_PLAN:VERTEBRATE_TISSUE_LAYERS:SKIN:FAT:MUSCLE:BONE:CARTILAGE] | ||
[SELECT_MATERIAL:SKIN] | [SELECT_MATERIAL:SKIN] | ||
[MAT_FIXED_TEMP:10600] | [MAT_FIXED_TEMP:10600] | ||
Line 471: | Line 406: | ||
It's evident that the process of creating and editing castes is comparable to the modifications we were making to tissues and materials earlier: A caste is declared, and modifications to the base creature are made. Declared castes can be selected and subsequently modified, again, just like tissues and materials. | It's evident that the process of creating and editing castes is comparable to the modifications we were making to tissues and materials earlier: A caste is declared, and modifications to the base creature are made. Declared castes can be selected and subsequently modified, again, just like tissues and materials. | ||
− | In this case, each caste is declared, given its own name, and a POP_RATIO, which determines how commonly a birth results in that caste - for every 10000 workers born, there'll be an average of 1000 soldiers, 5 drones and one queen. You've probably also noticed that the DRONE and QUEEN castes have the MALE and FEMALE tokens respectively - these tokens determine how breeding works. A creature without both a MALE caste and a FEMALE caste will be unable to breed (no | + | In this case, each caste is declared, given its own name, and a POP_RATIO, which determines how commonly a birth results in that caste - for every 10000 workers born, there'll be an average of 1000 soldiers, 5 drones and one queen. You've probably also noticed that the DRONE and QUEEN castes have the MALE and FEMALE tokens respectively - these tokens determine how breeding works. A creature without both a MALE caste and a FEMALE caste will be unable to breed (no asexual creatures yet, unfortunately). As they lack FEMALE, the workers and soldiers are unable to breed with the male drones. |
After this, there are some modifications to bodyparts. In this case, the drones have wings and the FLIER token, which the other castes lack. It's entirely possible for creatures of different castes to have completely different body structures, even to the extent that they don't resemble each other at all. If you read the section of this guide that dealt with entities, you may remember a passing mention of multi-creature civilisations and how they don't quite work as you may think they would. The castes system is your workaround. You could create a caste that is, for all intents and purposes, a human, and another caste of the same creature that acts exactly like a giant cave spider, put the creature in a civ, and get a human-spider civ. The only flaw in this approach is that the castes will interbreed. | After this, there are some modifications to bodyparts. In this case, the drones have wings and the FLIER token, which the other castes lack. It's entirely possible for creatures of different castes to have completely different body structures, even to the extent that they don't resemble each other at all. If you read the section of this guide that dealt with entities, you may remember a passing mention of multi-creature civilisations and how they don't quite work as you may think they would. The castes system is your workaround. You could create a caste that is, for all intents and purposes, a human, and another caste of the same creature that acts exactly like a giant cave spider, put the creature in a civ, and get a human-spider civ. The only flaw in this approach is that the castes will interbreed. | ||
Line 479: | Line 414: | ||
=== Modding items === | === Modding items === | ||
− | Items are fairly simple to deal with. By default, each item type is contained in its own file; this may help make browsing for a specific item easier, but from a purely technical point of view, it's possible to throw all items into one file. Unfortunately, | + | Items are fairly simple to deal with. By default, each item type is contained in its own file; this may help make browsing for a specific item easier, but from a purely technical point of view, it's possible to throw all items into one file. Unfortunately, item tokens don't seem to be especially well-documented (at least not as well as the other object types), but you should be able to figure out most things by way of our explanations and your assumptions. |
Let's look at the entry for, of course, the thong: | Let's look at the entry for, of course, the thong: | ||
Line 511: | Line 446: | ||
[MATERIAL_SIZE:5] | [MATERIAL_SIZE:5] | ||
[ATTACK:EDGE:100000:8000:slash:slashes:NO_SUB:1250] | [ATTACK:EDGE:100000:8000:slash:slashes:NO_SUB:1250] | ||
− | |||
[ATTACK:EDGE:50:4000:stab:stabs:NO_SUB:1000] | [ATTACK:EDGE:50:4000:stab:stabs:NO_SUB:1000] | ||
− | |||
[ATTACK:BLUNT:100000:8000:slap:slaps:flat:1250] | [ATTACK:BLUNT:100000:8000:slap:slaps:flat:1250] | ||
− | |||
[ATTACK:BLUNT:100:1000:strike:strikes:pommel:1000] | [ATTACK:BLUNT:100:1000:strike:strikes:pommel:1000] | ||
− | |||
}} | }} | ||
Line 524: | Line 455: | ||
Attacks take a little more explanation. The first value determines the contact area of the weapon's attack; this should be high for slashing weapons and low for bludgeoning, piercing and poking ones. The second value determines how deep the weapon penetrates - for BLUNT attacks this value is ignored as they're not supposed to penetrate anyway, but in the case of EDGE attacks it should generally be lower for slashing attacks and higher for stabbing attacks. | Attacks take a little more explanation. The first value determines the contact area of the weapon's attack; this should be high for slashing weapons and low for bludgeoning, piercing and poking ones. The second value determines how deep the weapon penetrates - for BLUNT attacks this value is ignored as they're not supposed to penetrate anyway, but in the case of EDGE attacks it should generally be lower for slashing attacks and higher for stabbing attacks. | ||
− | Following these are the nouns and verb used; they should be self-explanatory. Finally, we have the velocity modifier, which has a multiplying effect on the weapon's size for the purposes of determining how powerful it is in combat | + | Following these are the nouns and verb used; they should be self-explanatory. Finally, we have the velocity modifier, which has a multiplying effect on the weapon's size for the purposes of determining how powerful it is in combat. |
− | |||
− | |||
Other, more miscellaneous items are generally simple and shouldn't require any further explanation. | Other, more miscellaneous items are generally simple and shouldn't require any further explanation. | ||
Line 533: | Line 462: | ||
=== Modding language files === | === Modding language files === | ||
− | |||
Let's say you added a whole new species. Sure, you could just swipe one of the existing translation files and steal their language for your species, but that's the lazy way! If you want to create a whole new language, it is very simple. | Let's say you added a whole new species. Sure, you could just swipe one of the existing translation files and steal their language for your species, but that's the lazy way! If you want to create a whole new language, it is very simple. | ||
− | First, you'd need a whole new language_RACE file, such as language_LIZARDMAN.txt, along with "language_LIZARDMAN" at the top of the file proceeded by [OBJECT:LANGUAGE] and [TRANSLATION:LIZARDMAN]. After that, it's just a matter of copy-pasting one of the existing language lists and editing the finished 'translated' word. That's it! Then just add the translation link to your civ in entity_default.txt and it'll be added to the game on worldgen | + | First, you'd need a whole new language_RACE file, such as language_LIZARDMAN.txt, along with "language_LIZARDMAN" at the top of the file proceeded by [OBJECT:LANGUAGE] and [TRANSLATION:LIZARDMAN]. After that, it's just a matter of copy-pasting one of the existing language lists and editing the finished 'translated' word. That's it! Then just add the translation link to your civ in entity_default.txt and it'll be added to the game on worldgen. |
− | |||
− | |||
(Note that the name of the file doesn't actually matter; however, it's good form to name the file after a creature if only that creature speaks the language.) | (Note that the name of the file doesn't actually matter; however, it's good form to name the file after a creature if only that creature speaks the language.) | ||
Line 954: | Line 880: | ||
{{code|code= | {{code|code= | ||
− | [BUILDING_WORKSHOP:SOAP_MAKER] | + | [BUILDING_WORKSHOP:SOAP_MAKER] |
− | + | [NAME:Soap Maker's Workshop] | |
− | + | [NAME_COLOR:7:0:1] | |
− | + | [DIM:3:3] | |
− | + | [WORK_LOCATION:2:2] | |
− | + | [BUILD_LABOR:SOAP_MAKER] | |
− | + | [BUILD_KEY:CUSTOM_SHIFT_S] | |
− | + | [BLOCK:1:0:0:1] | |
− | + | [BLOCK:2:0:0:1] | |
− | + | [BLOCK:3:0:0:0] | |
− | + | [TILE:0:1:' ':' ':150] | |
− | + | [TILE:0:2:' ':' ':'/'] | |
− | + | [TILE:0:3:'-':' ':' '] | |
− | + | [COLOR:0:1:0:0:0:0:0:0:6:0:0] | |
− | + | [COLOR:0:2:0:0:0:0:0:0:6:0:0] | |
− | + | [COLOR:0:3:6:0:0:0:0:0:0:0:0] | |
− | + | [TILE:1:1:' ':' ':'='] | |
− | + | [TILE:1:2:'-':' ':8] | |
− | + | [TILE:1:3:' ':' ':150] | |
− | + | [COLOR:1:1:0:0:0:0:0:0:6:0:0] | |
− | + | [COLOR:1:2:6:0:0:0:0:0:6:0:0] | |
− | + | [COLOR:1:3:0:0:0:0:0:0:6:0:0] | |
− | + | [TILE:2:1:'-':' ':8] | |
− | + | [TILE:2:2:' ':' ':8] | |
− | + | [TILE:2:3:' ':150:' '] | |
− | + | [COLOR:2:1:6:0:0:0:0:0:6:0:0] | |
− | + | [COLOR:2:2:0:0:0:0:0:0:6:0:0] | |
− | + | [COLOR:2:3:0:0:0:6:0:0:0:0:0] | |
− | + | [TILE:3:1:150:' ':8] | |
− | + | [TILE:3:2:' ':' ':8] | |
− | + | [TILE:3:3:' ':240:' '] | |
− | + | [COLOR:3:1:6:0:0:0:0:0:6:7:0] | |
− | + | [COLOR:3:2:0:0:0:0:0:0:6:7:0] | |
− | + | [COLOR:3:3:0:0:0:7:0:1:0:0:0] | |
− | + | [BUILD_ITEM:1:BUCKET:NONE:NONE:NONE][EMPTY][CAN_USE_ARTIFACT] | |
− | + | [BUILD_ITEM:1:NONE:NONE:NONE:NONE][BUILDMAT][WORTHLESS_STONE_ONLY][CAN_USE_ARTIFACT] | |
− | |||
}} | }} | ||
Line 1,017: | Line 942: | ||
{{code| | {{code| | ||
− | [BLOCK:1:0:0: | + | [BLOCK:1:0:0:1] |
... | ... | ||
}} | }} | ||
− | This is a bit more complex, and is where we get to the meaty part of workshop making--the tiles' properties. BLOCK refers to which tiles will be untraversable--1 means blocked, 0 means unblocked. The first number refers to row, and the next 3 refer to column, so 1:0:0: | + | This is a bit more complex, and is where we get to the meaty part of workshop making--the tiles' properties. BLOCK refers to which tiles will be untraversable--1 means blocked, 0 means unblocked. The first number refers to row, and the next 3 refer to column, so 1:0:0:1 means that, on the first row, the first two tiles will be unblocked and the last will be blocked. |
{{code| | {{code| | ||
Line 1,039: | Line 964: | ||
}} | }} | ||
These refer to items required to build the building. These are in the same format as [[Reaction|reaction reagents and products]]--quantity:[[Item token|item]]:[[Material token|material]]. You'll learn more about those on the article about [[Reaction|reactions]], though. The second BUILD_ITEM is special-- it uses modifiers exclusively to determine its requirements. BUILDMAT refers to wood logs, wood blocks, stone boulders, and stone blocks; WORTHLESS_STONE_ONLY means it can't use economic stone; CAN_USE_ARTIFACT means that it... can use artifacts. EMPTY, in the bucket's case, means that the bucket must be empty. | These refer to items required to build the building. These are in the same format as [[Reaction|reaction reagents and products]]--quantity:[[Item token|item]]:[[Material token|material]]. You'll learn more about those on the article about [[Reaction|reactions]], though. The second BUILD_ITEM is special-- it uses modifiers exclusively to determine its requirements. BUILDMAT refers to wood logs, wood blocks, stone boulders, and stone blocks; WORTHLESS_STONE_ONLY means it can't use economic stone; CAN_USE_ARTIFACT means that it... can use artifacts. EMPTY, in the bucket's case, means that the bucket must be empty. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
More can be seen at the [[Building token|building tokens]] article. | More can be seen at the [[Building token|building tokens]] article. | ||
Line 1,067: | Line 986: | ||
[[material definition token|Here's a list of material tokens]]. It should also help you out with any modifications you want to make regarding those creature modifications we were making a while back. See, it all ties together in the end. The beauty of the current materials system is that there's actually very little difference between, say, leather and iron - they're fundamentally the same thing, just with different properties, which is how things really should be. | [[material definition token|Here's a list of material tokens]]. It should also help you out with any modifications you want to make regarding those creature modifications we were making a while back. See, it all ties together in the end. The beauty of the current materials system is that there's actually very little difference between, say, leather and iron - they're fundamentally the same thing, just with different properties, which is how things really should be. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Examples == | == Examples == | ||
− | :''Main articles: [[:Category:Modding_Examples]]'' | + | :''Main articles: [[:Category:DF2014:Modding_Examples]]'' |
The Hydling below was made by Mysteryguye (and annotated, updated and separated into blocks by Putnam), to act as an example creature. | The Hydling below was made by Mysteryguye (and annotated, updated and separated into blocks by Putnam), to act as an example creature. | ||
Line 1,131: | Line 1,003: | ||
[CREATURE_TILE:'='][COLOR:2:0:1] Will appear as a light green "=". | [CREATURE_TILE:'='][COLOR:2:0:1] Will appear as a light green "=". | ||
− | [PETVALUE: | + | [PETVALUE:78][NATURAL] Creature is known to be naturally occurring by the game. Will cost 40 embark points to buy. |
[LARGE_ROAMING] Will spawn outdoors, wandering around. | [LARGE_ROAMING] Will spawn outdoors, wandering around. | ||
Line 1,145: | Line 1,017: | ||
[BODY:BASIC_2PARTBODY:7HEADNECKS:BASIC_FRONTLEGS:BASIC_REARLEGS:TAIL:2EYES:NOSE:2LUNGS:HEART:GUTS:ORGANS:THROAT:SPINE:BRAIN:SKULL:3TOES_FQ_REG:3TOES_RQ_REG:MOUTH:TONGUE:GENERIC_TEETH_WITH_FANGS:RIBCAGE] | [BODY:BASIC_2PARTBODY:7HEADNECKS:BASIC_FRONTLEGS:BASIC_REARLEGS:TAIL:2EYES:NOSE:2LUNGS:HEART:GUTS:ORGANS:THROAT:SPINE:BRAIN:SKULL:3TOES_FQ_REG:3TOES_RQ_REG:MOUTH:TONGUE:GENERIC_TEETH_WITH_FANGS:RIBCAGE] | ||
− | Has a lower body, upper body, 4 legs, a tail, | + | Has a lower body, upper body, 4 legs, a tail, ten eyes, ten ears, five noses, two lungs, a heart, guts, a pancreas etc., and 5 heads with all that goes with those. |
[BODYGLOSS:PAW] Feet will be called "paws" | [BODYGLOSS:PAW] Feet will be called "paws" | ||
Line 1,247: | Line 1,119: | ||
[MALE] See above. | [MALE] See above. | ||
}} | }} | ||
+ | |||
+ | == Utilities == | ||
+ | {{main|Utilities#Modding_tools|l1=Utilities § Modding_tools}} | ||
+ | There are several utilities that assist in modding efforts. There is [http://www.bay12forums.com/smf/index.php?topic=28829.0 a list of them] on the [[Bay 12 Forums]]. | ||
== See also == | == See also == | ||
− | |||
− | |||
* [[Raw file]] | * [[Raw file]] | ||
* [[Token]] | * [[Token]] | ||
− | |||
− | |||
− | |||
+ | {{Modding navbox}} | ||
{{Category|Modding}} | {{Category|Modding}} | ||
{{Category|Guides}} | {{Category|Guides}} | ||
[[ru:Modding]] | [[ru:Modding]] |