STAR TREK 2d20
Page 1 of 2 12 Last
  1. #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: 2
    Availability: Tuesdays and Wednesday
    Time zone: Eastern time. GMT-5 USA
    Ultimate license user

  2. #2

  3. #3
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,272
    Blog Entries
    9
    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.

  4. #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

  5. #5
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,827
    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

  6. #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.

  7. #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.

  8. #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

  9. #9
    Quote Originally Posted by Callum View Post
    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)?

  10. #10
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,827
    Quote Originally Posted by rickyhunt View Post
    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.
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in