Senior Member
Volunteer Data File Contributor
Join Date: Jan 2007
Posts: 591
|
|
#11 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
I realized that there is one more thing I would like to do with the knight. It has an ability where if he is wearing heavy armor, he adds +4 to his intimidate check. Is there a way to set that up?
|
#12 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Quote:
First, in the Develop menu, make sure that the first item "enable data file debugging" is checked. Now, add a few armors to your character - you'll want light armor, medium armor, heavy armor, and shields. For each of those armors, right-click, and select "Show debug tags for XXX". Now that you have a few tag lists showing, study those lists, looking for differences - you want to figure out what tags mark something as heavy armor, medium, etc. (The answer is "ArmorClass.Heavy") Next, try equipping one of them - watch the list of tags, and see what's added to the equipped armor. (The answer is "Helper.CurrArmor") Later on, you'll need to search through armors, so while you have those tag lists open, see if you can find a component tag that appears to be specific to armor (you may also want to add some weapons and regular gear, so you can compare the armor tags to their tags). component.BaseArmor is the tag you're looking for here. Now for the script. This will be an Eval Script, running on whatever class special grants this ability. In terms of timing, we'll choose Post-Levels/10000, since that's when all class specials run their scripts, unless there's a reason to run it at another time. We'll start with the standard opening for a class special, then declare a variable that we'll use later. Code:
~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) var bonus as number Code:
foreach pick in hero from BaseArmor where "ArmorClass.Heavy & Helper.CurrEquip" Code:
bonus = 4 nexteach Code:
#skillbonus[skIntim] += bonus Timing: Post-Levels/10000 Code:
~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) var bonus as number ~if we have any heavy armor that's equipped, set the bonus ~we'll be granting to 4 foreach pick in hero from BaseArmor where "ArmorClass.Heavy & Helper.CurrEquip" bonus = 4 nexteach ~assign the bonus we've calculated #skillbonus[skIntim] += bonus |
|
#13 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
Thanks for all of that. I think I can have some fun with some of the other things now too. I am so gonna play around with this when I get some free time this weekend.
For some reason though, it didn't work. I'm not sure what I did wrong. I found everything you mentioned, which is cool that it's something I can look up. I then copied everything you said and it didn't add it in. |
#14 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Please be more specific about what didn't work - did you get compile errors? Did you get runtime errors? Is everything there, but there's just no bonus being applied to Intimidate?
|
#15 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
Sorry, the bonus just didn't add. I didn't get any errors.
|
#16 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Okay, then we'll use some debug statements to track down what's not working.
The "debug" instruction tells Hero Lab to report some information to the user. Code:
debug "Class Level: " & field[xAllLev].value ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) var bonus as number debug "We've passed the basic test" ~if we have any heavy armor that's equipped, set the bonus ~we'll be granting to 4 foreach pick in hero from BaseArmor where "ArmorClass.Heavy & Helper.CurrEquip" debug "Found Armor: " & eachpick.field[name].text bonus = 4 nexteach debug "Total Bonus: " & bonus ~assign the bonus we've calculated #skillbonus[skIntim] += bonus Now, go to the Develop menu ... Floating Info Windows ... Show Debug Output. Hopefully that will help you figure out what parts of the script are being reached. If that doesn't tell you what's going wrong, you can right-click on that window and use "Copy to clipboard" to copy it. Then just paste it here, and I'll give you some suggestions for where to go from there. |
#17 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
So it looks like I've passed all the tests:
Quote:
I know I can just use the Adjust Tab as a work around so thank you for all your help. I really do appreciate this. |
|
#18 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
When you say you put it on him does that mean you actually equipped it? Just asking as the script Mathais wrote will only add the bonus when the armor is equipped and its not getting into the do loop.
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#19 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
Yeah. That was the first thing I double checked.
|
#20 |
|
|