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