• 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

Weapon Proficiency Script

DMayhew469

Well-known member
Anyone know the correct syntax for assigning a weapon proficiency in a script?

I think it looks something like this:

perform hero.assign[WpnProf.wHammer]

I know the WpnProf.wHammer is not correct.
 
In the editor, while you're looking at the script you're writing, select "wHammer" with your mouse. Then, press the "Find Thing" button, and change the "Show: -All Things-" selector to "Melee Weapons". Then, you can find and double-click the name of the weapon you want, and Hero Lab will insert its Id where the mouse cursor was in the script.
 
The weapon Proficiency feat does it like this
Code:
doneif (field[usrChosen1].ischosen = 0)
      perform field[usrChosen1].chosen.forward[WeaponProf.?]

There isn't a proficiency category in the 4e ruleset Mathias.
 
Crypto, that is where I got the "perform hero.assign". I need to be able to assign a specific weapon group to the hero, i.e. hammers, light blades, spears, etc.
 
Dwarven Weapon training gives better details... this should work.

Code:
      perform hero.assign[WpGrpRqSim.wgAxe]
      perform hero.assign[WpGrpRqMil.wgAxe]
      perform hero.assign[WpGrpRqSup.wgAxe]
      perform hero.assign[WpGrpRqSim.wgHammer]
      perform hero.assign[WpGrpRqMil.wgHammer]
      perform hero.assign[WpGrpRqSup.wgHammer]
      foreach pick in hero from WeaponBase where "(WepGroup.wgAxe | WepGroup.wgHammer)"
        perform eachpick.field[wpDamFeat].modify[+,2,""]
        nexteach
 
Back
Top