Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Nightchilde
Junior Member
 
Join Date: Jan 2007
Posts: 9
Send a message via AIM to Nightchilde

Old January 17th, 2007, 10:35 AM
How do you do an "or" statement, specifically in regards to feat prerequisites.

For instance, "Intelligence 17 or elf."

(and if it's as simple as putting the word "or" in somewhere, I'm gonna cry.) :lol:
Nightchilde is offline   #1 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 18th, 2007, 03:10 AM
Pre-requisites are always treated as separate conditions that are AND'd by HL. So an "or" would need to be implemented as its own complete pre-requisite.

You can start by copying another feat that has a requirement of an ability score minimum. I'll use Power Attack for this example. It has a pre-requisite with the following script.

*** if (child[aSTR].field[aNormal].value >= 13) then
***** @valid = 1
***** endif

Changing that over to verify a minimum Int of 17 gives you the following.

*** if (child[aINT].field[aNormal].value >= 17) then
***** @valid = 1
***** endif

We also need to factor in the separate test of the Elf race. A quick look at the hero tags using the debugging aids shows a tag of "Race.Elf" when I've chosen the Elf race for my hero. So the other test we need to make is to look for this tag. Since HL's scripting is very simple and doesn't allow for complex boolean expressions within "if/then" tests, we modify the script as shown below.

*** if (child[aINT].field[aNormal].value >= 17) then
***** @valid = 1
*** elseif (tagis[Race.Elf] <> 0) then
***** @valid = 1
***** endif

The net result is a single pre-requisite that checks both requirements. The script first tests if the Int is high enough and marks the prereq as valid if so. If that isn't satisfy, the script then tests if the "Race.Elf" tag is present, making the prereq as valid if so. When the script ends, if either condition is satisfied, the "@valid" special symbol is non-zero - just the way we want it. If not, the value is zero and the prereq fails - just the way we want it.

Hope this helps,
Rob

P.S. You'll find "tagis" documented in the Authoring Kit. It simply tests whether a tag is present or not, returning 1 if a tag is found and 0 if not.


At 11:35 AM 1/17/2007, you wrote:

Quote:
How do you do an "or" statement, specifically in regards to feat prerequisites.

For instance, "Intelligence 17 or elf."

(and if it's as simple as putting the word "or" in somewhere, I'm gonna cry.) [img]./modules/mdforum/images/smiles/icon_lol.gif[/img]
rob is offline   #2 Reply With Quote
Nightchilde
Junior Member
 
Join Date: Jan 2007
Posts: 9
Send a message via AIM to Nightchilde

Old January 18th, 2007, 03:39 AM
Ah. Cool. I'll give it a shot!
Nightchilde is offline   #3 Reply With Quote
Nightchilde
Junior Member
 
Join Date: Jan 2007
Posts: 9
Send a message via AIM to Nightchilde

Old January 19th, 2007, 07:21 AM
Next question: How would you script a feat that gives an additional class skill (for example, Education in the Eberron CS gives you all knowledge skills as class skills)?
Nightchilde is offline   #4 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 25th, 2007, 08:13 PM
At 08:21 AM 1/19/2007, you wrote:
Quote:
Next question: How would you script a feat that gives an additional class skill (for example, Education in the Eberron CS gives you all knowledge skills as class skills)?
This one is out of my depth, so I've flagged it to Colen. He should get back to you on this shortly.

-Rob
rob is offline   #5 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old January 26th, 2007, 02:14 PM
At 08:21 AM 1/19/2007, you wrote:
>Next question: How would you script a feat that gives an additional
>class skill (for example, Education in the Eberron CS gives you all
>knowledge skills as class skills)?


Hi,


It's currently not possible to grant a character all knowledge skills
as class skills, only individual classes. However, I just added
support for doing that to the data files, so it should be included in
the next release (which should be out soon). Once you get hold of it,
check the "How To" section of the manual for details.


Thanks!



--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
Colen is offline   #6 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 09:36 AM.


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