- 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"
IndigoFenix (talk | contribs) |
IndigoFenix (talk | contribs) |
||
Line 2: | Line 2: | ||
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. | 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== | ||
+ | |||
+ | ===Synchronizing Adventure and Fort Mode syndrome timers=== | ||
+ | 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. 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 72 ticks in Adventure Mode. | ||
+ | |||
+ | ===Syndromes with no effect=== | ||
+ | There are times you will want to create a syndrome that has no actual effect - generally in order to add a SYN_CLASS that renders the target untargetable by a different interaction. Syndromes disappear once their effects have expired, so to do this you will need to add an effect that does nothing. | ||
+ | Some examples: | ||
+ | {{gamedata|title=Useless syndrome tags| | ||
+ | [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: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:72] <-- Makes the target take 1/1 times its normal damage from attacks | ||
+ | }} | ||
+ | |||
+ | So if you see tags like this in the examples below, this is what they are for. | ||
==Material Emission Interactions== | ==Material Emission Interactions== | ||
Line 117: | Line 136: | ||
This is intended to be used by non-playable units, like animals or zombies. | This is intended to be used by non-playable units, like animals or zombies. | ||
− | {{gamedata|title=Timed Self-Destruct| | + | {{gamedata|title=Example Timed Self-Destruct with Override Ability| |
<nowiki> | <nowiki> | ||
[INTERACTION:EXPLOSION_READY_1] <-- This is the ability you actually give the creature. Use CDI:USAGE_HINT:DEFEND, and CDI:TARGET:A:SELF_ONLY. | [INTERACTION:EXPLOSION_READY_1] <-- This is the ability you actually give the creature. Use CDI:USAGE_HINT:DEFEND, and CDI:TARGET:A:SELF_ONLY. |
Revision as of 18:22, 7 March 2020
v51.11 · 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.
General Tips
Synchronizing Adventure and Fort Mode syndrome timers
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. 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 72 ticks in Adventure Mode.
Syndromes with no effect
There are times you will want to create a syndrome that has no actual effect - generally in order to add a SYN_CLASS that renders the target untargetable by a different interaction. Syndromes disappear once their effects have expired, so to do this you will need to add an effect that does nothing. Some examples:
[show][Select all] Useless syndrome tags |
---|
So if you see tags like this in the examples below, this is what they are for.
Material Emission Interactions
Following are several examples of material emission interactions.
Multiple Projectile Emission
[show][Select all] Example [MATERIAL_EMISSION] interaction raws that fire three projectiles of the same material |
---|
By adding additional [I_EFFECT:MATERIAL_EMISSION] tags with their associated targets, you may stack additional projectiles.
Predefined Material Emissions
[show][Select all] Example [MATERIAL_EMISSION] interaction raws that use a predefined material |
---|
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
[show][Select all] Example [MATERIAL_EMISSION] interaction raws that use two predefined material types |
---|
This interaction fires both a solid glob of basalt and a liquid glob of granite magma.
Material Emissions With Immunity
[show][Select all] Example [MATERIAL_EMISSION] interaction raws that may only target creatures |
---|
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.
Timed Self-Destruct with Override Ability
This will allow the user to explode after spending a certain amount of time in combat. A few ticks before exploding, it will flash with a "!" as a warning. You can also replace the explosion with any other powerful ability that you want it to use only after a countdown. It also comes with a syndrome that will disable the explosion. This is intended to be used by non-playable units, like animals or zombies.
[show][Select all] Example Timed Self-Destruct with Override Ability |
---|
Syndrome Interactions
Following are examples of interactions that apply syndromes.
Emission Immunity
[show][Select all] Example [ADD_SYNDROME] interaction raws with an "immunity" syndrome tag |
---|
This interaction would prohibit a creature from being targeted by the emission interaction listed above.