• 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

Adding spells to spell list

AndrewD2

Well-known member
I've got a custom ability that that adds a couple of spells to the classes spell list. I've created the spells at the new level and didn't apply and class tags because I don't want every version of this class to get them. The classes spells are memorized like a cleric/paladin. So for adding the spells to the spell list I figured I'd have to do like the feat Unsanctioned Knowledge and it uses pulltags and pushtags to add the spells. Ok that shouldn't be a big deal, but I have one problem that I can't find examples of.

the code on the feat is:

Code:
        perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?]
        perform hero.childfound[cHelpPal].pushtags[ClsAllowSp.?]

Well the pushtags part is easy, I just need to change the paladin helper to my class helper, but what I'm not sure is the transition to get to the spell without using the usrChosen1 field. I'm not sure what usrChosen1 actually fills in there. Any help?

Thanks Andrew
 
I'm not sure what usrChosen1 actually fills in there. Any help?
usrChosen1 is like a Pointer to the "Thing" or "pick" that a gamer chooses from a drop down box. Its a generic variable name that references what was selected. Most likely in this case it references a spell that was chosen from a drop down list.

My advice is why not just put the ClsAllowSp.? tags directly on to your custom ability Thing. Then all you need is the Push part of the logic. Assuming that it sounds like you have specific spells you want to add.

So lets say you have spells spSpellA and spSpellB for your new class. On the "Custom Ability" add the tags ClsAllowSp.spSpellA and ClsAllowSp.spSpellB.

Then your script just needs to do the following:
Code:
perform hero.childfound[cHelpXXX].pushtags[ClsAllowSp.?]

The above takes the tags that exist on your Custom Ability and pushes it to the class.

To really make the code above "generic" in its use you can use's Mathia's great Location Location thread to get how to transition from a Custom Ability to its parent class without knowing the parent class.

Code:
perform linkage[table].pushtags[ClsAllowSp.?]
 
Back
Top