Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   A Special Kind of Case - Adding SLA to Spells Known (http://forums.wolflair.com/showthread.php?t=56391)

chaoscowboy August 11th, 2016 08:37 PM

A Special Kind of Case - Adding SLA to Spells Known
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.

Farling August 12th, 2016 12:58 AM

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.

chaoscowboy August 12th, 2016 07:04 AM

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.

Aaron August 12th, 2016 07:08 AM

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.

chaoscowboy August 12th, 2016 07:14 AM

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.

ShadowChemosh August 12th, 2016 09:59 AM

The trait that adds to a spellbook/spells known is Two-World Magic. If you get time take a look at that one for help.

Aaron August 12th, 2016 10:23 AM

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.

Mathias August 12th, 2016 10:27 AM

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.

All times are GMT -8. The time now is 06:54 AM.

Powered by vBulletin® - Copyright ©2000 - 2021, vBulletin Solutions, Inc.
wolflair.com copyright 1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.