Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
dartnet
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2007
Posts: 591

Old May 29th, 2010, 07:45 AM
Quote:
Originally Posted by blzbob View Post
Thanks. I knew it had to be something simple.

Thank you for your patience. I will get the hang of this and ask fewer questions as I go on. I hope I'm not a pain in the butt.
No by all means ask away. Your questions will help others later.
dartnet is offline   #11 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old May 30th, 2010, 01:05 PM
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?
blzbob is offline   #12 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 1st, 2010, 04:00 PM
Quote:
Originally Posted by blzbob View Post
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?
Here's how to go about this:

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
Next, we'll search through all the armor on the character, restricting our search to heavy armors that are equipped:

Code:
 
foreach pick in hero from BaseArmor where "ArmorClass.Heavy & Helper.CurrEquip"
If we find one of those, we'll set our variable to 4 (and close the foreach)

Code:
 
  bonus = 4
  nexteach
Now, we're done searching through all the armors on the hero. If one of them was heavy and equipped, bonus = 4. If not, bonus = 0. So, now we'll add the variable to the intimidate skill:

Code:
 
#skillbonus[skIntim] += bonus
Assembling all that for easy copying (and adding some comments to the code):

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
Mathias is online now   #13 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old June 1st, 2010, 08:11 PM
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.
blzbob is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 2nd, 2010, 07:16 AM
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?
Mathias is online now   #15 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old June 2nd, 2010, 08:22 AM
Sorry, the bonus just didn't add. I didn't get any errors.
blzbob is offline   #16 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 2nd, 2010, 08:56 AM
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
On the Class Special, replace the script with this version, with debugging statements entered. Then use the "Test now!" button to replace the existing copy of the class special with the revised copy, and add a sufficient number of class levels to the class.

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.
Mathias is online now   #17 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old June 2nd, 2010, 08:54 PM
So it looks like I've passed all the tests:

Quote:
********** Start Evaluation Cycle **********

Class Level: 1
We've passed the basic test
Total Bonus: 0

********** Start Evaluation Cycle **********

Class Level: 1
We've passed the basic test
Total Bonus: 0

********** Start Evaluation Cycle **********

Class Level: 1
We've passed the basic test
Total Bonus: 0

********** Start Evaluation Cycle **********

Class Level: 1
We've passed the basic test
Total Bonus: 0
The ability is a level 1 ability. I put dwarven plate mail on him.

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.
blzbob is offline   #18 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 2nd, 2010, 09:31 PM
Quote:
Originally Posted by blzbob View Post
I put dwarven plate mail on him.
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.
ShadowChemosh is offline   #19 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old June 3rd, 2010, 04:47 AM
Yeah. That was the first thing I double checked.
blzbob is offline   #20 Reply With Quote
Reply


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 09:30 AM.


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