• 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

Sanity Points

I would try this as an eval script sometime in the Finals Phase:

var sanity as number
sanity = hero.child[aWIS].field[aFinalVal].value * 5

Then set the value of your tracker or whatever to be equal to "sanity".
 
Thank you very much!!! Here is the script and it works great:

~ 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 += sp
 
Cool ok, now I made an Adjustment that: "You gain one Rank of the Skill: Knowledge (forbidden lore).

Each rank you gain in this skill permanently reduces your maximum Sanity by 1 point: The more you know about the horrible truths underlying reality, the less capable you are of leading a normal life."
The scipt for reducing the Sanity works great, but the script to increase the skill doesn't, any ideas?


~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

~ Add to Knowledge: Forbidden Lore
#trkmax[skshForLor] += field[pAdjust].value
 
Cool that works great, thank you!

Ok, I want to see if I can get the skill to reduce the Tracker, here is the script, any ideas?

~ reduces to Sanity Points
#trkmax[trkshSanit] -= field[pSklPoints].value
 
~ reduces to Sanity Points
#skillbonus[skshForLor] -= field.trkmax[trkshSanit].value

IDK, any thoughts?
 
from a third thing:
#trkmax[trkshSanit] -= #skillranks[skshForLor]

from the tracker:
field[trkMax].value -= #skillranks[skshForLor]

from the skill:

#trkmax[trkshSanit] -= field[kUserRanks].value
 
I am try to see if I can get the user to pick either Int, Wis, and/or Cha, (The Pathfinder way)

here is the script, but with no luck:

if (field[usrChosen1].ischosen <> 0) then
var sp as number
sp = [usrChosen1].field[aFinalVal].value * 5
sp = round(sp, 0, -1)

Any Ideas?
 
You don't say why that doesn't work - is there an error reported? Is it not doing what it's supposed to? What is it doing?

You've also left out the phase and priority of your script.

As a first look, check your usages of usrChosen1 - see any difference between the first time you reference it (correctly), and the second time you reference it (incorrectly)?
 
I am sorry, my bad. 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
-> Error in right-side expression of assignment"

I have it at Final Phase at 10000 as a Custom Ability.

And I have this in the Custom Expression

thingid.aCHA|thingid.aINT|thingid.aWIS
 
So, look at your script - what's line #3 say?

(The first look I mentioned does appear to be the problem here).
 
if (field[usrChosen1].ischosen <> 0) then
var sp as number
sp = [usrChosen1].field[aFinalVal].value * 5
sp = round(sp, 0, -1)

That's the whole thing at the moment
 
Correct.

As I said before, check your usages of usrChosen1 - see any difference between the first time you reference it (correctly), and the second time you reference it (incorrectly)?
 
ok this is the error when I rebooted

The data files could not be loaded due to errors. Hero Lab will now attempt to load them in recovery mode. Once loaded, you can access the editor as normal to correct any errors.

The following errors occurred:

Syntax error in 'eval' script for Thing 'cMHMind' (Eval Script '#1') on line 3
-> Error in right-side expression of assignment
 
Frodie, I can see exactly what's wrong with it. But, this isn't the first time you've asked a question where the problem was not understanding the syntax of Hero Lab's programming language, so I'm trying to lead you to the solution, so that next time, you'll have a better understanding of how to solve these yourself.
 
Back
Top