https://www.dropbox.com/s/xwp8yj680w597 ... 9.zip?dl=0
- the focus of this rather larger update were triggers (and prop triggers) in encounters, aka event squares. This came with bug fixing/polishing spells that leave lingering effects on squares (eg flame walls or posion clouds)
- also a lot of scripts were adjusted to work in encounters, too, and the in battle trap system was fleshed out a bit more
- the approach here was to use our existing systems and tie them in, so the event squares are are little on contact spells casters opening up the whole spell and effect toolbox
- you can do anything form mine fields to healing pools to squares granting poisitional buffs, like bonus to hit, while a character or creature stands on them
- work was very tricky due to the way the animation and turn order systems work and rely on each other (I spare you the bloody details


- I tested a lot and it looks bug free, but naturally my testing will always be limited and due to the nature of the work I expect some more bug reprots than usual coming in in the next weeks
- So here comes, what changed in detail:
- Triggers, in TriggerEvents tab in encounter editor:
- I added an "EveryStep" check box; when this is checked, the trigger will be called on every move; when unchecked, the trigger is only called on the start of a turn of a creature/pc standing on it
- as beforehand you can also set here whether only pc/ only creatures/ both can trigger it and how many charges the trigger has left; a message will be written to the log now once a trigger has been depleted
- gcTrue and gcFalse work in encounters now, too; this means that you can make event2 (true) and event3 (false) depend on the outcome of a gc check (eg call of gcPassSkillCheck script; note: use -1 for PCIndex to have the character who just stepped on the trigger make the skill roll) on event1
- large creatures will trigger the very same trigger (triggers can have many squares) only once per move now
Props Blueprints, in properties tab, in encounter editor ("Triggers(combat)" section)
- the "encounterPropTriggerOnEevryStep" property works like "Every step" decsribed beforehand for triggers
- as before with normal triggers you set whether only pc/ only creatures/ both can trigger the prop and how many charges the prop trigger has
- you can set that the prop is a trap and how difficult it is to disarm (dc)
- diasarming traps works via using a trait/spell that has as spell script "trRemoveTrap";eg a thief can "cast"/use it on a trap prop and then a skill roll is automatically made using "disabledevice" as trait to check for; on success the prop with the trap is removed
gaCastSpellEncounterTrigger.cs
The new script gaCastSpellEncounterTrigger can be used to cast spells from the script hooks of triggers or prop triggers; these will always target the square they are on (but might still affect a large area via spell radius and spell shape):
//gaCastSpellEncounterTrigger.cs - Cast a spell from a trigger (or prop trigger) in battle (during encounter)
//parm1 = tag of the spell
//parm2 = enter "true" (without "") to remove the effects applied by this spell after each step of a creature or pc (eg useful for positional buffs that shall only work while standing on a specific square), set to "false" for effects that shall last for their full duration regardless of moving on
//parm3 = caster level with which the spell is cast, like 10
//parm4 = enter the text to appear in the log to announce the casting of the spell in the combat log
Note: So far this is only for spells using spellEffectTagList to list their effects (ie not for those that use single tag (outdated property) or those that use a special script). You might experiment with the already existing "gaPropOrTriggerCastSpellOnThisSquare.cs" (which I saw too late, stupid me), but the work I did was done and tested with gaCastSpellEncounterTrigger.cs.
Other scritps adjusted for encounters (osSetProp, gaEnableDisableTrigger, gaEnableDisableTriggerEvent)
The scripts osSetProp, gaEnableDisableTrigger and gaEnableDisableTriggerEvent should work in battle, too, now. Using "thisProp" in osSetProp will directly target the prop that the script was called from.
Graphics
The spells called from triggers and prop triggers have their ending animations up an running (eg exploding fireball), including death aimations for creatures slain by them and damage floaties. Setting this up correctly (to work after each move) was simply painful.
Spells that create lingering effects
As introduced in v108 already (well more precisely, it was added by Jer before that and just expanded on a bit by me) you can have spells that implement lingering effects on squares (think gas clouds or flame walls). This is controlled by the spell properties "isUsedForCombatSquareEffects" and "triggeredEachStepToo". Such effects are applied on the start of each turn of a cretaure/pc standing on such a square. If "triggeredEachStepToo" is true, these effetcs are additionally applied after each step of a creature/pc that ends on a square that carries such an effect. This last mechanism makes it very painful to run through eg a flame wall or poisonous cloud. Better watch out how you move

Done:-)