Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old February 3rd, 2022, 07:29 AM
I am sure I saw someone had written a script to do this, but I can't find it. I am looking for a conditional where if the character does not have medium armor proficiency they gain it, but if the do, they instead get heavy armor proficiency. I don't have any problems with adding medium armor proficiency, but I'm not having any luck getting the heavy armor proficiency part to work.

Code:
      ~ Check for medium armor proficiency and grant it, or heavy if already there
      if (tagis[ArmProfGrp.ArmorMed] = 0) then
          perform hero.assign[ArmProfGrp.ArmorMed]
      else
          perform hero.assign[ArmProfGrp.ArmorHeavy]
      endif
DeathSheep is offline   #1 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old February 3rd, 2022, 07:45 AM
You're checking this thing for the ArmProfGrp tag, not the hero. Change line 2 to:

if (hero.tagis[ArmProfGrp.ArmorMed] = 0) then

Super easy mistake to make, I do it all the time

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!
Fenris447 is offline   #2 Reply With Quote
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old February 4th, 2022, 07:46 AM
That did the trick. Thanks! I found a few other places where I made that same error too!
DeathSheep is offline   #3 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:30 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.