Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
Okay, I've found the main hitpoint script in thing_traits.dat (the block beginning id=trHealth). Fudge by default has it as 9+Damage Capacity Attribute. As I think I mentioned before, I've downgraded Damage Capacity to a skill.
What I need the health trait to actaully calculate is 9+Damage Capacity+Armour Class (the setting uses British English spellings) - so is this a safe script to change the current calculate script to (assuming trDefense and skDamCap are valid ids)? <script> <!-- Calculate the Health trait as appropriate --> <eval value="1" phase="Traits" priority="4000"> <before name="Derived trtFinal"/> <after name="Calc trtFinal"/><![CDATA[ field[trtBonus].value = field[trt.Final].value+linkage[trDefense]+linkage[skDamCap] ]]></eval> </thing> </script> |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The linkage[] transition only works if you have established a linkage in the component (traits.str). Also, when using it, you use the name you established for the linkage, rather than the Id of the pick you want to target.
Also, your script has "field[trt.Final].value" - the compiler will not know what to do with the "." inside of trtFinal. Adding the trtFinal of trDefense and skDamCap to the current thing can be done with: Code:
field[trtBonus].value += hero.childfound[trDamage].field[trtFinal].value + hero.childfound[skDamCap].field[trtFinal].value Code:
field[trtBonus].value += #trait[trDamage] + #trait[skDamCap] Code:
<fieldval field="trtBonus" value="9"/> Code:
<thing id="trHealth" name="Health" compset="Trait" isunique="yes" description="Description goes here"> <fieldval field="trtAbbrev" value="Hlth"/> <fieldval field="trtBonus" value="9"/> <tag group="explicit" tag="1"/> <tag group="User" tag="Power"/> <!-- Calculate the Health trait as appropriate --> <eval value="1" phase="Traits" priority="4000"> <before name="Derived trtFinal"/> <after name="Calc trtFinal"/><![CDATA[ field[trtBonus].value += #trait[trDamage] + #trait[skDamCap] ]]></eval> </thing> |
#2 |
|
|