Here is what the code in "trtFinal" currently looks like:
Code:
<!-- Final value for the trait -->
<field
id="trtFinal"
name="Final Value"
type="derived">
<!-- Calculate the final value from the three distinct pieces -->
<calculate phase="Traits" priority="3000" name="Calc trtFinal"><![CDATA[
~Note! If you change this calculation, you may need to change the similar
~ calculation in the "Derived" component.
if (tagis[component.Attribute] = 1) then
@value = field[trtTemplat].value + field[trtUser].value + field[trtInPlay].value
~Brent changed calculation
~@value = field[trtMinimum].value + field[trtUser].value + field[trtInPlay].value
~@value = field[trtUser].value + field[trtInPlay].value
else
@value = field[trtUser].value + field[trtBonus].value + field[trtInPlay].value + field[trtTemplat].value
endif
if (compare(field[trtAbbrev].text,"Barg")=0) then
debug "Calculate in Final Value " & field[trtAbbrev].text & ": " & @value
endif
]]></calculate>
</field>
When I look at my debug output I can see that my Bargain skill which has two advances to it does the calculations for it's original value then recalculates for the two advancements before I get to my advCost calculations (tagged with "NEW advCost" and "NEWsklRoll" in the debug
Code:
Creation date:
Creation date:
********** Start Evaluation Cycle **********
AdvTarget: 0
AdvReal: 20140125
AdvNote:s
AdvTarget: 0
AdvReal: 20140125
AdvNote:s
Eval 1 in thing resAdvance
Advancing Gizmo from CanAdvance0
Advancing Gizmo from CanAdvance0
Eval 4 for CanAdvance
Eval 4 for CanAdvance
Calculate in Final Value Barg: 2
Calculate in Final Value Barg: 1
Calculate in Final Value Barg: 0
Calculate in Final Value Barg: 0
Calculate in sklRoll field Barg0
Calculate2 in sklRoll field Barg11
Calculate in sklRoll field Barg0
Calculate2 in sklRoll field Barg10
Calculate in sklRoll field Barg0
NOT IN HERO - sklRoll
Calculate2 in sklRoll field Barg0
Calculate in sklRoll field Barg0
NOT IN HERO - sklRoll
Calculate2 in sklRoll field Barg0
NEW advCost: 3
NEW sklRoll: 11
NEW advCost: 3
NEW sklRoll: 11
Eval 1 in thing advBSkill
AdvCost4: 3
AdvCost5: 3
Eval 1 End in thing advBSkill
Eval 1 in thing advBSkill
AdvCost4: 3
AdvCost5: 3
Eval 1 End in thing advBSkill
res Max(afterMove): 54
Eval 3 in sklRoll field phase Traits 11
Eval 3 in sklRoll field phase Traits 10
Eval 3 in sklRoll field phase Traits 0
NOT IN HERO
Eval 3 in sklRoll field phase Traits 0
NOT IN HERO
AdvCost*: 3
AdvCost*: 3
field[livename]: Bargain
field[livename]: Bargain
Eval 4 in sklRoll field phase Traits Bargain11
Eval 4 in sklRoll field phase Traits Bargain: Droids10
Eval 4 in sklRoll field phase Traits Bargain0
Eval 4 in sklRoll field phase Traits Bargain0
Finalize in Add Item