Quote:
Originally Posted by ShadowChemosh
Yea problem is you have to set the Encumbrance value before attributes are calculated.
|
So I take this back. We have a very small window to set the Encumbrance value to be equal to the just calculated Cha value.
Here are all three scripts:
Code:
<eval phase="PostLevel" priority="10050" index="1"><![CDATA[
~ If not equipped get out now!
doneif (field[gIsEquip].value = 0)
~ Only process if we are incorporeal
doneif (hero.tagis[Ability.raIncorpor] = 0)
~ Remove the Ingore Encubrance tag that incorporeal applies
perform hero.delete[Hero.IgnoreEnc]
~ Find all gear items and give the Ghost Touch ability
~ so that these items can be worn without errors.
foreach pick in hero from MyGear
perform eachpick.assign[Ability.iGhostTch]
nexteach
]]></eval>
<eval phase="PostAttr" priority="1" index="2"><![CDATA[
~ If not equipped get out now!
doneif (field[gIsEquip].value = 0)
~ Only process if we are incorporeal
doneif (hero.tagis[Ability.raIncorpor] = 0)
~ Set our Encubrance Strength to be our Charisma
herofield[tEncumSTR].value += hero.child[aCHA].field[aFinalVal].value
]]></eval>
<eval phase="Render" priority="9999999" index="3"><![CDATA[
~ If not equipped get out now!
doneif (field[gIsEquip].value = 0)
~ Only process if we are corporeal
doneif (hero.tagis[Ability.raIncorpor] = 1)
~ Find all weapons and give the Ghost Touch ability
foreach pick in hero from BaseWep
perform eachpick.assign[Ability.iGhostTch]
perform eachpick.assign[HasAbility.iGhostTch]
~ If custom/magic weapon then build full name including other
~ abilities.
if (eachpick.isgizmo = 1) then
eachpick.field[livename].text = signed(eachpick.field[BonEnhance].value) & " " & lowercase(eachpick.tagnames[Ability.?," "]) & " " & lowercase(eachpick.tagnames[IsWeapon.?])
~.. not a custom/magic weapon so just add ghost touch
else
eachpick.field[livename].text = lowercase(eachpick.tagnames[Ability.?," "]) & " " & lowercase(eachpick.field[name].text)
endif
nexteach
]]></eval>