Encounter triggers and spells that create effect squares

Any documentation, tutorials, tips and tricks, or examples on how to use the IB2 Toolset

Encounter triggers and spells that create effect squares

Postby youngneil1 » Fri Jun 22, 2018 5:46 am

There are two systems for making squares in an encounter affect creatures and player characters that step on them, via 1) spells cast midbattle and 2) via setting up triggers (as well as prop triggers) in the toolset when building the encounter.

First up, it's imporant to note that the effect properties doBuff and doDeBuff are relevant again (I isted them under "Outdated Properties" for some time, which I is now corrected from beta v113+). Please use those for all spells that modify stats (like AC or to hit) or change states (like hold spells, which give the Held status). Long lasting healing or damaging effects should not be considered buffs/debuffs though. The thing with buffs/debuffs is that their existence in the effect list of a target is used by various sections in the code, while damage and heal effects just do the direct change to hp/sp and that's it (eventually repeatedly with longer duration).

1. Spells that imbue squares with lingering effects
The following properties allow you to set up a spell and effects combination that will cause the effects to live on the squares affected after the spell has been cast:

Spell:
[03 -Target] isUsedForCombatSquare
This is the main property indicating that is spell is not applied directly on creatures or PCs, but on the squares themselves. Such spells will show in log for how long their effects will linger on the affected squares. Also, these spells have no immediate effect on creatures/PCs in the moment of casting. Instead, they will affect creatures/PCs at the start of their turn on such a square and also each time they step on such a square (if triggeredEachStepToo).

[03 - Target]triggeredEachStepToo
As mentioned above, set this to true if you want the effect square to also try to apply its effect on a creature/PC each time it steps on the square. If set to false, the effect square will try effect application only if a creature/PC starts his/its turn on the square.

Effect:
[00 - Main] durationOnSquareInUnits
This is the duration that the effect will linger on a square (in seconds, so typically use multiples of six for combat rounds, like 12 for 2 combat rounds). Please note that this duration is always added on top of current round. This is different from the duration that an effect lasts on an affected PC/creature.

[00 - Main] squareIndicatorFilename
This is the graphic that is shown on a square when an effect lingers on it (use filename without .png ending). This is different from the effect graphic shown on an affected PC/creature.

Limitations:
- Spell [03 - Target]: spellTargetType is always used like it is set to PointLocation (best do so manually, too, so you get not confused later), ie a spell with isUsedForCombatSquare set to true will always affect all squares that fall under its area of effect shape; the lingering effects created will also always affect friend and enemy alike

2. Triggers (and prop triggers)

a. Triggers
Ecounter triggers are set up via the box "Combat only settings" in the trigger menu.
The check boxes "By PCs" and "ByCreatures" determine which type of actor can cause the trigger to activate.
"Every step" check box controls whether the trigger is actviated on every step,too. In any case a trigger will activate additionally at the start of a creature's/PC's turn when it/he stands on it.
Finally, there's a counter with the charges of the trigger before it stops working (by deault set to 999).

When you want the trigger to cast a spell on contact, best use the script gaCastSpellEncounterTrigger as event script:

//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 applided 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 tht shall alst for their full duration regardless of moving on
//parm3 = caster level with which the spell is cast, like 10
//parm4 = enter the next to appear in the log to announce the casting of the spell in the combat log


A thing of beauty here is that you can also use gcPassSkillCheck.cs with encounter triggers:

