PDA

View Full Version : (Beta) Extension: Save versus school types, poison, sleep and other arbitrary tags



Kelrugem
May 6th, 2019, 03:31
UPDATE: A new version is here https://www.fantasygrounds.com/forums/showthread.php?50297-(New-IF-operator)-New-and-much-better-version-of-Save-versus-tags&p=447232#post447232
Use that, it is better :)
StrainInjury: The combined version with strain and injury is now in https://www.fantasygrounds.com/forums/showthread.php?50121-StrainInjury-packages&p=445695#post445695

Hello :)

I have a new extension and it really took a looooot of time and effort such that I need some people to test this extension :) The use of this extension is to have SAVE effects against spells, spell-like effects, against specific type of schools of magic, against sleep spells, against fear, or any other thing; and that fully automated :) This needs some explanation, in the attached picture you can see the new spell window while programming how the save of your spell works. (In post #4 you can see a picture about how it works; ignore the "REMOVE: " messages there, they are not there anymore)

In that window there are several new things:



A button for the schools (click on it several times to switch the school, there is also an empty field). This field will be automatically parsed with the appropriate school when there is some information about that in the spell description. (For your existing spells you have to reparse the spell or to add it again to the spell list)
Another button for the type, spell, spell-like or nothing. When you add a spell or when you reparse it then the standard there will be 'spell' because I think that is the most common situation.
At the very bottom (extend your window) there is an empty field for other tags for your spell. Add any information there you want, like 'poison', or 'sleep' etc.. Very important: Separate your tags with a semicolon, e.g. 'poison;sleep' when this correspons to a sleep poison.


How to use this?



The effects are based on the CUSTOM effect as in the bottom of https://www.fantasygrounds.com/wiki/i...p/3.5E_Effects (https://www.fantasygrounds.com/wiki/index.php/3.5E_Effects), so make sure that you know how that works; see e.g. my post #21 where I explained that a bit more. When you want that some effect is only taken into account when the roll is against a spell or spell-like ability, or only against spells of evocation etc., then write e.g. 'IF: CUSTOM (spell); SAVE: 2 racial' or 'IF: CUSTOM (enchantment); SAVE: 2 racial' and so on on the target of the spell who has to make the save. I.e., in the CUSTOM([...]) you write the tag(s) of the situation when that save should be modified by that effect. Always make new effects for different save-situations, do not put them all in the same line (see post #20 and my answer #21)
The tags of the schools are: abjuration, conjuration, divination, enchantment, evocation, illusion, necromancy, transmutation, universal
The tags of the type are: spell, spelllike (without the - in spell-like!). In general: Do not use special signs like '-' etc., otherwise the extension will not completely work :) (See also the second update entry below)
To use the other tags in the line at the very bottom simply type anything in it, this can be then read by the extension. Very important: This is done by CUSTOM(...), i.e., as a general rule, I would suggest to separate different tags with a semicolon (and maybe everything small and without gaps between the words, but normally CUSTOM is not case sensitive such that this shouldn't matter). I.e., like 'poison;sleep;anyothertag' and then e.g. 'IF: CUSTOM (poison); IF: CUSTOM (sleep); IF: CUSTOM(anyothertag); SAVE: 2 resistance' (or just 'IF: CUSTOM(sleep); SAVE: 2 resistance', so the tags only give the spell action some new properties in form of tags which can be read by your effect and when all the tags for your effect are there then the effect applies, no matter if there are any other tags.


The spell resistance of dwarves would be (in 3.5e) then two effects 'IF: CUSTOM (spell); SAVE: 2 racial' and 'IF: CUSTOM (spelllike); SAVE: 2 racial'. The enchantment resistance of elves then 'IF: CUSTOM (enchantment); SAVE: 2 racial', the halfling fear resistance 'IF: CUSTOM (fear); SAVE: 2 morale' and so on. With the tags entry you can add any other tag you want :) There is no limit but this field has to be filled in manually, there is no parsing for it, i.e. the fear tags etc. have to be filled in manually. I may add automatic parsing for psionic spells and psi-like effects in the future like it is done already for spells.

I resolved all bugs and optical issues :) But maybe there are some other bugs I was not able to find yet, therefore I would happy when here are some people who can try this extension :) Please tell me about any problem you may find, then I try to fix that :) (but I have to work a lot in the upcoming weeks) Beware: I had to change a lot of the codes, i.e. this extension might not work with some extensions (maybe also not with my other extensions) and I only tested it for 3.5e, but I do not see any reason why it should be different in Pathfinder.

I hope that this extension is useful :) Took me incredible much time (the whole weekend) to do that :D When this extension works as intended then there is hopefully less manually tweaking in the future, especially when it is about save boni just against spells etc :)

Update: Darrenan allowed me to combine this extension with Strain and Injury :) See https://www.fantasygrounds.com/forums/showthread.php?50121-StrainInjury-packages&p=445695#post445695. The save vs tags alone is compatible with my advanced effects extension.

UPDATE 2: There is now automatic parsing of tags for subschools, descriptors, harmless and object descriptors (in saves and/or spell resistance) :) One warning: The code does not like special signs like '-', thence, the tags for language-dependent and mind-affecting are 'languagedependent' and 'mindaffecting', respectively :) (so the same rule as for spelllike :) )

UPDATE 3: I have now added several new features :)




The information of other tags in the save chat message will now be only displayed when there are really other tags available.
I have added the effect 'SR: (N) '. 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). beware, this effect can [B]not be combined with tags, so IF: CUSTOM (tag) will not work with SR. For some unknown reason I get some errors there and I was not able yet to find out why.
There is also now an effect for spell immunity! :) The effect is 'SIMMUNE' and you trigger that effect only by pressing on the cast button. When the target has SIMMUN then you see [FAILURE] in the chat message of the cast message and the target will be removed according to your choice in the options for Remove on Miss. This effect can be combined with tags, e.g. 'IF: CUSTOM (mindaffecting); SIMMUNE' will work :)


