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 "Graphics token"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(→‎Layered Conditions: v51 conditions)
m (→‎Layered Conditions: AND/OR conditions)
 
(25 intermediate revisions by 7 users not shown)
Line 105: Line 105:
  
 
|-
 
|-
| {{text_anchor|LIST_ICON}} || The default icon for this creature in lists, such as [[Arena]] mode or overall training.
+
| {{text_anchor|LIST_ICON}} || The default icon for this creature in lists, such as [[Arena mode]] or overall training.
  
 
|-
 
|-
Line 115: Line 115:
 
|-
 
|-
 
| {{text_anchor|SKELETON_WITH_SKULL}} || The sprite for a rotten corpse that can have a [[totem]] made from it.
 
| {{text_anchor|SKELETON_WITH_SKULL}} || The sprite for a rotten corpse that can have a [[totem]] made from it.
 +
 +
|-
 +
| {{text_anchor|GLOW}}{{version|51.01-beta26}} || The creature is in the [dark]. Graphical replacement for {{token|GLOWTILE}}.
 +
 +
|-
 +
| {{text_anchor|GLOW_LEFT_GONE}}{{version|51.01-beta26}} || As {{token|GLOW|graphics}}, but with their left eye missing. If the sprite is facing forwards, then the visually leftmost eye should remain.
 +
 +
|-
 +
| {{text_anchor|GLOW_RIGHT_GONE}}{{version|51.01-beta26}} || Counterpart of {{token|GLOW_LEFT_GONE|graphics}}.
 +
 +
|-
 +
| {{text_anchor|GLOW_CHILD}}{{version|51.01-beta26}} || A child creature is in darkness. Does not have wound states.
  
 
|}
 
|}
  
 
=== Layered Conditions ===
 
=== Layered Conditions ===
Layers aren't very useful on their own, so they come with a set of conditions to define how when they are displayed and how they interact.
+
Layers aren't very useful on their own, so they come with a set of conditions to define how when they are displayed and how they interact. Unless otherwise stated, a layer will only render if all of its conditions are true.
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 127: Line 139:
 
! Type
 
! Type
 
! Description
 
! Description
 +
 +
|-
 +
| {{text_anchor|LAYER_GROUP}} ||
 +
| General{{verify}}
 +
| Begins a layer group. Only the first-matching layer in a group will be rendered, so list more specific items at the beginning of the layer group and more general items towards the end.
  
 
|-
 
|-
Line 132: Line 149:
 
* condition
 
* condition
 
| Creature<br>Graphics
 
| Creature<br>Graphics
| Begins defining a layer set for a creature's graphics.  Valid values of ''condition'' are DEFAULT, PORTRAIT{{version|51.01}}, or any valid values  
+
| Begins defining a layer set for a creature's graphics.  Valid values of ''condition'' are DEFAULT, PORTRAIT{{version|50.13}}, BABY:DEFAULT{{version|51.01-beta20}}, CHILD:DEFAULT{{version|51.01-beta20}}, or CORPSE Valid values for basic conditions may not work.{{verify}}
  
 
|-
 
|-
| {{text_anchor|LS_PALETTE}}{{version|51.01}} ||
+
| {{text_anchor|LS_PALETTE}}{{version|50.13}} ||
 
*  name
 
*  name
 
|| Layer<br>Set
 
|| Layer<br>Set
|| Begins defining a palette for the layer set. Its name can be referenced by {{token|USE_PALETTE|g}}. Unlike the palettes used to render all [[descriptor color tokens]], it can be of any length.
+
|| Begins defining a palette for the layer set. Its name can be referenced by {{token|USE_PALETTE|g}}. Unlike the palettes used to render all [[descriptor color token]]s, it can be of arbitrary length.
  
 
|-
 
|-
| {{text_anchor|LS_PALETTE_FILE}}{{version|51.01}} ||
+
| {{text_anchor|LS_PALETTE_FILE}}{{version|50.13}} ||
 
* file name
 
* file name
| The file name of the 8bit RGBA (sometimes called 32bit) in the <tt>\graphics\images</tt> folder of the mod, such as <tt>images/portraits/dwarf_portrait_body_palette.png</tt>.
+
| Palette
 +
