• 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

ClsAllowSp question

nlmacdonald

Active member
I was working on a conversion of the Dread Necromancer and ran into a problem. This guys has a class ability gained periodically (4th, 8th, 12th, etc..) that allows him to add spell to his "book." I developed this class using the Warmage (unrestricted) style of casting. And found the example of "Greater Spell Access" from the Magus to develop a script to add the spell to "book." Here is the script, set to post-levels 10000.

Code:
      ~once the user's made a selection for each of the lists, get the 
      ~allowed spell tag from that spell 
      if (field[usrChosen1].ischosen <> 0) then 
        perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?] 
        endif 

      ~ If we're not shown, just get out now 
      doneif (tagis[Helper.ShowSpec] = 0) 

      ~ If we're disabled, do nothing 
      doneif (tagis[Helper.SpcDisable] <> 0) 

      ~push those tags to the magus class, which will allow the class to 
      ~choose those spells 
      perform root.pushtags[ClsAllowSp.?]

This script was attached to 5 class special developed that are gained by the class at 4th, 8th, 12th, 16th, and 20th.

It worked great at 4th level, but not at all at other levels. I experimented with staggering the timing (Advanced Learning 1 at 10000, Advanced Learning 2 at 10100, etc.) but no luck there. I changed the caster type to Spellbook (Wizard ) and it works perfectly for all class abilities. For the other spellcaster types it only works the first time (4th level).

I check out the forums and found someone else had this problem but they didn't post a solution or explanation. I reviewed the fields of the Class object and found the cSpellExpr and cSplBkExpr fields were affected by the "pushtags[ClsAllowSp.?] statement. Here is the expression after adding the spell Bonefiddle at 4th level:

sClass.cHelpDrN | ClsAllowSp.spBonefid2 & !(sClassNot.cHelpDrN) & !.Hide.Spell & !.Hide.Obsolete & & !.Hide.Helper & !(component.EffectWord | component.MetaWord)

This expression was not affected by the pushtags[ClsAllowSp.?] at the levels where advanced learning was gained (8th, 12th, etc..). I changed my script to append " | thingid.<spell id> ". This works at all levels.

Can someone explain why the ClsAllowSp tagging did not work after it worked fine at 4th level. As I understand the ClsAllowSp tag, it allows a spell to added to the spell list of a class. The tag needs to be pushed to the class object "cHelp???".

Thanks
 
Add some debugs to see if later level copies are stopping before the push, or are failing to pull.
 
Back
Top