• 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

Template Setting Caster Level to total HD how???

bodrin

Well-known member
I'm trying to get a template to adjust the CL of a spell like ability to reflect the total hit dice of the creature it's applied to.

I've bootstrapped the spell onto the template and it displays as it ought too but with a CL of 1.

I'm trying the following script

field[sCL].value += field[tHitDice].value

but I get this error.

Code:
Attempt to access field 'tHitDice' that does not exist for thing 'tmCBOSFCre'
- - -
Attempt to access field 'sCL' that does not exist for thing 'tmCBOSFCre'
- - -
Attempt to access field 'sCL' that does not exist for thing 'tmCBOSFCre''

Suggestions?:(
 
After searching the forums I stumbled upon the sCL field which refers to spell like abilities so I Scrapped the first script and tried this one

Code:
var bonus as number

bonus = #totallevelcount[]

if (hero.childlives[spShadSte4] <> 0) then
perform hero.childfound[sCL].setfocus
doneif (state.isfocus <> 0)

if (focus.field[sCL] <> 0) then 
field[sCL] += bonus

endif

which only displays this error now

Code:
Syntax error in 'eval' script for Thing 'tmCBOSFCre' (Eval Script '#3') on line 6
  -> Non-existent thing 'sCL' used by script

but if sCL is a non-existent thing then why is it referenced for spell like abilities.

Confused????

Suggestions?
 
Re-adjusted and got it to compile

Code:
var bonus as number

bonus = #totallevelcount[]

field[sCL].value += bonus

but now get

Code:
Attempt to access field 'sCL' that does not exist for thing 'tmCBOSFCre'
- - -
Attempt to access field 'sCL' that does not exist for thing 'tmCBOSFCre'
 
The problem you're having is one of context. The eval script is running on the template, which is it's initial context, and templates do not have the sCL field. You would need to navigate from the template to the spell like ability first, and then add to the field.

Fortunately, there is already a built in mechanism for making Spell like abilities use the total HD for their caster level. Look at the Divine Guardian template and see how it bootstraps its SLAs. Alternately, any of the Deific Obedience boons which bootstrap Spell like abilities should have them set up to use total HD.
 
The problem you're having is one of context. The eval script is running on the template, which is it's initial context, and templates do not have the sCL field. You would need to navigate from the template to the spell like ability first, and then add to the field.

Fortunately, there is already a built in mechanism for making Spell like abilities use the total HD for their caster level. Look at the Divine Guardian template and see how it bootstraps its SLAs. Alternately, any of the Deific Obedience boons which bootstrap Spell like abilities should have them set up to use total HD.

Helper HDCastLev was the answer. :D

Thank you Aaron for the help once more.
 
Back
Top