• 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

A Special Kind of Case - Adding SLA to Spells Known

chaoscowboy

Well-known member
Hello folks! I've been working on a Thunderscape Campaign Setting homebrew file for my local game and have come across a bit of a snag. I'm quite new to this software, writing user files especially, and have no idea how to accomplish what I want.

Basically it is a trait that gives you either a 0 level spell at 3/day or a 1st level spell at 1/day. If you take a level in a spellcasting class that has that spell on its spell list, you add it to your spells known and lose the SLA.

I've got the SLA working properly with the dropdown and everything, but I have no idea how to get it to add to spells known.
 
That sounds similar to an existing feat or trait. You could have a look at how those work to see how to have the spells added to your new trait.
 
I looked at the trait that gave spell as spell like ability but I don't think there's anything that adds it to spells known. I could be wrong, and if so since pathfinder rules are OGL I'd love a suggestion as to what it is.
 
First of all, how are you handling the SLA bit?

One bit of advice would be to look at the tags which are on a known spell, and compare them to the tags on most SLAs, to see what is different and needs to be added/deleted.
 
I copied magical talent and gave it an additional dropdown for the ability score used for dc's (part of the talent). Then I made sure I had one trait for 0 level spell, 1 trait for 1st level spell, and that I put them both as magical traits.
 
Alright, that trait doesn't bootstrap anything, it just shows itself on the SLA list, I think. If you're already using the second selector for an attribute, you may need to come up with something else for that. Need that selector for this plan of action.

The trickiest part is going to be figuring out when it should switch from showing itself vs. adding to the spell list of spells known. Here is how I would approach it.

Step 1, in an eval script on the trait pull all sClass tags on the chosen spell to the trait. Also pull the ClsAllowSp and ClsScAllSp tags.

Step 2, in the same eval script, use those tags to generate a tag expression (store it in a string variable), then do a foreach through all casting classes on the hero.

Step 3, inside the foreach set a field (maybe abValue) on the trait to 1 (a flag to indicate we should be expanding a spell list rather than showing ourselves), and build a second tag expression (stored in a different string variable) of all valid classes we find.

Step 4, check our flag from the previous step. If it is 0 then we found no valid classes and should show ourselves (so assign the tags which will make us show on the SLA list and in the tracked resources table). If it is 1 then use the tag expression we built in the previous step to set up our usrCandid2 field to select between valid classes.

Step 5, in a seperate eval script which runs later than the first, check our flag. If we've used the second selector to choose what class should get expanded, push the ClsAllowSp tag we pulled in Step 1 to the chosen class.

Step 6, in an eval rule check our flag. We're valid if the flag is set to 0. Otherwise, check the spells on this hero to see if the one chosen by selector 2 has been added. If it hasn't, generate a validation error message mentioning the name and prompting the user to add it to the selected class.
 
A simpler option might be to have two different versions - one that's an SLA, the other that adds the spell to the spellcasting class. Then leave it up to the user to select the version that's correct for their character.
 
Back
Top