I have a question about syndrometrigger.
(Edit: its solved, I added the solution at the bottom of the post.)I tried running animaltrain.lua on a specific caste only, but I cant get it to work. I started with this:
[INORGANIC:TRAIN_SKELETON_BITE]
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
[STATE_NAME_ADJ:ALL:Train one skill point]
[MATERIAL_VALUE:0]
[SYNDROME]
[SYN_CLASS:\AUTO_SYNDROME]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:animaltrain]
[SYN_CLASS:\WORKER_ID]
[SYN_CLASS:BITE]
It works beautifully and adds 1 skill in biting to the creature running the reaction. Sadly, I cant restrict it to only accept a specific creature caste. So I thought I try syndrometrigger, which I have never used so far, and have never seen in other mods yet. I made an inorganic that teaches an interaction, and the interaction should trigger the script:
[INORGANIC:TRAIN_SKELETON_BITE]
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
[STATE_NAME_ADJ:ALL:Train one skill point]
[MATERIAL_VALUE:0]
[SYNDROME]
[SYN_CLASS:\AUTO_SYNDROME]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:SKELETON]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:IRONBONE_SKELETON]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:BLOODSTEEL_SKELETON]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:DREADNOUGHT_SKELETON]
[CE_CAN_DO_INTERACTION:PROB:100:START:0:END:100]
[CDI:INTERACTION:TRAIN_SKELETON_BITE]
[CDI:VERB:learn biting:learns how to bite better:NA]
[CDI:TARGET:A:SELF_ONLY]
[CDI:TARGET_RANGE:A:1]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:300]
[INTERACTION:TRAIN_SKELETON_BITE]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_AFFECTED_CREATURE:WARLOCK_CIV:SKELETON]
[IT_AFFECTED_CREATURE:WARLOCK_CIV:IRONBONE_SKELETON]
[IT_AFFECTED_CREATURE:WARLOCK_CIV:BLOODSTEEL_SKELETON]
[IT_AFFECTED_CREATURE:WARLOCK_CIV:DREADNOUGHT_SKELETON]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:animaltrain][SYN_CLASS:\UNIT_ID][SYN_CLASS:BITE]
The skeletons use the interaction just fine, they show the "learns how to bite better" in the combat log. But the interaction does not trigger syndrometrigger. What did I do wrong?
Edit: SyndromeTrigger is enabled in the init. In case you were wondering.
EDIT: Ups. It actually needs some effect in that syndrome. I used
[CE_SPEED_CHANGE:SPEED_PERC:99:START:0:END:10], and everything works just fine.