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
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 9th, 2009, 06:26 PM
The v1.8 Pathfinder files include the ability to create classes in the editor, so I'm adding a quick explanation of something I didn't have time to add to the documentation.

The way class specials are used in the Pathfinder files differs from the way they are used in the SRD files.

In the SRD files, the Sneak Attack ability was defined separately for each class, and for each +1d6 a class gave you, a different copy was required - each copy specified the level it was gained at. The initial copy on each class calculated the number of class levels you had, and calculated the number of d6's that you had gained. Each initial copy also bootstrapped another sneak attack thing from the Special category - because this thing was unique, no matter how many classes with sneak attack you had, only one copy could ever be added. That way, each class could add its bonus to that common thing, which displayed the total.

In Pathfinder, the Sneak Attack ability is defined only once. Each class adds as many copies of Sneak Attack as it needs, telling each copy what level it is gained at. The program searches through all the copies of sneak attack that have been added to the hero. It designates one of them as being the primary copy (this will be the lowest-level copy on the class who'se first level is the lowest). Then the primary copy simply counts the number of copies whose level has been reached, and displays that total to the user.

On the class, you'll add all your class specials with the "Class Specials" button in the editor, as you did for the d20 system. However, there's an extra step, since the Pathfinder versions aren't level specific.

Go to the bootstraps button on the top left of the editor. In there, you'll see a list of all the class specials you've added (along with other bootstraps like the weapon/armor proficiencies). For each one, press the "Tags" button, then "Add another tag", and then in the "Group Id" field, enter "ClSpecWhen" - capitalization is important. In the "Tag Id" field, enter the level the class gets this special at.

If a class gets the same special at multiple levels, press "Click to add another bootstrap", enter the name of the class special, then set the level by adding a ClSpecWhen tag. Do that for each additional copy, giving each one the appropriate level.

Let's use sneak attack's script as our example:
Code:
field[abValue].value += field[xCount].value
field[livename].text = "Sneak Attack +" & field[abValue].value & "d6"
field[abSumm].text = "+" & field[abValue].value & "d6 damage if you flank your target or your target is flat-footed."
field[listname].text = "Sneak Attack +" & field[xIndex].value & "d6"
The first line says that the abValue field 0 which for sneak attack, we're using to display the total number of dice you've accumulated - is equal to the count of active sneak attacks on the hero (xCount). Note that += is used instead of just setting it equal to the count.

When writing a script, X += Y means the same thing as X = X + Y - it just saves a bit of writing. In this case, it means we're adding our count to whatever was already there, instead of replacing it. Normally, abValue will be 0 until this script is run, but this means that we can make a feat that says "You get +1d6 to your sneak attack damage". All that feat has to do is add 1 to the abValue field of sneak attack (which is simplified with a macro):

#value[cSneakAtt] += 1

So, all that feat needs is a one line script. Just make sure that the timing puts it before Sneak Attack's script runs (which is Post-Levels/10000).

Code:
field[livename].text = "Sneak Attack +" & field[abValue].value & "d6"
field[abSumm].text = "+" & field[abValue].value & "d6 damage if you flank your target or your target is flat-footed."
The second and third lines are related - now that we know what our sneak attack value is, these display that value to the user. The livename is the name you will see on the special tab, the in-play tab, and on printouts - it's the version you'll show to the world. abSumm does the same thing - it's the summary text that's shown to the world. BTW, if you don't set them yourself, HeroLab will set the livename as the name and abSumm to the summary, so if you don't need to change them, you don't have to.

Each of those lines uses & symbols to mix together text with the abValue we've calculated, to generate the name and summary the user will see.

Code:
field[listname].text = "Sneak Attack +" & field[xIndex].value & "d6"
The listname is the version of the name that will appear on each class tab. The xIndex is calculated for each special, it is the position of this class special among all of the identical class specials that are on this class (NOT on all classes). For example, going down the list of class specials on the Rogue tab, the 3rd copy of sneak attack you encounter will have an xIndex of 3. So, the listname for that copy will show up on the class tab as "Sneak Attack + 3d6".

(I'm sorry about the length, it takes a lot of words to explain this, but I hope you'll be able to get used to the method once you've tried it a few times).

The best way to learn how to use this is probably to look at examples. Go the the class special tab in the editor, and press the "New (Copy)" button

Last edited by Mathias; October 9th, 2009 at 07:26 PM. Reason: Added how to set the level on a class special
Mathias is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 9th, 2009, 07:01 PM
As a second example, we'll pick something that's more level based, rather than count-based - the Wild Empathy ability. The same class special is shared between Druids and Rangers.

The Wild Empathy ability has two simple scripts, instead of the more complex single script that Sneak Attack uses. The first runs at Post-Attributes/10000:
Code:
field[abValue].value = field[xAllLev].value + hero.child[aCHA].field[aModBonus].value
In this case, we're setting our value equal to the total levels among all classes that have this special (xAllLev) + our charisma modifier. xAllLev is used because a Druid 5/Ranger 3 will have xAllLev = 8 for Wild Empathy. A Druid 5 would have xAllLev = 5.

The second script generates the name, at Render/1000:
Code:
field[livename].text &= " +" & field[abValue].value
Like the += I mentioned in the last post, &= is meant to save typing. X &= Y means X = X & Y.

By the time we've gotten to Render/1000, we're inside a window. At Final/100, if nothing has been set for the livename yet, the livename is set equal to the name. At Render/500, any information from things the user has selected (for example, the weapon selected for weapon focus) is added to the livename.

The other end of the window is at Render/20000, when the DC and the ability type ((Su) for example) are added to the livename.

So, inbetween Render/500 and Render/20000, you can use:
Code:
field[livename].text &=
to simply add something onto the end of the livename. In this case, we're adding the bonus that was calculated, along with a + sign. Don't miss noting that there's a space before the + sign (" +").
Mathias is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 9th, 2009, 07:02 PM
As a note, you may see the field xTotalLev used in place of xAllLev in some scripts. xAllLev is the total levels of all the classes which have the same class specials (oh - and it does make sure that you've reached the correct level before adding in those xAllLev's). xTotalLev is the total level of the class that this special is on. So, for a Druid 5/Ranger 3, Wild Empathy would have an xAllLev of 8. The Druid's copy would have an xTotalLev of 5, and the Ranger's copy would have an xTotalLev of 3.

In most cases, class specials aren't shared though - why use xAllLev? The reason is that someone might write a prestige class or a regular class in a year that does share that special. When that happens, if you've used xAllLev, they'll merge together nicely.

On the other hand, if you know you don't want your specials to merge if they're on multiple classes, use xTotalLev instead.
Mathias is offline   #3 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 05:25 AM.


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