• 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

Caster Level

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
 
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.
 
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.

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

Code:
if (#levelcount[Wizard] >= 4) then
   debug "greater than or equal to 4 lvls of wizard"
endif
 
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
 
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?
 
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.
 
Back
Top