Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Aldaron
Senior Member
 
Join Date: Dec 2007
Posts: 139

Old March 21st, 2013, 05:13 PM
Hi guys,

We have a house-rule in my campaigns for druids, where a druid's wild empathy checks get a bonus equal to half his Handle Animal skill. Without recreating druids from scratch, I'm trying to create an Adjustment in the editor. So far, so good. By using the Eval Script from the Ring of Sacred Mistletoe, I've created a simple Adjustment with the following Eval Script:


Code:
if (hero.childlives[cWildEmp] <> 0) then
        hero.childfound[cWildEmp].field[abValue].value += 3
        endif
This works nicely, and give the bonus the Wild Empathy for the character (ups the current +6 to +9)

The problem comes about when I try to make the "3" in the above code equate to half the Handle Animal skill of the character. I've tried using the following in place of "3", but get errors:

Code:
(hero.skHandleAn)/2
(hero.child[skHandleAn])/2
skHandleAn/2
At the moment, I'm just guessing, really, and I was hoping someone might be able to clue me in on the correct syntax. I'm also assuming there is some sort of rounding function, as well.

Thanks in advance
Aldaron is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old March 21st, 2013, 10:48 PM
hero.child[skHandleAn].field[FIELDNAME].value

FIELDNAME will depend on what you're trying to get. skRanks is the number of ranks, skTotal is the total bonus.
Aaron is offline   #2 Reply With Quote
Aldaron
Senior Member
 
Join Date: Dec 2007
Posts: 139

Old March 22nd, 2013, 01:15 AM
Thanks for that Aaron...it didn't quite work as planned, but you set me on the track for finding what did!

I ended up finding a macro that grabbed the value, and then chucked it into a variable, because the ROUND() function didn't seem to like working on the macro. The code I ended up with, which is working perfectly, is:

Code:
var div_ranks as number

div_ranks = #skillranks[skHandleAn]   
  
if (hero.childlives[cWildEmp] <> 0) then
        hero.childfound[cWildEmp].field[abValue].value += round(div_ranks/2,0,-1)
endif
Thanks for setting me straight and telling me what to look for!
Aldaron is offline   #3 Reply With Quote
Reply


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 07:52 AM.


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