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
Dastir
Member
 
Join Date: Sep 2008
Posts: 48

Old June 29th, 2009, 07:52 AM
I am entering in the Radiant Servant prestige class, and one of the abilities grants an extra cleric domain. I have created a class special and have How do I increase the number of domains allowed? On the Class Special, I have an eval script that runs on Post-Attributes (Users), Priority 10000 and looks like this:

Code:
if (hero.tagcount[Classes.RadiantS] >= 5) then
   linkage[table].field[cGiveSpec].value += 1
endif
I pulled the code from another thread and modified it.

The code compiles when I hit test, but when the special is applied, I get an error:

"Linkage pick 'table' not located for current context"

Help?
Dastir is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 29th, 2009, 09:30 AM
It looks link the "linkage[table]" is only accessible from the domain - your script is running from the class.

Here's how to go about solving this - add a level of cleric, and go to the develop menu, then select "Floating Info Windows" and then "Show Selection Fields". In the list that comes up, select the second cleric thing (the one that starts with cHelp - the class helper has most of the information about a class).

Now, go to the Cleric tab, and select a domain. Watch the floating info window for what changes. The answer is actually field[cGiveSpec].value, but I was trying to walk you through the generic procedure for finding information about a class in HL.

So,
Code:
 
if (hero.tagcount[Classes.RadiantS] >= 5) then
hero.childfound[cHelpClr].field[cGiveSpec].value += 1
endif
Ought to work. What was happening was that the linkage[table] transitioned the script's context from the domain where it started to the class it was being attached to, and then modified the value. In this version, we transition to the hero, and then specifically to the cleric class, and then we access the field.

Oh, and I used "childfound[cHelpClr]" instead of "child[cHelpClr]" because it is possible that a user will add the prestige class without having added cleric levels - it that happens, you want the script to do nothing, rather than putting up an error message.

Last edited by Mathias; June 29th, 2009 at 09:31 AM. Reason: Switched to childfound
Mathias is offline   #2 Reply With Quote
Dastir
Member
 
Join Date: Sep 2008
Posts: 48

Old July 18th, 2009, 01:44 PM
Worked perfectly thanks!

And extra thanks for teaching me how you did it - that will help greatly in the future.
Dastir is offline   #3 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 02:02 AM.


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