• 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

Feat prerequisite: doesn't have a different feat

egg_green

Well-known member
Greetings!

I just bought HeroLab at Gen Con, and I'm setting up houserules for my Pathfinder group (I can't wait for the datasets since we start next week, so I'm doing it myself. It's a good way to learn the system, if nothing else.)

Anyway, I'm adding Feats, and one of them has a prerequisite that the character *not* have another specific feat. How would I go about this? I tried this script:

Code:
valid = 1

if(#hasfeat[fLoneWolf]==1)
@valid = 0
endif

if(#hasfeat[fCountryBo]==1)
@valid = 0
endif

But I get an error:
"Syntax error in 'pre-requisite rule' script for Thing 'fCityBorn' on line 3 -> invalid use of a reserved word in script."

I suspect the problem is that I'm not allowed to use the #hasfeat[] macro in an if statement. If that is the case, how can I check for the feat "the long way"? If not, what am I doing wrong, and is there a better way to go about this?

Thanks!
--Emmanuel
 
Here's an example from the Warmind class:

Code:
@valid = 1
        if (#hasfeat[fLeader] <> 0) then
              @valid = 0
          endif

Looks like all you were missing was that <> means != or does not equal.
 
d'oh!

That makes sense. Is there any reference for the syntax of these scripts? It would be nice to be able to find that sort of thing without having to go to the forums.

Thanks so much!
--Egg
 
At 12:34 PM 8/21/2007, you wrote:
That makes sense. Is there any reference for the syntax of these scripts? It would be nice to be able to find that sort of thing without having to go to the forums.
There is a section in the Authoring Kit manual about this. You can access the Authoring Kit docs from the Windows Start menu, plus there is a link to it from within the User Manual. The section entitled "Scripting Basics" covers all of the language features.
 
Back
Top