-
December 4th, 2019, 01:14 #1
Effects affecting the character sheet
Hi
I got very often the request for an effect changing the caster level in 3.5e/PF1 (in combination with my IFTAG operator to allow the change of the caster level just for specific spells, but that's less of a problem). But this would need a major rewrite of the code (I guess, but I may not see an easier solution (in sense of having an effect, inside the character sheet I may have an other idea)). I had the idea that such an effect could instead affect the CL number field in the character sheet forcing to update all the spell actions, then I would avoid a major rewrite of the existing code (I hope? ). But for this one would need to add update handlers to look at the effects of the corresponding entry in the CT (if added to the CT). Since I saw several times on the forum that someone asked about effects changing the numbers also in the character sheet, I wondered if someone tried to code something like this? I am worrying about performance when this is possible and so I wanted to ask first whether this idea is good or not
Thanks in advance
Have a nice and pleasant week
KelrugemLast edited by Kelrugem; December 4th, 2019 at 02:04.
My extensions for 3.5e and Pathfinder
Bug reports please here
-
December 4th, 2019, 09:42 #2
Effects inherently impact FG actions only. They don't change the base numbers in the character sheet - and this is by design.
Effect code triggers when an action occurs (or less commonly, an event - such as ongoing damage). Therefore, the ode that checks for effects is in the action handler LUA scripts - the scripts\manager_action_XXXX.lua files.
Like you say, trying to update directly in the character sheet can lead to issues - having event handlers, going against the usual effect process, overriding preset values, etc..
So, if you want to have an effect that modifies the CL, then my recommendation would be to add effect code to the relevant action/s that it would impact (there are many examples of effect code in the manager_action_... files).Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
December 4th, 2019, 12:36 #3
thank you Yeah, that is what I suspected, thanks for confirmation I tried the way of having the effect in the relevant actions but that is not really possible for such an effect because the data about, how the CL influences the spell action (damage formulas and so on), are not saved in the actions themselves. They just get the result/outcome of the values depending on CL, so, it is like that the character sheet tells the spell actions which damage dice etc. one has but not how these were calculated (like I tell you my solution of some mathematical problem but not how I derived that). Therefore I would need to save all the formulas using CL in the action rolls, too, such that an effect could recalculate all the values depending on the CL That surely needs some work and therefore I was thinking about more elegant solutions and came up with the idea of changing the CL number field instead Sadly, this idea would surely be a dangerous one
Last edited by Kelrugem; December 4th, 2019 at 14:02.
My extensions for 3.5e and Pathfinder
Bug reports please here
-
December 4th, 2019, 15:14 #4
Actually, I did just this... well, tweaking the level to cast. It's a "ARCANE:X", "DIVINE:X" or "CLASSNAME:X" effect that is applied. Then in the spell damage/duration it calculates the damage/duration with those adjustments.
Honestly, it doesn't require much work to do (for the CoreRPG/5e style effects) and if the PF stuff works the same then it should be pretty easy.
Code:-- get sSpellType "ARCANE: X" effect modifier local aAddDice, nAddMod, nEffectCount = EffectManager5E.getEffectsBonus(rActor, {sSpellType:upper()}, false); if nEffectCount > 0 then local nAddTotal = StringManager.evalDice(aAddDice, nAddMod); nCasterLevel = nCasterLevel + nAddTotal; end
Last edited by celestian; December 4th, 2019 at 15:18.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
December 4th, 2019, 15:21 #5
Yes, but I may have to look again at the code (at the moment I was just brainstorming) In 3.5e/PF1 you have CL dependencies like "every third CL", "every odd/even CL" and so on for damage/heal dice, duration, save DC and so on (and sometimes there is also a cap for the allowed CL for the specific damage/duration etc.), at least these informations I have to save in the action, too, such that the CL adjustment coming from an effect is correctly accounted These informations are "saved in the character sheet" but in the codes of the actions themselves one only get the "results from the character sheet" about the duration etc.
Thanks a lot It may be indeed less cumbersome than I imagine at the momentLast edited by Kelrugem; December 4th, 2019 at 15:29.
My extensions for 3.5e and Pathfinder
Bug reports please here
-
December 4th, 2019, 15:28 #6
You mean something like this? (this guy is a level 1 caster with fireball, yeah, just an example, normally he'd not get it till 5th and it would be 5d6 minimum)
To be fair, since I already had caster level damage and duration (I've the same thing in duration) the effect level modification was easier. If PF doesn't already have that then you'd need to add that as well.---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
December 4th, 2019, 15:39 #7
Last edited by Kelrugem; December 4th, 2019 at 15:43.
My extensions for 3.5e and Pathfinder
Bug reports please here
-
December 4th, 2019, 16:53 #8---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
December 4th, 2019, 16:55 #9My extensions for 3.5e and Pathfinder
Bug reports please here
-
December 4th, 2019, 17:21 #10
oki, tried it; in manager_spell.lua is the CL often used for defining damage dice etc.. What I thought is: When I click the damage button then the code will not run through manager_spell again to parse the damage dice, but actually this is what happens and therefore my effect worked Thanks for that, I always thought that the code for the spell parsing/definitions is not ran again when pressing the spell buttons and therefore I didn't see how one can affect the code with such an effect So, my problem was due to a wrong assumption on my side
The only (very little) problem is the spell displays in the action tab then, the effect is not affecting them of course, but when I force an update of the spell actions (by changing the CL in the sheet or adding/changing existing damage buttons or whatever) then the displays take the effects into account which could lead to confusion in certain situations (though I now accidentally coded some sort of effect which affects the sheet without any other problems so far... )
Is just a display problem, so not really important because the automation of damage etc. is not affected, but I want to fix this
Thanks a lot I should simply test a bit more and not make wrong assumptions
EDIT: oh, and testing very high numbers of CL results into an error when there are then more physical dice than FGC can show (seems to be a problem with FG itself, not with the extension)Last edited by Kelrugem; December 4th, 2019 at 17:30.
My extensions for 3.5e and Pathfinder
Bug reports please here
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks