• 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 powers to powers available list

Sendric

Well-known member
Ok, I had something that seemed to work yesterday, but it doesn't today so now I'm stumped again.

I took some scripts from the Mystic that someone did. The Mystic uses domains like a Cleric does, but Psionic Mantles don't work exactly the same way as domains. Instead of granting a bonus spell (power), Mantle powers are the only powers the character can choose from. Even so, I'm trying to handle things in a similar fashion since I don't really have any other ideas. There seems to be multiple steps involved. The class I'm working on is called Ardent.

When creating the custom ability (in this case, Chaos Mantle), I put in the following Eval Script:

Code:
Final Phase, 10000

perform delete[Helper.ShowSpec]

  ~ Check through all our spell levels, if we can cast spells of that level, add 1 for the bonus spell from our domain. This will be enforced through an eval rule.

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[1] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[1] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[2] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[2] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[3] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[3] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[4] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[4] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[5] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[5] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[6] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[6] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[7] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[7] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[8] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[8] += 1
endif

if (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[9] <> 0) then
    hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[9] += 1
endif

Then added this as one of the Eval Rules:

Code:
Validation Phase; 20000

 validif (hero.childfound[cHelpArd].field[cKnowMax].arrayvalue[1] = 0)
 validif (hero.pickexists[sCha20000] <> 0)

It's also unclear to me if I need to specify the class when I create the power. For example, when I create the power, do I need to set "Power Class" to Ardent? When I do that, the powers show up in the classes available powers list before selecting the mantle, so I'm guessing that's wrong. It's weird that yesterday I did this and the power was there, but grayed out until I selected the mantle. Today, it's no longer grayed out. Apparently HL changed its mind about how to handle my craptastic coding.

Anyway, what I ultimately need to be able to do is add certain powers to the available powers list after someone has selected a mantle. Any help would be greatly appreciated.
 
The power class is the class that gets those powers, so yes, if you tell HL that this is a power for the Ardent class, it'll be available for Ardents to select.

For that set of cKnowMax stuff you've added - does it do anything? The cKnowMax field's name is "Maximum Known Spell Count" so I'm surprised it's working for a psionic character.
 
The first option in the Power Class list is "New Tag" - try making a new tag for this mantle.

Then, have the mantle assign the power class tag you've created to go with it to the class:

Code:
perform hero.childfound[cHelpArd].assign[psiClass.manXXXXX]

Do that before Post-Attributes/10000, and that tag will get incorporated into the list of powers the ardent class can choose from.
 
For that set of cKnowMax stuff you've added - does it do anything?

Probably not. I can pretty safely say that anything I use doesn't necessarily do anything. I subscribe to the Copy, Paste, and Pray methodology of programming.

The first option in the Power Class list is "New Tag" - try making a new tag for this mantle.

Then, have the mantle assign the power class tag you've created to go with it to the class:

Code:
perform hero.childfound[cHelpArd].assign[psiClass.manXXXXX]

Do that before Post-Attributes/10000, and that tag will get incorporated into the list of powers the ardent class can choose from.

That worked beautifully. Thanks.
 
Is there a way to do the same thing as this but across all manifester classes? I tried using a foreach loop like this:

Code:
foreach pick in hero from BaseClass where "Custom.Manifest"

 perform hero.childfound[???].assign[psiClass.IllLeg]

nexteach

Unfortunately, I'm not sure A) if "Custom.Manifest" will locate all Manifester classes or B) what to put in the brackets where I have ???. Am I on the right track here, or should I code in each class individually?
 
Back
Top