Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
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'' Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#1 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
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 Code:
Syntax error in 'eval' script for Thing 'tmCBOSFCre' (Eval Script '#3') on line 6 -> Non-existent thing 'sCL' used by script Confused???? Suggestions? Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#2 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Re-adjusted and got it to compile
Code:
var bonus as number bonus = #totallevelcount[] field[sCL].value += bonus 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' Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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. |
#4 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
Thank you Aaron for the help once more. Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
|
#5 |
|
|