View Single Post
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 12th, 2015, 09:01 PM
Quote:
Originally Posted by ShadowChemosh View Post
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>

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #18 Reply With Quote