• 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

Defining negative pre-reqs for prestige class

direinsomniac

Well-known member
I am working to define the pre-reqs for a prestige class in which the character must not be able to cast arcane spells or use arcane spell-like abilities.

But I am running into trouble in adapting the existing codes that check for the ability to cast arcane spells, but I keep getting this error message:

Hero Lab was forced to stop compilation after the rolling errors were detected:

Syntax error in 'pre-requisite rule' script for Thing 'cMagSlayer' on line 1
-> Error parsing left-side expression in relational comparison

I have tried using:

(tagis[Hero.SpontArc] and (tagis[Hero.Arcane]

with >= 0, <> 0, /= 0, >< 0

none of which work.


Anyone have ideas on how to make this work?
 
HL scripting does not have "AND" or "OR" statements. You can do them sort of but its a little different.

So in this case do:
Code:
hero.tagis[Hero.SpontArc] + hero.tagis[Hero.Arcane] <> 0
Means check each tag and add the results together and then make sure its not 0. So if both are found you will have an answer of 2 or if one or the other is found you will have an answer of 1. In both cases you will NOT be equal to zero.
 
I didn't mean that I had tried them together, I just meant that I had tried those two phrases trying to get the script to work.
 
So, if I understand correctly, you want an error to be thrown if the hero can cast arcane spells? There isn't really a good way to detect whether any spell like abilities are arcane or divine, so we'll have to ignore that.

So, the ability to cast arcane spells is marked by the Hero.Arcane tag, you already discovered. If we have 0 of those tags, we can't cast Arcane spells and should be valid, so the expr-req is simply:

Code:
hero.tagis[Hero.Arcane] = 0

If you're using a pre-req script instead

Code:
validif (hero.tagis[Hero.Arcane] = 0)
 
Back
Top