Senior Member
Join Date: Feb 2013
Posts: 357
|
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?
|
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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. |
#2 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
Tried that, doesn't work. Right-clicking only shows "delete armor" and does nothing on skills.
|
#3 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#4 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
Tried that, still doesn't do anything.
|
#5 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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. |
#6 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
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 |
#7 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
var pen as number foreach pick in hero from BaseArmor where "Helper.CurrArmor & Helper.Proficient" pen = eachpick.field[mArmorChk].value nexteach |
|
#8 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
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.
|
#9 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
How could I use this to make a feat add an armor check penalty?
|
#10 |
|
|