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.

Editing Interaction examples

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

If you are creating a redirect to the current version's page, do not use any namespace. For example: use #REDIRECT [[Cat]], not #REDIRECT [[Main:Cat]] or #REDIRECT [[cv:Cat]]. See DF:Versions for more information.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{migrated article}}
 
 
{{av}}
 
{{av}}
  
This page was created to aid those curious about the [[interaction token|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.
+
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.
  
 
==General Tips==
 
==General Tips==
  
 
===Synchronizing Adventure and Fort Mode syndrome timers===
 
===Synchronizing Adventure and Fort Mode syndrome timers===
Fort mode runs 144 times faster than adventure mode - which means that a syndrome that lasts a single tick in Fort Mode will last 144 ticks in Adventure Mode.  For short-term syndromes, this will cause very different behaviors between the two modes.  In order to ensure that a syndrome operates the same way regardless of mode, add DWF_STRETCH:144 to the end of the CE effect tag.
+
Fort mode runs 72 times faster than Adventure mode - which means that a syndrome that lasts a single tick in Fort Mode will last 72 ticks in Adventure Mode.  For short-term syndromes, this will cause very different behaviors between the two modes.  In order to ensure that a syndrome operates the same way regardless of mode, add DWF_STRETCH:72 to the end of the CE effect tag.
  
It is not possible to make a syndrome that lasts shorter than 144 ticks in Adventure Mode
+
It is not possible to make a syndrome that lasts shorter than 72 ticks in Adventure Mode.
  
 
===Syndromes with no effect===
 
===Syndromes with no effect===
Line 15: Line 14:
 
Some examples:
 
Some examples:
 
{{gamedata|title="Dummy" syndrome tags|
 
{{gamedata|title="Dummy" syndrome tags|
[CE_SPEED_CHANGE:SPEED_PERC:100:START:0:END:1:DWF_STRETCH:144] <-- Makes the target move at 100% of its current speed
+
[CE_SPEED_CHANGE:SPEED_PERC:100:START:0:END:1:DWF_STRETCH:72] <-- Makes the target move at 100% of its current speed
  
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:1:DWF_STRETCH:144] <-- Multiplies the target's skill by 100%, 0% of the time
+
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:1:DWF_STRETCH:72] <-- Multiplies the target's skill by 100%, 0% of the time
  
[CE_MATERIAL_FORCE_MULTIPLIER:PROB:100:MAT_MULT:NONE:NONE:1:1:START:0:END:1:DWF_STRETCH:144] <-- Makes the target take 1/1 times its normal damage from attacks
+
[CE_MATERIAL_FORCE_MULTIPLIER:PROB:100:MAT_MULT:NONE:NONE:1:1:START:0:END:1:DWF_STRETCH:72] <-- Makes the target take 1/1 times its normal damage from attacks
 
}}
 
}}
  
Line 168: Line 167:
 
[SYN_NAME:turned]
 
[SYN_NAME:turned]
 
[SYN_CLASS:TURN_UNDEAD]
 
[SYN_CLASS:TURN_UNDEAD]
[CE_REMOVE_TAG:NO_DIZZINESS:NONAUSEA:NOFEAR:NOPAIN:NOSTUN:START:0:END:8:DWF_STRETCH:144] <-- This removes the normal undead tags, rendering them vulnerable to the syndrome's other effects.
+
[CE_REMOVE_TAG:NO_DIZZINESS:NONAUSEA:NOFEAR:NOPAIN:NOSTUN:START:0:END:8:DWF_STRETCH:72] <-- This removes the normal undead tags, rendering them vulnerable to the syndrome's other effects.
[CE_SKILL_ROLL_ADJUST:PERC:50:PERC_ON:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_SKILL_ROLL_ADJUST:PERC:50:PERC_ON:100:START:0:END:8:DWF_STRETCH:72]
[CE_DIZZINESS:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_DIZZINESS:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:72]
[CE_NAUSEA:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_NAUSEA:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:72]
[CE_PAIN:SEV:100:PROB:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_PAIN:SEV:100:PROB:100:START:0:END:8:DWF_STRETCH:72]
 
</nowiki>
 
</nowiki>
 
}}
 
}}
  
 
===Smite Evil===
 
