- 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.
Difference between revisions of "Interaction examples"
Line 86: | Line 86: | ||
}} | }} | ||
− | This interaction | + | This interaction fires both a solid glob of basalt and a liquid glob of granite magma. |
===Material Emissions With Immunity=== | ===Material Emissions With Immunity=== |
Revision as of 22:27, 6 March 2020
v50.14 · v0.47.05 This article is about the current version of DF.Note that some content may still need to be updated. |
This page was created to aid those curious about the interaction process by providing example interactions for them to use or study. Those familiar with interaction raws should feel free to add helpful/obscure information to the lists below to help members of the community less experienced with interactions.
Material Emission Interactions
Following are several examples of material emission interactions.
Multiple Projectile Emission
Example [MATERIAL_EMISSION] interaction raws that fire three projectiles of the same material |
---|
[INTERACTION:MATERIAL_EMISSION_3]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:MATERIAL]
[IT_MATERIAL:CONTEXT_MATERIAL]
[I_TARGET:B:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION] <-- this is always the emitter for now
[I_TARGET:C:LOCATION]
[IT_LOCATION:CONTEXT_CREATURE_OR_LOCATION] <-- lets projectiles be aimed at specific creatures
[IT_MANUAL_INPUT:target]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]
|
By adding additional [I_EFFECT:MATERIAL_EMISSION] tags with their associated targets, you may stack additional projectiles.
Predefined Material Emissions
Example [MATERIAL_EMISSION] interaction raws that use a predefined material |
---|
[INTERACTION:BASALT_EMISSION]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:MATERIAL]
[IT_MATERIAL:MATERIAL:INORGANIC:BASALT:SOLID_GLOB] <-- the predefined material (INORGANIC), sub material (BASALT), and action type (SOLID_GLOB)
[I_TARGET:B:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:C:LOCATION]
[IT_LOCATION:CONTEXT_CREATURE_OR_LOCATION]
[IT_MANUAL_INPUT:target]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]
|
If a material is listed in this format, the creature will not need a [CDI:MATERIAL] tag in their creature raws in order to use it. This allows projectile attacks to be gained through substance ingestion, other interactions, etc.
Predefined Emissions of Different Types
Example [MATERIAL_EMISSION] interaction raws that use two predefined material types |
---|
[INTERACTION:BASALT_GRANITE_EMISSION]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:MATERIAL]
[IT_MATERIAL:MATERIAL:INORGANIC:BASALT:SOLID_GLOB] <-- the predefined material (INORGANIC), sub material (BASALT), and action type (SOLID_GLOB)
[I_TARGET:A1:MATERIAL]
[IT_MATERIAL:MATERIAL:INORGANIC:GRANITE:LIQUID_GLOB] <-- the second predefined material (INORGANIC), sub material (GRANITE), and action type (LIQUID_GLOB)
[I_TARGET:B:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:C:LOCATION]
[IT_LOCATION:CONTEXT_CREATURE_OR_LOCATION]
[IT_MANUAL_INPUT:target]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A1]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]
|
This interaction fires both a solid glob of basalt and a liquid glob of granite magma.
Material Emissions With Immunity
Example [MATERIAL_EMISSION] interaction raws that may only target creatures |
---|
[INTERACTION:CTARGET_BASALT_EMISSION]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:MATERIAL]
[IT_MATERIAL:MATERIAL:INORGANIC:BASALT:SOLID_GLOB] <-- the material tags used in the previous predefined material example.
[I_TARGET:B:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:C:CREATURE] <-- the may no longer be used on a location and must target a creature.
[IT_CANNOT_HAVE_SYNDROME_CLASS:NO_EMISSION] <-- the syndrome class that makes targeting a creature with this interaction impossible.
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:target]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]
|
Material emissions used in this format are affected by [IT_CANNOT_HAVE_SYNDROME_CLASS:X] tags (given above as the custom tag NO_EMISSION). This allows a modder to create immunity syndromes, disallowing a creature using the emission interaction from targeting the creature with immunity.
Syndrome Interactions
Following are examples of interactions that apply syndromes.
Emission Immunity
Example [ADD_SYNDROME] interaction raws with an "immunity" syndrome tag |
---|
[INTERACTION:EMISSION_PROTECTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:target]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_CLASS:NO_EMISSION]
[SYN_NAME:protection from projectiles]
[CE_FLASH_TILE:TILE:'O':7:0:1:FREQUENCY:2000:1000:START:0:END:2:ABRUPT:DWF_STRETCH:144]
|
This interaction would prohibit a creature from being targeted by the emission reaction listed above.