I have a little problem getting torches to work. I am using cave adaption triggers to make humans slower and dizzy underground, but if they equip a torch (shield), that shouldnt happen. I set it up this way:
This is the slow interaction. It doesnt work on creatures with syn_class:light.
[INTERACTION:SPELUNCAPHOBIA_MW_SLOW]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:LIGHT]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[CE_SPEED_CHANGE:SPEED_PERC:50:START:0:PEAK:3050]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:3050:NONE:REQUIRED]
The human creature has this. So after 3050 ticks underground they affect themselves with it.
[CAN_DO_INTERACTION:SPELUNCAPHOBIA_MW_SLOW]
[CDI:TARGET:A:SELF_ONLY]
[CDI:WAIT_PERIOD:3050]
[CDI:FREE_ACTION]
And the torch inorganic has this:
[INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_HUMAN]
[USE_MATERIAL_TEMPLATE:SOIL_TEMPLATE]
[SYNDROME]
[SYN_NAME:torch]
[SYN_CLASS:DFHACK_ITEM_SYNDROME]
[SYN_AFFECTED_CREATURE:HUMAN:ALL]
[SYN_CLASS:LIGHT]
[CE_ADD_TAG:NO_DIZZINESS:START:0]
And last: The torch itself.
///human torch to stop cave adaption
19
[ITEM_SHIELD:ITEM_SHIELD_TORCH]
[NAME:torch:torches]
[ARMORLEVEL:1]
[BLOCKCHANCE:10]
[UPSTEP:1]
[MATERIAL_SIZE:1]