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.

Difference between revisions of "Token"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Added tissue)
(Speech files added to token list, they are referenced by tokens and have a number of tokens to reference)
 
(48 intermediate revisions by 17 users not shown)
Line 1: Line 1:
In Dwarf Fortress, a '''token''' is a game code tag that adds information, restrictions or behaviour to a [[creature]], object, [[material]], terrain feature or other part of the game. Tokens are visible in the [[RAW]] .txt files, and can often be [[modding|modified]] to create some interesting results - some useful, some not so much.
+
{{Quality|Fine}}
 +
{{av}}
 +
{{Modding}}
 +
In ''Dwarf Fortress'', a '''token''' is a piece of text that defines the properties of an object.  An "object" could be a material, a type of tissue, an organ, a piece of armor, a creature, a biome, a civilisation, or anything else in the game.  A "property" could be how large something is, what it is made from, its melting temperature, its name, its biome preference (for civilisations) or anything else that makes it unique.  All information associated with the properties of an object in the game is defined using tokens. Tokens are used in the [[raws]], which can be easily [[modding|modified]], allowing users to create (and distribute) new content.
  
Examples of tokens include...
+
:* [[Audio]] tokens define audio metadata and the triggers to play music and sound.
 
+
:* [[Biome token]]s reference [[biome|environments]] for creatures, plants and [[civilization|entities]].
:* [[Ammo token]]s, used for ammo.
+
:* [[Building token]]s define buildings.
:* [[Armor token]]s define armor.
+
:* [[Body token]]s determine bodily structure and materials.
:* [[Biome token]]s are used in creature, entity and plant definitions for placement.
+
:** [[Bodygloss]] tokens perform a single-word substitution of a creature's body parts.
:* [[Building token]]s define buildings, their tiles, hotkeys, and how they block movement.
+
:* [[Body detail plan token]]s define some details of a body, similar to body tokens.
:* [[Body token]]s determine bodily structure, both ''body templates'' (BODY) and ''body parts''
 
:* [[Body detail plan token]] Like the above but for detail.
 
:* [[Bodygloss]] change how body parts appear.
 
 
:* [[Creature token]]s determine the properties of creatures.
 
:* [[Creature token]]s determine the properties of creatures.
:* [[DF2012:Creature variation token]] change the properties of creatures.
+
:* [[Creature variation token]]s are used to modify creatures.
:* [[Entity token]] defines entities, or [[civilizations]], in entity_*.txt files.
+
:* [[Descriptor color token]]s define colors used in text-based descriptions. Not to be confused with [[color scheme]]s.
:* [[Item token]]s are used in reactions, creatures and entities to refer to specific items.
+
:* [[Descriptor pattern token]]s define color patterns.
:* [[Item definition token]] is used in item definitions in the raws.
+
:* [[Descriptor shape token]]s define [[shape]]s.
:* [[Interaction token]] is used by interactions.
+
:* [[Entity token]]s define entities, or [[civilization]]s.
:* [[Labor token]] define labors.
+
:** [[Position token]]s define [[noble]] titles and administrative positions in entities.
:* [[Language token]] define language.
+
:* [[Graphics token]]s define tile-based [[graphics]].
:* [[Material token]]s are the same as item tokens, but for materials.
+
:* [[Item token]]s reference the most basic form of items (made specific by material tokens). Item tokens are mainly used in [[reactions]].
:* [[Material definition token]]s are used to define materials, like item definitions.
+
:* [[Item definition token]]s are used to define various types of item.
:* [[Plant token]]s define what plants are made of, where they grow, what can be made out of them, etc.
+
:** [[Ammo token]]s define ammunition, such as arrows and bolts.
:* [[Profession token]]s are referred to by tilesets and entities for purposes of nobility and the like.
+
:** [[Armor token]]s define armor.
:* [[Position token]]s define positions in entity_*.txt files.
+
:** [[Instrument token]]s define instruments.
:* [[Skill token]]s are referred to by creatures for natural skills and such.
+
:** [[Trap component token]]s define weapons used in traps.
:* [[Syndrome tokens]] define syndromes.
+
:** [[Tool token]]s define tools, similar to weapon tokens.
:* [[Tissue definition token]] is used to define tissues.
+
:** [[Weapon token]]s define weapons.
:* [[Tool token]] define tools. They're a lot like weapon tokens.  
+
:* [[Interaction token]]s define interactions.
:* [[Trap component token]]s define traps. A bit like weapon tokens.
+
:* [[Labor token]]s reference labors.
:* [[Weapon token]]s define weapons. They're fairly simple, so it's a good place to start with DF modding.
+
:* [[Language token]]s define a language's vocabulary. Since fictional languages in ''Dwarf Fortress'' are currently only used in names, language tokens do not define grammar.
:* [[World token]]s are used in custom world generation.
+
:* [[Material token]]s are used to refer to materials, similar to item tokens.
:* [[Unit type token]]s are used with various entity tokens, as well as in graphical tilesets.  
+
:* [[Material definition token]]s are used to define materials that appear in a number of object types.
 +
:** [[Inorganic material definition token]]s are specific to defining inorganic materials.
 +
:* [[Plant token]]s define plants.
 +
:* [[Reaction]] tokens define crafting recipes.
 +
:* [[Skill token]]s reference skills.
 +
:* [[Speech file]]s define strings used for certain lines of dialog and book titles.
 +
:* [[Syndrome token]]s define syndromes (ie: conditions, diseases, bonuses and maluses).
 +
:* [[Tissue definition token]]s define tissues.
 +
:* [[Unit type token]]s reference by tilesets and entities, for purposes of professions and the like.
 +
:* [[World token]]s are used in [[advanced world generation]].
  
Also note [[Reactions]], which are a little more complicated than simple tokens.
+
Also note the ``[LOG_CURRENT_ENTRY]`` token, available for all object types. For information regarding use, see [[Modding#Modifying the vanilla objects]].
  
This [http://www.bay12games.com/forum/index.php?board=13.0 forum] is the official DF subforum dedicated to discussions about modding.
+
== See also ==
 +
{{catbox|Tokens}}
  
 
----
 
 
 
'''See Also:'''
 
* [[Bodygloss]]
 
 
* [[Raw file]]
 
* [[Raw file]]
 
* [[Modding]]
 
* [[Modding]]
 +
* [[Lua scripting]]
 +
 
[[category:Modding]]
 
[[category:Modding]]
 +
[[ru:Token]]

Latest revision as of 00:57, 7 March 2025

This article is about the current version of DF.
Note that some content may still need to be updated.


In Dwarf Fortress, a token is a piece of text that defines the properties of an object. An "object" could be a material, a type of tissue, an organ, a piece of armor, a creature, a biome, a civilisation, or anything else in the game. A "property" could be how large something is, what it is made from, its melting temperature, its name, its biome preference (for civilisations) or anything else that makes it unique. All information associated with the properties of an object in the game is defined using tokens. Tokens are used in the raws, which can be easily modified, allowing users to create (and distribute) new content.

Also note the [LOG_CURRENT_ENTRY] token, available for all object types. For information regarding use, see Modding#Modifying the vanilla objects.

See also[edit]

CancelHideAbout

Rating Token