| The file name of the 8bit RGBA (sometimes called 32bit) in the <tt>/graphics/images</tt> folder of the mod, such as <tt>images/portraits/dwarf_portrait_body_palette.png</tt>.
  
 
|-
 
|-
| {{text_anchor|LS_PALETTE_DEFAULT}}{{version|51.01}} ||
+
| {{text_anchor|LS_PALETTE_DEFAULT}}{{version|50.13}} ||
 
* integer  
 
* integer  
 
| Palette
 
| Palette
Line 152: Line 170:
  
 
|-
 
|-
| {{text_anchor|LG_CONDITION_BP}}{{version|51.01}} ||
+
| {{text_anchor|LG_CONDITION_BP}}{{version|50.13}} ||
 
*  selection criteria BY_TYPE, BY_CATEGORY, BY_TOKEN
 
*  selection criteria BY_TYPE, BY_CATEGORY, BY_TOKEN
 
*  category, type, or token
 
*  category, type, or token
Line 168: Line 186:
 
* Armor type (ARMOR, GLOVES, Etc.)
 
* Armor type (ARMOR, GLOVES, Etc.)
 
* Item ID(s)
 
* Item ID(s)
|| Armor<br>Wieldables || Defines a clothing or armor graphic by the specific part it is equipped to, the type of armor it is, and the internal id of that item.  
+
|| Armor<br>Wieldables || Defines a clothing or armor graphic by the specific part it is equipped to, the [[Item token|type]] of armor it is, and the internal ID of that item. Additional arguments can be supplied to check for additional subtypes. Valid if any matching items are worn.
 
For example, a condition representing a right handed mitten or glove would be defined as:
 
For example, a condition representing a right handed mitten or glove would be defined as:
 +
 
<code>[CONDITION_ITEM_WORN:BY_TOKEN:RH:GLOVES:ITEM_GLOVES_MITTENS]</code>
 
<code>[CONDITION_ITEM_WORN:BY_TOKEN:RH:GLOVES:ITEM_GLOVES_MITTENS]</code>
Also accepts the input <code>ANY_HELD</code> or <code>WIELD</code> (e.g. <code>WIELD:WEAPON:ANY</code>).
+
Also accepts the input <code>ANY_HELD</code> or <code>WIELD</code> (e.g. <code>WIELD:WEAPON:ANY</code>), though ANY_HELD has been bugged since v50.14.
  
 
|-
 
|-
Line 179: Line 198:
 
* Armor type
 
* Armor type
 
* Item ID(s)
 
* Item ID(s)
|| Armor || Causes the current layer to not be rendered if the creature has one of the items worn or equipped. Also accepts the input <code>ANY_HELD</code> or <code>WIELD</code> (e.g. <code>WIELD:WEAPON:ANY</code>).
+
|| Armor || Causes the current layer to not be rendered if the creature has one of the items worn or equipped. Also accepts the input <code>ANY_HELD</code> or <code>WIELD</code> (e.g. <code>WIELD:WEAPON:ANY</code>). Note that ANY_HELD has been bugged since v50.14.
  
 
|-
 
|-
Line 191: Line 210:
 
* dye color
 
* dye color
 
|| Armor
 
|| Armor
|| Should represent which color the clothing is dyed. Currently nonfunctional.{{version|50.05}}
+
|| Represents which color the clothing is dyed. Partially-working.{{version|50.15}}
 +
Takes a [[descriptor color]]. Vanilla [[dye]] options:
 +
* MIDNIGHT_BLUE - ([[Dimple cup]])
 +
* EMERALD - ([[Blade weed]])
 +
* RED - ([[Hide root]])
 +
* BLACK - ([[Sliver barb]])
  
 
|-
 
|-
 
| {{text_anchor|CONDITION_NOT_DYED}} ||  || Armor
 
| {{text_anchor|CONDITION_NOT_DYED}} ||  || Armor
|| Should check if the clothing is dyed. Currently nonfunctional.{{version|50.05}}
+
|| Checks if the clothing is dyed.{{version|50.15}}
  
 
|-
 
|-
 