===Smite Evil===
An attack that hits all procedurally-generated bogeymen, night creatures, vampires, werebeasts, demons, and... angels. There does not currently appear to be a way of excluding angels. (Eh, it's DF angels, they probably count as evil anyway).
+
An attack that hits all procedurally-generated bogeymen, night creatures, vampires, werebeasts, demons, and... angels. There does not appear to be a way of excluding angels. Eh, it's DF angels, they probably count as evil anyway.
 
{{gamedata|title=Smite Evil|
 
{{gamedata|title=Smite Evil|
 
  <nowiki>
 
  <nowiki>
Line 206: Line 205:
 
[SYN_NAME:smote]
 
[SYN_NAME:smote]
 
[SYN_CLASS:SMITE_EVIL]
 
[SYN_CLASS:SMITE_EVIL]
[CE_REMOVE_TAG:NO_DIZZINESS:NONAUSEA:NOFEAR:NOPAIN:NOSTUN:START:0:END:8:DWF_STRETCH:144]
+
[CE_REMOVE_TAG:NO_DIZZINESS:NONAUSEA:NOFEAR:NOPAIN:NOSTUN:START:0:END:8:DWF_STRETCH:72]
[CE_SKILL_ROLL_ADJUST:PERC:50:PERC_ON:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_SKILL_ROLL_ADJUST:PERC:50:PERC_ON:100:START:0:END:8:DWF_STRETCH:72]
[CE_DIZZINESS:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_DIZZINESS:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:72]
[CE_NAUSEA:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_NAUSEA:SEV:200:PROB:100:START:0:END:8:DWF_STRETCH:72]
[CE_PAIN:SEV:100:PROB:100:START:0:END:8:DWF_STRETCH:144]
+
[CE_PAIN:SEV:100:PROB:100:START:0:END:8:DWF_STRETCH:72]
 
</nowiki>
 
</nowiki>
 
}}
 
}}
Line 237: Line 236:
 
[SYN_NAME:counting down]
 
[SYN_NAME:counting down]
 
[SYN_CLASS:EXPLOSION_READY_1]
 
[SYN_CLASS:EXPLOSION_READY_1]
[CE_CAN_DO_INTERACTION:START:10:END:11:DWF_STRETCH:144] <--The START affects the amount of time spent in combat before the explosion can occur.
+
[CE_CAN_DO_INTERACTION:START:10:END:11:DWF_STRETCH:72] <--The START affects the amount of time spent in combat before the explosion can occur.
 
[CDI:ADV_NAME:Draw Energy]
 
[CDI:ADV_NAME:Draw Energy]
 
[CDI:USAGE_HINT:DEFEND]
 
[CDI:USAGE_HINT:DEFEND]
Line 257: Line 256:
 
[SYN_NAME:ready to explode]
 
[SYN_NAME:ready to explode]
 
[SYN_CLASS:EXPLOSION_READY_2]
 
[SYN_CLASS:EXPLOSION_READY_2]
[CE_FLASH_TILE:TILE:33:4:0:0:FREQUENCY:32:16:START:0:END:2:DWF_STRETCH:144] <-- Flash as a warning
+
[CE_FLASH_TILE:TILE:33:4:0:0:FREQUENCY:32:16:START:0:END:2:DWF_STRETCH:72] <-- Flash as a warning
[CE_SPEED_CHANGE:SPEED_PERC:50:START:0:END:2:DWF_STRETCH:144]
+
[CE_SPEED_CHANGE:SPEED_PERC:50:START:0:END:2:DWF_STRETCH:72]
[CE_CAN_DO_INTERACTION:START:1:END:2:DWF_STRETCH:144] <-- The AI will use this and then immediately explode, provided it is still in combat and not affected by EXPLOSION_OVERRIDE.
+
[CE_CAN_DO_INTERACTION:START:1:END:2:DWF_STRETCH:72] <-- The AI will use this and then immediately explode, provided it is still in combat and not affected by EXPLOSION_OVERRIDE.
 
[CDI:ADV_NAME:Remove safeties]
 
[CDI:ADV_NAME:Remove safeties]
 
[CDI:USAGE_HINT:DEFEND]
 
[CDI:USAGE_HINT:DEFEND]
Line 278: Line 277:
 
[SYN_NAME:about to explode]
 
[SYN_NAME:about to explode]
 
[SYN_CLASS:EXPLOSION_READY_3]
 
[SYN_CLASS:EXPLOSION_READY_3]
[CE_FLASH_TILE:TILE:33:4:0:0:FREQUENCY:32:16:START:0:END:2:DWF_STRETCH:144]
+
[CE_FLASH_TILE:TILE:33:4:0:0:FREQUENCY:32:16:START:0:END:2:DWF_STRETCH:72]
[CE_CAN_DO_INTERACTION:START:0:END:1:DWF_STRETCH:144]
+
[CE_CAN_DO_INTERACTION:START:0:END:1:DWF_STRETCH:72]
 
[CDI:ADV_NAME:Explode]
 
[CDI:ADV_NAME:Explode]
 
[CDI:USAGE_HINT:ATTACK]
 
[CDI:USAGE_HINT:ATTACK]
Line 302: Line 301:
 
[SYN_NAME:unable to explode]
 
[SYN_NAME:unable to explode]
 
[SYN_CLASS:EXPLOSION_OVERRIDE]
 
[SYN_CLASS:EXPLOSION_OVERRIDE]
[CE_SPEED_CHANGE:SPEED_PERC:100:START:0:END:2:DWF_STRETCH:144]
+
[CE_SPEED_CHANGE:SPEED_PERC:100:START:0:END:2:DWF_STRETCH:72]
  
 
</nowiki>
 
</nowiki>
 
}}
 
}}
 
