• 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

Help making bonus class skills for Clerics based on Deity

BiggDawg

New member
Hello

I was looking to get some advice on how to make an Eval Script that will add a specific class skill to a cleric character based on their deity selection. I was having trouble setting it up as an if then statement and kept getting errors. I had it set up once before but lost the files. It was an Eval Script on the deity itself that checked if the character was a cleric and if it was it gave them a class skill. Any advice is appreciated. Thanks!
 
Last edited:
That is kind of like how I made it so that Fighters get Perception as a Class skill.

Make a mechanic.
Pre-Levels 5000

Make an if statement.
Code:
if (#levelcount[Cleric] > 0) then
    if (HasDeity.(name)) then
          #makeclassskill[skWhatever]
    endif
endif

I am not sure of the specific wording, but it will probably use HasDeity.(name). I would need to play around with it to get it right, but anyway, have all of the HasDeity if-statements within the cleric > 0 levels statement
 
I was looking to get some advice on how to make an Eval Script that will add a specific class skill to a cleric character based on their deity selection.
You don't mention what this script will run on? SeeleyOne assumed its a global rule so said a Mechanic. But is this a feat, archetype ability, new class ability, or trait? It can make a small difference how the script is written.

That is kind of like how I made it so that Fighters get Perception as a Class skill.

Make a mechanic.
Pre-Levels 5000
If your using the "#levelcount[]" macro you need to be in "Post-Levels" phase to work. Otherwise the levels will not have been added yet to the character.

Code:
if (#levelcount[Cleric] > 0) then
    [B]if (HasDeity.(name)) then[/B]
          #makeclassskill[skWhatever]
    endif
endif
This is really close actually but the highlighted code above won't work. You have to tell the script "where" to test for the existence of the tag. In this case you will want to check the hero. Also their is a macro #hasdeity[] built for checking that makes it easy to do.

Code:
~ If we have cleric levels then proceed.
if (#levelcount[Cleric] > 0) then
    ~ Check that we have a specific god A
    if (#hasdeity[[B]UNIQUE_ID_GOES_HERE[/B]]) then
          #makeclassskill[[B]UNIQUE_ID_GOES_HERE[/B]]
    ~ Check that we have a specific god B
    Elseif (#hasdeity[[B]UNIQUE_ID_GOES_HERE[/B]]) then
          #makeclassskill[[B]UNIQUE_ID_GOES_HERE[/B]]
    endif
endif
 
Yeah, I knew that part of it was not quite done, i did not have a chance to see how the hasdeity works. But regarding the timing, it actually does work with the Fighter class levels. I have it give Fighters a perception class skill. I had initially tried thr post lebels, as you are right that is how it normally works. But in tjis case it only worked earlier. Weird, huh?
 
Going back to my fighter version, it works in both pre- and post-levels if the timing is 5000. I think that maybe it did not work before was because I had the timing be 10000 in post-levels.
 
Actually Shadow you don't need to be post-levels for level count. In fact there's a post somewhere the specifically says the only time you should be using levelcount in an eval script was if you needed to count your levels BEFORE Post-Levels (and a couple of corner cases where you need to count levels for different classes besides your current one). That only applies to Class Specials, but I'd assume the using it before Post-Levels would apply to any script.
 
Actually Shadow you don't need to be post-levels for level count. In fact there's a post somewhere the specifically says the only time you should be using levelcount in an eval script was if you needed to count your levels BEFORE Post-Levels (and a couple of corner cases where you need to count levels for different classes besides your current one). That only applies to Class Specials, but I'd assume the using it before Post-Levels would apply to any script.
Ok then it must be using the "Classes.?" tags to do the counting. In that case yea you can go before Post-Level as they are applied somewhat early. The "tHitDice" value fields are not calculated until Post-Level/100 or so.

I actually have stopped using some macros as I didn't like that I was blind to what it was counting/doing. So often would just do "hero.tagcount[Classes.?]" to count all class levels.

I like the idea of the macros but with the number of different languages and system packages I write in I like to be "verbose" in my code. Even if its a tad longer to write I don't have to make any assumptions about what is happening.

So my bad. Nothing to see here. Just move along. ;)
 
Originally I had the script run on the deity itself, so that whenever someone selected the deity it checked if the character was a cleric and then gave them the class skill.
 
Back
Top