Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   Setting up a prereq (http://forums.wolflair.com/showthread.php?t=51128)

AndrewD2 October 23rd, 2014 08:56 PM

Setting up a prereq
 
I'm trying to setup a universal prereq for my Traits that states if you already have the opposite of the trait, you can't take the new one.

So I looked at Savage Worlds and saw the Arcane Backgrounds have a way to preclude spells from the backgrounds. I thought hey this sounds like what I'm trying to do, tried that and it didn't work but what I've done so far.

1) Create identity group on the traits called "Opposite"
2) Created a way to add the Opposite tag to the trait in the editor.
3) The DenySpell prereq forwarded the tag to the hero so I did the same thing
4) when I couldn't get the tagmatch to work, I tried an intersect of the Opposite and the HasTrait tag, and it looked like it worked, if I took Attractive, Unattractive was grayed out.

But then I noticed something, on the hero the Traits were showing as invalid, so I thought well that's odd, then I realized that every trait has an Opposite tag because of the identity group and when I forwarded it to the Hero the prereq then intersected with the HasTrait and its own Opposite tag.

Is there a way to only forward the added Opposite tag? Or a better way to go about this?

Mathias October 24th, 2014 08:28 AM

Here's how Shadowrun solved an issue like this:

(This is from the tags.1st file)

Code:

  <!-- These are generated as identity tags by condition monitors.  It's only
      here to establish it so the OverflowTo group can inherit from it -->
  <group
    id="Overflow"
    dynamic="yes">
    </group>

  <!-- Since we want to overflow from one condition monitor to another, the tags
      that identify the target need to be identity tags from the same component
      as the things that will use them, so this inherits all those tags.  That
      means that there are no OverflowTo tags on a condition monitor unless
      they've been placed there. -->
  <group
    id="OverflowTo"
    dynamic="yes"
    inherit="Overflow">
    </group>

P.S. Be very careful when working with inherit in tag groups - not having the group to inherit from above the group doing the inheriting in tags.1st is a crash bug.

Also, dynamic="yes" is necessary when adding a tag group definition for something that's an identity tag.

AndrewD2 October 24th, 2014 09:16 AM

Ace! Took me a few minutes to figure it out, but it works great. Thanks Mathias.


All times are GMT -8. The time now is 11:21 AM.

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