==Transformation Interactions==
 
These are interactions that will cause a creature to transform into another creature.
 
 
===Demon Transformation===
 
 
This is a fairly straightforward transformation, as it only relies on one caste token. This interaction will transform a creature into a random non-unique demon
 
 
{{gamedata|title=Demon transformation|
 
<nowiki>
 
[INTERACTION:DEMON_POLYMORPH]
 
[I_SOURCE:CREATURE_ACTION]
 
[I_TARGET:A:CREATURE]
 
[IT_LOCATION:CONTEXT_CREATURE]
 
[I_EFFECT:ADD_SYNDROME]
 
[IE_TARGET:A]
 
[IE_IMMEDIATE]
 
[SYNDROME]
 
[SYN_CONCENTRATION_ADDED:1000:0]
 
[CE_BODY_TRANSFORMATION:START:0:PEAK:0:END:5:ABRUPT:DWF_STRETCH:144]
 
[CE:CREATURE_CASTE_FLAG:DEMON]
 
[CE_ADD_TAG:NO_AGING:START:0:PEAK:0:END:5:ABRUPT:DWF_STRETCH:144]
 
</nowiki>
 
}}
 
 
Note that this interaction will not work in arena mode due to the lack of generated creatures in that mode. However, it will work if a creature performs the interaction in a loaded world that contains generated demons.
 
 
 
===Vault Guardian Transformation===
 
 
Transformation syndromes that turn a creature into a titan or demon only really rely on the [DEMON] and [TITAN] tokens, but how can the same be achieved with vault guardians? Below is an example of an interaction that will reliably transform a creature into a random angel.
 
 
{{gamedata|title=Angel transformation|
 
<nowiki>
 
[INTERACTION:ANGEL_POLYMORPH]
 
[I_SOURCE:CREATURE_ACTION]
 
[I_TARGET:A:CREATURE]
 
[IT_LOCATION:CONTEXT_CREATURE]
 
[I_EFFECT:ADD_SYNDROME]
 
[IE_TARGET:A]
 
[IE_IMMEDIATE]
 
[SYNDROME]
 
[SYN_CONCENTRATION_ADDED:1000:0]
 
[CE_BODY_TRANSFORMATION:START:0:PEAK:0:END:5:ABRUPT:DWF_STRETCH:144]
 
[CE:FORBIDDEN_CREATURE_FLAG:SMALL_RACE]
 
[CE:FORBIDDEN_CREATURE_FLAG:HAS_ANY_FEATURE_BEAST]
 
[CE:CREATURE_FLAG:GENERATED] this is key, as the generated token is one unique to vault guardians and other "secret" creatures
 
[CE:FORBIDDEN_CREATURE_CASTE_FLAG:DEMON] we have to forbid all types of night creatures and other generated creatures so the game may only choose angels
 
[CE:FORBIDDEN_CREATURE_FLAG:HAS_ANY_NIGHT_CREATURE]
 
[CE:FORBIDDEN_CREATURE_FLAG:HAS_ANY_NIGHT_CREATURE_BOGEYMAN]
 
[CE:FORBIDDEN_CREATURE_FLAG:HAS_ANY_NIGHT_CREATURE_EXPERIMENTER]
 
[CE:FORBIDDEN_CREATURE_FLAG:HAS_ANY_NIGHT_CREATURE_NIGHTMARE]
 
[CE:FORBIDDEN_CREATURE_FLAG:HAS_ANY_NIGHT_CREATURE_HUNTER]
 
[CE:FORBIDDEN_CREATURE_CASTE_FLAG:CANNOT_BREATHE_AIR]
 
[CE:FORBIDDEN_CREATURE_CASTE_FLAG:IMMOBILE_LAND]
 
[CE:FORBIDDEN_CREATURE_CASTE_FLAG:MEGABEAST]
 
[CE:FORBIDDEN_CREATURE_CASTE_FLAG:SEMIMEGABEAST]
 
[CE:FORBIDDEN_CREATURE_CASTE_FLAG:TITAN]
 
[CE:FORBIDDEN_CREATURE_CASTE_FLAG:UNIQUE_DEMON]
 
[CE_ADD_TAG:NO_AGING:START:0:PEAK:0:END:5:ABRUPT:DWF_STRETCH:144]
 
</nowiki>
 
}}
 
 
Note that this interaction will not work in arena mode due to the lack of generated creatures in that mode. However, it will work if a creature performs the interaction in a loaded world that contains vault guardians.
 
 
==See Also==
 
* [[Creature examples]]
 
* [[Reaction examples]]
 
  
 
{{Category|Modding}}
 
{{Category|Modding}}
{{Category|Modding_Examples}}
 

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

This page is a member of 1 hidden category: