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"
Jump to navigation
Jump to search
(→Interaction Definitions: Added IT_LOCATION:CONTEXT_CREATURE_OR_LOCATION) |
(add {{text anchor}}) |
||
Line 12: | Line 12: | ||
|- | |- | ||
− | | I_SOURCE | + | | {{text anchor|I_SOURCE}} |
| Global | | Global | ||
| type | | type | ||
Line 26: | Line 26: | ||
|- | |- | ||
− | | IS_HIST_STRING_1 | + | | {{text anchor|IS_HIST_STRING_1}} |
| Within I_SOURCE | | Within I_SOURCE | ||
| text | | text | ||
Line 34: | Line 34: | ||
|- | |- | ||
− | | IS_HIST_STRING_2 | + | | {{text anchor|IS_HIST_STRING_2}} |
| Within I_SOURCE | | Within I_SOURCE | ||
| text | | text | ||
Line 42: | Line 42: | ||
|- | |- | ||
− | | IS_FREQUENCY | + | | {{text anchor|IS_FREQUENCY}} |
| Within I_SOURCE | | Within I_SOURCE | ||
| Number | | Number | ||
Line 48: | Line 48: | ||
|- | |- | ||
− | | IS_NAME | + | | {{text anchor|IS_NAME}} |
| Within I_SOURCE | | Within I_SOURCE | ||
| string | | string | ||
Line 54: | Line 54: | ||
|- | |- | ||
− | | IS_REGION | + | | {{text anchor|IS_REGION}} |
| Within I_SOURCE:REGION | | Within I_SOURCE:REGION | ||
| Region type | | Region type | ||
Line 70: | Line 70: | ||
|- | |- | ||
− | | IS_SPHERE | + | | {{text anchor|IS_SPHERE}} |
| Within I_SOURCE:SECRET | | Within I_SOURCE:SECRET | ||
| [[Sphere]] | | [[Sphere]] | ||
Line 76: | Line 76: | ||
|- | |- | ||
− | | IS_SECRET_GOAL | + | | {{text anchor|IS_SECRET_GOAL}} |
| Within I_SOURCE:SECRET | | Within I_SOURCE:SECRET | ||
| Secret Goal token | | Secret Goal token | ||
Line 95: | Line 95: | ||
|- | |- | ||
− | | IS_SECRET | + | | {{text anchor|IS_SECRET}} |
| Within I_SOURCE:SECRET | | Within I_SOURCE:SECRET | ||
| Secret Flag | | Secret Flag | ||
Line 104: | Line 104: | ||
* 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. | ||
|- | |- | ||
− | | IS_USAGE_HINT | + | | {{text anchor|IS_USAGE_HINT}} |
| Within I_SOURCE:DEITY | | Within I_SOURCE:DEITY | ||
| Usage Hint token | | Usage Hint token | ||
Line 110: | Line 110: | ||
|- | |- | ||
− | | I_TARGET | + | | {{text anchor|I_TARGET}} |
| Global | | Global | ||
| id, type | | id, type | ||
Line 120: | Line 120: | ||
|- | |- | ||
− | | IT_LOCATION | + | | {{text anchor|IT_LOCATION}} |
| Within I_TARGET | | Within I_TARGET | ||
| Location | | Location | ||
Line 132: | Line 132: | ||
|- | |- | ||
− | | IT_MANUAL_INPUT | + | | {{text anchor|IT_MANUAL_INPUT}} |
| Within I_TARGET | | Within I_TARGET | ||
| text | | text | ||
Line 138: | Line 138: | ||
|- | |- | ||
− | | IT_AFFECTED_CREATURE | + | | {{text anchor|IT_AFFECTED_CREATURE}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| CREATURE:CASTE | | CREATURE:CASTE | ||
Line 144: | Line 144: | ||
|- | |- | ||
− | | IT_AFFECTED_CLASS | + | | {{text anchor|IT_AFFECTED_CLASS}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| Creature class | | Creature class | ||
Line 150: | Line 150: | ||
|- | |- | ||
− | | IT_IMMUNE_CREATURE | + | | {{text anchor|IT_IMMUNE_CREATURE}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| CREATURE:CASTE | | CREATURE:CASTE | ||
Line 156: | Line 156: | ||
|- | |- | ||
− | | IT_IMMUNE_CLASS | + | | {{text anchor|IT_IMMUNE_CLASS}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| Creature class | | Creature class | ||
Line 162: | Line 162: | ||
|- | |- | ||
− | | IT_REQUIRES | + | | {{text anchor|IT_REQUIRES}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| Creature token or property | | Creature token or property | ||
Line 175: | Line 175: | ||
|- | |- | ||
− | | IT_FORBIDDEN | + | | {{text anchor|IT_FORBIDDEN}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| Creature token or property | | Creature token or property | ||
Line 181: | Line 181: | ||
|- | |- | ||
− | | IT_CANNOT_TARGET_IF_ALREADY_AFFECTED | + | | {{text anchor|IT_CANNOT_TARGET_IF_ALREADY_AFFECTED}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| | | | ||
Line 187: | Line 187: | ||
|- | |- | ||
− | | IT_CANNOT_HAVE_SYNDROME_CLASS | + | | {{text anchor|IT_CANNOT_HAVE_SYNDROME_CLASS}} |
| Within I_TARGET:CORPSE or I_TARGET:CREATURE | | Within I_TARGET:CORPSE or I_TARGET:CREATURE | ||
| [[Syndrome]] class | | [[Syndrome]] class | ||
Line 193: | Line 193: | ||
|- | |- | ||
− | | IT_MATERIAL | + | | {{text anchor|IT_MATERIAL}} |
| Within I_TARGET:MATERIAL | | Within I_TARGET:MATERIAL | ||
| Type | | Type | ||
Line 202: | Line 202: | ||
|- | |- | ||
− | | I_EFFECT | + | | {{text anchor|I_EFFECT}} |
| Global | | Global | ||
| type | | type | ||
Line 215: | Line 215: | ||
|- | |- | ||
− | | IE_TARGET | + | | {{text anchor|IE_TARGET}} |
| Within I_EFFECT | | Within I_EFFECT | ||
| ID | | ID | ||
Line 221: | Line 221: | ||
|- | |- | ||
− | | IE_INTERMITTENT | + | | {{text anchor|IE_INTERMITTENT}} |
| Within I_EFFECT | | Within I_EFFECT | ||
| Frequency | | Frequency | ||
Line 228: | Line 228: | ||
|- | |- | ||
− | | IE_IMMEDIATE | + | | {{text anchor|IE_IMMEDIATE}} |
| Within I_EFFECT | | Within I_EFFECT | ||
| | | | ||
Line 234: | Line 234: | ||
|- | |- | ||
− | | IE_LOCATION | + | | {{text anchor|IE_LOCATION}} |
| Within I_EFFECT | | Within I_EFFECT | ||
| Location Hint | | Location Hint | ||
Line 244: | Line 244: | ||
|- | |- | ||
− | | IE_ARENA_NAME | + | | {{text anchor|IE_ARENA_NAME}} |
| Within I_EFFECT | | Within I_EFFECT | ||
| text | | text | ||
Line 250: | Line 250: | ||
|- | |- | ||
− | | IE_GRIME_LEVEL | + | | {{text anchor|IE_GRIME_LEVEL}} |
| Within I_EFFECT:CLEAN | | Within I_EFFECT:CLEAN | ||
| amount? | | amount? | ||
Line 256: | Line 256: | ||
|- | |- | ||
− | | IE_SYNDROME_TAG | + | | {{text anchor|IE_SYNDROME_TAG}} |
| Within I_EFFECT:CLEAN | | Within I_EFFECT:CLEAN | ||
| Syndrome flag | | Syndrome flag | ||
Line 262: | Line 262: | ||
|- | |- | ||
− | | GENERATED | + | | {{text anchor|GENERATED}} |
| Global | | Global | ||
| | | | ||
Line 280: | Line 280: | ||
|- | |- | ||
− | | INTERACTION | + | | {{text anchor|INTERACTION}} |
| id | | 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. | | 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 | + | | {{text anchor|TARGET}} |
| target ID, target types | | target ID, target types | ||
| Specifies how the creature chooses what to . 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: | | Specifies how the creature chooses what to . 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 295: | Line 295: | ||
|- | |- | ||
− | | TARGET_RANGE | + | | {{text anchor|TARGET_RANGE}} |
| target ID, range | | target ID, range | ||
| Specifies how far away the target can be, in tiles. | | Specifies how far away the target can be, in tiles. | ||
|- | |- | ||
− | | LOCATION_HINT | + | | {{text anchor|LOCATION_HINT}} |
| Location Hint (see above) | | Location Hint (see above) | ||
| ? | | ? | ||
|- | |- | ||
− | | USAGE_HINT | + | | {{text anchor|USAGE_HINT}} |
| Usage hint token | | 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: | | 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: | ||
Line 318: | Line 318: | ||
|- | |- | ||
− | | ADV_NAME | + | | {{text anchor|ADV_NAME}} |
| text | | text | ||
| Specifies the interaction's name when used in Adventurer mode. | | Specifies the interaction's name when used in Adventurer mode. | ||
|- | |- | ||
− | | MAX_TARGET_NUMBER | + | | {{text anchor|MAX_TARGET_NUMBER}} |
| ID, number | | ID, number | ||
| Specifies the maximum number of things that can be selected for a particular I_TARGET. | | Specifies the maximum number of things that can be selected for a particular I_TARGET. | ||
|- | |- | ||
− | | WAIT_PERIOD | + | | {{text anchor|WAIT_PERIOD}} |
| number | | number | ||
| Controls how often the interaction can be used. | | Controls how often the interaction can be used. | ||
|- | |- | ||
− | | VERBAL | + | | {{text anchor|VERBAL}} |
| | | | ||
| Only creatures that can speak will be able to use the interaction. Might also be needed for VERBAL_SPEECH. | | Only creatures that can speak will be able to use the interaction. Might also be needed for VERBAL_SPEECH. | ||
|- | |- | ||
− | | VERBAL_SPEECH | + | | {{text anchor|VERBAL_SPEECH}} |
| filename | | filename | ||
| Specifies what the creature says when they perform the interaction. Filename path is relative to /data/speech. | | Specifies what the creature says when they perform the interaction. Filename path is relative to /data/speech. | ||
|- | |- | ||
− | | CAN_BE_MUTUAL | + | | {{text anchor|CAN_BE_MUTUAL}} |
| | | | ||
| Presumably, allows two creatures with this same interaction to use it on each other simultaneously, for example cats cleaning each other. | | Presumably, allows two creatures with this same interaction to use it on each other simultaneously, for example cats cleaning each other. | ||
|- | |- | ||
− | | FREE_ACTION | + | | {{text anchor|FREE_ACTION}} |
| | | | ||
| Indicates that performing the interaction doesn't take any time. | | Indicates that performing the interaction doesn't take any time. | ||
|- | |- | ||
− | | VERB | + | | {{text anchor|VERB}} |
| self:other:mutual | | self:other:mutual | ||
| When a creature uses the interaction, a message will display, describing the source as doing this. | | When a creature uses the interaction, a message will display, describing the source as doing this. | ||
|- | |- | ||
− | | VERB_REVERSE | + | | {{text anchor|VERB_REVERSE}} |
| ? | | ? | ||
| ? | | ? | ||
|- | |- | ||
− | | TARGET_VERB | + | | {{text anchor|TARGET_VERB}} |
| self:other | | self:other | ||
| When a creature uses the interaction, a message will display, describing the target as doing this. | | When a creature uses the interaction, a message will display, describing the target as doing this. | ||
|- | |- | ||
− | | BP_REQUIRED | + | | {{text anchor|BP_REQUIRED}} |
| Body part criteria | | 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. | | 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 | + | | {{text anchor|FLOW}} |
| [[Syndrome#Breath Attack Types|Breath attack token]] | | [[Syndrome#Breath Attack Types|Breath attack token]] | ||
| Causes the interaction to create an effect not made of any material. Only makes sense for FIREBALL, FIREJET, or DRAGONFIRE. | | Causes the interaction to create an effect not made of any material. Only makes sense for FIREBALL, FIREJET, or DRAGONFIRE. | ||
|- | |- | ||
− | | MATERIAL | + | | {{text anchor|MATERIAL}} |
| [[Material token]]:Breath attack token | | [[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. | | Causes the interaction to create an effect made of a specific material. Doesn't make sense for FIREBALL, FIREJET, or DRAGONFIRE. |
Revision as of 19:44, 26 December 2014
v50.14 · v0.47.05 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.
Interaction Definitions
Token | Context | Arguments | Description |
---|---|---|---|
I_SOURCE | Global | type | Defines what things are capable of triggering this interaction. Can be specified multiple times. Valid values:
|
IS_HIST_STRING_1 | Within I_SOURCE | text | Describes what the interaction did to a historical figure. Displayed 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. Displayed 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_FREQUENCY | Within I_SOURCE | Number | Presumably, the probability of biome specified by [IS_REGION] to have this interaction. |
IS_NAME | Within I_SOURCE | string | Generally used with secrets, describes what the secret is about. |
IS_REGION | Within I_SOURCE:REGION | Region type | Indicates what types regions are capable of performing this interaction. Can be specified multiple times. Valid values:
|
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 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:
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:
|
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, MAJOR_CURSE is the only value that makes sense. |
I_TARGET | Global | id, type | Specifies what things this interaction acts upon. Can be specified multiple times. Valid values:
|
IT_LOCATION | Within I_TARGET | Location | Narrows down exactly what the interaction targets. Valid values:
|
IT_MANUAL_INPUT | Within I_TARGET | text | Tells the player what they should be selecting. |
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:
|
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. Valid values:
|
I_EFFECT | Global | type | Specifies what the interaction does to the targets. Can be specified multiple times. Valid values:
|
IE_TARGET | Within I_EFFECT | ID | Specifies which I_TARGET this effect will be applied to |
IE_INTERMITTENT | Within I_EFFECT | Frequency | Indicates that the effect happens intermittently and specifies roughly how often. Valid values:
|
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:
|
IE_ARENA_NAME | Within I_EFFECT | text | Allows the interaction to be applied to newly spawned creatures in Arena mode. |
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. |
GENERATED | Global | Indicates that this is a generated interaction. Cannot be specified in user-defined raws. |
Interaction Usage
In order to actually use an interaction, add the creature token [CAN_DO_INTERACTION:NAME] 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 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:
|
TARGET_RANGE | target ID, range | Specifies how far away the target can be, in tiles. |
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:
|
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 this 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. |