• 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

The Knight

blzbob

Well-known member
Has anyone added the Knight from the Tome of Secrets? I'm trying to add it but I am so very confused. I tried reading the tutorial but I just am not understanding it at all. I am currently stuck trying to have the class grant +2 to two skills. I can see that I am going to run into more problems as I try to add more stuff. I can't even get the bonus feats to show up at the proper intervals.
 
Is the +2 being applied to 2 specific skills, or is this something along the lines of skill focus - choose two skills and add +2 to each?

Can you think of any abilities that do something similar to what you're trying to accomplish?

For example, the Druid's Nature Sense ability adds +2 to the Knowledge (Nature) and Survival skills - make a copy of that in the Class Specials tab, and you can take a look at its script to figure out how it works.

For adding bonuses to a user-selected skill, perhaps the Gnome's Obessive ability (you'll find that in the Racial Specials) - that adds +2 to a skill the user chooses. There are many traits that offer a choice of skills, and then add a bonus to the chosen skill - by comparing how Obsessive and those traits restrict the list of skills to choose from, you may be able to create any restriction this class gives.

For the bonus feats, can you elaborate on what you've tried entering, and what result you're getting?
 
I think I got it. I couldn't find the druid ability script but I still was able to get it to work. For the bonus feats, you may want to mention in the tutorial that you need to put the number of bonus feats as a cumulative total at the appropriate level. It took me a few tries to figure that out. If it's in the tutorial, I couldn't find it.

This is the page I was using: file:///C:/herolab/Data/pathfinder/authoring/pathfinderedittut3.htm

Thank you for the help. I think I'm getting the hang of this slowly. Expect more questions from me. I'm a little slow with stuff like this. Once I've got it, I tend to have it for good. It's just the getting started part that's hard for me.
 
I have another question. Is it possible to set the class abilities up so that something where you get a bonus every 4 levels just shows what the bonus is on the character sheet?

For example, the knight's mounted combat ability:

Mounted Combat (Ex): At 4th level and every four levels thereafter, the knight receives a bonus to his melee attack and defense rolls while mounted. The amount of the bonus is indicated on the knight table.

Can I set this up so that at 4th level it prints out +1, at 8th level it prints +2, etc?
 
Can you think of any other class abilities that work like this, that you could study, to figure out how they work?

(I'm not talking about the effects - the bonus while mounted - can you think of other class abilities that increase by +1 every X levels? Or gain +1 use/X levels?)
 
Last edited:
I'm trying to use the Fighter's Bravery as an example but I keep getting an error saying Syntax error in 'eval' script for Thing 'cMounCom' (Eval Script '#1') on line 1 -> Reference to undeclared variable: 'Mounted".

This is what Bravery says for the Eval Script:

field[listname].text = "Bravery +" & field[xIndex].value

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

field[abValue].value += field[xCount].value
field[abSumm].text = "+" & field[abValue].value & " Will save vs. Fear"
field[livename].text = "Bravery +" & field[abValue].value


This is what I did for the Mounted Combat:

field[listname].text = Mounted Combat+" & field[xIndex].value

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

field[abValue].value += field[xCount].value
field[abSumm].text = "+" & field[abValue].value & " +1 to attack/damage while mounted"
field[livename].text = Mounted Combat+" & field[abValue].value


I didn't change Phase, Priority, or Index.
 
field[livename].text = Mounted Combat+" & field[abValue].value
Your problem is in this line of code. You don't have a leading quote around the word Mounted Combat+. So its trying to use Mounted as a variable name instead of treating it as a string.

It should read as follows:
Code:
  field[livename].text = "Mounted Combat+" & field[abValue].value

Also looks like Copy & Paste was not your friend as you also have the same issue for the very first line
field[listname].text = Mounted Combat+" & field[xIndex].value

Fixed
Code:
field[listname].text = "Mounted Combat+" & field[xIndex].value
 
Last edited:
Your problem is in the first line - you need a quote before Mounted Combat:

Code:
field[listname].text = "Mounted Combat+" & field[xIndex].value

Without the quote, HL thinks Mounted is a variable you're trying to use without declaring it.
 
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.
 
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.
 
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?
 
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
 
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.
 
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?
 
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.
 
So it looks like I've passed all the tests:

********** 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.
 
Back
Top