• 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

Advanced Learning Script

GodPole

Well-known member
Greetings all,

I know that there have been some previous posts on this topic and that Lawful_G has done a great job building most of this already, but I really would like to find a nice, clean, automated way for the extra spell provided by the Advanced Learning class special to be applied.
This is specifically in regards to the Warmage class from Comp. Arcane.
So far, I have two ideas on how to tackle this:
1) As a pseudo-domain
2) As a secondary spell

Right now, I think the best way to handle this is with the Secondary Spell functionality: It allows me to specify the wizard spell school so I don't have to create a new "spell list" for the ability.
However, I am struggling with how to only give the extra spell at 3rd, 6th, 11th, and 16th lvl, since secondary spells, by default, give x spells every level.
What I would like to do is use a script which drops that # to 0 EXCEPT at the appropriate levels, however I am having a difficult time actually finding which field name controls how many secondary spells a character is allowed.
(See image attachment)

Does anyone know where this value can be accessed?

Thanks.

-GP
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    285.6 KB · Views: 14
Add a level of Warmage. Go to Develop - Show Selection Fields, then choose the Class Helper for Warmage. If you scroll down you should see a field called cSecSplReq, I think that is what you are looking for. Good luck, and feel free to ask any other questions.
 
Awesome!
Thanks.

Ok...making some progress.

How does one work with an array?? Such as cSecMax and cSecCur?
I understand arrays from a coding perspective, but I'm just curious about the reassignment mechanism that HF uses.
Thanks.

-GP
 
Ok...I did some digging and found some info about how to access and modify arrays.
However, I'm getting some weird errors that I can't figure out.
Just to test my understandings first, I set up some debug scripts to make sure that I was accessing arrays correctly and knew which rows I wanted to modify.
Here is where I started:
var result as number
result = hero.child[cHelpWMa].field[cSecTot].arrayvalue[1]

debug "cSecTot 1 = " & result

...simple huh?
But, I keep getting this weird error:
Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'cHelpWMa'(Eval Scrip '#1') on line 2
-> Attempt to access a field 'cSecTot' defined with an incompatible style. Expected 'array'.

Any ideas on what I am doing wrong? Other posters who have asked about arrays are accessing them the same way so I'm at a loss.

Help.
:/

-GP
 
cSecTot appears to not be used for anything. It looks like you want to be working with cSecMax.

I'm guessing that the original idea was to set secondary spells up like regular spells, with a matrix saying how many you get at each level, but it turned out to be easier to copy cSecSplReq to each field of cSecMax (for the levels of spells the character can cast), since every spellcasting class in the SRD that uses secondary spells always has a secondary spell if they can cast spells of that level (sometimes excluding 0-level spells).
 
What my current plan is to use this for the Warmage.

Warmages get an extra Wiz/Evoc spell at 3rd, 6th, 11th, and 16th lvl.
So, I was going to set it up as a secondary spell. That way I could restrict it to Evocation Spells.

I would have an eval scrip that surpressed the Secondary spells unless the hero was either lvl 3,6,11, or 16. At 3rd level, it would show them having access to one 0-lvl Evoc Spell and (or) one 1-lvl Evoc Spell.
Now, since a Warmage only gets ONE extra spell, the script would also check to see if any of the cSecCur array values <>0, and if so, which would mean that they have already selected their one spell, it would zero-out all of the other cSecMax values.

Any holes in this logic?

-GP
 
So they're not restricted to which level of spells those extra secondaries are used for? Or do they get a new version of the ability at each of those levels, and each version can use any of the spell levels that were there when it was added (which creates a real problem if you use a prestige class to add magic levels to the Warmage, since the magic level and the level of the class special become separate things).
 
The way I read the class special description for Advanced Learning:
A Warmage can choose an additional spell from the Wizard Evocation School that they have the ability to cast. So...

At 3rd level, a Warmage can learn an additional 1st lvl Evocation spell.
At 6th level, s/he can learn an additional 1st-3rd lvl Evocation spell.
At 11th lvl, an additional 1st-5th lvl Evoc spell
At 16th lvl, an additional 1st-8th lvl Evoc spell.

So, a 16th lvl Warmage could have chosen to learn an additional max 4 1st level spells, max 3 3rd lvl spells, max 2 5th lvl spells, or max 1 8th lvl spells, filling the other slots with lower lvl spells.

Am I interpreting this correctly?

-GP
 
And, if I am not mistaken, this ONLY applies to the number of Warmage levels.
So, when dealing with multiclassing with other classes that actually might get Secondary Spells, they need to be kept separate...which I think it does anyway, because the cSecMax field is specific to the class.

-GP
 
learn?

Does this class cast spells spontaneously (like a sorcerer), and this is a new spell known?

If so, take a look at the "Spells Known" adjustment - you can use the "Array-Based Menu" option in the class special to let the user choose which spell level they want to add to, and use that to modify the spells known for the class. You'll have to trust the user to pick an Evocation spell with that slot.
 
Last edited:
Yes. Warmages cast like Sorcerers.

Adding to the Spells Known array is another way of handling this, but I was trying to steer clear of having the player have to verify that the spell is an evocation spell. I'm trying to make this as automated as possible.
 
The secondary spells mechanics are set up to support a Wizard's specialty spells and a cleric's domain spells - both of those are questions of how many spells/day can be prepared. I'm not sure if they're set up to do anything useful for a spontaneous caster.
 
Back
Top