- 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.
Difference between revisions of "v0.34:Raw file"
(new page with some unchanged content from 0.31) |
(use category template for versioning) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Quality|Superior|02:10, 29 April 2013 (UTC)}} | ||
{{av}} | {{av}} | ||
− | + | ||
'''Raw files''' are text files found in the '''raw/objects/''' subdirectory of Dwarf Fortress (used for [[world generation]]), as well as inside the [[saved game folder]] ('''data/save/<region name>/raw/objects/''') for already generated worlds. These files can be looked through to discover various specifics of game items, materials, and creatures, and can be changed to alter how the game behaves. They are sometimes referred to by players as just "the raws". | '''Raw files''' are text files found in the '''raw/objects/''' subdirectory of Dwarf Fortress (used for [[world generation]]), as well as inside the [[saved game folder]] ('''data/save/<region name>/raw/objects/''') for already generated worlds. These files can be looked through to discover various specifics of game items, materials, and creatures, and can be changed to alter how the game behaves. They are sometimes referred to by players as just "the raws". | ||
− | The '''raw/graphics''' subfolder of Dwarf Fortress is used to store user-customizable [[graphics sets]]. The '''raw/interaction examples''' folder is absolutely useless and completely ignored by Dwarf Fortress. | + | The '''raw/graphics''' subfolder of Dwarf Fortress is used to store user-customizable [[graphics set repository|graphics sets]]. The '''raw/interaction examples''' folder is absolutely useless and completely ignored by Dwarf Fortress. |
Dwarf Fortress is not an open source program, so most [[modding]] of the game is limited to altering the raws or doing [[memory hacking]]. | Dwarf Fortress is not an open source program, so most [[modding]] of the game is limited to altering the raws or doing [[memory hacking]]. | ||
− | Duplicating the raw files can cause | + | Duplicating the raw files can cause strange, difficult-to-diagnose problems, and even crashes in some cases. |
==Syntax of raw files== | ==Syntax of raw files== | ||
Line 18: | Line 19: | ||
<...contents...> | <...contents...> | ||
− | ID is | + | ID is a unique identificator for your type to use (i.e. [CREATURE:DOG], ID=DOG or [ITEM:ITEM_WEAPON_SWORD], ID=ITEM_WEAPON_SWORD). |
===Types of content=== | ===Types of content=== | ||
Line 50: | Line 51: | ||
*LANGUAGE — word definitions for the languages used by ENTITY objects. | *LANGUAGE — word definitions for the languages used by ENTITY objects. | ||
**Entries beginning with [SYMBOL:ID] sort words into symbolic/poetic groups to be referenced by ENTITY preferences. | **Entries beginning with [SYMBOL:ID] sort words into symbolic/poetic groups to be referenced by ENTITY preferences. | ||
− | **Entries beginning with [WORD:ID] define words and their alternate forms (in | + | **Entries beginning with [WORD:ID] define words and their alternate forms (in English). |
*MATERIAL_TEMPLATE — definitions of information common to groups of materials (referenced all over the place). | *MATERIAL_TEMPLATE — definitions of information common to groups of materials (referenced all over the place). | ||
− | *PLANT — definitions of plants, their materials, and their | + | *PLANT — definitions of plants, their materials, and their derivatives. |
*REACTION — reactions/custom workshop jobs (turn items into other items through dwarven or adventurer effort). | *REACTION — reactions/custom workshop jobs (turn items into other items through dwarven or adventurer effort). | ||
*TISSUE_TEMPLATE — defines templated tissues for use with BODY_DETAIL_PLAN objects or in creatures. | *TISSUE_TEMPLATE — defines templated tissues for use with BODY_DETAIL_PLAN objects or in creatures. | ||
− | Usually empty | + | Usually empty lines are used to divide different types of structures like the file name and [OBJECT:] or different entries, however everything which is not a token besides the 1st string (which is the filename) is understood as comments and is not considered. |
The tokens are enclosed in square brackets ([TOKEN:VALUES]). | The tokens are enclosed in square brackets ([TOKEN:VALUES]). | ||
Line 67: | Line 68: | ||
The order that Dwarf Fortress parses raw files is determined by the first line of the raw file (''not'' necessarily the filename). This parsing order is important for certain tags such as [COPY_TAGS_FROM], but not for most other tags. | The order that Dwarf Fortress parses raw files is determined by the first line of the raw file (''not'' necessarily the filename). This parsing order is important for certain tags such as [COPY_TAGS_FROM], but not for most other tags. | ||
− | + | {{Category|Files}} | |
{{Category|Modding}} | {{Category|Modding}} |
Latest revision as of 04:45, 6 January 2023
This article is about an older version of DF. |
Raw files are text files found in the raw/objects/ subdirectory of Dwarf Fortress (used for world generation), as well as inside the saved game folder (data/save/<region name>/raw/objects/) for already generated worlds. These files can be looked through to discover various specifics of game items, materials, and creatures, and can be changed to alter how the game behaves. They are sometimes referred to by players as just "the raws".
The raw/graphics subfolder of Dwarf Fortress is used to store user-customizable graphics sets. The raw/interaction examples folder is absolutely useless and completely ignored by Dwarf Fortress.
Dwarf Fortress is not an open source program, so most modding of the game is limited to altering the raws or doing memory hacking.
Duplicating the raw files can cause strange, difficult-to-diagnose problems, and even crashes in some cases.
Syntax of raw files[edit]
filename [OBJECT:TYPE] [TYPE:ID] <...contents...>
ID is a unique identificator for your type to use (i.e. [CREATURE:DOG], ID=DOG or [ITEM:ITEM_WEAPON_SWORD], ID=ITEM_WEAPON_SWORD).
Types of content[edit]
- BODY — body parts and structures.
- BODY_DETAIL_PLAN — similar to CREATURE_VARIATION, but used for defining tokens related to body parts (specifically materials, tissues, the assignment thereof, and body part positions, relative sizes, etc.)
- BUILDING — custom workshops and smelters.
- CREATURE — creatures.
- CREATURE_VARIATION — variations that can be applied to creatures (e.g., making them giants, or anthropomorphic). Technically a series of tokens that are added to or removed from the creature (essentially a set of templated changes).
- DESCRIPTOR_COLOR (tag is COLOR) — named colours for use with DESCRIPTOR_PATTERN objects (other purposes unknown)
- DESCRIPTOR_PATTERN (tag is COLOR_PATTERN) — patterns with colour combinations for use with creatures.
- DESCRIPTOR_SHAPE (tag is SHAPE) — shapes with descriptions and variations. These are used for engravings.
- ENTITY — civilization types, with assigned race, language, culture, ethics, and social structure.
- GRAPHICS — graphic tiles for creatures. These are not found inside the raw/objects folder.
- INTERACTION — interaction definitions.
- INORGANIC — inorganic material definitions.
- ITEM — items ranging from ammunition to food types, has secondary types for the purposes of [TYPE:ID].
- ITEM_AMMO — ammunition for ranged weapons.
- ITEM_ARMOR — body clothing, including armour.
- ITEM_FOOD — prepared food definitions.
- ITEM_GLOVES — hand clothing, including armour.
- ITEM_HELM — head clothing, including armour.
- ITEM_INSTRUMENT — instrument definitions.
- ITEM_PANTS — lower body clothing, including armour.
- ITEM_SHIELD — shields.
- ITEM_SHOES — foot clothing, including armour.
- ITEM_SIEGEAMMO — ammunition for siege weapons that ballistae fire.
- ITEM_TOOL — multi-purpose items that can serve as a weapon, food storage container, etc.
- ITEM_TOY — toy definitions.
- ITEM_TRAPCOMP — components that can be used in weapon traps (two special tags define trapcomps that can be used in other constructions: IS_SCREW and IS_SPIKE).
- ITEM_WEAPON — weapons that are used by soldiers, as well as digging tools.
- LANGUAGE — word definitions for the languages used by ENTITY objects.
- Entries beginning with [SYMBOL:ID] sort words into symbolic/poetic groups to be referenced by ENTITY preferences.
- Entries beginning with [WORD:ID] define words and their alternate forms (in English).
- MATERIAL_TEMPLATE — definitions of information common to groups of materials (referenced all over the place).
- PLANT — definitions of plants, their materials, and their derivatives.
- REACTION — reactions/custom workshop jobs (turn items into other items through dwarven or adventurer effort).
- TISSUE_TEMPLATE — defines templated tissues for use with BODY_DETAIL_PLAN objects or in creatures.
Usually empty lines are used to divide different types of structures like the file name and [OBJECT:] or different entries, however everything which is not a token besides the 1st string (which is the filename) is understood as comments and is not considered.
The tokens are enclosed in square brackets ([TOKEN:VALUES]).
When a world is generated, the raw files are copied from <game folder>/raw/ to <game folder>/data/save/REGION/raw/. It is currently unknown how much these can then be changed without breaking the save.
A list of tokens can be seen at Category:Tokens.
Parsing[edit]
The order that Dwarf Fortress parses raw files is determined by the first line of the raw file (not necessarily the filename). This parsing order is important for certain tags such as [COPY_TAGS_FROM], but not for most other tags.