• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Help with custom item power (armor)

willuwontu

Well-known member
Code:
Reduces the armor category of an armor by one step. (Heavy becomes medium, Medium becomes Light).


Code:
Phase: Pre-levels  Priority: 10000


        if (parent.tagis[ArmorClass.Medium] <> 0) then
          perform parent.delete[ArmorClass.Medium]
          perform parent.assign[ArmorClass.Light]
          perform parent.delete[ArmorCateg.Slows]

          ~adding this tag to the armor makes it count as one category worse for
          ~the purpose of proficiency, meaning it requires the same proficiency
          ~it used to.

          perform parent.assign[Helper.Prof1Step]
        elseif (parent.tagis[ArmorClass.Heavy] <> 0) then
          perform parent.delete[ArmorClass.Heavy]
          perform parent.assign[ArmorClass.Medium]

          ~adding this tag to the armor makes it count as one category worse for
          ~the purpose of proficiency, meaning it requires the same proficiency
          ~it used to.

          perform parent.assign[Helper.Prof1Step]
          endif

      ~ Add to our custom description if we're armor
      if (container.parent.tagis[component.BaseArmor] <> 0) then
        field[mtDesc].text &= " Decreased armor category and penalties."
endif

      container.parent.field[arArcFail].value -= 10
      container.parent.field[arMaxDex].value += 2
      container.parent.field[arArmorChk].value += 2


So I made essentially an item powers version of mithril (just copied the script over made a couple changes but that is it), when I select it though it says

Code:
Attempt to access field 'mtDesc' that does not exist for thing 'ipLighten'
- - -
Attempt to access field 'mtDesc' that does not exist for thing 'ipLighten'

Any Idea on what I coded wrong?
 
Item Powers don't have a mtDesc field, that's only on materials I believe, so you'd have to change that part. I'd just put it in the Summary.
 
Back
Top