I am trying to create the Encumbrance Threshold for the Star Wars RPG Edge of the Empire. Taking the skeleton files and following the Savage Worlds walkthru and modifying where needed such as here. I am trying to convert the load limit to encumbrance threshold.
When I compile HL informs that I it was forced to stop compilation because I have syntax error in eval script for thing resEncThr (Eval Script "Apply 'EncThr'). This is an unspecified error parsing script.
This is the eval script #2 which I am trying to modify from Savage Worlds system to Star Wars RPG. I need to be able to add 5 to Brawn to get my Encumbrance Threshold. Thanks for any help. I am not a programmer.
<thing
id="resEncThr"
name="Encumbrance Threshold"
compset="Resource">
<fieldval field="resMin" value="0"/>
<tag group="Helper" tag="Bootstrap"/>
<eval index="1" phase="Traits" priority="7000" name="Calc EncThr">
<before name="Calc resLeft"/><![CDATA[
~our maximum is based on 5 plus Brawn
field[resMax].value = 5 + #trait[attrBr]
]]></eval>
<eval index="2" phase="Traits" priority="8000" name="Apply EncThr">
<after name="Accrue Weight"/>
<after name="Calc EncThr"/><![CDATA[
~get quantity spent from encumbrance resource and save it in "extra" field
var spent as number
spent = #resspent[resEncumb]
field[resExtra].value = spent
~if we haven't exceeded the encumbrance threshold, there's nothing to do
if (spent <= field[resMax].value) then
done
endif
~calculate how much we exceeded the threshold by
var overage as number
overage = round(spent - field[resMax].value,0,-1)
~apply the appropriate penalty to all Brawn and Agility rolls
#traitroll[attrBr] -= overage
#traitroll[attrAg] -= overage
~apply the penalty to all skills based on Brawn and Agility
foreach pick in hero where "component.Skill & (Attribute.attrBr | Attribute.attrAg)"
eachpick.field[trtRoll].value -= overage
nexteach
]]></eval>
</thing>
When I compile HL informs that I it was forced to stop compilation because I have syntax error in eval script for thing resEncThr (Eval Script "Apply 'EncThr'). This is an unspecified error parsing script.
This is the eval script #2 which I am trying to modify from Savage Worlds system to Star Wars RPG. I need to be able to add 5 to Brawn to get my Encumbrance Threshold. Thanks for any help. I am not a programmer.
<thing
id="resEncThr"
name="Encumbrance Threshold"
compset="Resource">
<fieldval field="resMin" value="0"/>
<tag group="Helper" tag="Bootstrap"/>
<eval index="1" phase="Traits" priority="7000" name="Calc EncThr">
<before name="Calc resLeft"/><![CDATA[
~our maximum is based on 5 plus Brawn
field[resMax].value = 5 + #trait[attrBr]
]]></eval>
<eval index="2" phase="Traits" priority="8000" name="Apply EncThr">
<after name="Accrue Weight"/>
<after name="Calc EncThr"/><![CDATA[
~get quantity spent from encumbrance resource and save it in "extra" field
var spent as number
spent = #resspent[resEncumb]
field[resExtra].value = spent
~if we haven't exceeded the encumbrance threshold, there's nothing to do
if (spent <= field[resMax].value) then
done
endif
~calculate how much we exceeded the threshold by
var overage as number
overage = round(spent - field[resMax].value,0,-1)
~apply the appropriate penalty to all Brawn and Agility rolls
#traitroll[attrBr] -= overage
#traitroll[attrAg] -= overage
~apply the penalty to all skills based on Brawn and Agility
foreach pick in hero where "component.Skill & (Attribute.attrBr | Attribute.attrAg)"
eachpick.field[trtRoll].value -= overage
nexteach
]]></eval>
</thing>