Hello.
I am trying to make an advancement method which consumes points based on level of existing skill.
For example advancement from 1 cost 50 points, from 2 costs 100, from 3 cost 200 and so on.
Currently I tried to set it by:
which uses "trtAdv" instead of default "trtBonus" and which works in calculation of level of skill.
But when I try to use that code to determine the cost in XP:
...then always I've got focus.linkage[basis].field[trtAdv].value as 0.
"trtUser" is getting correctly.
I tried some changes with timing but still can't to manage to make it work.
Thanks in advance for any help.
I am trying to make an advancement method which consumes points based on level of existing skill.
For example advancement from 1 cost 50 points, from 2 costs 100, from 3 cost 200 and so on.
Currently I tried to set it by:
Code:
<eval index="4" phase="Traits" priority="2000"><![CDATA[
doneif (tagis[Advance.Gizmo] = 0)
if (origin.parent.tagis[Advance.Increase] > 0) then
linkage[basis].field[trtAdv].value += 1
elseif (origin.parent.tagis[Advance.Decrease] > 0) then
linkage[basis].field[trtAdv].value -= 1
endif
]]></eval>
But when I try to use that code to determine the cost in XP:
Code:
<eval index="1" phase="Setup" priority="4000"><![CDATA[
var level as number
var curvesq as number
var pointspent as number
var advanced as number
var sequence as number
perform gizmo.findchild[none,"Advance.Gizmo"].setfocus
if (state.isfocus <> 0) then
if (focus.islinkage[basis] <> 0) then
level = focus.linkage[basis].field[trtUser].value + focus.linkage[basis].field[trtAdv].value
curvesq = focus.linkage[basis].field[sklLrnCrv].value
pointspent = focus.linkage[basis].field[trtUser].value
advanced = focus.linkage[basis].field[trtAdv].value
else
curvesq = 0
pointspent = 0
endif
endif
sequence = power(2,advanced)*curvesq
doneif (origin.ishero = 0)
field[advCost].value = sequence * 10
doneif (state.isfocus = 0)
if (focus.islinkage[basis] = 0) then
field[advCost].value = 0
endif
]]></eval>
"trtUser" is getting correctly.
I tried some changes with timing but still can't to manage to make it work.
Thanks in advance for any help.