Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
agermosh
Junior Member
 
Join Date: Feb 2021
Posts: 8

Old May 4th, 2023, 01:29 PM
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?
agermosh is offline   #1 Reply With Quote
Dami
Senior Member
 
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 1,086

Old May 4th, 2023, 11:01 PM
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.
Dami is offline   #2 Reply With Quote
agermosh
Junior Member
 
Join Date: Feb 2021
Posts: 8

Old May 5th, 2023, 01:11 PM
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.
agermosh is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 5th, 2023, 01:44 PM
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.
Mathias is offline   #4 Reply With Quote
agermosh
Junior Member
 
Join Date: Feb 2021
Posts: 8

Old May 5th, 2023, 02:19 PM
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?
Attached Images
File Type: png Ability.png (58.0 KB, 2 views)
File Type: png Form.png (466.5 KB, 2 views)
agermosh is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 5th, 2023, 02:47 PM
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).
Mathias is offline   #6 Reply With Quote
agermosh
Junior Member
 
Join Date: Feb 2021
Posts: 8

Old May 5th, 2023, 03:11 PM
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?
agermosh is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 5th, 2023, 03:17 PM
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.
Mathias is offline   #8 Reply With Quote
agermosh
Junior Member
 
Join Date: Feb 2021
Posts: 8

Old May 5th, 2023, 03:24 PM
Data file debugging is enabled - yes
agermosh is offline   #9 Reply With Quote
agermosh
Junior Member
 
Join Date: Feb 2021
Posts: 8

Old May 5th, 2023, 03:44 PM
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.
agermosh is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:50 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.