Thread: How to properly write if effects
-
January 7th, 2018, 05:54 #1
How to properly write if effects
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: 2Availability: Tuesdays and Wednesday
Time zone: Eastern time. GMT-5 USA
Ultimate license user
-
January 7th, 2018, 06:10 #2
Without knowing teh rest of the syntax CE is not the correct usage for Evil.
You want something like:
IF: ALIGN (evil);
-
January 7th, 2018, 06:11 #3
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/forum...-Hunter-s-Mark
- https://www.fantasygrounds.com/wiki/...p/3.5E_Effects
Also, this has the right topic, but not sure it's what you need; https://www.fantasygrounds.com/forum...-Hunter-s-Mark
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
January 7th, 2018, 06:22 #4
IF: ALIGN (evil); SAVE: 2; AC: 2; or not quite right?
Availability: Tuesdays and Wednesday
Time zone: Eastern time. GMT-5 USA
Ultimate license user
-
January 7th, 2018, 08:59 #5
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.Last edited by Zacchaeus; January 7th, 2018 at 09:01.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
January 7th, 2018, 14:03 #6
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.
-
January 8th, 2018, 15:55 #7
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.
-
January 8th, 2018, 19:02 #8
IFT: TYPE: (goblin); DMG: 2d6 melee
That works for bane ok getting a hang of the if and IFT variables now.Availability: Tuesdays and Wednesday
Time zone: Eastern time. GMT-5 USA
Ultimate license user
-
January 9th, 2018, 11:59 #9
- Join Date
- May 2016
- Posts
- 167
-
January 9th, 2018, 12:27 #10
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.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks