- 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.
40d:Raw file
Introduction
The modding of the Dwarf Fortress game is mostly limited to the things the author allowed us to do via text files because the application is not an open-source one. This page describes the main idea of the raw file.
What is a "raw file"?
Where are they?
A "raw file" is a text file which is stored into your <game folder>/raw/ folder. There're 2 subfolders: "graphics" and "objects".
The first one contains information about a special feature which supports replacement of ascii characters for creatures with actual pictures. The second one contains all the major moddable info about the game.
How does the game understands their content?
There are 2 major rules about raw file for the game to read it. 1) It should have a file name (without an extension) in the first string inside. 2) The next not empty string* should be a [OBJECT:TYPE] token which describes the contents of the file. The types are: BODY, CREATURE, DESCRIPTOR, ENTITY, GRAPHICS, ITEM, LANGUAGE, MATGLOSS, REACTION.
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]). [Category:Tokens|The list of tokens]
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).