Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,606

Old March 21st, 2011, 01:03 PM
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
The error is reported for line #3 - the second one of those, but not for line #1 - the first one of those - so why is the first one right, and the second one wrong?
Mathias is online now   #21 Reply With Quote
Frodie
Senior Member
 
Join Date: May 2007
Location: Durham, NC
Posts: 1,721

Old March 21st, 2011, 01:42 PM
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
Frodie is offline   #22 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,606

Old March 21st, 2011, 01:50 PM
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.
Mathias is online now   #23 Reply With Quote
Frodie
Senior Member
 
Join Date: May 2007
Location: Durham, NC
Posts: 1,721

Old March 21st, 2011, 02:03 PM
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)
Frodie is offline   #24 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,606

Old March 21st, 2011, 02:14 PM
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:
Should be used by anything that can be run after all other scripts.
For example, if you want to calculate a field based on the final results of a number of other scripts, that isn't used by anything else, you should use this phase.
If you set a number of uses, Hero Lab needs to be able to compare that to the number you've actually used - that means that the Final phase, for scripts that "can be run after all other scripts" is too late.

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.
Mathias is online now   #25 Reply With Quote
Frodie
Senior Member
 
Join Date: May 2007
Location: Durham, NC
Posts: 1,721

Old March 21st, 2011, 03:52 PM
Thank you again for your help with all this, and all the other material. It all works great now!
Frodie is offline   #26 Reply With Quote
solscar
Junior Member
 
Join Date: Aug 2010
Location: Brisbane
Posts: 19

Old August 17th, 2011, 06:18 PM
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
solscar is offline   #27 Reply With Quote
Frodie
Senior Member
 
Join Date: May 2007
Location: Durham, NC
Posts: 1,721

Old August 18th, 2011, 04:04 AM
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.
Frodie is offline   #28 Reply With Quote
Frodie
Senior Member
 
Join Date: May 2007
Location: Durham, NC
Posts: 1,721

Old August 18th, 2011, 04:56 PM
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.
Attached Files
File Type: zip PFRPG_Modern_Pathfinder.zip (419.9 KB, 8 views)

Last edited by Frodie; August 18th, 2011 at 04:59 PM.
Frodie is offline   #29 Reply With Quote
solscar
Junior Member
 
Join Date: Aug 2010
Location: Brisbane
Posts: 19

Old August 21st, 2011, 07:28 PM
Thankyou sir
solscar is offline   #30 Reply With Quote
Reply

Thread Tools
Display Modes

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 10:40 AM.


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