PDA

View Full Version : Caster Level


Talinthalas
March 8th, 2010, 01:56 PM
How do you retrieve the caster level of a hero for example if you had a trait that says

if ({Casterlevel?}.value >= 4) then
#skillbonus[skSpellcr] += 4
else
#skillbonus[skSpellcr] += 2
endif

Mathias
March 8th, 2010, 02:47 PM
If you're looking for the character's maximum caster level (what would be looked up to determine whether or not you qualify for an item creation feat), then I'd suggest you open an Item creation feat, and check its Expr-req to find out what value it references.

(the answer is herofield[tMaxCaster].value)

If you're looking for the caster level of a specific class or a chosen class, please tell me more about the thing you're creating, since the way to find that would be different if this is on a class, a class special, or a feat.

Mindcloud
March 8th, 2010, 03:02 PM
Here are some examples. The first example checks for any caster levels. The second checks for a wizard. I timed my script at pre-attributes 5000

FYI: debug just outputs stuff to the debug floating info window.

if (herofield[tMaxCaster].value >= 4) then
debug "max is greater than or equal to 4"
else
debug "max is less than 4"
endif

if (#levelcount[Wizard] >= 4) then
debug "greater than or equal to 4 lvls of wizard"
endif

Talinthalas
March 8th, 2010, 04:35 PM
I created this Eval script and it always returns a value of 0

if (herofield[tMaxCaster].value >= 1) then
#skillbonus[skSpellcr] += 2
else
#skillbonus[skSpellcr] += 3
endif

Mindcloud
March 8th, 2010, 04:57 PM
It works for me. Clarify what you mean by "returns a value 0f 0"? Have you added at least 1 rank to the skill or did you want the bonus to show up even if there is no ranks in the skill? Also what did you set the timing to?

Talinthalas
March 8th, 2010, 05:13 PM
Ahh I set the priority to 5000, but I hadn't changed the phase to Pre-attribute. Now it works properly. I will figure this all out eventually.