Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 174

Old October 12th, 2017, 05:10 PM
I need to find a way to check if the Hero is proficient with current equipped armor and, if they are, find the equipped armor's check penalty. 1.5 times that penalty will be added to the Hero's Swim check (effectively, you only have half the armor's acp to swim checks instead of double). What would the scripting look like for this?
Illyahr is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,402

Old October 13th, 2017, 06:45 AM
If you right-click on a piece or armor in your portfolio, you should see an option for "Show Debug Tags". Open that window up, and you can see all of the tags assigned to that armor. If you then equip the armor, you will see a new tag appear to indicate that it is equipped. There is also a tag for if the character is proficient.

You can also see what fields the armor has by right-clicking on it and selecting "Show Debug Fields". Scroll down until you find the field for Armor Check Penalty.

You can do the same with Swim to find what field is being changed when the penalty is applied.

Once you have all that information, you can create a script to change the penalty as you see fit. Depending on where the script is being run, you will likely need a foreach loop.
Sendric is offline   #2 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 174

Old October 13th, 2017, 12:51 PM
Tried that, doesn't work. Right-clicking only shows "delete armor" and does nothing on skills.
Illyahr is offline   #3 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,402

Old October 14th, 2017, 03:16 AM
Quote:
Originally Posted by Illyahr View Post
Tried that, doesn't work. Right-clicking only shows "delete armor" and does nothing on skills.
Sounds like you need to enable debugging. Go to Develop -> Enable Data File Debugging.
Sendric is offline   #4 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 174

Old October 14th, 2017, 06:29 AM
Tried that, still doesn't do anything.
Illyahr is offline   #5 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,402

Old October 15th, 2017, 06:05 AM
Quote:
Originally Posted by Illyahr View Post
Tried that, still doesn't do anything.
That's odd. Once Data File Debugging is enabled, you should be able to see several options when you right-click on things.

In the Develop menu, is "Floating Info Windows" available at the bottom (ie not grayed out)? If so, you can hover over it and get a number of options, like "Show Selection Tags" and "Show Selection Fields".

If you select either of those it will bring up a list of all the things attached to the character. Among them would be any equipment and skills.
Sendric is offline   #6 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 174

Old October 15th, 2017, 07:42 AM
OK, fugured out what I was doing wrong. Just need help cleaning up the scripting

Code:
if (hero.childfound[???].tagis[Helper.CurrArmor] <> 0) then
if (hero.child found[???].tagis[Helper.Proficient] <> 0) then
perform hero.child[kSwim].delete[Helper.ArmorChk2]
endif
endif

foreach pick in hero from BaseArmor where "Helper.CurrArmor & Helper.Proficient"
#skillbonus[kSwim] -= each.tagis[mArmorChk.?] / 2
next each
Need a field in the first part and the math is coming out weird in the second part. Any ideas?
Illyahr is offline   #7 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,402

Old October 15th, 2017, 10:58 AM
Quote:
Originally Posted by Illyahr View Post
OK, fugured out what I was doing wrong. Just need help cleaning up the scripting

Code:
if (hero.childfound[???].tagis[Helper.CurrArmor] <> 0) then
if (hero.child found[???].tagis[Helper.Proficient] <> 0) then
perform hero.child[kSwim].delete[Helper.ArmorChk2]
endif
endif

foreach pick in hero from BaseArmor where "Helper.CurrArmor & Helper.Proficient"
#skillbonus[kSwim] -= each.tagis[mArmorChk.?] / 2
next each
Need a field in the first part and the math is coming out weird in the second part. Any ideas?
You're foreach loop is right, but it's in the wrong place. You need to use that to find the armor and then get the value.

Code:
var pen as number
foreach pick in hero from BaseArmor where "Helper.CurrArmor & Helper.Proficient"
    pen = eachpick.field[mArmorChk].value
nexteach
After you get the Armor Check value, you can modify it as you see fit outside of the foreach loop. Then you can assign the value to Swim.
Sendric is offline   #8 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 174

Old October 15th, 2017, 11:16 AM
OK, got the math working, still need something in that first part to disable the check penalty to Swim while wearing armor you are proficient with.
Illyahr is offline   #9 Reply With Quote
Reply

Thread Tools
Display Modes

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 07:04 PM.


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