• 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

I must be getting used to this...

Erich

Well-known member
I actually managed to figure out the code to require a character NOT have a specific hindrance to take an edge.
Feeling kinda proud of myself at the moment :D.

-Erich
 
Sure thing.
This particular line would require that the hero not have the bad eyes hindrance.
Code:
hero.tagis[Hindrance.hinBadEyes] <>1
If you want to require a hindrance the code is
Code:
hero.tagis[Hindrance.hinBadEyes] <>0
 
The way that I have found I prefer is to use Pick-Reqs. Then do the checkmark for "Preclude selection if present" if I want it to preclude it. You can then put the edge, hindrance, race, racial ability, group, or whatever that is true/false (on/off) as desired.

I am not saying that your way is bad. It works, so therefore It Is Good. I mention my way because I am efficiently lazy and the least that I actually enter manually the better. :)
 
I'm with SeeleyOne on that. Pick-Reqs is the easier way to go, but if you need it to happen conditionally (like only allow this Edge to be taken if this one thing is true AND/OR you do or don't have this other Edge) then knowing a code way to do it as well is really, really helpful. So for that, nice find!
 
Erich, what you found was one of the great uses of tags. Almost every item has an identity tag you can test for.

In this case, the pick-req system was designed to handle this for you.

If you wanted to test for something else, like if a weapon was two-handed (tagis[Equipment.TwoHand] <> 0) or if a Hindrance was Major (tagis[User.HindMajor] <> 0), then the other method would be needed.
 
Back
Top