How-To: Add a bonus to all save DC's
Hi, first time poster, long time reader here.
I'm trying to create a template in the editor and one of its special abilities adds a +2 bonus to each special ability (including spell-like abilities) that the creature has. I've managed to mine some code from other things in the editor, but I can't get my code to work. Right now, it just doesn't do anything. Here's what I have so far: Code:
[Phase=Final Phase; Priority=10000; Index=1] Thanks |
#1: You're restricting this to RaceAbil - that means you're leaving out all class abilities, spell-like abilities built from spells, and generic abilities.
#2: Timing: Your expression requires that abDC already be finished calculating, so that it's non-zero, but then you want to add more to abDC, which has to happen before abDC's final value is calculated. |
My quick idea is your way to late in timing by using Final. Adding bonus should be pre-levels or post-levels at the latest. Trying changing your timing to pre-levels and see what it does.
|
Also, you need to fork your addition within the foreach. Spells store their DCs in the sDC field, while abilities store it in abDC. Adding to the wrong field will throw errors. I'd do something like:
Code:
[Phase=Final Phase; Priority=11000; Index=1] |
Code:
[Phase=Final Phase; Priority=11000; Index=1] Syntax error in 'eval' script for Thing 'fArcAdept' (Eval Script '#1') on line 2 -> Invalid use of reserved word 'if' in script |
Quote:
|
*slaps forehead* That seems so obvious in hindsight, and works perfectly! Thank you!
|
All times are GMT -8. The time now is 07:48 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.