• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Closing the form doesn't trigger evaluation

agermosh

Member
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?
 
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?
 
Last edited:
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.
 
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.
 
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?
 

Attachments

  • Ability.png
    Ability.png
    58 KB · Views: 2
  • Form.png
    Form.png
    466.5 KB · Views: 2
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).
 
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?
 
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.
 
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.
 
What do you mean - incrementer portal definitions have a setting for the field they're displaying.

Code:
<portal
   id="unStatSize"
   style="lblDisable">
   <label_field
     field="unSize">
     </label_field>
   </portal>
usrIndex is tied to useArray and usrSelect, and should not be used on its own.
 
Last edited:
Let us know more about what's going on, so we can help answer why it's not working - like your statement that "form modifies several value fields" without further details, but that's my guess as to where the problem lies.
 
Back
Top