| {{text_anchor|CONDITION_MATERIAL_FLAG}} ||
 
| {{text_anchor|CONDITION_MATERIAL_FLAG}} ||
 
* material flag
 
* material flag
|| Material || Changes graphics based on the material an equipped item is made of. Valid material flags are similar to [[Reaction#Full_token_list|reactant conditions]] including:
+
|| Material || Changes graphics based on the material an equipped item is made of. Specifying multiple of this condition for a layer uses the "AND" instead of "OR" logical operator, whether placed in the same line or on separate lines. Valid material flags are similar to [[Reaction#Full_token_list|reactant conditions]] including:
 
* WOVEN_ITEM
 
* WOVEN_ITEM
 
* ANY_X_MATERIAL
 
* ANY_X_MATERIAL
Line 207: Line 231:
 
* IS_DIVINE_MATERIAL
 
* IS_DIVINE_MATERIAL
 
* NOT_ARTIFACT
 
* NOT_ARTIFACT
* IS_CRAFTED_ARTIFACT
+
* <span style="text-decoration: line-through; text-decoration-thickness:0.15em;">IS_CRAFTED_ARTIFACT</span> (Note that this token might not have ever worked.)
 
* METAL_ITEM_MATERIAL
 
* METAL_ITEM_MATERIAL
 
* GLASS_MATERIAL
 
* GLASS_MATERIAL
 
* FIRE_BUILD_SAFE
 
* FIRE_BUILD_SAFE
 
* MAGMA_BUILD_SAFE
 
* MAGMA_BUILD_SAFE
 +
* GROWN_NOT_CRAFTED{{version|51.01-beta20}}
 
[http://www.bay12forums.com/smf/index.php?topic=169696.msg8442543#msg8442543 among other, less useful ones.]
 
[http://www.bay12forums.com/smf/index.php?topic=169696.msg8442543#msg8442543 among other, less useful ones.]
  
Line 217: Line 242:
 
| {{text_anchor|CONDITION_MATERIAL_TYPE}} ||
 
| {{text_anchor|CONDITION_MATERIAL_TYPE}} ||
 
* material token
 
* material token
|| Material || Changes graphics based on the material an equipped item is made of. Valid material types take the form <code>METAL:COPPER</code> where copper can be replaced with any weapons-grade metal. General [[material token]]s are '''not''' functional. {{token|CONDITION_MATERIAL_FLAG|g}} is a better option for any material condition other than metal.
+
|| Material || Changes graphics based on the material an equipped item is made of. Valid material types are <code>INORGANIC</code> or <code>METAL:IRON</code> where iron can be replaced with any weapons-grade metal. General [[material token]]s are '''not''' functional. {{token|CONDITION_MATERIAL_FLAG|g}} is a better option for any material condition other than metal.
  
 
|-
 
|-
| {{text_anchor|CONDITION_PROFESSION_CATEGORY}} ||
+
| {{text_anchor|CONDITION_PROFESSION_CATEGORY}}{{version|50.01-v50.13}} <br /> Note: This condition is bugged and doesn't work since DFv50.14.||
 
* [[Unit type token#Profession Categories|profession category token(s)]]
 
* [[Unit type token#Profession Categories|profession category token(s)]]
 
|| General
 
|| General
|| Checks the profession category of the creature to act as a condition. Multiple profession category tokens can be chained together. You can also use multiple of these tokens instead of listing them all in a single one, but this is functionally identical. Valid Profession tokens which are not categories will be ignored; values that do not match any existing Profession will be treated as <code>NONE</code> and thus apply to doctors, military, etc..
+
|| Checks the profession category of the creature to act as a condition. Multiple profession category tokens can be supplied as additional arguments, and will be valid for any of them. You can also use multiple of these tokens instead of listing them all in a single line, but this is functionally identical. Valid Profession tokens which are not categories will be ignored; values that do not match any existing Profession will be treated as <code>NONE</code> and thus apply to doctors, military, etc..
  
 
|-
 
|-
 
| {{text_anchor|CONDITION_RANDOM_PART_INDEX}} ||
 
| {{text_anchor|CONDITION_RANDOM_PART_INDEX}} ||
* body part
+
* identifier
 
* integer index
 
* integer index
 
* integer range
 
* integer range
 
|| General
 
|| General
|| Chooses a random layer within the same group of body parts. Index is which option this condition is, out of Range number of options. Ex:
+
|| Chooses a random layer among layers with a CONDITION_RANDOM_PART_INDEX with the same identifier. Index is which option this condition is, out of Range number of options. Ex:
 
<code>[CONDITION_RANDOM_PART_INDEX:HEAD:3:4]</code>
 
<code>[CONDITION_RANDOM_PART_INDEX:HEAD:3:4]</code>
Is the third possible random head out of four total options. One of these random conditions each will be put into a set of four slightly different heads to add some random variation in the appearance of the creature's head.
+
is the third possible random head out of four total options. One of these random conditions each will be put into a set of four different sprites to add some random variation in the appearance of the creature's head.
  
 
|-
 
|-
Line 267: Line 292:
 
* VAMPCURSE
 
* VAMPCURSE
 
* RAISED_UNDEAD
 
* RAISED_UNDEAD
 +
* DISTURBED_DEAD
 
* GHOUL
 
* GHOUL
  
Line 320: Line 346:
  
 
|-
 
|-
| {{text_anchor|ITEM_QUALITY}}{{version|51.01}} ||
+
| {{text_anchor|ITEM_QUALITY}}{{version|50.13}} ||
 
* integer
 
* integer
| Armor<br>Wieldables{{verify}}
+
| Armor<br>Wieldables
|| Checks the current {{token|CONDITION_ITEM_WORN|g}}'s [[quality]]. 0 is base quality, 5 is masterwork.  See [CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT] for [[artifact]]-quality items.
+
|| Checks the current {{token|CONDITION_ITEM_WORN|g}}'s [[quality]]. 0 is base quality, 5 is masterwork.  See <nowiki>[</nowiki>[[Graphics_token#CONDITION_MATERIAL_FLAG |CONDITION_MATERIAL_FLAG]]:NOT_ARTIFACT] for non-[[artifact]]-quality items.
  
 
|-
 
|-
| {{text_anchor|USE_STANDARD_PALETTE_FROM_ITEM}}{{version|51.01}} || || Armor<br>Wieldables{{verify}}
+
| {{text_anchor|USE_PALETTE}}{{version|50.13}} ||
|| Uses the default palette to render the layer based on the current {{token|CONDITION_ITEM_WORN|g}}'s [[color]].
+
* layer set palette
 +
* row
 +
| General
 +
|| Colors the layer using that row of either the layer-set-specific {{token|LS_PALETTE|}} or a predefined [[Graphics#Palettes|palette]] such as DEFAULT.
 +
 
 +
|-
 +
| {{text_anchor|USE_STANDARD_PALETTE_FROM_ITEM}}{{version|50.13}} || || Armor<br>Wieldables
 +
|| Uses the default palette to render the layer based on the [[Material definition token#STATE_COLOR|color]] of the current {{token|CONDITION_ITEM_WORN|g}}.
  
 
|-
 
|-
| {{text_anchor|CONDITION_BP}}{{version|51.01}} ||
+
| {{text_anchor|CONDITION_BP}}{{version|50.13}} ||
 
*  selection criteria BY_TYPE, BY_CATEGORY, BY_TOKEN
 
*  selection criteria BY_TYPE, BY_CATEGORY, BY_TOKEN
 
*  category, type, or token
 
*  category, type, or token
Line 337: Line 370:
  
 
|-
 
|-
| {{text_anchor|BP_APPEARANCE_MODIFIER_RANGE}}{{version|51.01}} ||
+
| {{text_anchor|BP_APPEARANCE_MODIFIER_RANGE}}{{version|50.13}} ||
 
*  QUALITY
 
*  QUALITY
 
*  minimum
 
*  minimum
Line 345: Line 378:
  
 
|-
 
|-
| {{text_anchor|BP_PRESENT}}{{version|51.01}} || || Body
+
| {{text_anchor|BP_PRESENT}}{{version|50.13}} || || Body
 
|| Checks if the current {{token|CONDITION_BP|g}} is present and not destroyed, pulped, or severed. Can also be applied to {{token|LG_CONDITION_BP|g}}.
 
|| Checks if the current {{token|CONDITION_BP|g}} is present and not destroyed, pulped, or severed. Can also be applied to {{token|LG_CONDITION_BP|g}}.
  
 
|-
 
|-
| {{text_anchor|BP_SCARRED}}{{version|51.01}} || || Body
+
| {{text_anchor|BP_SCARRED}}{{version|50.13}} || || Body
 
|| Checks if the current {{token|CONDITION_BP|g}} is scarred. Seems to also require {{token|BP_PRESENT|g}} to avoid illogical results. {{verify}}
 
|| Checks if the current {{token|CONDITION_BP|g}} is scarred. Seems to also require {{token|BP_PRESENT|g}} to avoid illogical results. {{verify}}
  
|-
 
| {{text_anchor|USE_PALETTE}}{{version|51.01}} ||
 
* layer set palette
 
* row
 
| General
 
|| Colors the layer using that row of the layer-set-specific {{token|LS_PALETTE|g}}.
 
 
|-
 
 
|}
 
|}
  
Line 385: Line 410:
  
 
|-
 
|-
| {{text anchor|LIGHT_VERMIN}} || For [[firefly|fireflies]] etc. Does not replace {{token|VERMIN|g}}.
+
| {{text anchor|LIGHT_VERMIN}} || For [[firefly|fireflies]] etc. Does not replace {{token|VERMIN|g}}.  
  
 
|-
 
|-
| {{text anchor|LIGHT_VERMIN_ALT}} || Like {{token|VERMIN_ALT|g}} for [[firefly|fireflies]] etc.
+
| {{text anchor|LIGHT_VERMIN_ALT}} || Like {{token|VERMIN_ALT|g}} for [[firefly|fireflies]] etc.  
  
 
|-
 
|-
| {{text anchor|LIGHT_SWARM_SMALL}} || Like {{token|SWARM_SMALL|g}} for [[firefly|fireflies]] etc. in small groups.
+
| {{text anchor|LIGHT_SWARM_SMALL}} || Unused.  
  
 
|-
 
|-
| {{text anchor|LIGHT_SWARM_MEDIUM}} || Like {{token|SWARM_LARGE|g}} for [[firefly|fireflies]] etc. in large groups.
+
| {{text anchor|LIGHT_SWARM_MEDIUM}} || Unused.  
  
 
|-
 
|-
| {{text anchor|LIGHT_SWARM_LARGE}} || Like {{token|SWARM_LARGE|g}} for [[firefly|fireflies]] etc.
+
| {{text anchor|LIGHT_SWARM_LARGE}} || Unused.  
  
 
|-
 
|-

Latest revision as of 15:37, 1 April 2025

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


For an explanation of how to use the various graphics types, see Graphics.

The [OBJECT:GRAPHICS] token defines the use of various tile-based graphics in the game. As of version 50.01, graphics tokens have been greatly expanded to accommodate the release of the Steam & Itch premium version. These tokens, and explanations on how to use them, are listed below; the list will expand as the tokens are discovered and understood.

Creature Graphics[edit]

Creature graphics are found within graphics_creature_x files (such as graphics_creature_domestic or graphics_creature_layered). All graphics files must begin with the file name, followed by the [OBJECT:GRAPHICS] type that tells the game that the file contains graphics definitions. A more detailed explanation on how to use these can be found in creature graphics.

Types[edit]

Type Arguments Description
 CREATURE_GRAPHICS The simplest and most common form of creature graphics for defining one sprite for each basic condition.

Further conditions are required for this to function following the creature graphics format. Accepts large graphics tokens.

Additionally used to start defining a layered graphics set.

 CREATURE_CASTE_GRAPHICS Nearly the same as [CREATURE_GRAPHICS], but allows a separate sprite to be defined for each caste.

A simple alternative to Layered Graphics.

Requires conditions defined in creature graphics format. Accepts large graphics tokens.

 STATUE_CREATURE_GRAPHICS Format for beginning a creature statue definition. Defines a 1x2 vertical rectangle to be displayed when a statue depicts one of these creatures.
 STATUE_CREATURE_CASTE_GRAPHICS Format for beginning a creature statue definition while specifying caste. Defines a 1x2 vertical rectangle to be displayed when a statue depicts one of these creatures.
 TILE_GRAPHICS_RECTANGLE Graphics for a 3x2 rectangle; for creatures, this is used exclusively for representing Forgotten Beasts based on their body parts. Uses forgotten beast graphics. It's also, however, used for interface graphics, see graphics_interface.txt.

Conditions[edit]

Different graphics can be defined for the same creature based on some properties about it. Below is a list of all the basic "creature texture" types that can be used as additional conditions to various basic sprites.

Condition Description
 DEFAULT The default condition that will be displayed unless overwritten by a more specific one below.
 LAW_ENFORCE Displayed if the unit is law enforcement.
 TAX_ESCORT Displayed if the unit escorts a tax collector (unused).
 ANIMATED Displayed if the creature is raised from the dead using an I_EFFECT:ANIMATE interaction.
 GHOST Displayed if the creature is a ghost.
 ADVENTURER Displayed if the creature is an adventurer.
 CORPSE Displayed for corpses.

Basic creature sprite types[edit]

An individual sprite can be of any of the following classes. If "accepts secondary" is "yes", it can also have an extra condition tacked on at the end.

Condition Description
 Basic Condition Any of the above conditions can be used on their own, as the default for that condition class.
 Unit type Any Unit type token can be used. You may also append a basic condition as above to further specify.
 Position Any Position token can be used, such as MONARCH, BROKER etc. All position tokens are raw-defined; any modded positions can have their own graphics. You may also append a basic condition as above to further specify.
 LIST_ICON The default icon for this creature in lists, such as Arena mode or overall training.
 EGG The sprite for a clutch of eggs.
 SKELETON The sprite for a rotten corpse.
 SKELETON_WITH_SKULL The sprite for a rotten corpse that can have a totem made from it.
 GLOWv51.01-beta26 The creature is in the [dark]. Graphical replacement for [GLOWTILE].
 GLOW_LEFT_GONEv51.01-beta26 As [GLOW], but with their left eye missing. If the sprite is facing forwards, then the visually leftmost eye should remain.
 GLOW_RIGHT_GONEv51.01-beta26 Counterpart of [GLOW_LEFT_GONE].
 GLOW_CHILDv51.01-beta26 A child creature is in darkness. Does not have wound states.

Layered Conditions[edit]

Layers aren't very useful on their own, so they come with a set of conditions to define how when they are displayed and how they interact. Unless otherwise stated, a layer will only render if all of its conditions are true.

Token Arguments Type Description
 LAYER_GROUP General[Verify] Begins a layer group. Only the first-matching layer in a group will be rendered, so list more specific items at the beginning of the layer group and more general items towards the end.
 LAYER_SET
  • condition
Creature
Graphics
Begins defining a layer set for a creature's graphics. Valid values of condition are DEFAULT, PORTRAITv50.13, BABY:DEFAULTv51.01-beta20, CHILD:DEFAULTv51.01-beta20, or CORPSE Valid values for basic conditions may not work.[Verify]
 LS_PALETTEv50.13
  • name
Layer
Set
Begins defining a palette for the layer set. Its name can be referenced by [USE_PALETTE]. Unlike the palettes used to render all descriptor color tokens, it can be of arbitrary length.
 LS_PALETTE_FILEv50.13
  • file name
Palette The file name of the 8bit RGBA (sometimes called 32bit) in the /graphics/images folder of the mod, such as images/portraits/dwarf_portrait_body_palette.png.
 LS_PALETTE_DEFAULTv50.13
  • integer
Palette Defines the default row of a layer set palette, conventionally 0. The exact color values on this row will be replaced on layer images with the colors in the same column, based on what row is passed as an argument to [USE_PALETTE].
 LG_CONDITION_BPv50.13
  • selection criteria BY_TYPE, BY_CATEGORY, BY_TOKEN
  • category, type, or token
Layer
Group
Allows the entire layer group (rather than an individual layer) to be switched on and off depending on the conditions of a body part. Should accept the same tokens [CONDITION_BP] does.[Verify]
 END_LAYER_GROUP Layer
Group
Explicitly marks the end of a layer group, which allows layers after to not belong to any layer group.
 CONDITION_ITEM_WORN Armor
Wieldables
Defines a clothing or armor graphic by the specific part it is equipped to, the type of armor it is, and the internal ID of that item. Additional arguments can be supplied to check for additional subtypes. Valid if any matching items are worn.

For example, a condition representing a right handed mitten or glove would be defined as:

[CONDITION_ITEM_WORN:BY_TOKEN:RH:GLOVES:ITEM_GLOVES_MITTENS] Also accepts the input ANY_HELD or WIELD (e.g. WIELD:WEAPON:ANY), though ANY_HELD has been bugged since v50.14.

 SHUT_OFF_IF_ITEM_PRESENT Armor Causes the current layer to not be rendered if the creature has one of the items worn or equipped. Also accepts the input ANY_HELD or WIELD (e.g. WIELD:WEAPON:ANY). Note that ANY_HELD has been bugged since v50.14.
 CONDITION_CASTE
  • caste name(s)
General Displays this layer if the creature is this caste. Only one caste is accepted for each condition, but multiple caste conditions can be used in one layer and the layer will be displayed if any of them match.
 CONDITION_DYE
  • dye color
Armor Represents which color the clothing is dyed. Partially-working.v50.15

Takes a descriptor color. Vanilla dye options:

 CONDITION_NOT_DYED Armor Checks if the clothing is dyed.v50.15
 CONDITION_MATERIAL_FLAG
  • material flag
Material Changes graphics based on the material an equipped item is made of. Specifying multiple of this condition for a layer uses the "AND" instead of "OR" logical operator, whether placed in the same line or on separate lines. Valid material flags are similar to reactant conditions including:
  • WOVEN_ITEM
  • ANY_X_MATERIAL
with X being:
  • PLANT, SILK, YARN, LEATHER, WOOD, SHELL, BONE, STONE, GEM, TOOTH, HORN, PEARL
  • IS_DIVINE_MATERIAL
  • NOT_ARTIFACT
  • IS_CRAFTED_ARTIFACT (Note that this token might not have ever worked.)
  • METAL_ITEM_MATERIAL
  • GLASS_MATERIAL
  • FIRE_BUILD_SAFE
  • MAGMA_BUILD_SAFE
  • GROWN_NOT_CRAFTEDv51.01-beta20

among other, less useful ones.

 CONDITION_MATERIAL_TYPE
  • material token
Material Changes graphics based on the material an equipped item is made of. Valid material types are INORGANIC or METAL:IRON where iron can be replaced with any weapons-grade metal. General material tokens are not functional. [CONDITION_MATERIAL_FLAG] is a better option for any material condition other than metal.
 CONDITION_PROFESSION_CATEGORYv50.01-v50.13
Note: This condition is bugged and doesn't work since DFv50.14.
General Checks the profession category of the creature to act as a condition. Multiple profession category tokens can be supplied as additional arguments, and will be valid for any of them. You can also use multiple of these tokens instead of listing them all in a single line, but this is functionally identical. Valid Profession tokens which are not categories will be ignored; values that do not match any existing Profession will be treated as NONE and thus apply to doctors, military, etc..
 CONDITION_RANDOM_PART_INDEX
  • identifier
  • integer index
  • integer range
General Chooses a random layer among layers with a CONDITION_RANDOM_PART_INDEX with the same identifier. Index is which option this condition is, out of Range number of options. Ex:

[CONDITION_RANDOM_PART_INDEX:HEAD:3:4] is the third possible random head out of four total options. One of these random conditions each will be put into a set of four different sprites to add some random variation in the appearance of the creature's head.

 CONDITION_HAUL_COUNT_MIN
  • integer
General Counts how many items the creature is hauling. Used for [PACK_ANIMAL]s in vanilla.
 CONDITION_HAUL_COUNT_MAX
  • integer
General Counts how many items the creature is hauling. Used for [PACK_ANIMAL]s in vanilla.
 CONDITION_CHILD General Checks if the creature is a child or baby.
 CONDITION_NOT_CHILD General Checks if the creature is an adult.
 CONDITION_GHOST General Checks if the creature is a ghost.
 CONDITION_SYN_CLASS Syndrome Changes graphics based on any syndromes the creature is affected by. Vanilla values include:
  • ZOMBIE
  • NECROMANCER
  • VAMPCURSE
  • RAISED_UNDEAD
  • DISTURBED_DEAD
  • GHOUL
 CONDITION_TISSUE_LAYER Tissue Selects a tissue layer to use for checking other conditions. Ex:

[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]

 TISSUE_MIN_LENGTH
  • integer
Tissue Checks the current [CONDITION_TISSUE_LAYER]'s LENGTH appearance modifier. Is true if the LENGTH is greater than the integer input.
 TISSUE_MAX_LENGTH
  • integer
Tissue Checks the current [CONDITION_TISSUE_LAYER]'s LENGTH appearance modifier. Is true if the LENGTH is less than the integer input.
 TISSUE_MAY_HAVE_COLOR Tissue Checks the selected tissue's color. Accepts multiple color tokens, and is true if the any of the colors is present in the selected tissues.
 TISSUE_MAY_HAVE_SHAPING
  • styling token
Tissue Checks the current [CONDITION_TISSUE_LAYER]'s shaping (hairstyle). Valid tokens are NEATLY_COMBED, BRAIDED, DOUBLE_BRAIDS, PONY_TAILS, CLEAN_SHAVEN and STANDARD_HAIR/BEARD/MOUSTACHE/SIDEBURNS_SHAPINGS.[Verify]
 TISSUE_NOT_SHAPED Tissue Checks the current [CONDITION_TISSUE_LAYER]'s color. Accepts multiple color tokens, and is true if the any of the colors is present in the selected tissues.
 TISSUE_SWAP
  • IF_MIN_CURLY
  • integer
  • tile page id
  • x position
  • y position
Tissue Checks if a tissue is sufficiently curly, and if so swaps to display a different image. The new image is defined by the tile page ID, x position, and y position.

This condition should be within a [LAYER:... ] that has a similar graphic to the on in the TISSUE_SWAP. The current [CONDITION_TISSUE_LAYER] group must also include a [TISSUE_MIN_LENGTH].

 ITEM_QUALITYv50.13
  • integer
Armor
Wieldables
Checks the current [CONDITION_ITEM_WORN]'s quality. 0 is base quality, 5 is masterwork. See [CONDITION_MATERIAL_FLAG:NOT_ARTIFACT] for non-artifact-quality items.
 USE_PALETTEv50.13
  • layer set palette
  • row
General Colors the layer using that row of either the layer-set-specific [LS_PALETTE] or a predefined palette such as DEFAULT.
 USE_STANDARD_PALETTE_FROM_ITEMv50.13 Armor
Wieldables
Uses the default palette to render the layer based on the color of the current [CONDITION_ITEM_WORN].
 CONDITION_BPv50.13
  • selection criteria BY_TYPE, BY_CATEGORY, BY_TOKEN
  • category, type, or token
Body Defines a body part graphic using standard body token selection criteria.
 BP_APPEARANCE_MODIFIER_RANGEv50.13
  • QUALITY
  • minimum
  • maximum
Body Checks if current [CONDITION_BP]'s [BP_APPEARANCE_MODIFIER] falls within the chosen range.
 BP_PRESENTv50.13 Body Checks if the current [CONDITION_BP] is present and not destroyed, pulped, or severed. Can also be applied to [LG_CONDITION_BP].
 BP_SCARREDv50.13 Body Checks if the current [CONDITION_BP] is scarred. Seems to also require [BP_PRESENT] to avoid illogical results.[Verify]

Vermin Conditions[edit]

Special Conditions for [VERMIN] creature graphics:

Condition Description
 VERMIN The default graphic for this vermin.
 VERMIN_ALT Image cycles every 1 second.
 SWARM_SMALL For swarming vermin like flies and fairies in small groups.
 SWARM_MEDIUM For swarming vermin like flies and fairies in medium-sized groups.
 SWARM_LARGE For swarming vermin like flies and fairies in large groups.
 <