Best,

Kelrugem :)

Kelrugem
May 6th, 2019, 03:44
Another minor optical issue: When there are not then you see still some information about it in the chat when making a save, in form of "[Other tags: ]". (Somehow I can not edit my initial post)

And: The tags of the spell school and type are given by the two cycle buttons under "ON SAVE". You do not have to write this in the tag box below of course :)

Ideas for future development:

Adding disciplines of psionic stuff and psionic/psi-like in general (up to now, they can be manually added as a tag in the last line, but automatic parsing would be of course better like it happens already for spells).
Automatic parsing of the last line with subschools and descriptors coming from the school like fear, sleep, mind-affecting and so on (DONE)
Immunity against specific spell tags (DONE)
Spell focus
Effect for spell resistance (DONE)

Kelrugem
May 6th, 2019, 04:36
I also try to make a documentary about it and to add a lot of comments about my changes in the code for other developers (and I will probably forget all the details after some days which makes the maintenance terrible in the future I guess :D)

Kelrugem
May 6th, 2019, 19:01
Sadly I can not edit my first post, but here is some picture about what the extension is doing (sorry, my texts are always so messy; the remove messages in the chat are not in the extension anymore. So you can ignore that chat information) :)

27281

There you can see the following: My test character attacks an aboleth with three spells. The aboleth has the effect ''IF: CUSTOM(spell); IF: CUSTOM(test); SAVE: 3", so it gets a +3 bonus on saves against spells with the tag "test". You can see the details of the spells in the three windows at the right (and one in the middle).

The first casted spell is Charm Monster and you see that the Aboleth gets the +3 bonus since the spell has the type "spell" and the tag "test".

The second spell is Charm Monster, Mass and there you can see that the Aboleth does not get the +3 bonus. Charm Monster, Mass has the type spell but it lacks the tag test.

The third spell is Psionic Charm without a school and type, but with the tags test and psi (and I could have added also the tag telepathy for the psi discipline, i.e. in total then "test;psi;telepathy"). Although it has the tag "test" the aboleth does again not gain any bonus since it has not the type "spell" :) It would have gotten the bonus of +3 when it would have the type/tag spell, doesn't matter that there is also the tag "psi".

I hope it is somehow understandable :) I was trying to figure out the easiest way to do that without loosing the advantage of using any arbitrary tag (because I want to support homebrew rules as good as possible) :)

Kelrugem
May 6th, 2019, 19:45
Update: I updated the extension, now you do not need the REMOVE extension anymore :) The tag is now correctly removed (I added a unique name to the auxiliary effect in form of "tagsistagsKelrugem;". Thus, as long as you do not use that string somewhere in your effects everything should work :D) Thence, the REMOVE messages are gone now. (Now I was able to edit the first post by rewriting it again)

Kelrugem
May 6th, 2019, 20:40
BUG: I now know why it doesn't work when the PC casts on himself: When the PC has to make the save then the extension does in general not work. I will shortly fix it, probably due to that the code for the save of players is somewhere else in the code. So it only works for the saves of NPCs

Kelrugem
May 6th, 2019, 23:19
UPDATE: Now the bug is resolved :) This extension now works for any save roll, for NPCs and PCs; you can download the new extension in the first post :) (basically due to that my previous version was not finding the CT position of the players, now I fixed that) In my opinion it now fully works but I would be glad when you can tell me about any other issue. This extension will not work with Strain and Inury, but I try to combine both :)

Thanks to Moon Wizard in helping me to find the bug :)

Kelrugem
May 7th, 2019, 04:47
I've added an extension where this and Darrenan's extension about Strain&Injury are combined :) Thanks, Darrenan :)

Markjan
May 8th, 2019, 12:18
Whaow ! Magnificent !
Thank you Kelrugem

Kelrugem
May 8th, 2019, 18:46
Whaow ! Magnificent !
Thank you Kelrugem

:) I hope it is useful :) The next thing I do is maybe the automatic parsing of the descriptors in the spells (such that one has not to write "fear" in that one line; of course the tags are saved when you drag&drop this spell back into the spell library, but then one duplicates the spell entries there). But Celestian also allowed to use his code for effects saved in item, NPC descriptions etc :) At some time I try to expand Celestian's extension for 3.5e/Pathfinder :)

The story behind this extension is by the way funny: In my last gaming session I killed the dwarven fighter of the player's group with phantasmal killer; afterwards he found out that he would have survived when he would have thought about his +2 save bonus against spells :D Therefore this extension, to save my players :P (but then I found out that he forgot his CON penalty of cloud kill which neglected that bonus again (he uses CON on his will saves due to some feat) :D)

Svandal
May 12th, 2019, 12:29
:) I hope it is useful :) The next thing I do is maybe the automatic parsing of the descriptors in the spells (such that one has not to write "fear" in that one line; )

That would be really really great. Our group plays a lot of high level pathfinder, and utilizes most of the effects to automate combat as much as possible. This is a good extension, but if you manage to automatically parse things like: Fear, sleep, compulsion, mind affecting (and all the subschools), poision, etc this extension would be truly awsome.

Thank you for your great work kelrugem, and we hope you manage to do this as well.

Kelrugem
May 12th, 2019, 16:32
That would be really really great. Our group plays a lot of high level pathfinder, and utilizes most of the effects to automate combat as much as possible. This is a good extension, but if you manage to automatically parse things like: Fear, sleep, compulsion, mind affecting (and all the subschools), poision, etc this extension would be truly awsome.

