PDA

View Full Version : How to properly write if effects



belkasro
January 7th, 2018, 05:54
I have been trying to get my IF effects to work. I've been scouring the forums and no luck as of yet. Trying to start with protection from evil effect.

If evil undead is attacking while having protection from evil up. Player gets +2 bonuses applied only when evil undead is attacking the character.


Non working Effect
IF: ALIGN: CE; TYPE: undead; AC: 2; SAVE: 2

damned
January 7th, 2018, 06:10
Without knowing teh rest of the syntax CE is not the correct usage for Evil.

You want something like:
IF: ALIGN (evil);

LordEntrails
January 7th, 2018, 06:11
I'm not an expert on effects, but I can point you toward two things;
1) Check the Wiki on effects. General IF/IFT should be there.
2) I think you are going to have to use the "custom" effect and use two effects, one for the undead and one for the protection spell. There was recently a thread or two (maybe in 5E) about ... Hunter's Mark? that detailed how to do this.

See;
- https://www.fantasygrounds.com/forums/showthread.php?40057-Question-about-applying-Hunter-s-Mark
- https://www.fantasygrounds.com/wiki/index.php/3.5E_Effects

Also, this has the right topic, but not sure it's what you need; https://www.fantasygrounds.com/forums/showthread.php?23926-Effects-help-Protection-from-Evil-and-Hunter-s-Mark

belkasro
January 7th, 2018, 06:22
IF: ALIGN (evil); SAVE: 2; AC: 2; or not quite right?

Zacchaeus
January 7th, 2018, 08:59
Th IF statement can’t be chained as in your first example so you can’t make two tests in the one line. Secondly the IF statement tests for a condition that is on the actor that the effect is sitting on. So if this effect is sitting on a player it is testing for the player’s alignment. So you want the IFT: statement which tests the target to see if it has the appropriate conditions.

So we get IFT: TYPE(undead); AC: 2; SAVE: 2

Your problem comes if this only fires if the target is evil and undead since you will require another test this time for alignment which you can’t chain. So you would need another effect IFT: ALIGN(evil); AC: 2 etc
You could then end up with both tests coming up true and getting a double bonus or getting a bonus against evil characters that are not undead or undead characters that are also not evil.

