• 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

Find ACP of equipped armor

Illyahr

Well-known member
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?
 
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.
 
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.
 
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?
 
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.
 
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.
 
How could I use this to make a feat add an armor check penalty?

Code:
foreach pick in hero from BaseArmor where "Helper.CurrArmor & Helper.Proficient"
    eachpick.field[mArmorChk].value += pen
nexteach

You'll have to set the penalty, or if no variable is needed, just provide a number. Might be -=, but I don't remember. Should work though.
 
Back
Top