Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Find ACP of equipped armor (http://forums.wolflair.com/showthread.php?t=59323)

Illyahr October 12th, 2017 05:10 PM

Find ACP of equipped armor
 
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?

Sendric 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.

Illyahr October 13th, 2017 12:51 PM

Tried that, doesn't work. Right-clicking only shows "delete armor" and does nothing on skills.

Sendric October 14th, 2017 03:16 AM

Quote:

Originally Posted by Illyahr (Post 257377)
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.

Illyahr October 14th, 2017 06:29 AM

Tried that, still doesn't do anything.

Sendric October 15th, 2017 06:05 AM

Quote:

Originally Posted by Illyahr (Post 257392)
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.

Illyahr 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?

Sendric October 15th, 2017 10:58 AM

Quote:

Originally Posted by Illyahr (Post 257417)
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.

Illyahr 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.

Provos January 3rd, 2021 04:33 PM

How could I use this to make a feat add an armor check penalty?


All times are GMT -8. The time now is 11:35 AM.

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