Thank you for your great work kelrugem, and we hope you manage to do this as well.

Thank you :)

Ah, good to know that this can be useful for some people :) Then I try it when I find time for it; when there is an online list about all existing descriptors of a spell in the school entry then this should be somehow possible :D

Svandal
May 12th, 2019, 18:45
Thank you :)

Ah, good to know that this can be useful for some people :) Then I try it when I find time for it; when there is an online list about all existing descriptors of a spell in the school entry then this should be somehow possible :D

I will try to help out then. With my 10 years of experience with D&D 3.5 and pathfinder this is what I can come up with on top of my head. If somebody knows of anything else please post it here to help Kelrugem.

For descriptors and subschools:
https://www.d20pfsrd.com/Magic/#TOC-Descriptor-

Here is a list:
Descriptors:
Acid
Air
Chaotic
Cold
Curse
Darkness
Death
Disease
Draconic
Earth
Electricity
Emotion
Evil
Fear
Fire
Force
Good
Language-Dependent
Lawful
Light
Meditative
Mind-Affecting
Pain
Poison
Ruse
Shadow
Sonic
Water

Subschools:
Calling
Creation
Healing
Summoning
Teleportation
Scrying
Charm
Compulsion
Figment
Glamer
Pattern
Phantasm
Shadow
Polymorph

Might be usefull and shows in the saves section in a "()" (Undead have immunities vs fort saves except when it works on objects or is harmless):
object
harmless

Other (But might be hard to implement, and it not that usefull) (Some creatures are immune to these effects)
Sleep
paralysis
morale




For subschool and descroptors, the always show up in the "School" section of the spell. Subschools is in "()" and descriptor is in"[]"
"
Suggestion
School enchantment (compulsion) [language-dependent, mind-affecting]
"
For undead it might be usefull to get the object or harmless descriptor. Example is:
"
Disintegrate
Saving Throw Fortitude partial (object);
"

I am guessing it will be l lot easier to do this automatically if you just skip my "other" list, since this does not show up in one specific place in the spell description.

Kelrugem
May 12th, 2019, 18:54
Ah, thank you very much :) I found a list for 3.5e but Pathfinder seems to have some additional/another descriptors etc :) Then I am going to try this out (for your "other" list: yes, this may have to be done manually, i.e. manually writing paralysis in the tag line. But I may think about automatic parsing when the spell name is nice enough; e.g. for the 'sleep' spell it is clear that it needs 'sleep' as a tag). But it may take some time until I have enough free time again :)

Kelrugem
May 14th, 2019, 22:35
I updated the extension :) There is now automatic parsing of tags for subschools, descriptors, object and harmless tags (in saves and resistance; although I do not know if 'harmless' and 'object' are useful at the moment. It may be good when they are not usable since there are spells with harmless for saves but not for spell resistance but the tag 'harmless' would be parsed. Thus, two different 'harmless' may be good, but as long as I do not see any use for that I will not add them to avoid unnecessary complex things) :) Moreover, the parsing for descriptors and subschools is very general, basically every additional word next to the school is parsed :) So, for Enchantment (test) [alsotest] as school entry one would automatically get the tags 'test' and 'alsotest' :) So, you can use your own descriptors and subschools :D One warning: The code does not like special signs like '-', thence, the tags for language-dependent and mind-affecting are 'languagedependent' and 'mindaffecting', respectively :) (so the same rule as for spelllike :) ) Reparse your spells or add a spell from the rulemodule again into your action tab to get all the tags :)

Svandal
May 15th, 2019, 05:48
Nice. Great work Kelrugem, thank you. This will be a great addition to our games

Kelrugem
May 15th, 2019, 05:51
Nice. Great work Kelrugem, thank you. This will be a great addition to our games

Thanks :)
You're welcome :)

TrentLane
May 15th, 2019, 19:12
Nicely done! I already use your fortification extension and it's been of great use in my Iron Gods game. Definitly gonna add this one too!

Kelrugem
May 15th, 2019, 19:50
Nicely done! I already use your fortification extension and it's been of great use in my Iron Gods game. Definitly gonna add this one too!

Thank you :)

I am also open to any suggestion :) I may add spell immunity (then also the tags harmless and object could really be used) or spell focus (then one does not have to adjust all DC's manually). I was also thinking about adding anti-magic, maybe by giving the option to tell FG whether an effect comes from magic or not. When one then has the anti-magic effect, all magic effects are suppressed :) But I am not sure yet if any of these things can nicely be done :)

TrentLane
May 15th, 2019, 21:35
I'm trying to setup the racial bonuses for my android player, but I think I'm getting something fundamentally wrong here.

Set up like this it works fine against mindaffecting, but nothing else
27345
27346

Set up like this it applies the bonus to every spell, no matter the tags
27347
27348

Can't figure out what I'm doing wrong

Kelrugem
May 15th, 2019, 22:02
I'm trying to setup the racial bonuses for my android player, but I think I'm getting something fundamentally wrong here.

Set up like this it works fine against mindaffecting, but nothing else
27345
27346

Set up like this it applies the bonus to every spell, no matter the tags
27347
27348

Can't figure out what I'm doing wrong

Ah, yes, that is due to how the CUSTOM effect works in FG (generally; my extension doesn't change that). As far as I know FG reads the effects from the left to the right. When there is an IF or IFT effect then it stops there when the CUSTOM tag can not be found :) It is like a door and FG runs from left to right, when one of the doors is closed then it skips that effect from that point on. That is the reason why your mindaffecting worked but not the other because it already stops at the beginning due to the lack of the tag about mindaffecting :)

When I understand your purpose right then the android gets a +4 racial bonus when at least one tag is in the spell, isn't it? (and not all together)

Therefore rather make four separate effects:

IF: CUSTOM(mindaffecting); SAVE: 4 racial

then new separate effect for

IF: CUSTOM(poison); SAVE: 4 racial

and so on :)

If you want that several tags have to be there at the same time for one effect (like the bonus applies only to enchantment spells but not to spelllike enchantments) then e.g. write

IF: CUSTOM(spell); IF: CUSTOM(enchantment); SAVE: 4 racial

(and not IF: CUSTOM(spell; enchantment); SAVE: 4 racial)

(So all IF's/'doors' at the beginning then one gets only the bonus when there are the tags 'spell' AND 'enchantment' :) )

I hope I explained the mechanic of IF/IFT well enough :) The picture as a 'door' might help :)

