Good Day,
I have been working on a side project with the authoring kit and have encountered a small problem.
The progression system I am trying to implement has a two tier cost system, and the cost system is also non-linar.
The first set of costs are:
rank cost (total cost)
0 0 (0)
1 10 (10)
2 15 (25)
3 20 (45)
4 25 (70)
5 30 (100)
The second set of costs are:
rank cost (total cost)
0 0 (0)
1 5 (5)
2 10 (15)
3 15 (30)
4 20 (50)
5 25 (75)
Using thread necromancy I found this:
http://forums.wolflair.com/showthread.php?t=8776&highlight=excel&page=2
Which helped resolve the second set of numbers. However, the first set of numbers are behaving strangely.
With the finalvalue + 5 in, the first and second rank cost 10 each and then increases in 5 increments.
Without the doneif (field[trtUser].value = 0) line, it causes the 0 value of the skill to cost 5 each.
Was wondering if anyone could help tell me what blindingly obvious mistake that I am making is?
I also tried this:
Which is the excel graph formula (ignoring the 0 value), which breaks in similiar ways.
I have been working on a side project with the authoring kit and have encountered a small problem.
The progression system I am trying to implement has a two tier cost system, and the cost system is also non-linar.
The first set of costs are:
rank cost (total cost)
0 0 (0)
1 10 (10)
2 15 (25)
3 20 (45)
4 25 (70)
5 30 (100)
The second set of costs are:
rank cost (total cost)
0 0 (0)
1 5 (5)
2 10 (15)
3 15 (30)
4 20 (50)
5 25 (75)
Using thread necromancy I found this:
http://forums.wolflair.com/showthread.php?t=8776&highlight=excel&page=2
Which helped resolve the second set of numbers. However, the first set of numbers are behaving strangely.
Code:
<!-- Each career skill point that is allocated by the user costs the appropriate XP -->
<eval index="5" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
doneif (field[trtFinal].value = 0)
doneif (tagis[Skill.Career] = 0)
var traitlevel as number
var traitcost as number
var finalvalue as number
traitlevel = field[trtFinal].value
traitcost = 5
finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)
hero.child[resXP].field[resSpent].value += finalvalue
]]></eval>
<!-- Each non-career skill point that is allocated by the user costs the appropriate XP -->
<eval index="6" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
doneif (field[trtUser].value = 0)
doneif (tagis[Skill.Career] = 1)
var traitlevel as number
var traitcost as number
var finalvalue as number
traitlevel = field[trtFinal].value
traitcost = 5
finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)
hero.child[resXP].field[resSpent].value += finalvalue + 5
]]></eval>
With the finalvalue + 5 in, the first and second rank cost 10 each and then increases in 5 increments.
Without the doneif (field[trtUser].value = 0) line, it causes the 0 value of the skill to cost 5 each.
Was wondering if anyone could help tell me what blindingly obvious mistake that I am making is?
I also tried this:
Code:
var traitlevel as number
doneif (field[trtFinal].value = 0)
doneif (tagis[Skill.Career] = 1)
var finalvalue as number
traitlevel = field[trtFinal].value
finalvalue = (2.5 * traitlevel * traitlevel) + (2.5 * traitlevel)
hero.child[resXP].field[resSpent].value += finalvalue - 5 -->
Which is the excel graph formula (ignoring the 0 value), which breaks in similiar ways.