Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,214
|
Here's the piece of code (in advancement.core) that places the final advance cost on the resource that's storing all the advancement costs:
Code:
<!-- Each advancement consumes its cost in accrued advances --> <eval index="1" phase="Setup" priority="5000"><![CDATA[ #resspent[resAdvance] += field[advCost].value ]]></eval> Code:
<!-- Number of advancement slots consumed --> <field id="advCost" name="Cost" type="static" defvalue="1"> </field> My recommendation: move the calculation of sklRoll to slightly after Calc trtFinal. Then, add a new script in the CanAdvance component in advancement.core to calculate advCost. Now, that needs some complex code in order to deal with the gizmo, so here's a simple example: Code:
if (tagis[Advance.Increase] <> 0) then origin.parent.field[advCost].value = linkage[basis].field[sklRoll].value * some multiplier elseif (tagis[Advance.AddNew] <> 0) then origin.parent.field[advCost].value = the cost of gaining level 1 in something endif |
#11 |
|
|