Small update, there is a minor error in the wrapper script that effects only very specific combinations of tokens. I am already almost done with a fix, but it still needs to be tested at least a couple times before I release it, until then I doubt anyone will encounter the error, but just know that it does exist (if you think something isn't working as it should).
I am also considering modifying the addsyndrome script to specify the syndromes you wish to add. For example, the current system requires you to have one inorganic for each one syndrome, but this means that you will need many inorganics just to specify syndromes. A work around for this would be defining several syndromes in one inorganic, and then applying the syndromes via INORGANIC_TOKEN/SYN_NAME
So instead of having three different inorganics for three different syndromes
addsyndrome SYNDROME_FIRE_BURN \UNIT_ID
addsyndrome SYNDROME_FIRE_IMMOLATE \UNIT_ID
addsyndrome SYNDROME_FIRE_SEAR \UNIT_ID
You would have three different syndromes in one inorganic
addsyndrome SYNDROME_FIRE/BURN \UNIT_ID
addsyndrome SYNDROME_FIRE/IMMOLATE \UNIT_ID
addsyndrome SYNDROME_FIRE/SEAR \UNIT_ID
This would limit the number of DFHack related inorganics. You could even, theoretically (as long as there are no in game limits), place all syndromes in a single inorganic, although that might make your raws hard to navigate.
And lastly, here is a preview of a couple of my sample interactions. All of the following should be applied with a USAGE_HINT:ATTACK.
Up first, a self only targeting interaction which adds a syndrome. You can see that there are various checks made.
[SYNDROME]
[SYN_NAME:blink]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:spells/wrapper]
[SYN_CLASS:script@spells/addsyndrome]
[SYN_CLASS:args@SYNDROME_ARCANE_TIME_BLINK;!UNIT]
[SYN_CLASS:self@true]
[SYN_CLASS:iclass@TIME3;TIME4;MAGIC_IMMUNE;ARCANE_IMMUNE]
[SYN_CLASS:isyndrome@MAGIC_IMMUNITY;TIMEWARD;ARCANEWARD]
[SYN_CLASS:relfect@REFLECT_TIME;REFLECT_ARCANE;REFLECT_ALL]
[SYN_CLASS:silence@SILENCE_TIME;SILENCE_ARCANE;SILENCE_ALL]
[SYN_CLASS:verbose@true]
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:0]
And here is a self only interaction which changes the material of the casters weapon for 1 day;
[SYNDROME]
[SYN_NAME:arcane weapon]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:spells/wrapper]
[SYN_CLASS:script@spells/imbueitem]
[SYN_CLASS:args@!SELF;weapon;SPELL_MATERIAL_ARCANE;3600]
[SYN_CLASS:iclass@MAGIC_IMMUNE;ARCANE_IMMUNE;MAGIC_RESIST;MYSTIC1;MYSTIC2;MYSTIC3;MYSTIC4]
[SYN_CLASS:isyndrome@MAGIC_IMMUNITY;RESIST_MAGIC;RESIST_ARCANE;ARCANEWARD;MYSTICWARD]
[SYN_CLASS:relfect@REFLECT_MYSTIC;REFLECT_ARCANE;REFLECT_ALL]
[SYN_CLASS:silence@SILENCE_MYSTIC;SILENCE_ARCANE;SILENCE_ALL]
[SYN_CLASS:verbose@true]
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:0]
Up next is a friendly only (without self) targeting interaction that adds a syndrome. Here the silence check and the iclass, isyndrome, and reflect checks take place on different units;
[SYNDROME]
[SYN_NAME:haste]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:spells/wrapper]
[SYN_CLASS:script@spells/addsyndrome]
[SYN_CLASS:args@SYNDROME_ARCANE_TIME_HASTE;!UNIT]
[SYN_CLASS:self@true]
[SYN_CLASS:center@false]
[SYN_CLASS:target@civ]
[SYN_CLASS:maxtargets@1]
[SYN_CLASS:radius@10/10/10]
[SYN_CLASS:iclass@TIME2;TIME3;TIME4;MAGIC_IMMUNE;MAGIC_RESIST;ARCANE_RESIST;ARCANE_IMMUNE]
[SYN_CLASS:isyndrome@MAGIC_IMMUNITY;RESIST_MAGIC;TIMEWARD;ARCANEWARD]
[SYN_CLASS:relfect@REFLECT_TIME;REFLECT_ARCANE;REFLECT_ALL]
[SYN_CLASS:silence@SILENCE_TIME;SILENCE_ARCANE;SILENCE_ALL]
[SYN_CLASS:verbose@true]
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:0]
Similarly, a friendly target interaction (including self) which adds a syndrome;
[SYNDROME]
[SYN_NAME:magic immunity]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:spells/wrapper]
[SYN_CLASS:script@spells/addsyndrome]
[SYN_CLASS:args@SYNDROME_ARCANE_AEGIS_MAGIC_IMMUNITY;!UNIT]
[SYN_CLASS:self@true]
[SYN_CLASS:target@civ]
[SYN_CLASS:maxtargets@1]
[SYN_CLASS:radius@10/10/10]
[SYN_CLASS:iclass@MAGIC_IMMUNE;ARCANE_IMMUNE]
[SYN_CLASS:isyndrome@MAGIC_IMMUNITY]
[SYN_CLASS:silence@SILENCE_AEGIS;SILENCE_ARCANE;SILENCE_ALL]
[SYN_CLASS:verbose@true]
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:0]
Now, switching gears, an enemy only interaction which adds a syndrome. Here there doesn't need to be any specification of target, since the ingame USAGE_HINT rules already provide the specification;
[SYNDROME]
[SYN_NAME:slow]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:spells/wrapper]
[SYN_CLASS:script@spells/addsyndrome]
[SYN_CLASS:args@SYNDROME_ARCANE_TIME_SLOW;!UNIT]
[SYN_CLASS:iclass@TIME2;TIME3;TIME4;MAGIC_IMMUNE;MAGIC_RESIST;ARCANE_RESIST;ARCANE_IMMUNE]
[SYN_CLASS:isyndrome@MAGIC_IMMUNITY;RESIST_MAGIC;TIMEWARD;ARCANEWARD]
[SYN_CLASS:relfect@REFLECT_TIME;REFLECT_ARCANE;REFLECT_ALL]
[SYN_CLASS:silence@SILENCE_TIME;SILENCE_ARCANE;SILENCE_ALL]
[SYN_CLASS:verbose@true]
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:0]
And lastly, an example of a ranged attack interaction.
[SYNDROME]
[SYN_NAME:arcane missle]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:spells/wrapper]
[SYN_CLASS:script@spells/projectile]
[SYN_CLASS:args@unit;!UNIT;AMMO/ITEM_AMMO_ARROWM_MAGIC;SPELL_MATERIAL_ARCANE;shoot;2/65/50/30/1;!SELF]
[SYN_CLASS:iclass@MAGIC_IMMUNE;ARCANE_IMMUNE;MAGIC_RESIST;MYSTIC1;MYSTIC2;MYSTIC3;MYSTIC4]
[SYN_CLASS:isyndrome@MAGIC_IMMUNITY;RESIST_MAGIC;RESIST_ARCANE;ARCANEWARD;MYSTICWARD]
[SYN_CLASS:relfect@REFLECT_MYSTIC;REFLECT_ARCANE;REFLECT_ALL]
[SYN_CLASS:silence@SILENCE_MYSTIC;SILENCE_ARCANE;SILENCE_ALL]
[SYN_CLASS:verbose@true]
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:0]
As you can see I have broken down the interactions into various types and categories. For now there are;
Combat Buff (Self Only)
Combat Buff (Friendly Only)
Combat Buff (Friendly + Self)
Combat Debuff (Enemy Only)
Combat Debuff (All)
Ranged Attack
Melee Attack
Summon
Map Change
And
Buff (Self Only)
Buff (Friendly Only)
Buff (Friendly + Self)
Summon
Map Change
I am sure there will be more categories and types as I move through my list of spells, but with 40 done so far, those are all the types I have. I will be releasing the actual raws when they are all done (and not just copies of parts of the interactions), along with suggested CAN_DO_INTERACTION snippets, so that people can see what I am thinking when I am making them.
[INTERACTION:SPELL_ARCANE_MYSTIC_ARCANE_MISSLE]
* Shoot an arrow made of arcane material
* Ranged Attack
* Targets enemies only
-CAN_DO_INTERACTION:SPELL_ARCANE_MYSTIC_ARCANE_MISSLE--
-CDI:ADV_NAME:Arcane Missle--
-CDI:USAGE_HINT:ATTACK--
-CDI:TARGET:C:LINE_OF_SIGHT--
-CDI:TARGET_RANGE:C:15--
-CDI:MAX_TARGET_NUMBER:C:1--
-CDI:VERB:casts arcane missle:arcane missle casted:arcane missled--
-CDI:WAIT_PERIOD:1000--
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:C:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[IT_MANUAL_INPUT:target]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:C]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:arcane missle]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:spells/wrapper]
[SYN_CLASS:script@spells/projectile]
[SYN_CLASS:args@unit;!UNIT;AMMO/ITEM_AMMO_ARROWM_MAGIC;SPELL_MATERIAL_ARCANE;shoot;2/65/50/30/1;!SELF]
[SYN_CLASS:iclass@MAGIC_IMMUNE;ARCANE_IMMUNE;MAGIC_RESIST;MYSTIC1;MYSTIC2;MYSTIC3;MYSTIC4]
[SYN_CLASS:isyndrome@MAGIC_IMMUNITY;RESIST_MAGIC;RESIST_ARCANE;ARCANEWARD;MYSTICWARD]
[SYN_CLASS:relfect@REFLECT_MYSTIC;REFLECT_ARCANE;REFLECT_ALL]
[SYN_CLASS:silence@SILENCE_MYSTIC;SILENCE_ARCANE;SILENCE_ALL]
[SYN_CLASS:verbose@true]
[CE_SKILL_ROLL_ADJUST:PERC:100:PERC_ON:0:START:0:END:0]