So, as a general rule: Make always separate effects for each IF and when you want several tags asked at the same time, then put them all at the beginning like in my example :) (with separate CUSTOM entries; CUSTOM(spell; enchantment) will not work properly as you have seen, too. That is properly due to the semicolon which breaks the CUSTOM such that it becomes informational text only for FG and so it is completely ignored as in your example)

TrentLane
May 15th, 2019, 22:14
Thank you, I didn't know that IF/IFT works that way. All working as intended now :)

Kelrugem
May 15th, 2019, 22:16
Thank you, I didn't know that IF/IFT works that way. All working as intended now :)

Cool, makes me glad, too :) (I am always a bit afraid about whether I coded something wrong :D)

Kelrugem
May 23rd, 2019, 17:17
UPDATE 3: I have now added several new features :)



The information of other tags in the save chat message will now be only displayed when there are really other tags available.
I have added the effect 'SR: (N) '. 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). beware, this effect can [B]not be combined with tags, so IF: CUSTOM (tag) will not work with SR. For some unknown reason I get some errors there and I was not able yet to find out why.
There is also now an effect for spell immunity! :) The effect is 'SIMMUN' and you trigger that effect only by pressing on the cast button. When the target has SIMMUN then you see [FAILURE] in the chat message of the cast message and the target will be removed according to your choice in the options for Remove on Miss. This effect can be combined with tags, e.g. 'IF: CUSTOM (mindaffecting); SIMMUN' will work :) Clicking on the attack, CLC or save button will not check for that effect, so your players can still cast when there should be a reason for that and you do not have to turn that effect of then (and since e.g. SR is not asked/checked when clicking on the save button and I wanted to keep that procedure also for SIMMUN). See later: It is now SIMMUNE, not SIMMUN


For the people who knows a bit of code (otherwise stop to read now, it may get boring :D), I found some bug (?) in removeTarget function in the CoreRPG file manager_targeting.lua (maybe interesting for you, MoonWizard, when you are reading that?). removeTarget not only removes some target of the actor (e.g. the caster) it also adds the target to the actor when the target is actually not a target, i.e. removeTarget(actor, Test) adds Test as a target of the actor when Test is not a target of the actor which is probably not the wanted aim of that function, isn't? Therefore I changed that function by adding adding an if-clause checking wether Test is actually a target. One can test that bug by taking some player character, then turn Remove on Miss to On such that also single targets are removed. Make sure that this character has not any target and then drag&drop an attack die from a weapon action onto some NPC in the CT. When it is a miss then that player will get that NPC as target. On the next miss it will be removed, but again it is added after the next miss and so on.

(And I found out that targets of are ignored for CLC checks when one has 'Manual Dice rolls: On' and is triggering the CLC button by the cast button; but I didn't change that since that was not so important for me. But I was confused when checking the SR effect)

Svandal
May 23rd, 2019, 18:18
UPDATE 3: I have now added several new features :)



The information of other tags in the save chat message will now be only displayed when there are really other tags available.
I have added the effect 'SR: (N) '. 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). beware, this effect can [B]not be combined with tags, so IF: CUSTOM (tag) will not work with SR. For some unknown reason I get some errors there and I was not able yet to find out why.
There is also now an effect for spell immunity! :) The effect is 'SIMMUN' and you trigger that effect only by pressing on the cast button. When the target has SIMMUN then you see [FAILURE] in the chat message of the cast message and the target will be removed according to your choice in the options for Remove on Miss. This effect can be combined with tags, e.g. 'IF: CUSTOM (mindaffecting); SIMMUN' will work :) Clicking on the attack, CLC or save button will not check for that effect, so your players can still cast when there should be a reason for that and you do not have to turn that effect of then (and since e.g. SR is not asked/checked when clicking on the save button and I wanted to keep that procedure also for SIMMUN).


For the people who knows a bit of code (otherwise stop to read now, it may get boring :D), I found some bug (?) in removeTarget function in the CoreRPG file manager_targeting.lua (maybe interesting for you, MoonWizard, when you are reading that?). removeTarget not only removes some target of the actor (e.g. the caster) it also adds the target to the actor when the target is actually not a target, i.e. removeTarget(actor, Test) adds Test as a target of the actor when Test is not a target of the actor which is probably not the wanted aim of that function, isn't? Therefore I changed that function by adding adding an if-clause checking wether Test is actually a target. One can test that bug by taking some player character, then turn Remove on Miss to On such that also single targets are removed. Make sure that this character has not any target and then drag&drop an attack die from a weapon action onto some NPC in the CT. When it is a miss then that player will get that NPC as target. On the next miss it will be removed, but again it is added after the next miss and so on.

