• 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

Armor Proficiency

FCWesel

Well-known member
Any way to give proficiency in a specific set of armor, like the way that Weapon Proficiency does in the adjustment tab?

Meaning, is there a way to make a character proficient with chain shirt if the character has Chain Shirt on his armor list, but isn't actually proficient with it?
 
Should be possible as you can do this with monsters. If you have a look at the script for a monster in the MM Community Pack you should be able to find code where this has been done.
 
It's not done the same as weapons that I can see, weapons have a WepProf.XXX tag that you assign to the hero, this is done at the Race level or at the Class level. Armor is only assigned in the broad groups (light, medium, heavy, shields). However, you can manipulate the Helper.Proficient tag if you do it early enough.

For an adjustment you could do the following (pre-levels/10000) - if the Show Menu option is "Current Armor" it only shows armor that you have bought, but you could modify it with a list of all armors if you know how to construct the selection lists.

Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ If we've not chosen anything, get out
      doneif (field[pChosen].ischosen = 0)

      ~ Assign the identity tag for the proficiency
      var id as string
      id = field[pChosen].chosen.idstring
      foreach pick in hero where "IsArmor." & id
        perform eachpick.assign[Helper.Proficient]
        nexteach

This means that if you don't have chain shirt in your normal armor proficiencies, but you have a chain shirt in inventory you could pick the chain shirt and grant yourself proficiency in it.
 
Last edited:
Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ If we've not chosen anything, get out
      doneif (field[pChosen].ischosen = 0)

      ~ Assign the identity tag for the proficiency
      var id as string
      id = field[pChosen].chosen.idstring
      foreach pick in hero where "IsArmor." & id
        perform eachpick.assign[Helper.Proficient]
        nexteach
As an FYI instead of doing string manipulation you can just use the tagids[] function directly in the foreach loop.

Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)
      ~ If we've not chosen anything, get out
      doneif (field[pChosen].ischosen = 0)

      ~ Assign the helper proficient tag
      foreach pick in hero where field[pChosen].chosen.tagids[IsArmor.?]
        perform eachpick.assign[Helper.Proficient]
        nexteach

You can read more about tagids[] on the HL wiki.
 
Back
Top