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
Drew
Junior Member
 
Join Date: Jul 2010
Posts: 7

Old July 28th, 2010, 09:01 PM
I just downloaded Hero Lab and I'm looking to implement some house rules. The first thing I want to do is change the way Linguistics grants languages. Basically, I want characters to learn 1 language for every 2 points they put into Linguistics, instead of 1 for 1. I understand that I can do this by creating a new Linguistics skill that uses the same ID as the original skill. I created a duplicate of Linguistics to get started, but the script part where it actually generates the number of languages is completely foreign to me. Can some one give me quick instructions on how to change this to give the effect I want?

Also, how do I get the program to stop displaying the default languages and only display my own, campaign specific languages?

Thanks in advance.
Drew is offline   #1 Reply With Quote
TopCat
Member
 
Join Date: Feb 2010
Posts: 74

Old July 29th, 2010, 02:40 AM
The script in the Linguistics skill currently reads:

Code:
container.child[Totals].field[tLangsSpk].value += 
    field[skUser].value + field [skInnate].value
This is telling Hero Lab to add a number of languages to the character equal to the number of ranks put into Linguistics (the field[skUser].value bit). I'm not sure what the skInnate bit is doing but we can ignore that for the purposes of this script.

If all you want to do is add one language per 2 skill points, then change the script to

Code:
container.child[Totals].field[tLangsSpk].value += 
    round(field[skUser].value / 2, 0, -1) + field [skInnate].value
All that's doing is dividing the skill ranks by two and rounding down any fractions.

It's easy enough to add in your own languages via the editor. Where they replace an existing language, you can just use the "Replaces Thing Id" field in the same way as you did for your copy of the Linguistics skill.

Hiding/disabling the remaining languages can be done using the "Hidden" tab in the editor (create a new entry, enter the language Id and it should vanish). It's problematic to do that, though, as many races may well depend on that language being available and could start throwing errors at you within Hero Lab. The simpler solution may be to override the languages you don't want with dummy languages that are clearly named not to be used.
TopCat is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 29th, 2010, 06:55 AM
Thanks for answering this, TopCat. To clarify, if a race pre-sets how it spends its skill ranks, that's done with skInnate, so skUser and skInnate should be totaled before dividing by two:

Code:
 
var bonus as number
bonus = field[skUser].value + field[skInnate].value
container.child[Totals].field[tLangsSpk].value += round(bonus/2,0,-1)

Last edited by Mathias; July 29th, 2010 at 01:20 PM. Reason: There was a space where there shouldn't have been one.
Mathias is online now   #3 Reply With Quote
Drew
Junior Member
 
Join Date: Jul 2010
Posts: 7

Old July 29th, 2010, 12:39 PM
Wow, what a rapid response! Thanks a bunch.
Drew is offline   #4 Reply With Quote
Drew
Junior Member
 
Join Date: Jul 2010
Posts: 7

Old August 16th, 2010, 08:58 PM
Quote:
Originally Posted by Mathias View Post
Thanks for answering this, TopCat. To clarify, if a race pre-sets how it spends its skill ranks, that's done with skInnate, so skUser and skInnate should be totaled before dividing by two:

Code:
 
var bonus as number
bonus = field[skUser].value + field[skInnate].value
container.child[Totals].field[tLangsSpk].value += round(bonus/2,0,-1)
Hey, Mathias, can you clarify this a bit? I'm not sure I understand...

Actually, I'm trying to redo this since I added the APG. Now I'm getting the following error when I try to test the data after making the changes TopCat suggested:

"Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'SkLing' (Eval Script '#2') on line 1
->invalid use of a reserved word in script"


Um...what?

Last edited by Drew; August 16th, 2010 at 09:11 PM.
Drew is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 17th, 2010, 06:57 AM
"invalid use of a reserved word in script " almost always means a spelling error in my experience (by misspelling something, you created an instruction that's not in its approved list).

If you copied TopCat's script directly, try removing the space within "field [skInnate].value"

Could you copy the script you've added to your thing and paste it here for me to look at? (The error says Eval Script #2, so please copy both scripts).
Mathias is online now   #6 Reply With Quote
Drew
Junior Member
 
Join Date: Jul 2010
Posts: 7

Old August 17th, 2010, 06:41 PM
Quote:
Originally Posted by Mathias View Post
"invalid use of a reserved word in script " almost always means a spelling error in my experience (by misspelling something, you created an instruction that's not in its approved list).

If you copied TopCat's script directly, try removing the space within "field [skInnate].value"

Could you copy the script you've added to your thing and paste it here for me to look at? (The error says Eval Script #2, so please copy both scripts).
Indeed, the problem was the space as you thought. I removed it and things are now working again. Thanks for your help.
Drew is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 17th, 2010, 08:51 PM
Just as a note, my script was intended as a correction of TopCat's, not an addition, so I wouldn't recommend using both scripts together (or they'll stack and each add 1/2 language / slot, meaning that at 1 rank, you'll get 0 languages, 2 languages at 2, 2 at 3, 4 at 4, etc).
Mathias is online now   #8 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:07 PM.


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