(And I found out that targets of are ignored for CLC checks when one has 'Manual Dice rolls: On' and is triggering the CLC button by the cast button; but I didn't change that since that was not so important for me. But I was confused when checking the SR effect)

Nice, the spell resistance will be especially helpful. We have 2 characters running around with the spell resistance spell.
For the spell immunity it is really difficult to spot that is is a failure, but we can only add some ridiculous high save in order to spot it. Like IF: Custom(fire); SIMMUN; SAVES: +999.
It will be helpful for those multiple target spells like hold person mass.
One minor thing. You call it "SIMMUN", you should call it "SIMMUNE" :)
For the automatic parcing of spell level. Without looking at the code there might be a way to extract the spell level. Spell DC can be based off spell level where you put it. So in theory the information should be there. Is there any way to read the information in "Class DC+" button in saves and use this information when making the tags?

Kelrugem
May 23rd, 2019, 18:27
Nice, the spell resistance will be especially helpful. We have 2 characters running around with the spell resistance spell.
For the spell immunity it is really difficult to spot that is is a failure, but we can only add some ridiculous high save in order to spot it. Like IF: Custom(fire); SIMMUN; SAVES: +999.
It will be helpful for those multiple target spells like hold person mass.
One minor thing. You call it "SIMMUN", you should call it "SIMMUNE" :)
For the automatic parcing of spell level. Without looking at the code there might be a way to extract the spell level. Spell DC can be based off spell level where you put it. So in theory the information should be there. Is there any way to read the information in "Class DC+" button in saves and use this information when making the tags?

Yes, it is hard to see in the chat when there is a FAILURE in the cast, especially when there is a save, CLC and attack roll, too :D Hmmm, I might think about another solution, maybe sending a chat message after all rolls about whether it failed or not? (But your workaround with SAVE:+999 should work, at least for spells which allow saves :) without the save roll it should hopefully be readable). But I also have in general a problem with the chat outputs in FG, they often look chaotic, even without my extensions :D I could try to do something similar as in the combat enhancer of Styrmir/kenL. There is a graphical hint whether a target succeeded or not :)

Oh,oops, yes, I forgot the E in SIMMUNE :D At the moment it works only with SIMMUN but I may change that :) Thanks, didn't see that somehow

Aaah, yes, very good idea. I didn't think about that the DC already reads the actual spell level... Thanks! :) That should help, with that information automatic parsing should be hopefully no problem :) I will investigate that soon :)

Kelrugem
May 23rd, 2019, 19:37
It is now SIMMUNE and SIMMUN :) Just updated it :)

Kelrugem
June 18th, 2019, 20:24
I have updated the extension to 3.3.8 :) Do not use it with previous versions (and wait for the 3.3.8 update when you are not playing in the test mode) and the combined version with strain and injury is deleted, it comes back when strain and injury is also compatible with 3.3.8 :)

My advanced effects gets a major update in some hours, too :) Therefore this extension has nothing new except compatibility because the advanced effects extension needed too much time :)

Kelrugem
June 22nd, 2019, 01:36
Here is the older version for save versus tags which is compatible with 3.3.7 when one already wants to use it (due to Discord discussion, I upload that again)

Also due to the discussion on Discord: SIMMUNE can be of course applied against any action like fear auras, not only against spells though the name SIMMUNE comes from spell immunity :)

dellanx
June 22nd, 2019, 17:02
That is awesome thank you! Tried IMMUNE: sleep, and did not see it work. Would it be possible to incorporate? Thanks Kelrugem!

dellanx
June 22nd, 2019, 17:57
Oh saw SIMMUNE will try. Thanks!

Kelrugem
June 22nd, 2019, 19:55
That is awesome thank you! Tried IMMUNE: sleep, and did not see it work. Would it be possible to incorporate? Thanks Kelrugem!

:)

Oh, I was not clear enough with my previous answer maybe, but it is implemented :) You have to write it as:

IF: CUSTOM(sleep); SIMMUNE

This should hopefully work. At some point I wanted to rewrite the parsing of NPCs such that FG would automatically use SIMMUNE instead of the informational effect like the one you used :)

EDIT: Oh, oops, now I saw your last answer :D Didn't see that there is already a new page with a new answer :D

dellanx
June 22nd, 2019, 22:22
:)

Oh, I was not clear enough with my previous answer maybe, but it is implemented :) You have to write it as:

IF: CUSTOM(sleep); SIMMUNE

This should hopefully work. At some point I wanted to rewrite the parsing of NPCs such that FG would automatically use SIMMUNE instead of the informational effect like the one you used :)

EDIT: Oh, oops, now I saw your last answer :D Didn't see that there is already a new page with a new answer :D

Tried IF: CUSTOM(sleep); SIMMUNE does not work, everything else does. Very awesome nevertheless.

Thanks!

Kelrugem
June 22nd, 2019, 22:45
For me it works but there is no automatic parsing for that tag. You have to insert them manually in the tag line in the spell/action save description :)

dellanx
June 22nd, 2019, 22:50
For me it works but there is no automatic parsing for that tag. You have to insert them manually in the tag line in the spell/action save description :)

Oh I see the first Failure Message! Thanks

Kelrugem
June 22nd, 2019, 23:14
ah yes, it is in the cast button message :) Depending on your options for Remove on Miss the target will then also be removed when there is immunity :)

dellanx
June 23rd, 2019, 01:55
ah yes, it is in the cast button message :) Depending on your options for Remove on Miss the target will then also be removed when there is immunity :)

It is truly a wonderful extension, thanks much!

Kelrugem
June 23rd, 2019, 02:00
It is truly a wonderful extension, thanks much!

:o

Thanks :)

dellanx
June 24th, 2019, 00:30
Playing with it I discovered that if one has five effects on everything works fine, with six or more things slow down or crash.

