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

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 23: Line 23:
 
| type
 
| type
 
| Defines what things are capable of triggering this interaction - can be specified multiple times. Valid values:
 
| Defines what things are capable of triggering this interaction - can be specified multiple times. Valid values:
* REGION - The interaction takes place in particular types of world regions.
+
* REGION - The interaction takes place in particular regions as specified using [[Interaction_token#IS_REGION|[IS_REGION]]].
* SECRET - The interaction is a secret that can be learned by particular individuals.
+
* SECRET - The interaction is a secret that can be learned and passed on as indicated via [[Interaction_token#IS_SECRET|[IS_SECRET]]].
* DISTURBANCE - The interaction is triggered when disturbing a [[tomb]].
+
* DISTURBANCE - The interaction is used by [[mummy|mummies]] solely on units who disturb their [[tomb|resting place]].
 
* DEITY - The interaction is inflicted upon mortals by the gods.
 
* DEITY - The interaction is inflicted upon mortals by the gods.
 
* ATTACK - The interaction is triggered by an attack during combat.
 
* ATTACK - The interaction is triggered by an attack during combat.
 
* INGESTION - The interaction is triggered by eating or drinking something.
 
* INGESTION - The interaction is triggered by eating or drinking something.
 
* CREATURE_ACTION - The interaction is triggered by an explicit action.
 
* CREATURE_ACTION - The interaction is triggered by an explicit action.
* UNDERGROUND_SPECIAL - The interaction takes place in [[Demonic fortress|curious underground structure]]s.
+
* UNDERGROUND_SPECIAL - The interaction takes place in [[Demonic fortress|curious underground structures]].
 
* EXPERIMENT - This interaction is triggered by experimenting [http://www.bay12forums.com/smf/index.php?topic=175437.msg8083510#msg8083510]
 
* EXPERIMENT - This interaction is triggered by experimenting [http://www.bay12forums.com/smf/index.php?topic=175437.msg8083510#msg8083510]
  
Line 37: Line 37:
 
| Within I_SOURCE
 
| Within I_SOURCE
 
| text
 
| text
| Describes what the interaction did to a historical figure. Displayed in legends mode after the name of the historical figure that performed the interaction.
+
| Describes what the interaction did to a historical figure; this is displayed in legends mode after the name of the historical figure that performed the interaction.
  
 
[IS_HIST_STRING_1: cursed]
 
[IS_HIST_STRING_1: cursed]
Line 45: Line 45:
 
| Within I_SOURCE
 
| Within I_SOURCE
 
| text
 
| text
| Describes what the interaction did to a historical figure. Displayed in legends mode after the name of the historical figure that was targeted by the interaction.
+
| Describes what the interaction did to a historical figure; this is displayed in legends mode after the name of the historical figure that was targeted by the interaction.
  
 
[IS_HIST_STRING_2: to assume the form of a lizard-like monster every full moon]
 
[IS_HIST_STRING_2: to assume the form of a lizard-like monster every full moon]
Line 72: Line 72:
  
 
[IS_TRIGGER_STRING_THIRD: has]
 
[IS_TRIGGER_STRING_THIRD: has]
 
|-
 
| {{text anchor|IS_FREQUENCY}}
 
| Within I_SOURCE
 
| Number
 
| Presumably, the probability of the biome specified by [[Interaction_token#IS_REGION|[IS_REGION]]] to have this interaction.
 
  
 
|-
 
|-
Line 83: Line 77:
 
| Within I_SOURCE
 
| Within I_SOURCE
 
| string
 
| string
| Generally used with secrets, describes what the secret is about.
+
| Generally used with [[Interaction_token#I_SOURCE|[I_SOURCE:SECRET]]] interactions to describe what the secret is about. This name is engraved onto the appropriate secret-containing slabs from worldgen, and is used in legends mode when describing the secret being learnt by historical figures.
 +
 
 +
[IS_NAME:the secrets of life and death]
  
 
|-
 
|-
Line 100: Line 96:
 
* SAVAGE_ONLY
 
* SAVAGE_ONLY
 
* Region type - SWAMP, DESERT, FOREST, MOUNTAINS, OCEAN, LAKE, GLACIER, TUNDRA, GRASSLAND, HILLS
 
* Region type - SWAMP, DESERT, FOREST, MOUNTAINS, OCEAN, LAKE, GLACIER, TUNDRA, GRASSLAND, HILLS
 +
 +
|-
 +
| {{text anchor|IS_FREQUENCY}}
 +
| Within I_SOURCE
 +
| Number
 +
| Presumably, the probability of the biome specified by [[Interaction_token#IS_REGION|[IS_REGION]]] to have this interaction.
  
 
|-
 
|-
Line 124: Line 126:
 
* SEE_THE_GREAT_NATURAL_SITES
 
* SEE_THE_GREAT_NATURAL_SITES
 
* IMMORTALITY
 
* IMMORTALITY
However, currently only immortality will result in a secret being pursued during world-gen.
+
However, currently only IMMORTALITY will result in a secret being pursued during world-gen.
  
 
|-
 
|-
Line 131: Line 133:
 
| Secret Flag
 
| Secret Flag
 
| Indicates how the secret can be learned. Valid values:
 
| Indicates how the secret can be learned. Valid values:
* SUPERNATURAL_LEARNING_POSSIBLE - the secret can be learned by supernatural means
+
* SUPERNATURAL_LEARNING_POSSIBLE - the secret can gifted by gods to their worshippers
 
* MUNDANE_RESEARCH_POSSIBLE - the secret can be researched by mundane means
 
* MUNDANE_RESEARCH_POSSIBLE - the secret can be researched by mundane means
 
* MUNDANE_TEACHING_POSSIBLE - the secret can be taught to apprentices
 
* MUNDANE_TEACHING_POSSIBLE - the secret can be taught to apprentices
 
* MUNDANE_RECORDING_POSSIBLE:objects/text/(book_title).txt:objects/text/(book_topic).txt - the secret can be written in books with the specified title. If this tag is present, a slab will be created upon learning the secret by supernatural means.
 
* MUNDANE_RECORDING_POSSIBLE:objects/text/(book_title).txt:objects/text/(book_topic).txt - the secret can be written in books with the specified title. If this tag is present, a slab will be created upon learning the secret by supernatural means.
 +
 
|-
 
|-
 
| {{text anchor|IS_USAGE_HINT}}
 
| {{text anchor|IS_USAGE_HINT}}
 
| Within I_SOURCE:DEITY
 
| Within I_SOURCE:DEITY
 
| Usage Hint token
 
| Usage Hint token
| Indicates why a deity would choose to perform this interaction. See CDI:USAGE_HINT below for valid values - in this context, MEDIUM_BLESSING{{version|0.47.01}}, MEDIUM_CURSE{{version|0.47.01}}, MINOR_BLESSING{{version|0.47.01}}, MINOR_CURSE{{version|0.47.01}}, and MAJOR_CURSE are the only values that make sense.
+
| Indicates why a deity would choose to perform this interaction. See [[Interaction_token#USAGE_HINT|CDI:USAGE_HINT]] below for valid values - in this context, MINOR_BLESSING{{version|0.47.01}}, MEDIUM_BLESSING{{version|0.47.01}}, MINOR_CURSE{{version|0.47.01}}, MEDIUM_CURSE{{version|0.47.01}}, and MAJOR_CURSE are the only values that make sense.
  
 
|-
 
|-

Revision as of 21:56, 12 March 2020

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

The following tokens can be used to define and use interactions.

Definitions

Token Context Arguments Description


EXPERIMENT_ONLYv0.47.01 Global This disallows use of the interaction in play, and also encourages usage specifically to create experimental populations. [1]
I_SOURCE Global type Defines what things are capable of triggering this interaction - can be specified multiple times. Valid values:
  • REGION - The interaction takes place in particular regions as specified using [IS_REGION].
  • SECRET - The interaction is a secret that can be learned and passed on as indicated via [IS_SECRET].
  • DISTURBANCE - The interaction is used by mummies solely on units who disturb their resting place.
  • DEITY - The interaction is inflicted upon mortals by the gods.
  • ATTACK - The interaction is triggered by an attack during combat.
  • INGESTION - The interaction is triggered by eating or drinking something.
  • CREATURE_ACTION - The interaction is triggered by an explicit action.
  • UNDERGROUND_SPECIAL - The interaction takes place in curious underground structures.
  • EXPERIMENT - This interaction is triggered by experimenting [2]
IS_HIST_STRING_1 Within I_SOURCE text Describes what the interaction did to a historical figure; this is displayed in legends mode after the name of the historical figure that performed the interaction.

[IS_HIST_STRING_1: cursed]

IS_HIST_STRING_2 Within I_SOURCE text Describes what the interaction did to a historical figure; this is displayed in legends mode after the name of the historical figure that was targeted by the interaction.

[IS_HIST_STRING_2: to assume the form of a lizard-like monster every full moon]

IS_TRIGGER_STRINGv0.47.01 Within I_SOURCE text Displayed as an announcement when the interaction is carried out during play. The text follows the name of the target unit, and is preceded by IS_TRIGGER_STRING_SECOND or IS_TRIGGER_STRING_THIRD. May be limited to [I_SOURCE:DEITY] and [I_SOURCE:EXPERIMENT] interactions at present; this still needs to be tested.

[IS_TRIGGER_STRING: been infected with a contagious ghoulish condition]

IS_TRIGGER_STRING_SECONDv0.47.01 Within I_SOURCE text Presented before the IS_TRIGGER_STRING when describing the event in the second person.

[IS_TRIGGER_STRING_THIRD: have]

IS_TRIGGER_STRING_THIRDv0.47.01 Within I_SOURCE text Presented before the IS_TRIGGER_STRING when describing the event in the third person.

[IS_TRIGGER_STRING_THIRD: has]

IS_NAME Within I_SOURCE string Generally used with [I_SOURCE:SECRET] interactions to describe what the secret is about. This name is engraved onto the appropriate secret-containing slabs from worldgen, and is used in legends mode when describing the secret being learnt by historical figures.

[IS_NAME:the secrets of life and death]

IS_REGION Within I_SOURCE:REGION Region type Indicates what types of regions are capable of performing this interaction. Can be specified multiple times. Valid values:
  • ANY
  • ANY_TERRAIN
  • NORMAL_ALLOWED
  • EVIL_ALLOWED
  • GOOD_ALLOWED
  • SAVAGE_ALLOWED
  • EVIL_ONLY
  • GOOD_ONLY
  • SAVAGE_ONLY
  • Region type - SWAMP, DESERT, FOREST, MOUNTAINS, OCEAN, LAKE, GLACIER, TUNDRA, GRASSLAND, HILLS
IS_FREQUENCY Within I_SOURCE Number Presumably, the probability of the biome specified by [IS_REGION] to have this interaction.
IS_SPHERE Within I_SOURCE:SECRET Sphere Indicates the sphere to which this secret pertains. Only one sphere can be defined for each [I_SOURCE:SECRET] token, thus, several [I_SOURCE:SECRET] tokens are required to create a valid custom secret which belongs to several different spheres.
IS_SECRET_GOAL Within I_SOURCE:SECRET Secret Goal token Indicates why somebody would want to learn the secret. Valid values:
  • STAY_ALIVE
  • MAINTAIN_ENTITY_STATUS
  • START_A_FAMILY
  • RULE_THE_WORLD
  • CREATE_A_GREAT_WORK_OF_ART
  • CRAFT_A_MASTERWORK
  • BRING_PEACE_TO_THE_WORLD
  • BECOME_A_LEGENDARY_WARRIOR
  • MASTER_A_SKILL
  • FALL_IN_LOVE
  • SEE_THE_GREAT_NATURAL_SITES
  • IMMORTALITY

However, currently only IMMORTALITY will result in a secret being pursued during world-gen.

IS_SECRET Within I_SOURCE:SECRET Secret Flag Indicates how the secret can be learned. Valid values:
  • SUPERNATURAL_LEARNING_POSSIBLE - the secret can gifted by gods to their worshippers
  • MUNDANE_RESEARCH_POSSIBLE - the secret can be researched by mundane means
  • MUNDANE_TEACHING_POSSIBLE - the secret can be taught to apprentices
  • MUNDANE_RECORDING_POSSIBLE:objects/text/(book_title).txt:objects/text/(book_topic).txt - the secret can be written in books with the specified title. If this tag is present, a slab will be created upon learning the secret by supernatural means.
IS_USAGE_HINT Within I_SOURCE:DEITY Usage Hint token Indicates why a deity would choose to perform this interaction. See CDI:USAGE_HINT below for valid values - in this context, MINOR_BLESSINGv0.47.01, MEDIUM_BLESSINGv0.47.01, MINOR_CURSEv0.47.01, MEDIUM_CURSEv0.47.01, and MAJOR_CURSE are the only values that make sense.
I_TARGET Global ID, type Defines the targets available for subsequent use with [I_EFFECT] tokens. Multiple targets may be specified; the precise target(s) used with each interaction effect are indicated via their ID (see [IE_TARGET]). Valid values:
IT_LOCATION Within I_TARGET Location This is often included after [I_TARGET] token to add more detail about the target. Valid values:
  • CONTEXT_CREATURE - Used with CREATURE to target the whole unit.
  • CONTEXT_BP - Used with CREATURE to target the body part specified in [CDI:BP_REQUIRED].
  • CONTEXT_LOCATION - Used with LOCATION to target only a tile.
  • CONTEXT_CREATURE_OR_LOCATION - Used with LOCATION to allow for targetting of both creatures and tiles.
  • CONTEXT_ITEM - Used with CORPSE.
  • CONTEXT_REGION - Can only be used by [I_SOURCE:REGION] interactions.
  • CONTEXT_MATERIAL - Used with MATERIAL if you want an [I_EFFECT:MATERIAL_EMISSION] to obtain the emission material/flow type from [CDI:MATERIAL] or [CDI:FLOW].
  • RANDOM_NEARBY_LOCATIONv0.47.01 - Used with LOCATION. Targets a location from somewhere random within a number of squares from another LOCATION target specified by its target ID. For example, [I_TARGET:B:LOCATION] with [IT_LOCATION:RANDOM_NEARBY_LOCATION:A:5] will randomly select a tile lying somewhere within a radius of 5 tiles from [I_TARGET:A:LOCATION]. A walkable path between the two locations must exist.
IT_MANUAL_INPUT Within I_TARGET text Tells the adventure mode player what they should be selecting. If not specified, the player will only be able to target themselves.
IT_AFFECTED_CREATURE Within I_TARGET:CORPSE or I_TARGET:CREATURE CREATURE:CASTE Specifies specific creatures the interaction can target.
IT_AFFECTED_CLASS Within I_TARGET:CORPSE or I_TARGET:CREATURE Creature class Specifies creature classes the interaction can target.
IT_IMMUNE_CREATURE Within I_TARGET:CORPSE or I_TARGET:CREATURE CREATURE:CASTE Specifies specific creatures the interaction cannot target.
IT_IMMUNE_CLASS Within I_TARGET:CORPSE or I_TARGET:CREATURE Creature class Specifies creature classes the interaction cannot target.
IT_REQUIRES Within I_TARGET:CORPSE or I_TARGET:CREATURE Creature token or property Indicates that the target must have the specified property. Valid values:
  • FIT_FOR_ANIMATION - Any corpse or body part that can become a zombie (heads, hands, etc.)
  • FIT_FOR_RESURRECTION - The target corpse's UPPERBODY must be attached.
  • HAS_BLOOD
  • MORTAL
  • NO_AGING
  • STERILE
  • Creature token: BLOODSUCKER, CAN_LEARN, CAN_SPEAK, CRAZED, EXTRAVISION, MISCHIEVOUS (or MISCHIEVIOUS), NO_CONNECTIONS_FOR_MOVEMENT, NO_DIZZINESS, NO_DRINK, NO_EAT, NO_FEVERS, NO_PHYS_ATT_GAIN, NO_PHYS_ATT_RUST, NO_SLEEP, NO_THOUGHT_CENTER_FOR_MOVEMENT, NOBREATHE, NOEMOTION, NOEXERT, NOFEAR, NONAUSEA, NOPAIN, NOSTUN, NOT_LIVING, NOTHOUGHT, OPPOSED_TO_LIFE, PARALYZEIMMUNE, SUPERNATURAL, TRANCES, UTTERANCES
IT_FORBIDDEN Within I_TARGET:CORPSE or I_TARGET:CREATURE Creature token or property Indicates that the target must not have the specified property. Valid values are the same as for IT_REQUIRES.
IT_CANNOT_TARGET_IF_ALREADY_AFFECTED Within I_TARGET:CORPSE or I_TARGET:CREATURE Prevents the interaction from targeting a creature that's already under the effect of the same interaction.
IT_CANNOT_HAVE_SYNDROME_CLASS Within I_TARGET:CORPSE or I_TARGET:CREATURE Syndrome class Prevents the interaction from targeting a creature under the effects of a syndrome having the specified SYN_CLASS value.
IT_MATERIAL Within I_TARGET:MATERIAL type Specifies the type of material the interaction targets; currently only used for MATERIAL_EMISSION interaction effects. See Breath Attack Types. Valid values:
  • FLOW:Breath attack token - Specifies an attack not made of any material.
  • MATERIAL:Material token:Breath attack token - Specifies an attack made of a specific material.
  • CONTEXT_MATERIAL - Use material from [CDI:MATERIAL] token.
I_EFFECT Global type Specifies what the interaction does to the targets. Multiple [I_EFFECT]s may be specified in a single interaction, and the same type may be used more than once. Valid values:
  • ADD_SYNDROME - Adds one or more syndromes to a valid creature target. You must specify the syndrome details just below this interaction effect using the [SYNDROME] tag followed by the relevant syndrome tokens. See here for more information.
  • ANIMATE - Raises the target corpse/bodypart as an undead unit. The zombie will always be hostile to life and will retain no information about its original personality/loyalties. Syndromes can also be specified within this tag. If a regional interaction contains this effect, affected regions will have undead wildlife.
  • RESURRECT - Takes a target corpse and returns the creature to life. This can be used on parts that are not FIT_FOR_RESURRECTION, but only the main part (with an UPPERBODY attached) will remain loyal to its original faction. Syndromes can also be specified within this tag.
  • CLEAN - Removes contaminants from a valid creature target. See [IE_GRIME_LEVEL] and [IE_SYNDROME_TAG].
  • CONTACT - Causes the creatures to touch.
  • MATERIAL_EMISSION - Causes a particular material to be emitted. Used by evil weather and the MATERIAL_EMISSION interaction.
  • HIDE - Allows the creature to hide even if another creature can see it.
  • CREATE_ITEMv0.47.01 - Creates an item as described by [IE_ITEM] and [IE_ITEM_QUALITY].
  • CHANGE_ITEM_QUALITYv0.47.01 - Alters an item's quality level as indicated by either [IE_CHANGE_QUALITY] or [IE_SET_QUALITY]. When targeting a unit, all items equipped by that unit will be affected.
  • SUMMON_UNITv0.47.01 - Creates a new unit at the target. The type of unit can either be specified using the [CREATURE] token, or made to be randomly selected as indicated by a variety of flag-based tokens: [IE_CREATURE_FLAG], [IE_FORBIDDEN_CREATURE_FLAG], [IE_CREATURE_CASTE_FLAG] and/or [IE_FORBIDDEN_CREATURE_CASTE_FLAG]. See also [IE_TIME_RANGE] and [IE_MAKE_PET_IF_POSSIBLE].
  • PROPEL_UNITv0.47.01 - Applies a force specified using [IE_PROPEL_FORCE] to a unit to knock it back.
  • CHANGE_WEATHERv0.47.01 - Changes the weather as specified by [IE_ADD_WEATHER] and/or [IE_REMOVE_WEATHER].
  • RAISE_GHOSTv0.47.01 - Present in version 0.47.01 and accepted as a valid I_EFFECT token, but does not have an effect currently.
IE_TARGET Within I_EFFECT ID Specifies which I_TARGET a particular interaction effect will be applied to. For example, in an interaction with the token [I_TARGET:B:CREATURE], 'B' is the ID used to indicate this target option. [I_EFFECT:ADD_SYNDROME] followed by [IE_TARGET:B] would therefore apply the syndrome to this target. Certain types of interaction effects require multiple IE_TARGET tokens in a specific order to function properly. A few effects do not require a target at all.
IE_INTERMITTENT Within I_EFFECT Frequency Currently only appears to work with [I_SOURCE:REGION] interactions. Indicates that the effect happens intermittently and specifies roughly how often. Valid values:
  • WEEKLY

note: DAILY, MONTHLY and YEARLY also exist in the string dump but aren't currently supported.

IE_IMMEDIATE Within I_EFFECT Indicates that the effect happens immediately.
IE_LOCATION Within I_EFFECT Location Hint Indicates where the effect can take place. Valid values:
  • IN_WATER
  • IN_MAGMA
  • NO_WATER
  • NO_MAGMA
  • NO_THICK_FOG
  • OUTSIDE

A depth of 1/7 appears to be sufficient for IN_WATER and IN_MAGMA.

IE_ARENA_NAME Within I_EFFECT text Allows the interaction to be applied to newly spawned creatures in Arena mode.
IE_ADD_WEATHERv0.47.01 Within I_EFFECT:CHANGE_WEATHER type Indicates what type of weather is added. The available weather types are: FOG_MIST, STRATUS_NIMBUS, FOG_THICK, FOG_NORMAL, FRONT_OCCLUDED, FRONT_COLD, CUMULUS_MULTI, CUMULUS_MED, CIRRUS, CUMULUS_NIMBUS, STRATUS_PROPER, and STRATUS_ALTO.
IE_REMOVE_WEATHERv0.47.01 Within I_EFFECT:CHANGE_WEATHER type Indicates what type of weather is removed. The available weather types are: FOG_MIST, STRATUS_NIMBUS, FOG_THICK, FOG_NORMAL, FRONT_OCCLUDED, FRONT_COLD, CUMULUS_MULTI, CUMULUS_MED, CIRRUS, CUMULUS_NIMBUS, STRATUS_PROPER, and STRATUS_ALTO.
IE_GRIME_LEVEL Within I_EFFECT:CLEAN amount? [IE_GRIME_LEVEL:2] appears in the default cleaning interaction, and may indicate amount of grime cleaned.
IE_SYNDROME_TAG Within I_EFFECT:CLEAN Syndrome flag Indicates that cleaning off materials will activate their syndromes if they have this flag.
IE_PROPEL_FORCEv0.47.01 Within I_EFFECT:PROPEL_UNIT amount Indicates the amount of force that the target will be propelled with.
IE_ITEMv0.47.01 Within I_EFFECT:CREATE_ITEM <probability>:<quantity>:item token:material token Defines what item will be created.
IE_ITEM_QUALITYv0.47.01 Within I_EFFECT:CREATE_ITEM <quality> OR <minimum quality>:<maximum quality> Defines what quality the created item shall have. Can either be specified in the form of a single, fixed quality (it seems that ARTIFACT can only be used in this manner), or a minimum and maximum level (in which case the quality is selected randomly). Valid values (numerals only except for ARTIFACT):
  • 0 = ordinary
  • 1 = well-crafted
  • 2 = finely crafted
  • 3 = superior quality
  • 4 = exceptional
  • 5 = masterwork
  • ARTIFACT
IE_SET_QUALITYv0.47.01 Within I_EFFECT:CHANGE_ITEM_QUALITY quality level Defines a fixed quality level which the affected item(s) will be set to (decreasing or increasing in quality as necessary). See above for a list of valid quality levels (but note that ARTIFACT cannot be used in this effect).
IE_CHANGE_QUALITYv0.47.01 Within I_EFFECT:CHANGE_ITEM_QUALITY amount Determines how much the quality of the item(s) will be changed. For instance, improving a well-crafted -item- (quality level 1) by 2 will turn it into a superior-quality *item* (quality level 3). A negative value can be used to decrease quality. Quality cannot be increased beyond level 5 (masterwork) or decreased below level 0 (ordinary).
CREATUREv0.47.01 Within I_EFFECT:SUMMON_UNIT <creature token>:<caste token> Indicates which specific creature will be created when using this interaction. ANY can be used in place of a specific caste token. Only one [CREATURE] may currently be specified per interaction effect.
IE_CREATURE_FLAGv0.47.01 Within I_EFFECT:SUMMON_UNIT <creature flag> Any creature with the specified creature flag may be summoned. This token may be used multiple times per interaction effect; it appears that any creature with at least one of the indicated flags will be counted as a valid option.
IE_FORBIDDEN_CREATURE_FLAGv0.47.01 Within I_EFFECT:SUMMON_UNIT <creature flag> Any creature with the specified creature flag will not be summoned. This token may be used multiple times per interaction effect; any creature with at least one of the indicated flags is forbidden.
IE_CREATURE_CASTE_FLAGv0.47.01 Within I_EFFECT:SUMMON_UNIT <caste flag> Any creature with the specified caste flag may be summoned. This token may be used multiple times per interaction effect; it appears that any creature with at least one of the indicated flags will be counted as a valid option.
IE_FORBIDDEN_CREATURE_CASTE_FLAGv0.47.01 Within I_EFFECT:SUMMON_UNIT <caste flag> Any creature with the specified caste flag will not be summoned. This token may be used multiple times per interaction effect; any creature with at least one of the indicated flags is forbidden.
IE_HAVE_FAST_EFFORTLESS_GAIT_SPEEDv0.47.01 Within I_EFFECT:SUMMON_UNIT Exists in the string dump; presumably narrows the random summoning choices to creatures whose normal/slow/slower gait is relatively fast, though this has yet to be tested.
IE_ALL_SLOW_EFFORTLESS_GAIT_SPEEDv0.47.01 Within I_EFFECT:SUMMON_UNIT Exists in the string dump; presumably narrows the random summoning choices to creatures whose normal gait is relatively slow, though this has yet to be tested.
IE_TIME_RANGEv0.47.01 Within I_EFFECT:SUMMON_UNIT <minimum ticks>:<maximum ticks> The summoned unit vanishes in a puff of smoke once a certain amount of time has elapsed. The time limit is a randomly selected number of ticks within the specified minimum-maximum time range. The unit will persist indefinitely if this token is omitted.
IE_MAKE_PET_IF_POSSIBLEv0.47.01 Within I_EFFECT:SUMMON_UNIT Makes the summoned unit behave as a pet of the unit who performed the summoning interaction.
GENERATED Global Indicates that this is a generated interaction. Cannot be specified in user-defined raws.


Usage

In order to actually use an interaction, the creature token [CAN_DO_INTERACTION:NAME] should be added, followed by a series of [CDI:...] tokens. Interactions can also be granted through syndromes using the token [CE_CAN_DO_INTERACTION] (plus the same series of CDI tokens).

The following CDI tokens can be specified:

Token Arguments Description
INTERACTION id Specifies which interaction can be performed. Only to be used with syndromes, since CE_CAN_DO_INTERACTION does not allow specifying the interaction ID directly.
TARGET target ID, target types Specifies how the creature chooses what to target. Target ID refers to an I_TARGET defined in the interaction itself. Multiple target types can be specified. If no target is specified, creature will target any available target within range, even through walls. Valid target types:
  • LINE_OF_SIGHT - the source needs to be able to see the target
  • TOUCHABLE - the source needs to be able to touch the target
  • DISTURBER_ONLY - the target must be whoever disturbed the source
  • SELF_ALLOWED - the target can be the source
  • SELF_ONLY - the target must be the source
TARGET_RANGE target ID, range Specifies how far away the target can be, in tiles. For SOLID_GLOB, LIQUID_GLOB and FIREBALL breath attacks, also determines how far the projectiles will fly before falling to the ground.
LOCATION_HINT Location Hint (see above) ?
USAGE_HINT Usage hint token Indicates when and how CPU-controlled creatures will use the interaction. If no hint is specified, the interaction will be used whenever a valid target is available. Valid values:
  • MINOR_BLESSINGv0.47.01 - Used in divination dice blessings. Targets the roller.
  • MINOR_CURSEv0.47.01 - Used in divination dice curses. Targets the roller.
  • MEDIUM_BLESSINGv0.47.01 - Used in divination dice blessings. Targets the roller.
  • MEDIUM_CURSEv0.47.01 - Used in divination dice curses. Targets the roller.
  • MAJOR_CURSE - Used in disturbance curses and deity curses. Targets the tomb disturber/temple defiler.
  • GREETING - Creatures will target 'friendly' creatures, usually at random.
  • CLEAN_SELF - Creature targets itself when covered in liquids or dust.
  • CLEAN_FRIEND - Same, but targets other friendly units.
  • ATTACK - Targets enemy creatures in combat. If the interaction specifies SELF_ONLY, CPU-controlled creatures will never use it.
  • FLEEING - Used when fleeing an enemy. Creature will target itself.
  • NEGATIVE_SOCIAL_RESPONSE - Used when a creature is expressing contempt (for example, to a murderer). Used for spitting by civilised races.
  • TORMENT
  • DEFENDv0.47.01 - Used in combat. Creature will target itself.
ADV_NAME text Specifies the interaction's name when used in Adventurer mode.
MAX_TARGET_NUMBER ID, number Specifies the maximum number of things that can be selected for a particular I_TARGET.
WAIT_PERIOD number Controls how often the interaction can be used.
VERBAL Only creatures that can speak will be able to use the interaction. Might also be needed for VERBAL_SPEECH.
VERBAL_SPEECH filename Specifies what the creature says when they perform the interaction. Filename path is relative to /data/speech.
CAN_BE_MUTUAL Presumably, allows two creatures with the same interaction to use it on each other simultaneously, for example, cats cleaning each other.
FREE_ACTION Indicates that performing the interaction doesn't take any time.
VERB self:other:mutual When a creature uses the interaction, a message will display, describing the source as doing this.
VERB_REVERSE ? ?
TARGET_VERB self:other When a creature uses the interaction, a message will display, describing the target as doing this.
BP_REQUIRED Body part criteria Indicates that a particular body part must be present in order to perform the interaction. Criteria are BY_CATEGORY:category, BY_TYPE:type, or BY_TOKEN:token.
FLOW Breath attack token Causes the interaction to create an effect not made of any material. Only makes sense for FIREBALL, FIREJET, or DRAGONFIRE.
MATERIAL Material token:Breath attack token Causes the interaction to create an effect made of a specific material. Doesn't make sense for FIREBALL, FIREJET, or DRAGONFIRE.

Breath attacks

Breath attacks are controlled by the MATERIAL_EMISSION interaction, like so:

 [CAN_DO_INTERACTION:MATERIAL_EMISSION]
 		[CDI:ADV_NAME:Breath custom material]
 		[CDI:USAGE_HINT:ATTACK]
 		[CDI:BP_REQUIRED:BY_CATEGORY:MOUTH]
 		[CDI:MATERIAL:LOCAL_CREATURE_MAT:CUSTOMMATERIAL:TRAILING_VAPOR_FLOW]
 		[CDI:TARGET:C:LINE_OF_SIGHT]
 		[CDI:TARGET_RANGE:C:15]
 		[CDI:MAX_TARGET_NUMBER:C:1]
 		[CDI:WAIT_PERIOD:50]

The most important part is this line:

 [CDI:MATERIAL:LOCAL_CREATURE_MAT:CUSTOMMATERIAL:TRAILING_VAPOR_FLOW]

The CDI refers to CAN_DO_INTERACTION; the MATERIAL states that this line shows what the material is. LOCAL_CREATURE_MAT:CUSTOMMATERIAL is your material, and TRAILING_VAPOR_FLOW refers to the breath attack type. Other types are seen below. Also important is this line:

 [CDI:TARGET:C:LINE_OF_SIGHT]

LINE_OF_SIGHT refers to where the target C may be; others include SELF_ALLOWED (presumably like LINE_OF_SIGHT, but with the creature allowed to target itself), SELF_ONLY (preferable for undirected attacks and TOUCHABLE (for up-close attacks, as trailing flows tend to be).

Breath Attack Types

When using types of MATERIAL the format would be: [CDI:MATERIAL:material:sub-material:action-type] action-type being like SOLID_GLOB or UNDIRECTED_VAPOR

When using types of FLOW the format would just be: [CDI:FLOW:FIREBALL]

Token Usage Type Description
TRAILING_DUST_FLOW MATERIAL Lets out a cloud of solid dust. Appears to use cave-in dust physics, causing this to fling around anything it comes in contact with, making it capable of smashing creatures into the ground and flinging them over walls. Creature will attack as normal.
TRAILING_VAPOR_FLOW MATERIAL Shoots a trail of liquid mist at the target which can condense and trigger contact syndromes. Creature will attack as normal.
TRAILING_GAS_FLOW MATERIAL Shoots a trail of gas substance at the target which can be inhaled. Creature will attack as normal.
TRAILING_ITEM_FLOW:item token MATERIAL Shoots a "cloud" of items at the target, leaving piles of this item on the floor. Note that this does not create the actual items or use falling item mechanics (meaning no flying daggers or Touhou-style barrages, unfortunately). Instead, this token acts as TRAILING_GAS_FLOW, except that the material will use its normal temperature - for example, a breath attack of steel anvils will envelop the target in a "burst of steel". Creature will attack as normal.
SHARP_ROCKv0.47.01 MATERIAL Shoots a sharpened solid chunk of spinning substance at the creature, leaving symbols similar to broken arrows, essentially, a projectile weapon. If the cooldown rate is short enough, some creatures with this breath attack will not move, preferring instead to hold position and shoot shards at you, even when you are literally right next to them.
SOLID_GLOB MATERIAL Shoots a solid glob of spinning substance at the creature, leaving symbols similar to broken arrows, essentially, a projectile weapon. If the cooldown rate is short enough, some creatures with this breath attack will not move, preferring instead to hold position and shoot globs at you, even when you are literally right next to them.
LIQUID_GLOB MATERIAL Shoots a liquid glob of substance at the target. Contact syndromes will take effect if the glob hits the target's exposed skin.
SPATTER_POWDER MATERIAL Creates a pile of powder at the specified location.
SPATTER_LIQUID MATERIAL Creates a pool of liquid at the specified location.
UNDIRECTED_GAS MATERIAL Creature occasionally releases a cloud of gas substance. Similar to TRAILING_GAS_FLOW, but undirected, thus affecting a larger area but losing the distance. Creature will attack as normal.
UNDIRECTED_VAPOR MATERIAL Creature occasionally releases a cloud of liquid mist. Similar to TRAILING_VAPOR_FLOW, but undirected, thus affecting a larger area but losing the distance. Creature will attack as normal.
UNDIRECTED_DUST MATERIAL Creature occasionally releases a cloud of solid dust, which will spread and dissipate. Similar to TRAILING_DUST_FLOW, but undirected, thus affecting a larger area but losing the distance - range is roughly the same as that of a cave-in. Creature will attack as normal. DO NOT USE THIS TAG UNLESS YOU WANT TO KILL THE CREATURE AND EVERYTHING NEAR IT AND SEND PEOPLE FLYING. You know you want to.
UNDIRECTED_ITEM_CLOUD:item token MATERIAL Creature occasionally releases a "cloud" of items at the target, leaving piles of this item on the floor. The same comments apply as TRAILING_ITEM_FLOW. Creature will attack as normal.
WEB_SPRAY MATERIAL Emits a burst of webs that entangle target creatures.
DRAGONFIRE FLOW Emits a wide cone of dragon fire that burns target creatures at a scorching 50000 °U . For this you want FLOW instead of a material.
FIREJET FLOW Emits a narrow cone of fire that burns target creatures at 11000 °U . For this you want FLOW instead of a material.
FIREBALL FLOW Emits a fireball that burns the target creature. For this you want FLOW instead of a material.
WEATHER_CREEPING_GAS MATERIAL Creates a cloud of gas that appears at the edge of the map and slowly creeps across the map. Not usable by creatures.
WEATHER_CREEPING_VAPOR MATERIAL Creates a cloud of creeping vapor. Not usable by creatures.
WEATHER_CREEPING_DUST MATERIAL Creates a cloud of creeping dust. Not usable by creatures.
WEATHER_FALLING_MATERIAL MATERIAL Causes it to start raining a particular material. If the material is solid at the outdoor temperatures, it will snow the material instead. Regardless of the nature of the material, being caught in it will give dwarves the bad thought of being 'caught in freakish weather lately'. Not usable by creatures.

Keep in mind that you can use multiple breath attacks, which appears to make the creature choose between them at random. Creatures cannot use the WEATHER effects, these being reserved for regional interactions.

One major difference between GAS, VAPOR, and DUST is that if the material cannot exist in the specified state at the current temperature, it will automatically be created at a temperature allowing it to exist. So if you create a vapor spray that uses rock or metal as a material, that spray will be created at the material's melting point, setting everything it touches on fire. You can also create a freezing spray by using a custom material that has extremely low melting and/or boiling points.

If you give a creature a material breath attack, be aware that it will be caught in the attack more frequently than its targets. Make sure to make your creatures immune to their own breath weapons!

Creature and Caste Flags

Certain interaction and syndrome effects (currently limited to [IE_SUMMON_UNIT] and [CE_BODY_TRANSFORMATION]) permit modders to specify the required/forbidden creature and caste flags of the desired creature. These are a collection of internal flags which are derived from creature tokens but are not necessarily identical to them. The following lists contain creature and caste flag names as provided by Toady One in a FoTF reply [3] (valid as of 0.47.04).

See Also