|This article is about an older version of DF.|
Raw files are text files found in the \raw\objects subfolder of Dwarf Fortress. 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.
Syntax of raw files
filename [OBJECT:TYPE] [TYPE:ID] <...contents...>
ID is an 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:
- BODY - body parts and structures
- CREATURE - creatures
- DESCRIPTOR - objects to be used for engravings/symbols
- ENTITY - civilizations
- GRAPHICS - graphic tiles for creatures
- ITEM - items
- LANGUAGE - language translation
- MATGLOSS - different types of materials (soil, minerals, wood, plants etc.)
- REACTION - smelter reactions
* usually the empty strings are used to divide different types of structures like the fine 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 the game is started the program "compiles" each file from <game folder>/raw/objects folder and converts them in actual data files which are placed in <game folder>/data/objects folder with the same names. This is made every time you start the game so if you make any changes to file structure or remove some files don't forget to clear the /data/objects folder as well for the game to avoid presense of data files which are no longer supported by raw files (the engine does not check for it yet).
A list of tokens can be seen at Category:Tokens.