• 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

Add bonus domain

Dastir

Well-known member
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?
 
It looks link the "linkage
" 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
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:
Worked perfectly thanks!

And extra thanks for teaching me how you did it - that will help greatly in the future.
 
Back
Top