Senior Member
Join Date: Dec 2007
Posts: 139
|
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 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 Thanks in advance |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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. |
#2 |
Senior Member
Join Date: Dec 2007
Posts: 139
|
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 |
#3 |
|
|