Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old December 2nd, 2010, 06:03 AM
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.
Sendric is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 2nd, 2010, 08:09 AM
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.
Mathias is online now   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 2nd, 2010, 08:19 AM
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.
Mathias is online now   #3 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old December 2nd, 2010, 08:31 AM
Quote:
Originally Posted by Mathias View Post
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.

Quote:
Originally Posted by Mathias View Post
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.
Sendric is offline   #4 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old February 29th, 2012, 10:35 AM
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?
Sendric is offline   #5 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:19 PM.


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