Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
What's the difference between how you're getting to usrChosen1 in these two lines:
Code:
if (field[usrChosen1].ischosen <> 0) then Code:
sp = [usrChosen1].field[aFinalVal].value * 5 |
#21 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
Well we have been trying to figuare it out, but still no luck (sorry not a programer). This is what we got so far:
if (field[usrChosen1].ischosen <> 0) then var sp as number sp = field[usrChosen1].field[aFinalVal].value * 5 sp = round(sp, 0, -1) and the error is Hero Lab was forced to stop compilation after the following errors were detected: Syntax error in 'eval' script for Thing 'cMHMind' (Eval Script '#1') on line 3 -> Invalid use of a reserved word in script BTW - Thank you for your patience |
#22 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Okay, that was the first error.
Now for the second (I only see these two errors) - there is still something missing in that line. I'd recommend looking at existing things that use field[usrChosen1]. You're missing something between field[usrChosen1] and the next use of field[] - those can't follow each other directly. |
#23 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
if (field[usrChosen1].ischosen <> 0) then
var sp as number sp = field[usrChosen1].chosen.field[aFinalVal].value * 5 sp = round(sp, 0, -1) endif Well the script doesn't give an error, but it doesn't seem to multiply the value, (the tracker has a 0 value) |
#24 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Yep, that was the other syntax error.
(I presume there's a line you haven't copied that adds the sp variable to field[trkMax].value) Now for timing. Going into the editor's help menu, and looking at the "Choosing a Phase" link at the bottom, here's the description of the Final phase: Quote:
You do need the final value of the attribute though - that means you need to be in the Post-Attribute phase or later, so, use Post-Attributes as the phase for this script. |
|
#25 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
Thank you again for your help with all this, and all the other material. It all works great now!
|
#26 |
Junior Member
Join Date: Aug 2010
Location: Brisbane
Posts: 19
|
Frodie,
I am trying to get this to work as well. I have the sanity adjustment in place. I have Knowledge skill: Forbidden Lore Adjustment working and have created the Knowledge skill: Forbidden Lore. I cannot get the following to work: - adjustment of the sanity tracker based on increase of the Knowledge: forbidden lore adjustment, or increase of the Knowledge: forbidden lore skill - adjustment of the knowledge: forbidden lore skill, based on an increase of the knowledge: forbidden lore adjustment. Any assitance would be greatly appreciated |
#27 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
I did get it to work, it is in one of the old Modern dataset, I can get it for you and posted it, but it might be later on today.
|
#28 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
Tracker Tab
Final Phase Priority 10000 ~ We get Wisdom score multiplied by 5, so calculate ~ that number. var sp as number sp = hero.child[aWIS].field[aFinalVal].value * 5 sp = round(sp, 0, -1) ~ Add to our total charges. field[trkMax].value -= #skillbonus[skshForLor] field[trkMax].value -= #skillranks[skshForLor] field[trkMax].value += sp It is in the Supernautral Heroes in the old Modern Pathfinder dataset under the tracker tab. This one is just based off the Wisdom score. The one that is based off Int, Wis, or Cha is in the older dataset, you can look through some of the old modern threads and it'sone of them. Last edited by Frodie; August 18th, 2011 at 04:59 PM. |
#29 |
Junior Member
Join Date: Aug 2010
Location: Brisbane
Posts: 19
|
Thankyou sir
|
#30 |
|
|