View Single Post
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old September 15th, 2011, 06:35 PM
Hey everyone,
I am still attempting to have advantages and disadvantages work from the CP total (ie Adv will take points away and Dis will add to the CP point total)
I have tracked it down to the Traits.str file lines (about) 274-301 which look like this (still using the slot from the skeleton files):
<!-- Each ability that is added by the user costs 1 CP -->
<eval index="1" phase="Setup" priority="5000"><![CDATA[
~we must ignore bootstrapped abilities from races and abilities added via advances
if (isuser + origin.ishero >= 2) then
hero.child[resAbility].field[resSpent].value += 1
endif
]]></eval>

<!-- Track the ability on the actor -->
<eval index="2" phase="Setup" priority="5000"><![CDATA[
perform forward[Ability.?]
]]></eval>

<!-- If the ability is activated, designate it appropriately -->
<eval index="3" phase="Setup" priority="100"><![CDATA[
~if we're not able to be activated, we don't qualify
if (tagis[User.Activation] = 0) then
done
endif

~if we've been activated by the user, mark ourselves as activated; in addition,
~forward our identity tag to our parent actor; this allows the actor to track
~when abilities are activated and reflect the state to the user
if (field[abilActive].value <> 0) then
perform assign[Helper.Activated]
perform forward[Activated.?]
endif
]]></eval>
and I think I can modify the skills eval to work but I need to know how to make HL read the value assigned by the advantage/disadvangate instead of auto calc by level of skill. This is a 1 time cost to the player *** also can i make one script that would allow adv to use CP points and DISAD to add points to the total or must I sperate them?

Here is my skill eval on cost:
<!-- Each skill point that is allocated by the user costs the next rank in CP-->

<eval index="2" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
~if this skill is not added directly to the hero (i.e. an advance), skip it entirely
if (origin.ishero = 0) then
done
endif

var traitlevel as number
var traitcost as number
var finalvalue as number

traitlevel = field[trtUser].value
traitcost = 1

finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)

hero.child[resCP].field[resSpent].value += finalvalue
]]></eval>

Thanks for any help
SAbel is offline   #15 Reply With Quote