Junior Member
Join Date: Jul 2010
Posts: 7
|
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. |
#1 |
Member
Join Date: Feb 2010
Posts: 74
|
The script in the Linguistics skill currently reads:
Code:
container.child[Totals].field[tLangsSpk].value += field[skUser].value + field [skInnate].value 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 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. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#3 |
Junior Member
Join Date: Jul 2010
Posts: 7
|
Wow, what a rapid response! Thanks a bunch.
|
#4 |
Junior Member
Join Date: Jul 2010
Posts: 7
|
Quote:
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. |
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
"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). |
#6 |
Junior Member
Join Date: Jul 2010
Posts: 7
|
Quote:
|
|
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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).
|
#8 |
|
|