• 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

Maximum Spell known level?

TCArknight

Well-known member
Is there a field that holds the actual Maximum level Known for a casting class?

for example, I'm an 11th level spontaneous caster that can know up to 6th level spells. Where is that 6 contained?

I thought to look at the Drow Sorcerer favored class option, but it just calls FavSpellBn procedure. Any one able to share the code for that procedure?

Thanks!
TC
 
Thanks Aaron!

I tried it at Final/30000 but it still returns -1 even for a caster with up to 4th level spells known:
Code:
field[usrCandid2].text = "component.BaseSpell  & !Helper.CustomItem & ("

notify field[usrCandid2].text

~ add level tags up to max known level -1
var spelllevel as number
var mySplLev as string
var i as number

spelllevel = field[usrChosen1].chosen.field[cMaxSpLev].value
notify "spelllevel: " & spelllevel

for i = 0 to spelllevel
  if (i > 0) then
    mySplLev &= "|"
  endif
  mySplLev &= "sLevel." & i
next 

notify "mySplLev: " & mySplLev

field[usrCandid2].text &= mySplLev
      
~Close everything
field[usrCandid2].text &= ")"

usrChosen1 has "component.Class & (CasterType.SpontKnow | CasterType.MemBook)" as a candidate and provides the class to add the new spell to. usrCandid2 is set to All Things so that all spells can be chosen from.

Thoughts?
 
cMaxSpLev is calculated at Post-Attr/20000.

usrChosen1 is looking for picks on hero, not all things, right?

Your test character has a high enough spellcasting attribute to cast the spells of that highest level, right?
 
Thanks Mathias!

I'll check, but I believe I do have the Picks on Hero selected in the Restrict selection. As it does only populate if the hero has a spell-using class.

Is it only available during the Post-Attribute phase? I thought once a value was calculated, it was there for all later phases?

TC
 
Last edited:
I was just telling you when it is calculated, so that you'd have the lower limit on the phase & priority for your script, instead of having to discover that limit by trial and error. It is available anytime after it's calculated.
 
Thanks Mathias!

I appreciate the advice. :) I'll play around with it later this evening after work...

TC
 
Last edited:
Ok, I found the problem.

The class I'm working with is a custom spellcasting class. cMaxSpLev is never changing from -1, no matter how many levels of the class or how high the attribute is.

This custom class had the Magic Type set to -none-. If I set it to Arcane, everything works well though.

I'd like to be able to use CasterSrc.Psionic is there a way to add that to the available list through a groupid tag in a 1st file?
 
Back
Top