PDA

View Full Version : The Knight


blzbob
May 26th, 2010, 08:45 AM
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.

chiefweasel
May 26th, 2010, 11:17 AM
What skill are you trying to add the +2 too?

Mathias
May 26th, 2010, 01:16 PM
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?

blzbob
May 26th, 2010, 08:54 PM
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.

blzbob
May 28th, 2010, 06:49 AM
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?

Mathias
May 28th, 2010, 07:05 AM
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?)

blzbob
May 28th, 2010, 08:36 AM
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.

ShadowChemosh
May 28th, 2010, 08:54 AM
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:

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

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

Mathias
May 28th, 2010, 08:54 AM
Your problem is in the first line - you need a quote before Mounted Combat:


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.

blzbob
May 28th, 2010, 06:42 PM
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.

dartnet
May 29th, 2010, 07:45 AM
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.

blzbob
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?

Mathias
June 1st, 2010, 04:00 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?

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.


~ 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:


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)


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:


#skillbonus[skIntim] += bonus


Assembling all that for easy copying (and adding some comments to the code):

Timing: Post-Levels/10000


~ 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

blzbob
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.

Mathias
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?

blzbob
June 2nd, 2010, 08:22 AM
Sorry, the bonus just didn't add. I didn't get any errors.

Mathias
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.


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.

blzbob
June 2nd, 2010, 08:54 PM
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.

ShadowChemosh
June 2nd, 2010, 09:31 PM
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.

blzbob
June 3rd, 2010, 04:47 AM
Yeah. That was the first thing I double checked.

Mathias
June 3rd, 2010, 08:46 AM
I just found the error - re-read my original post - I said that "Helper.CurrArmor" is the tag that marks the currently equipped armor, but then in the script, I looked for "Helper.CurrEquip"

So, change the foreach line to:

foreach pick in hero from BaseArmor where "ArmorClass.Heavy & Helper.CurrArmor"

and it should work. I apologize for that mistake.

P.S. Don't forget to delete the debug lines (or just go back to the original version and then apply the fix) - otherwise, next time you try to use debug, you may still have these debugs cluttering up the report, making it hard to figure out which set of debug information you're seeing.

blzbob
June 3rd, 2010, 07:55 PM
Cool! That was it. Thank you very much.

blzbob
June 4th, 2010, 08:30 AM
So the last two problems I am running into are probably going to have the same solution. I am trying to get Weapon Specialization to be a valid choice for the Knight. I copied Weapon Specialization but can't seem to find how to make it so that the Knight can choose the feat. I would also need to do this for Greater Weapon Specialization and I assume they both have the same solution.

The two things I have tried are 1) To make the knight count as a fighter, and 2) To make the feat a bonus feat for the Knight. Neither one seemed to do the trick.

Mathias
June 4th, 2010, 09:23 AM
I have an idea about how to revise the way feats check for levels of specific classes that I hope to add to Hero Lab in the next few weeks, so do you mind waiting to implement the rule that knights can get fighter feats?

blzbob
June 4th, 2010, 09:51 AM
I can wait. I can already select the feat but it creates the invalidation. I don't mind too much. Thanks.

ShadowChemosh
June 4th, 2010, 10:45 AM
blzbob,

Looks like you have done a great job on Pathfinderizing the Knight. It would be great if you shared the .user file with the community. Their is chiefweasel's repository (chiefweasel) or happy to have it on thed20pfsrd (http://www.d20pfsrd.com/extras/community-creations/hero-lab) or better yet both.

You can just email the attachment to me at shadowchemosh(at)yahoo(dot)com or chiefweasel@cheeseweasel.net or both. :)

Thanks

blzbob
June 4th, 2010, 11:07 AM
blzbob,

Looks like you have done a great job on Pathfinderizing the Knight. It would be great if you shared the .user file with the community. Their is chiefweasel's repository (chiefweasel) or happy to have it on thed20pfsrd (http://www.d20pfsrd.com/extras/community-creations/hero-lab) or better yet both.

You can just email the attachment to me at shadowchemosh(at)yahoo(dot)com or chiefweasel@cheeseweasel.net or both. :)

Thanks
I am still making sure the knight is working right. I think it is now. I also finished up the priest from the same book. I will email you both if you like. Expect an email from the devil (b_l_z_bob at hotmail dot com).