For Example

this works fine:
IF: CUSTOM(paralysis); SIMMUNE
IF: CUSTOM(poison); SIMMUNE
IF: CUSTOM(sleep); SIMMUNE
IF: CUSTOM(stunning); SIMMUNE
IF: CUSTOM(deatheffect); SIMMUNE

this slows down or crashes:
IF: CUSTOM(paralysis); SIMMUNE
IF: CUSTOM(poison); SIMMUNE
IF: CUSTOM(sleep); SIMMUNE
IF: CUSTOM(stunning); SIMMUNE
IF: CUSTOM(deatheffect); SIMMUNE
IF: CUSTOM(energydrain); SIMMUNE

When I tried something like this it does not work (the semi-colons ";" between effects make this always on, and commas "," alwasy off.

IF: CUSTOM(paralysis;poison;sleep;disease;mindaffectin g;stunning;abilitydrain;deatheffects;disease;energ ydrain; exhaustion;fatigue); SIMMUNE

Thanks

Kelrugem
June 24th, 2019, 00:42
I found this works equally well:

IF: CUSTOM(paralysis;poison;sleep;disease;mindaffectin g;stunning;abilitydrain;deatheffects;disease;energ ydrain; exhaustion;fatigue;mindaffecting); SIMMUNE

Hm, this should sadly not work, isn't it? someone else on Discord also tried this but there are several problems: On one hand more than one tag in CUSTOM is normally not possible (all tags in it will be looked as one big combined tag isntead) and on the other hand you separate them with a semicolon :) As with other effects a semicolon breaks an effect line into two separate effects (but one has to use the semicolon in the tag line of the spell save description in the action tab of course), therefore I assume that your IF is now without function and SIMMUNE will now always be turned on :) When you try a spell or action without one of these tags, then I think you still get an immunity message :) (which you do not want)

(But would be funny if it works, but normally it shouldn't :D)

At least this is how I understand that stuff works in FG (my extension doesn't change that) :)

So you normally have to put up a separate new effect for each tag. But Moon Wizard told me that this can cause FG lags when one has too many effects (a general "problem" in FG) :) So you have to see which effects are more important, which you turn off or (when it is about a Player character) ask that player to memorize some of the immunities such that that player can tell you when an immunity is important :)

dellanx
June 24th, 2019, 01:55
Hm, this should sadly not work, isn't it? someone else on Discord also tried this but there are several problems: On one hand more than one tag in CUSTOM is normally not possible (all tags in it will be looked as one big combined tag isntead) and on the other hand you separate them with a semicolon :) As with other effects a semicolon breaks an effect line into two separate effects (but one has to use the semicolon in the tag line of the spell save description in the action tab of course), therefore I assume that your IF is now without function and SIMMUNE will now always be turned on :) When you try a spell or action without one of these tags, then I think you still get an immunity message :) (which you do not want)

(But would be funny if it works, but normally it shouldn't :D)

At least this is how I understand that stuff works in FG (my extension doesn't change that) :)

So you normally have to put up a separate new effect for each tag. But Moon Wizard told me that this can cause FG lags when one has too many effects (a general "problem" in FG) :) So you have to see which effects are more important, which you turn off or (when it is about a Player character) ask that player to memorize some of the immunities such that that player can tell you when an immunity is important :)

I tested that further and all it does is return [FAILURE] always, so it does not work.

I changed previous message:

Playing with it I discovered that if one has five effects on everything works fine, with six or more things slow down or crash.

For Example

this works fine:
IF: CUSTOM(paralysis); SIMMUNE
IF: CUSTOM(poison); SIMMUNE
IF: CUSTOM(sleep); SIMMUNE
IF: CUSTOM(stunning); SIMMUNE
IF: CUSTOM(deatheffect); SIMMUNE

this slows down or crashes:
IF: CUSTOM(paralysis); SIMMUNE
IF: CUSTOM(poison); SIMMUNE
IF: CUSTOM(sleep); SIMMUNE
IF: CUSTOM(stunning); SIMMUNE
IF: CUSTOM(deatheffect); SIMMUNE
IF: CUSTOM(energydrain); SIMMUNE

When I tried something like this it does not work (the semi-colons ";" between effects make this always on and RETURNED "FAILED" , and commas "," always off, and RETURNS nothing.

IF: CUSTOM(paralysis;poison;sleep;disease;mindaffectin g;stunning;abilitydrain;deatheffects;disease;energ ydrain; exhaustion;fatigue); SIMMUNE

Thanks

Kelrugem
June 24th, 2019, 02:02
Yes, that is exactly what I expected :) But this is not due to my extension, this is how FG works in general, I didn't change the CUSTOM in FG. So you probably also get lags without my extension (I did). And the semicolon separates the effect line at his position into two effects, that is the reason why IF didn't work anymore (because the right bracket got separated) and so SIMMUNE is then always on true :) (This is how the semicolon works there, therefore one writes ATK: 2; DMG: 2 and not ATK: 2, DMG: 2.)

This is sadly nothing I can change. The effect lag is also there without extensions and Moon Wizard told me that the effect tab is not built for so many effects (but as a GM you probably can prepare which effects you may need for the encounter). Maybe this gets better in Unity at some point? I do not know, I do sadly have no experience about "performance coding" :D

EDIT: My extension only saves all the tags of a spell as an effect and adds that to all targets such that a CUSTOM can return true :) Everything else works as usual in FG (of course SIMMUNE is from me, but replacing that with SAVE should also result into lags)

EDIT2: but I was thinking about to allow multiple tags in CUSTOM as it works for TYPE. But I doubt that this helps with the lags then :D And then I really would have to change CUSTOM, such that the extension is less future proof when FG gets updates

