Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
chiefweasel
Senior Member
 
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322

Old August 31st, 2009, 04:36 PM
I am trying to find how I can determine if a class has spell use or not. Specifically I have the Battle Blessing feat which has a pre-req of Ability to cast paladin spells. How can determine if the Paladin has spell use yet?

I could check for the level to determine it that way, but this feat could be used with paladin varient classes who might not have spell use at all.

I run into the same thing with Druids and Mages, anyone have any idea where the item is to compare against? Thanks.
chiefweasel is offline   #1 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old September 1st, 2009, 03:32 AM
Chiefweasel this is a pre req script of mine that checks for the ability to cast 3rd level arcane spells

Code:
@valid = 0
    if (tagcount[Hero.Arcane] > 3) then
        @valid = 1
        endif
If you modify the Hero.Arcane to Hero.Divine and the >3 and follow it with if else statements then that may work for you. First by checking for the Divine tag of the paladin then checking for minimum spell level.
bodrin is offline   #2 Reply With Quote
chiefweasel
Senior Member
 
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322

Old September 1st, 2009, 04:30 AM
I was thinking of using the class level to check, but some class varients dont use spells. Such as the Holy Warrior, they give up spells for extra feats. There should be a "Thing" that indicates spells use though, much like the Wild Shape that druids get. You can test for the Wild Shape by it self, so you should be able to just test for pally Spells.
chiefweasel is offline   #3 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old September 1st, 2009, 05:33 AM
Similar problems cropped up for me when doing a ranger varient that does not use spells. First of all the modifications were not working as far as I could tell (I haven't gone back to look at it again). Secondly, I could subtract the # of spells a ranger normally gets at that level, but what if he has a high enough wisdom to get bonus spells? How do I account for that.

It would be simpler probably to just have an on/off switch for spells that could be detectable in the program.
Lawful_g is offline   #4 Reply With Quote
chiefweasel
Senior Member
 
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322

Old September 2nd, 2009, 07:04 AM
How about determining if a character can cast a specific level spell. I am looking at several feats in Complete Champion with the Prerequisite: Ability to cast 2nd-level spells. It could be any class though, anyone have any idea if its possible to determine this? thanks.
chiefweasel is offline   #5 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old September 2nd, 2009, 07:29 AM
The script I posted earlier checks for the ability to cast 3rd level Arcane spells and because the srd only recognises Divine and Arcane spells then I think this code could work or a variation of it, all you'd need to do is alter the spell level from 3 to 2 for each of the casting types.

@valid = 0
if (tagcount[Hero.Arcane] > 3) then
@valid = 1
endif

else
if (tagcount[Hero.Divine] > 3) then
@valid = 1
endif

Last edited by bodrin; September 2nd, 2009 at 07:32 AM.
bodrin is offline   #6 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old September 2nd, 2009, 07:52 AM
Here you go.

@valid = 0
if (tagcount[Hero.Arcane] >= 2 + 1) then
@valid = 1
elseif (tagcount[Hero.Divine] >= 2 + 1) then
@valid = 1
endif
Lawful_g is offline   #7 Reply With Quote
chiefweasel
Senior Member
 
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322

Old September 2nd, 2009, 07:58 AM
I'll give it a try and see what happens. Thanks.
chiefweasel is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 2nd, 2009, 09:25 AM
Quote:
Originally Posted by Lawful_g View Post
Similar problems cropped up for me when doing a ranger varient that does not use spells. First of all the modifications were not working as far as I could tell (I haven't gone back to look at it again). Secondly, I could subtract the # of spells a ranger normally gets at that level, but what if he has a high enough wisdom to get bonus spells? How do I account for that.

It would be simpler probably to just have an on/off switch for spells that could be detectable in the program.
Subract 99 spells per level, not just the exact number. It won't create any problems.

I do intend to add a "no spellcasting" switch to class variants. Eventually.

If that doesn't work, please email me the variant class at some point - It would be nice to have a starting point when I do my testing.
Mathias is online now   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 2nd, 2009, 09:27 AM
Quote:
Originally Posted by Lawful_g View Post
Here you go.

@valid = 0
if (tagcount[Hero.Arcane] >= 2 + 1) then
@valid = 1
elseif (tagcount[Hero.Divine] >= 2 + 1) then
@valid = 1
endif
And just as a reminder of some new programming conventions:
Code:
validif (tagcount[Hero.Arcane] >= 2 + 1)
validif tagcount[Hero.Divine] >= 2 + 1)
Will do exactly the same thing with less typing.
Mathias is online now   #10 Reply With Quote
Reply

Thread Tools
Display Modes

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:06 PM.


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