//gcPassSkillCheck.cs - Checks to see if PC passes a skill check (will write roll attempt and report to log)
//parm1 = (int) index of the PC to check for attribute (1st PC is index = 0), can adress directly with index number
//Other options:
//1. leave blank, enter -1, leader or Leader to use the currently selected party leader for the single roll
//2. enter -2, highest or Highest to use the pc with the highest power level (skill bonus from trait, attribute bonus and item bonus combined) for the single roll
//3. enter -3, lowest or Lowest to use the pc with the lowest power level (skill bonus from trait, attribute bonus and item bonus combined) for the single roll
//4. enter -4, average or Average to use average power level (skill bonus from trait, attribute bonus and item bonus combined) of the party for the single roll
//5. enter - 5, allMustSucceed or AllMustSucceed to have everybody rolling separately with their individual power level, all must succeed with check to get apositive outcome
//6. enter - 6, oneMustSucceed or OneMustSucceed to have everybody rolling separately with their individual power level, one success is enough to get apositive outcome
//parm2 = (string) trait tag to check for passing skill check (see standard list below)
//parm3 = (int) difficulty class (DC) the value to check against (can be a
// variable, rand(minInt-maxInt), or just type in an integer).
//parm4 = (bool) use static roll of 10, enter true and instead of rolling d20 the fixed value 10 is used
//
//Calculation: check if (1d20 + intelligence modifier + disarm device trait skill modifier) > DC
//
//Standard Trait tags that are skill type traits:
// (note: the engine will use the highest trait skill the PC has so you do not need
// to enter tags such as bluff2 or bluff3, just enter bluff.
//bluff
//diplomacy
//disabledevice
//intimidate
//pickpocket
//spot
//stealth

//Note: works in encounter,too; using -1 as parm1 in an encounter will use the pc whose current turn it is


The combination of both scripts (gaCastSpellEncounterTrigger.cs, gcPassSkillCheck.cs) allows you to set up encounetr triggers that will only fire on failed skill checks. Just place gcPassSkillCheck.cs as event1 and gaCastSpellEncounterTrigger.cs as event3, while setting the gcFalse check box of event3 to true. Same could be done for requiring a passed skill check (using event2 and its gcTrue checkbox).

b. Prop Triggers
Please make sure the prop carrying the trigger is active and has no collisisons, as otherwise PCs and creatures will not be able to step on it and start it to fire.

In contrast to normal triggers, prop triggers come with their own image and can be copied as well as refered to multiple times (blueprint). They also have special settings for traps. Their drawback is that they lack the three event flexibility and conditional logic of regular triggers. Also, they can only cover one square.

Prop triggers in encounters can be setup using category [03 - Triggers (combat)] of a prop's properties.
"canBeTriggeredByPc" and "canBeTriggeredByCreature" determine which type of actor can cause the prop trigger to activate.
"encounterPropTriggerOnEveryStep" controls whether the prop trigger is actviated on every step, too. In any case a prop trigger will activate additionally at the start of a creature's/PC's turn when it/he stands on it.
Finally, there's a counter with the charges of the trigger before it stops working (by deault set to 999).

As with triggers, scripts (including gaCastSpellEncounterTrigger.cs, see above) and ibscripts can be used, but no other event types.

You can finally set that the prop is a trap and how difficult it is to disarm (dc). Disarming 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. This gives thief types an extra amount of usefulness in combat, too. You eg could use traps to ward off healing squares, so the tief can enbale ressource access for the party in combat. Many potential cool usages here.
User avatar
youngneil1
Backer
Backer
 
Posts: 4539
Joined: Sat Dec 08, 2012 7:51 am

Re: Encounter triggers and spells that create effect squares

Postby Dorateen » Fri Jun 22, 2018 3:19 pm

Looks good. I think I will start by experimenting with setting up a Wall of Fire spell.
User avatar
Dorateen
Backer
Backer
 
Posts: 895
Joined: Mon Nov 26, 2012 2:08 pm

Re: Encounter triggers and spells that create effect squares

Postby youngneil1 » Fri Jun 22, 2018 3:33 pm

Wall of Fire sounds like big fun :mrgreen: I will keep adding (currently am) to above shell of a guide, so have a look on it once in awhile as it might make it a bit easier to set the spell up correctly (or so I hope).
User avatar
youngneil1
Backer
Backer
 
Posts: 4539
Joined: Sat Dec 08, 2012 7:51 am

Re: Encounter triggers and spells that create effect squares

Postby youngneil1 » Sun Jun 24, 2018 3:40 pm

Done :) .

I guess there's more to say and for sure new bugs will come up once you fine guys start using these new tools, but I hope the tutorial is good enough to get you started.
User avatar
youngneil1
Backer
Backer
 
Posts: 4539
Joined: Sat Dec 08, 2012 7:51 am


Return to Users Guide and Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests

cron