• 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

Scripting help: Campaign traits

evilash

Well-known member
I hope this is the correct forum for this post. I've been entering the campaign traits for Second Darkness into Hero Lab via the Editor. When it comes to scripting the traits I have a problem with some of them, and would like some help. Specifically it's the traits where you make a selection that I can't figure out how to script. There's the Looking for Work trait, where you select a skill from a list, and you then get a +1 trait bonus on that skill and it's a class skill for you. Then there's the Into Enemy Territory, there you select a saving throw to receive a +1 trait bonus on.

Can anyone enlighten me how to script these traits?
 
I could tell you how, but it's better to tell you how to find it so you can do it for all of them.

The way I figured it out was to open a second HeroLab application, load the d20 (even the demo version works) files. Then open the editor and tell it to open a file. Navigate to the "source" directory and find the pth_second_darkness.dat file. Load it, go to the Traits tab, select "New (Copy)" and find the trait you want to copy. Open the Eval window, copy, paste across into your Pathfinder version of HL. Presto!

EDIT: Oh, HL Pathfinder skills start wit "sk", not "k" like in the d20 files.

EDIT 2: Oh, and a very important little thing that isn't very clear that will help a LOT. On the Editor when you click on "Help" you actually get some! Seriously, I rarely click "Help" on a program because it usually only provides legal verbiage or other marginally helpful info. But with HeroLab it takes you to the files that actually tell you how to edit stuff, add feats, etc. So be sure to check it out if you haven't.
 
Last edited:
Some of the other scripting language changes that will be important to the feats you want to add are that all saves and save-related fields are now prefixed with "sv" instead of "v", and if you see a line that includes "field[fChosen].chosen", that's now "field[usrChosen1].chosen"
 
Back
Top