Page 1 of 12 12311 ... Last
  1. #1

    (New IF operator) New and much better version of Save versus tags

    This is for FG classic! See the link in my signature for FG Unity
    Now only part of the full overlay packages

    StrainInjury: A combined version of that with StrainInjury can be found in https://www.fantasygrounds.com/forum...695#post445695
    Normal version: https://www.fantasygrounds.com/forum...ea-from-Ken-L).


    This extension will be a replacement for my save versus tags extension, https://www.fantasygrounds.com/forum...arbitrary-tags (an explanation of the extension will be also here in this thread)

    Why the rewrite?
    There were performance problems; the CUSTOM effect is a performance-eating code in FG and too many of them could cause performance problems because this created some sort of "loop" (which is not really a loop but the code had to take a long path). For this I have developed a new operator similar to IF and IFT, its name is IFTAG. It works very similar to the previous IF: CUSTOM(..) of the previous extension, but its performance is now a lot better due to a different code in its background (different to CUSTOM and IF). This needed a rewrite of the effect code in FG, so please tell me when you see errors

    What does it do?
    Before I explain the IFTAG in detail let me shortly explain the main properties: (EDIT: New features and updates are listed below. @FutureKelrugem: You certainly need to rewrite this mess)

    • There is the effect SIMMUNE for immunity against spells/actions. You trigger that effect only by pressing on the cast button. When the target has SIMMUNE then you see [IMMUNE] in the chat message of the cast message, the star icon of the cast message changes in a cancelled star and the target will be removed according to your choice in the options for Remove on Miss.
    • There is the effect SR for an effect for spell resistance. It is of the form 'SR: (N) [bonus type]'. This adds the number N as spell resistance and it does not stack with the existing value of spell resistance in the sheets since spell resistance works like that as far as I know. But, due to the mechanic of effects in FG, several different SR effects might stack when there is not a suitable bonus type, i.e. 'SR: 13; SR: 2' would result into 'SR: 15'. Hence, rather use a generic bonus type like 'SR: 13 enhancement; SR: 2 enhancement' to avoid that stacking although there is not any bonus type for magical effects for SR in the core rules. There is also not any information about the effect bonus in the chat message to avoid that players can estimate the SR of their target (but the effect seemingly works, trust me or play a bit with it :P). SR can also have a target.
    • The IFTAG operator can be used for triggering SIMMUNE, SR and SAVE and all other effects affecting spells/actions only for specific type of actions and effects. So, with that extension it is possible to have saves and immunity against specific type of actions See below for details.
    • For this, there is a new automatic parsing of spells such that you do not have to do too much.
    • More features mentioned in the Updates section at the bottom

    How does it work? (if not already explained)
    See the attached picture (that is now old stuff), that is the new save configuration box of your spells. You see that there is a new box for the school and type of your action. At the moment the standard school types (and "None") are supported and for types: None, spell and spelllike.
    When you want to modify your actions a bit more with additional traits like paralysis, stun etc. then there is a new line at the bottom. Type in any tag you need for describing that spell action. Everything will work for the IFTAG (explanation for that still incoming :P), also apple, pie whatever But: separate them by a comma or semicolon or space, FG will know that words separated like that are different tags (and the code uses spaces and semicolons for the parser). Therefore do not use "magic missile" as one tag, rather write e.g. "magicmissile" and do not use special signs like -. Therefore spelllike, not spell-like. mindaffecting, not mind-affecting. languagedependent, not language-dependent. The parser of FG does not like that (and/or I didn't find out how to treat these signs well enough)
    You will realize that the spell parser already adds a lot of tags when you add a new spell (from a module coming from FG directly) or when you reparse them: The type is then always spell, the school depends on the string in the school entry and all remaining descriptors are automatically parsed in the bottom line

    To use the tags: Simply use IFTAG, e.g. save bonusses or immunity against specific types are written like in the following examples

    • IFTAG: spell; SAVE: 2 racial (+2 racial bonus against spells)
    • IFTAG: spelllike; SAVE: 2 racial (+2 racial bonus against spell-like effects, remember to not use the -)
    • IFTAG: poison; SAVE: 10 insight (+10 insight bonus on saves against poisons, poisons are not automatically parsed in the tag lines. You have to add them on their own such that FG will know which action corresponds to a poison)
    • IFTAG: spell; IFTAG: evocation; SIMMUNE (immunity versus spells of the school evocation)
    • IFTAG: spell, illusion; SAVE: 3 enhancement, will (+3 will enhancement bonus against spells in general and against illusions in general, so also spell-like illusions would be affected by that or anything else with the tag illusion, not only illusion spells. The comma between tags is like a logical (inclusive) OR )

    You see, after IFTAG you type in the tags which are needed to get the bonus or spell immunity (write the type (spell, spelllike) and the schools small); FG then compares these tags with the tags of the action/spell (saved in the save configuration box as explained above) to see if a save bonus or immunity has to be applied Always put these effects in new lines of effects in the combat tracker; the IFTAG works like IF and IFT, so, when the tags are not met then everything after the IFTAG will be ignored, therefore do not combine them with other effects like AC and so on, put them in different lines (or at the very end of another line without any IF and IFT,this is how FG works in general). When you want that to tags/conditions/traits (whatever) are met for a bonus, then put several IFTAGs next to each other as in the fourth effect. The fourth effect only grants SIMMUNE when the action of the attack is a spell of the school evocation, spell-like effects of evocation would not be affected by this for example.
    Instead, when you want that just at least one tag is needed for some bonus or immunity then use the structure of the last example. The last effect grants an enhancement bonus of +3 to will saves when the action is of type spell or illusion (so spell-like illusions would be affected by that effect). This allows you to put several effects of the same type (SAVE, SR or SIMMUNE) for different tags into one line. That is an exception of the rule above about putting these effects into new lines in the CT. I've implemented this to keep the CT effect entry small enough The spell and poison resistance of dwarves can then be written like: IFTAG: spell, spelllike, poison; SAVE: 2 racial

    Combinations with other extensions:
    StrainInjury (by darrenan) and all other things:
    Overlays, AoO tracker (with incorporated automated flat-footed by mr900rr) and advanced effects (with incorporated keen effect by darrenan): https://www.fantasygrounds.com/forum...ea-from-Ken-L)
    It is compatible with advanced effects and AoO (and with the extension where advanced effects and AoO are combined), so the combinations are only needed when you also want StrainInjury from darrenan and/or the overlays

    Have fun


    • Both, evasion and improved evasion, can now also be combined with IFTAG.
    • DC effect for improving the difficulty class, works also with IFTAG. DC: (N), where N ist an arbitrary number and bonus types should be supported here. Basically spell focus feats can now be done with that and IFTAG, too, when you do not want to go through all of your spells E.g. IFTAG: spell; IFTAG: enchantment; DC: 1
    • [STR], [DEX] etc. are now respecting STR-, DEX- etc. effects (conditions and so on, too), they do not only take the modifier from the sheet anymore This does not hold for [BAB], [LVL] and [CL] since there are no effects for them, thence they work as usual.
    • There is now dice support for the effect parsing! Simply type [NdM+K] where M is a positive number while N and K can be both, positive and negative (or zero for K). I.e. strength damage can be now parsed without rolling manually (although there is no physical dice, so not "physical/real randomness"), e.g. STR: [-2d6+1]. This die in the bracket will be rolled (in sense of a random table) and its result will be parsed into the CT, for example STR: -2 then. dF is also supported

    Update 2+ in the next post
    Attached Images Attached Images
    Last edited by Kelrugem; January 17th, 2022 at 15:41.

  2. #2
    I've now made it compatible again with all the other extensions, see the provided links at the end of the first post :)

    Sorry for that many changes. I always think "This is it now for some while" and then I already have a new idea. Then holidays.. that happens then :P

    By the way, the IFTAG code is coded very general such that I could easily combine it with any other effect (here SAVE and SIMMUNE at the time of this posting). Thence due to its more general design now I can think about combining tags with other effects. But depends on usage :)

    UPDATE 2:

    • There is now automatic parsing of the spell level depending on in which spell level you drop the spell. The numbers will be parsed as words, thus, one, two, three... :) With that you can code globe of invulnerabilities, e.g. the lesser globe would be (when I am not mistaken the lesser globe blocks up to level three spells) IFTAG: zero, one, two, three; SIMMUNE :) (this was already possible before, but now you do not have to add the numbers manually in the tags line)
    • (Improved) evasion will now be ignored when the PC or NPC has one of the following conditions as an effect: helpless, paralyzed, sleeping, unconscious, petrified, bound
    • There are now negated versions for IF, IFT and IFTAG: NIF, NIFT and NIFTAG, respectively. W.r.t. coding they work exactly as the ones with the N but the remainder of the effect is ignored when the conditions are met. This means that you can now e.g. code true seeing: Give the person who has true seeing e.g. the effect true (or anything else) and then the invisible persons get NIFT: CUSTOM(true); invisible :) Beware that they work also roughly as the operators without N when it is about performance, so don't overdo it :) Only use that when you need that for the combat (or test it before). But in 3.3.9 the performance of effects will be improved and therefore I didn't see any issues yet (for normal usages) :) And remember that only effects which can be targeted (having the (T) in the wiki) are affected by IFT and remember which effects can be combined with IFTAG because the same holds for NIFT and NIFTAG (but the bonus will always be applied, also without having a target or tag information, so the negation also takes this into account :) E.g. NIFT: healthy; ATK: -2 will always apply the -2, also without having a target, except when there is a target which has no wounds. I found this to be the most intuitive way to implement these operators).
    • For the previous point: invisible, CA and GRANTCA now also work in combination with IFT (and so also with NIFT). This was not possible before, the (T) did not imply that (so an exception in the wiki), it was only targetable. This means that you can combine them with IFT as in IFT: CUSTOM(test); GRANTCA. (IFT: invisible; [...] etc. should have been possible already before)
    • The spell save view window is now a bit increased such that one can see the (H) when the damage is halved (at least it is better, couldn't increase this too much due to the the position of the magnifying glass when the character sheet has minimum width).
    • There are now new entries in the options for the cast action, these should be self-explaining (see the image below): The ability box defines the attribute taken for the DC calculation. Its standard value will be given by the one defined in the spell class. But you can click on this new cycle button to change the ability just for that one spell :) At the bottom there is now a cycle button to change the behaviour about when the counter for Use/day will be resetted, after a long or short rest, or you define it as a consumable (no reset after any rest). The standard value for the reset button will be of course "Long Rest" :) (there is a "four" in the tags line because I dropped acid arrow in the fourth spell level :) )

    • SR, SIMMUNE now are targetable, too :)
    • With keladvantage and keldisadvantage you apply advantage and disadvantage to rolls, respectively :) Except for an edge case of damage rolls this should hopefully work, but still some sort of prototype, so please test it a bit first! :) When damage types are not important, then it works also for damage rolls, otherwise treat damage rolls manually. See also: https://www.fantasygrounds.com/forum...l=1#post490890
    • All the cycle buttons with CL, even CL and odd CL (or more) now also have CL/3 which simply uses CL/3 (rounded down and minimum 1) as a number :) Needed for some spells at least in 3.5e :)
    • Should work for FGU, too, hopefully :)
    • IFTAG can now be combined with CLC

    Update 3: New stuff!
    nodex This condition can be used in (N)IF(T) statements to check whether one has lost their Dex modifier to AC: When the (opposing) actor has an effect which leads to a loss of Dex mod to AC then this condition will return true. Hence, one can e.g. code sneak attack with IFT: nodex; DMG: 3d6 precision. The only exception is CA, that can’t be measured and has still to be treated manually or with other effects (e.g. having an CA effect would not apply the mentioned sneak attack effect). Similarly, IF: nodex will not work when the opposing actor has an CA effect, and so on... CA is difficult to treat, FG has major problems to check that, it basically always gave me the error "F***, that is too much, leave me alone with so many calculations!" :D Maybe FG has problems with that type of complexity, or I did it wrong
    Will not work as a single condition.
    ROLLON: [same as for /rollon] Rolls on the table at the beginning of turn, formatting is as for the macro /rollon. When the name starts with a separated number then do not use a 0 as the first digit (but something like 0A would work, but not 01, 0 A etc.)

    • Now compatible with some stuff of rmilmine's advanced effects extension; but sadly the IFTAG operators still won't work with rmilmine's extension :( I spent now many hours updating etc., such that I do not really have time anymore to delve into rmilmine's extension. It is very big extension, and I am not sure whether I can fix it on my side. I turn back to it when I have time for that again (which can really take a while now; I already lost too many hours now :D)
    • The parser now automatically parses the tag disbelief and it finally also parses tags for spell modules with custom actions! :) And the parser will do it intelligent: It won't overwrite anything (except the school entry), so, it checks first whether some tag already exists before it may add it, and custom tags will not be overwritten by that, also the spell box stays on spelllike or none when it was saved like that. But still make a sanity check, the automatic parser of the spell level could lead to two numbers in the tag line when you drop it into another spell level than the one it was saved with (so, save spells maybe without the spell level; or I may automate that later, i.e. such that it deletes the previous number tag). Possible new tags will then be added at the end of all the tags, separated with a space (the semicolon approach looked strange in general); that is just something visual, separating with a space is also okay when it is about automation. The semicolon was just legacy
    • IF(T): [condition] effects were returning true in the native code, when there was an effect of precisely that searched condition which was on "Skip". Now this behaviour is fixed, and "Skip" condition effects will be ignored like turned-off effects (but they will not automatically turn to on "when they would have been triggered" as usual, simply due to the the ambiguity of when such conditions would be triggered, especially outside of combat), but they do not do this even in the native code, seemingly also not so easy to code

    Update 4: See post #4 :)
    Last edited by Kelrugem; June 26th, 2021 at 13:32.

  3. #3

    Join Date
    Apr 2008
    Virginia Beach
    Kelrugem, you are doing great work, man. I wish I could use it, but for right now, my group wants to move to PF2. I have some mixed thoughts about that.

  4. #4
    Quote Originally Posted by Bidmaron View Post
    Kelrugem, you are doing great work, man. I wish I could use it, but for right now, my group wants to move to PF2. I have some mixed thoughts about that.
    Thank you

    Ah, I understand the mixed feelings, I would also not be sure if I should switch (and I didn't even switch to Pathfinder) Too many books I still have to work through in 3.5e

    Update 4: New effects:

    CL (D) [bonus] Caster level; dice evaluated as random table (since not important)
    COC (D) [bonus] Concentration check, PF1 only; use SKILL for 3.5e

    CL can be combined with IFTAG (its effect will not yet been shown in the chat message text, but the different number of dice, results etc are shown of course)
    The following is a test (but it should already work well): IFTAG can now be also combined with keen, all conditions, STR, DEX, ..., CMB, ATK, NLVL, AC, ACCC, CMD, SCOVER, COVER, PCOVER, CONC, TCONC, VCONC, TVCONC, ghost touch (for 3.5e), CC, DMG, DMGS, DMGTYPE, DMGSTYPE, TDMG, IMMUNE, FORTIF, RESIST, HRESIST, VULN, DR, and HEAL. Or: Basically all effects which can affect spells/actions. Of course, there must be the information about tags somewhere (coming from the actor of the action/spell, so, defenders/targets use the info about tags of course for AC etc., too, as it already happens for SAVE), so, ATK combined with IFTAG won't be triggered when just doing a weapon attack. The information about tags comes from the first cast button the code finds when you roll for damage or heal (the upper one, I think), so, when you have a spell with two cast buttons you may want to test that first, or align the tag infos in both cast buttons
    A word about the CL effect for the PF1 users: It won't update the concentration check, please use the COC effect separetely then I decided to do so because then it is for you easy to decide whether or not bonusses to CL and concentration stack by choosing bonus types in the COC effects Otherwise I would need to add some code which checks for all COC and CL effects, and which then checks the stacking, when you roll concentration (FG's code does not check stacking of different effects of course) (and another problem is that the concentration does not know about tags due to that it is not spell-specific. In that way the CL is always compatible with IFTAG)

    Update 5: Thanks to DCrumb for the motivation:
    d X {other tag}
    X ∈ {1,...,9} (if none, it will assume X = 1). The other tag will get divided by X.

    For example ATK: [d4STR]; additional attack mod given by the strength mod divided by 4
    {other tag} X X any non-negative total number (also more than one digit possible). The other tag cannot be bigger than X then; this operation is after all multiplications but before a sign change

    One can also now combine numbers with the letter tags like in [H3STR]; first the letter, then the number, as for the new d tag from above.

    For example: [-d5STR2] divides the STR mod first by 5, then takes the smaller of this result and 2, and then it changes the sign
    Last edited by Kelrugem; May 7th, 2021 at 21:15.

  5. #5
    Awesome! Can't wait to test this when 3.3.8 drops.
    Gonna be used for quite a while since my group really doesn't like 2E, and switching in the middle of the 2 APs I'm running isn't feasibe anyway
    Pathfinder/Traveller GM - Sometimes running CPRed, CoC, AD&D2E, and other stuff - Ultimate License
    Currently running Pirates of Drinax, and Skulls and Shackles
    Check out my little dungeon map blog

  6. #6
    There were the following update for 3.3.8:

    Quote Originally Posted by Moon Wizard View Post
    Thanks, guys. I generalized what you were doing to apply to all the dice/number expression processing I found with a quick scan, across all the rulesets I support directly.


    • [DEV][CoreRPG+] Decimal points supported in dice/number expressions (/die commands, table/template expressions, effect number parsing)

    Therefore I updated the save versus tags extension (and the combined extension packages with save versus tags ) since my extension would overwrite this change. But you do not need to update as long as you do not use decimal points in your effect actions

  7. #7
    I have some new and nice updates

    • Both, evasion and improved evasion, can now also be combined with IFTAG.
    • SR can also now be combined with IFTAG. (just because I was able to do it :P the general code for IFTAG allows me to extend it very easily to any effect). This effect can by the way also assigned with a target (for completeness I wanted to mention that).
    • DC effect for improving the difficulty class, works also with IFTAG. DC: (N), where N ist an arbitrary number and bonus types should be supported here. Basically spell focus feats can now be done with that and IFTAG, too, when you do not want to go through all of your spells E.g. IFTAG: spell; IFTAG: enchantment; DC: 1
    • [STR], [DEX] etc. are now respecting STR-, DEX- etc. effects (conditions and so on, too), they do not only take the modifier from the sheet anymore This does not hold for [BAB], [LVL] and [CL] since there are no effects for them, thence they work as usual.
    • There is now dice support for the effect parsing! Simply type [NdM+K] where M is a positive number while N and K can be both, positive and negative (or zero for K). I.e. strength damage can be now parsed without rolling manually (although there is no physical dice, so not "physical/real randomness"), e.g. STR: [-2d6+1]. This die in the bracket will be rolled (in sense of a random table) and its result will be parsed into the CT, for example STR: -2 then when -2 is the result of -2d6+1. dF is also supported

    I personally also like the first point because now I can finally fully automate the 3.5e version of fire shield I've started coding for FG because I wanted to automate my fire shield spell (therefore one of my first effects was HRESIST in the advanced effects extension. I didn't know that the fire shield will lead me to such extensions )
    I also cleaned the code a lot. If some other developer is interested to understand IFTAG then manager_effect_35E.lua should now look better. I merged my own functions with the original ones.

    I will upload the other updated packages with Save versus tags now
    Last edited by Kelrugem; August 8th, 2019 at 01:30.

  8. #8
    Oh, and what I forgot to mention in the initial post: write the tags for spell types and schools always small for your effects, so evocation and not Evocation. At the moment the parser/code in the background sees them as different words. I may change this at some point

  9. #9
    I'm having trouble with this one... It always uses the linked effect even without it being there. I mean, tried to set it on a character as "IFTAG: necromancy; SAVE: -2" (big bad Necrotic Cyst :D). That -2 is *always* on no matter the tag. Necromancy? -2. Conjuration? -2. Even random saves (prompted by a double click on the Saving Throw number) generates a result -2. Did I set it wrong?

  10. #10
    See the attached image, for me it is working Did you put it up like I did? Which other extensions are you running?

    EDIT: Test spell 2 is the abjuration spell while Test spell is necromancy. You can see that the penalty is only applied to the necromancy spell (though it should not matter whether it is a spell; when it only applies to spell then write IFTAG: necromancy; IFTAG: spell; SAVE: -2

    Make sure you wrote necromancy small and correct; I often have a typo with words like necromancy

    EDIT2: Also make sure that the school is correct in spell save description. The school is only automatically parsed for newly added spells into your action tab while the extension is active (or when you reparse a spell after right-clicking on it) But I doubt that all your spells are suddenly necromancy only
    Attached Images Attached Images
    Last edited by Kelrugem; August 9th, 2019 at 20:46.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Fallout 1

Log in

Log in