Kelrugem
June 24th, 2019, 02:17
Therefore I personally only use very frequently needed effects like IF: CUSTOM(spell); SAVE: 2 racial and so on, especially when damage in the spell is involved. Such things like immunity versus sleep spells are (normally?) easy to remember and I handle that still manually, e.g. for undeads it is often clear that they are immune to basically everything :D Depends strongly, for NPCs there should be less lag since they have in general less effects. But for PCs I would really recommend to tell your players that they should memorize their own immunities, then you can avoid to type in all possible effects and only the essential ones :)

But what also helps: Put all informational-only effects on off. All effects which are off do not produce more lag, but they can produce lag when they are on although they are just informational (FG still reads them; FG doesn't know that they are just informational before it has read them => lag possible due to reading of these informations)

Hopefully this helps, we will see how the performany of effects-reading change in the future :)

dellanx
June 24th, 2019, 02:18
I wonder how it will function in Unity with this issue? Also good to know so it fors not happen during a game.

Kelrugem
June 24th, 2019, 02:21
I wonder how it will function in Unity with this issue? Also good to know so it fors not happen during a game.

Good question, Moon Wizard could probably answer that but I do not know if he reads this thread. Maybe you can ask that in one of the Unity Threads?

I would also be glad when the performance of the effects reading would improve because I really like that as a helping tool when one has a lot of magical effects, especially in higher levels. But in higher levels one has then too many effects for FG and so lag probably exists which then sadly reduces the usability of effects :)

Kelrugem
July 4th, 2019, 19:40
I just realised that the tag information with CUSTOM etc. does not work when the effect lies on someone who is controlled by a player. It seems that informations are differently distributed when a character is controlled by someone such that the code is not finding these informations. I try to fix that as soon as possible :)

Svandal
July 4th, 2019, 22:30
I have a question Kelrugem. Is there a way to add caster level as an effect? My players have encountered lots of negative levels in the last weeks, and I do not think there are any effects that modifies their caster levels (yes they are all spell casters in one way or another :) ) There is only the CLC which only modifies the caster level check for spell resistance, not the concentration check, and not the variables based on caster level. (like fireball doing xd6 fire damage where x is caster level)

One more challenge, make "ray of enfeeblement" to work with effects:
There are effects for ability scores, but they only support numerical values (like STR: +4), is it easy to implement dice and numerical value like Fantasy grounds do with many other effects like SKILL?
Bonus to make it work with your caster level. Example, I would like to make an effect on ray of enfeeblement to do: CL is caster level, H is halved
Ray of enfeeblement; STR: 1d6 + H[CL](max 5) (this is the dream, and the dream dream is making it work on NPC sheets)
Ray of enfeeblement; STR: 1d6 + 5 (this is more realistic, only get the dice support, and the dice support is the most important)

Kelrugem
July 5th, 2019, 02:40
I have a question Kelrugem. Is there a way to add caster level as an effect? My players have encountered lots of negative levels in the last weeks, and I do not think there are any effects that modifies their caster levels (yes they are all spell casters in one way or another :) ) There is only the CLC which only modifies the caster level check for spell resistance, not the concentration check, and not the variables based on caster level. (like fireball doing xd6 fire damage where x is caster level)

One more challenge, make "ray of enfeeblement" to work with effects:
There are effects for ability scores, but they only support numerical values (like STR: +4), is it easy to implement dice and numerical value like Fantasy grounds do with many other effects like SKILL?
Bonus to make it work with your caster level. Example, I would like to make an effect on ray of enfeeblement to do: CL is caster level, H is halved
Ray of enfeeblement; STR: 1d6 + H[CL](max 5) (this is the dream, and the dream dream is making it work on NPC sheets)
Ray of enfeeblement; STR: 1d6 + 5 (this is more realistic, only get the dice support, and the dice support is the most important)

Very good ideas, I add that to my list :) The one with the caster level I already have on my list :D

I just tried to fix the problem that player controlled characters are not affected by the tags in the last hours, but I was sadly not able to solve that. For some reason FG treats player controlled characters differently and I did not figure out yet how to correct that. Hopefully I will be able to do that soon :)

Kelrugem
July 6th, 2019, 01:43
I now have fixed the problem :) So now the CUSTOM combinations with SIMMUNE and SAVE also works for the clients. Everything now works as intended when you download the new version, you do not have to change anything in your effects, the fix is only in the background :)

So, the problem was before that players were always ignoring SIMMUNE on NPCs and when your players had some CUSTOM combination with SAVE it actually didn't work... oops :D Sorry for that, I was not aware of that some code will not work when the client is doing something :) I now rewrote a lot, so there is now more transition of data between host and client, especially everything should now work as intended :) (but to the cost of that you now sometimes see extremely shortly the tag effect in the CT, but it is rapidly removed again)

Really sorry that I was not aware of that problem, I was always testing that as a host not as a client (and you probably, too, because noone told me yet about that problem :D Except one user who made me aware of that, thanks! :) ). As a little sorry I added also some graphical hint for SIMMUNE in the chat message because spell immunity was difficult to see: The star for the cast message will be cancelled by a red line then :)

I tested it now a lot (also on the client side ;) ), but please tell me if there are still problems :)

Beware that this version is still for 3.3.8 already :)

EDIT: And a big thank you to Trenloe :) He was helping me with finding out what the problem was. Without him I would probably not have found the issue of client and host stuff :)

EDIT2: When Strain and Injury is compatible with 3.3.8 then I will combine this fix with it of course :)

Svandal
July 6th, 2019, 08:01
You want other projects Kelrugem?😁

