![]() |
Junior Member
Join Date: Feb 2021
Posts: 8
|
I implemented the form to parametrize the class skill and it is working ok
with one exception - after done editing and closing the form with "ok" button evaluation cycle is not started. So, all parameters controlled by form are changed as expected (I see new values in debug window), but derivatives, calculated by ability evaluation scripts remain the same. If I trigger the evaluation by changing any other thing (like reducing the ability) scripts are working ok. Any suggestions? |
![]() |
![]() |
Senior Member
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 1,050
|
In most cases after editing, you need to "test now" and you might also need to reload the system in order for your edits to occur.
If you don't see changes unless you modify something (and cause a recalculation) then maybe the timing on your script is wrong. Can you provide code for what you are doing? Current RPG's: Pathfinder (GM), Pathfinder (Player), Gamma World (GM, Pathfinder homebrew). HeroLab: 3.5 & Pathfinder. HL User Files for PF: Greyhawk Setting, Gamma World (WIP). DM and player of D&D since 1980. Last edited by Dami; May 4th, 2023 at 11:05 PM. |
![]() |
![]() |
Junior Member
Join Date: Feb 2021
Posts: 8
|
It is not about editor changes - it is a form for ability parametrization
in HL itself. Code is bulk. Skeleton looks like this: Ability: <thing id="cMoonMagic" name="Moon Magic"> <eval phase="Final" priority="10100"><![CDATA[... <child entity="gMoons"></child> Gizmo: <entity id="gMoons" form="pMoons"> Form: <template id="Moons" name="Moons" compset="ClSpecial"> <layout id="lMoons"> <portalref portal="MoonsTitle"/> <panel id="pMoons" name="Moons of Krynn" entity="gMoons"> <layoutref layout="lMoons"/> Form modifies several value field, script generates name and assign bonuses to the hero. |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,169
|
What was the purpose of creating a new form? At first glance, this seems like something that would work with a configurable, and maybe a mechanic to bootstrap it, if this is an all-PC thing.
Please give us more information about what's going on, so we can help answer the question of why it's not working - like your statement that "form modifies several value field" has no details included, but that's my guess as to the most likely location for the problem. |
![]() |
![]() |
Junior Member
Join Date: Feb 2021
Posts: 8
|
I created an embedded moons tracker for Dragonlance Wizards of High Sorcery class.
You can see attachments to see how it looks like. So form remembers moons positions in abValue-abValue3 fields and ability script calculates and applies bonuses/penalties. So, after closing the form I see expected values in abValue-abValue3, but no calculations done. After I trigger evaluation manually - everything is working as it should. Question is - why closing the form doesn't trigger re-evaluation? |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,169
|
How are you storing the values the user sets for the vaValue fields? What user fields store the values used to calculate the vaValue field values?
abValue, abValue2, etc. are derived - their values are thrown away at the beginning of each new calculation cycle, and re-calculated according to whatever scripts modify them (actually, there's also some time-saving logic to determine whether any of the input values changed, and therefore whether the script needs to be re-run or the last calculation's results can just be used, but the effect is the same for this purpose). |
![]() |
![]() |
Junior Member
Join Date: Feb 2021
Posts: 8
|
I see - thanks..
It looks like there is a difference between full evaluation and fast one. Full evaluation reset my tracker as you said. Fast one keep abValues intact.. So, it seems I need different place to store values. Any suggestions here? Probably some usr* fields? |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,169
|
Just curious, in the Develop menu, do you have enable data file debugging turned on? I'm really surprised that it didn't give you an error message for trying to build an incrementer out of a derived field, and I know if you don't have the debugging turned on, it suppresses a lot of errors.
I would go by field names within the debugger, not by Ids. |
![]() |
![]() |
Junior Member
Join Date: Feb 2021
Posts: 8
|
Data file debugging is enabled - yes
|
![]() |
![]() |
Junior Member
Join Date: Feb 2021
Posts: 8
|
I didn't use incrementer actually, because there only one user field it can be connected to - usrIndex.
I need three, so I used custom buttons instead. |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|