Callum
January 7th, 2018, 14:03
Protection from evil (https://paizo.com/pathfinderRPG/prd/coreRulebook/spells/protectionFromEvil.html#protection-from-evil) provides its bonuses against attacks made by evil creatures, regardless of whether they are undead or not, so the effect would be:

IFT: ALIGN (evil); AC: 2 deflection; SAVE: 2 resistance

It's important to include the bonus types, so that multiple effects stack properly.

kwarner1986
January 8th, 2018, 15:55
Callum has it correct. CE however is a valid effect, but only targets Chaotic Evil creatures only. Therefore you need to use just (evil). You do want to put in bonus type because things like Protection from Evil does not stack with Cloaks of Resistance or Rings of Protection.

Here's another example of IF statements, this would be the Ranger's Favorite Enemy:

IFT: TYPE (goblin); ATK: 2; DMG: 2

You can fill in goblin with the following creature types: aberration, animal, construct, dragon, fey, giant, humanoid, magical beast, monstrous humanoid, ooze, outsider, plant, undead, vermin, air, angel, aquatic, archon, augmented, chaotic, cold, demon, devil, earth, evil, extraplanar, fire, good, incorporeal, lawful, living construct, native, psionic, shapechanger, swarm, water, dwarf, elf, gnoll, gnome, goblinoid, halfling, human, orc, reptilian.

There are sometimes a need to create an effect for a creatures of a certain size. This target certain sized creatures:

IFT: SIZE (large); ATK: 1
This effect grants +1 to attack if the creature is exactly large size.

IFT: SIZE (>=large); ATK: 1
This effect grants +1 to attack if the creature is large, huge, gargantuan, or colossal

IFT: SIZE (<=small); ATK: 1
This effect grants +1 to attack if the creature is small, tiny, diminutive, fine.

belkasro
January 8th, 2018, 19:02
IFT: TYPE: (goblin); DMG: 2d6 melee

That works for bane ok getting a hang of the if and IFT variables now.

rickyhunt
January 9th, 2018, 11:59
Protection from evil (https://paizo.com/pathfinderRPG/prd/coreRulebook/spells/protectionFromEvil.html#protection-from-evil) provides its bonuses against attacks made by evil creatures, regardless of whether they are undead or not, so the effect would be:

IFT: ALIGN (evil); AC: 2 deflection; SAVE: 2 resistance

It's important to include the bonus types, so that multiple effects stack properly.

The target can be the attacker, not just the target of an attack? So an effect on a player of bonus AC vs an evil attacker would apply to any evil attacker using the IFT: ALIGN (evil)?

Zacchaeus
January 9th, 2018, 12:27
The target can be the attacker, not just the target of an attack? So an effect on a player of bonus AC vs an evil attacker would apply to any evil attacker using the IFT: ALIGN (evil)?

No. IFT: tests the target of the actor on which the effect is placed. So if the NPC had an effect IFT: ALIGN(evil) and the player was evil then it would return true. The IFT: is not tested when the actor on which the effect is placed is a target itself. So placing an IFT: on a PC testes for any targets targeted by that PC; it doesn't test when the player is the target.

Trenloe
January 9th, 2018, 14:04
The IFT: is not tested when the actor on which the effect is placed is a target itself.
For effects that are defending the action (e.g. AC for an attack, SAVE for a cast/save action) then the target IFT is reversed and checked against the creature with the IFT effect.

So, in this case, a PC having the IFT: ALIGN (evil); AC: 2 deflection; SAVE: 2 resistance effect on them, does give the PC the AC and SAVE effects if an evil creature targets them with the relevant action.


The target can be the attacker, not just the target of an attack? So an effect on a player of bonus AC vs an evil attacker would apply to any evil attacker using the IFT: ALIGN (evil)?
Yes.

Zacchaeus
January 9th, 2018, 15:52
For effects that are defending the action (e.g. AC for an attack, SAVE for a cast/save action) then the target IFT is reversed and checked against the creature with the IFT effect.

So, in this case, a PC having the IFT: ALIGN (evil); AC: 2 deflection; SAVE: 2 resistance effect on them, does give the PC the AC and SAVE effects if an evil creature targets them with the relevant action.

Oops, so it does. I had an error in my effect when I tested it :)

Kozakai
January 30th, 2018, 20:24
It took me a while to defrag what how IF/IFT statements worked out, but in a nutshell:

IF(you) is for when the actor themselves meet the condition (blinded, shaken, SIZE: small, etc.)

IFT(arget) is for when outside entities meet the conditions, whether to hit them or about to be hit by them.

So, for instance, upon using Protection of evil on YOURSELF, [IFT: ALIGN (evil); AC 2 deflection; SAVE: 2 bonus] would give YOU +2 to AC and Saves from anyone that's evil attacking you, and if you cast it on someone else, they would get +2 to AC and saves from anything evil attacking it.

If anyone sees any hole in this logic of thinking of IF/IFT effects, please do!

Moon Wizard
January 30th, 2018, 22:14
Yes, that's correct.

The only other consideration is that IFT will only work with rolls that are enabled to be targeted (such as attacks, damage, saving throws, etc.)

Regards,
JPG

BCA
February 17th, 2018, 23:45
So I've had luck with with chaining IFT: tags, but you have to do it separate tests in the chain, so for evil outsider bane the line goes:

IFT: TYPE(outsider); IFT: TYPE (evil); ATK: 2; DMG: 2; DMG: 2d6

The double test seems to work so far, only effecting creature with both the Outsider and Evil types.

LordEntrails
February 18th, 2018, 00:18
So I've had luck with with chaining IFT: tags, but you have to do it separate tests in the chain, so for evil outsider bane the line goes:

IFT: TYPE(outsider); IFT: TYPE (evil); ATK: 2; DMG: 2; DMG: 2d6

The double test seems to work so far, only effecting creature with both the Outsider and Evil types.
Welcome :)

Thanks for posting, useful to know :)

BCA
February 18th, 2018, 00:38
Thanks! Been using the tool for several months now, and have been trolling the forums since then. Finally decided to try and contribute something.

Thanks again for the welcome!