Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old December 8th, 2013, 09:03 AM
I'm trying to get the hardness loss to be automatically calculated for this ability.

Quote:
Deteriorate: The alchemist can weaken the durability of inanimate objects. On a successful hit, the object loses 1 hardness for every two levels of the alchemist. Attended and magical objects are allowed a Fortitude saving throw to negate this effect: DC 10 + one-half alchemist level + alchemist’s Intelligence modifier.
I tried this (I took it from Stunning Fist):

Quote:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += #levelcount[Alchemist] levels/2,0,-1
I get the error:

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

Syntax error in 'eval' script for Thing 'cRGGAlDe' (Eval Script '#1') on line 7
-> Error in right-side expression of assignment
Where did I go wrong?
blzbob is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 8th, 2013, 02:13 PM
#levelcount[Alchemist] levels/2,0,-1

does not make sense. I think what you want is to halve levels and then round down? That would be

round(levels/2,0,-1)
Aaron is offline   #2 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old December 8th, 2013, 02:29 PM
This is what I'm using:

Quote:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += #levelcount[Alchemist] round(levels/2,0,-1)
This is the error I'm getting:

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

Quote:
Syntax error in 'eval' script for Thing 'cRGGAlDe' (Eval Script '#1') on line 7
-> Error in right-side expression of assignment
I've also tried (from the Bravery script):

Quote:
field[listname].text = "Reduce Hardness by +" & field[xIndex].value

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

var calclevel as number
calclevel = #levelcount[Alchemist].value
field[abValue].value = round(calclevel/2, 0, -1)
And I'm getting the error:
Quote:
Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'cRGGAlDe' (Eval Script '#1') on line 7
-> Error in right-side expression of assignment
Even with the change, I can't get it to compile.
blzbob is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 8th, 2013, 02:37 PM
#levelcount[Alchemist].value

Should be just:

#levelcount[Alchemist]

Anything with a # in front of it is a macro, and doesn't need a .value or .text after it, that is handled within the processes of the macro. Try this:

Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += round(levels/2,0,-1)
Aaron is offline   #4 Reply With Quote
blzbob
Senior Member
Volunteer Data File Contributor
 
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407

Old December 8th, 2013, 09:43 PM
Awesome! Thanks.
blzbob is offline   #5 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 08:15 AM.


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