Any way to modify the character sheet to calculate max hp as base hp (rolled hp) + (con modifier) x (level). Make con modifier a variable so that one can change it to charisma for example.
Character sheet effects have something called level as an effect ( the effect called LVL)
Npc have a hit dice which they have access to in fantasy grounds.
Also modify the effect "CON" so that you increase total hit points or decrease it if receiving a con effect.

Alternativly you take damage based on con and level if taking con damage as an effect, and getting temp hit points when getting con boost (not 100% correct, but increase or decrease hp might be difficult?)

Kelrugem
July 6th, 2019, 12:50
You want other projects Kelrugem?

Any way to modify the character sheet to calculate max hp as base hp (rolled hp) + (con modifier) x (level). Make con modifier a variable so that one can change it to charisma for example.
Character sheet effects have something called level as an effect ( the effect called LVL)
Npc have a hit dice which they have access to in fantasy grounds.
Also modify the effect "CON" so that you increase total hit points or decrease it if receiving a con effect.

Alternativly you take damage based on con and level if taking con damage as an effect, and getting temp hit points when getting con boost (not 100% correct, but increase or decrease hp might be difficult?)

Nice ideas, I will add them to the list :D (now I really need a list; when I wrote about a "list" before then I just meant that I memorize it :D )

Bidmaron
July 6th, 2019, 17:57
Kel, I would just ask that you separate things as cannon, 3rd party, and drug-induced. I love your work, but I don't want to have to wade through a bunch of non-cannon material to set things up.

Kelrugem
July 6th, 2019, 18:10
Kel, I would just ask that you separate things as cannon, 3rd party, and drug-induced. I love your work, but I don't want to have to wade through a bunch of non-cannon material to set things up.

Do you mean the use of CUSTOM with the effects SAVE and SIMMUNE? The problem is that any other solution would need much more coding, so it would be also less future-proof when the ruleset changes, i.e. the maintenance would increase a lot :) (in that way effects work like usual, the effect coding remains the same) When you find the use of CUSTOM complicated: It is already like that in standard FG, I didn't change anything for CUSTOM :) It is always that complicated :D
when I would implement it differently then it may also only work for predefined tags, while it is now easily possible to add new tags as a DM and player avoiding them to code anything :) (I guess you ask for something like "SAVE: 2, reflex, spell, enchantment,..."? that is sadly a bit more complicated)

But I understand what you mean, besides the CUSTOM one has to know that one has to separate different tags in the tag line of the spell save description by a semicolon. I try to see if it is also possible that commas can be used instead :)

EDIT: If you meant my last message about the fix, that was just something in the background :) Nothing changes for the users of that extension except that it now works as intended, hopefully ;)

Bidmaron
July 6th, 2019, 19:00
I was talking about Svandal's suggestions for the future, which you seemed to indicate you would 'add to the list.'

Kelrugem
July 6th, 2019, 19:06
I was talking about Svandal's suggestions for the future, which you seemed to indicate you would 'add to the list.'


Aaaah, now I understand, sorry :D

Yes, of course, when I add something which is more complicated then other stuff in some extension or which could disturb current ways of playing games, then I will make separate extensions of course such that everyone can build his "own package" of extensions and stuff :) Or I add it via some option in the options, I have to see how I am doing that :) E.g. I will never drastically change existing effects. Svandal's suggestion of the new CON effect I would add as a separate effect (in a possible separate extension) because I can think of situations in which someone maybe does not want the automatic HP reduction (since HP is affected by a lot of things) :)

Thanks for that :) I will keep in mind to separate things :)

EDIT: and although there is a "list" I do not know when and whether I add all these things (the caster level effect will probably be not possible since that would need a complete rewrite of all the spell actions, it has to be done differently then). Also, the third and last year of my PhD starts soon, I expect that I have to spend soon a lot of my free time for my thesis; and I have to move to Lyon for my last research year :) Thus, I may not be able to code a lot soon (sadly). So it is unlikely that the existing extensions change too much :D

Bidmaron
July 6th, 2019, 19:50
Good luck with the PhD!

Kelrugem
July 6th, 2019, 19:56
Good luck with the PhD!

Thank you :o

Kelrugem
July 24th, 2019, 02:36
The combination with StrainInjury is now back in https://www.fantasygrounds.com/forums/showthread.php?50121-StrainInjury-packages&p=445695#post445695 :)

Kelrugem
July 24th, 2019, 06:51
There was some little bug that the target removing when spell immunity was applied did not work when the caster was a player. Should be fixed now :) I update this in the combined packages in StrainInjury, too :)

Kelrugem
August 3rd, 2019, 03:58
I may soon upload a very new extension of Save versus tags. At the moment the biggest problem of that extension is the lag when you have too many CUSTOM effects. For each CUSTOM the code iterates through all effects searching for the effects and that behaviour is multiplicative, i.e. the more CUSTOMs you have the more often it iterates through all effects. This can produce a somewhat sort of big loop which causes lags (starting around five or six CUSTOMs).

I was able to reduce that lag a lot (but I did not upload that yet) by breaking that loop. But there can be still a small lag when you use a lot of these effects while doing a full attack (then due to the IF), but for standard situations and in general the lag is reduced a lot. Before I will upload that new version I want to see first if I can still improve that with respect to the lag :) Then there is soon hopefully a much better version of saves versus tags :)

Kelrugem
August 4th, 2019, 00:49
Here is now the new extension, https://www.fantasygrounds.com/forums/showthread.php?50297-(New-IF-operator)-New-and-much-better-version-of-Save-versus-tags&p=447232#post447232

This new extension will overwrite this old extension here now, so follow the other thread (and subscribe it when you want notifications on updates, I will not write updates here anymore :) )