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)
-   -   Data and Multiple Sources (http://forums.wolflair.com/showthread.php?t=60370)

TCArknight March 15th, 2018 08:33 AM

Data and Multiple Sources
 
Howdy!

I am working on a dataset where items in the core book can be classified as being part of “Past Era”, “Present Era” or “Future Era”. This works fine with an Era source group and just the three selections.

My difficulty comes with sourcebooks. A sourcebook can add material to any or all of the eras. How can I make sure that an item added from a Sourcebook is only visible when the valid Era is also selected (I.e. both Past and Sourcebook 1 have to be selected for Past material from Sourcebook 1 to show)?

As it is, if an item has an Era and the Sourcebook selected, everything from the Sourcebook shows, regardless of Era.

Mathias March 15th, 2018 08:41 AM

I would add a component to every compset that needs to be era-specific. This component would consist only of a <containerreq> test that looks at a tag group that stores what eras are allowed for that item, comparing it against hero tags that are added by the sources, saying what eras are currently in use. You're basically recreating the sources mechanism with tags, but setting it up in a way that the era choice is independent of the book choice.

Then, the various books would be handled as normal sources.

TCArknight March 15th, 2018 09:44 AM

Quote:

Originally Posted by Mathias (Post 264429)
I would add a component to every compset that needs to be era-specific. This component would consist only of a <containerreq> test that looks at a tag group that stores what eras are allowed for that item, comparing it against hero tags that are added by the sources, saying what eras are currently in use. You're basically recreating the sources mechanism with tags, but setting it up in a way that the era choice is independent of the book choice.

Then, the various books would be handled as normal sources.

Hmmm.... If I understand correctly:

I would have an Era.? Tag group.

On the individual items that are limited by Era, they would receive a Era.Xx as appropriate.

The component, within the cointainerreq test would compare the Era.xx tag on the component with the Era source tag on the component and fail if they don’t match?

Mathias March 15th, 2018 09:50 AM

The containerreq on the component would compare the Era.xx tag on that thing/pick with the Era.xx tags on the hero, and fail if they don't match. The individual items would not set sources from the Era group - they would need to use a separate editor control to add one or more Era.xx tags

TCArknight March 17th, 2018 05:02 AM

Can you use heromatch, tagmatch or intersect in a containerreq? They seem to throw errors. :(

In this case, the hero has source.Present, and the thing has both Era.Present and Era.Future .

I’ve got just heromatch[source,Era] inside the containerreq and am getting an invalid syntax error.
Quote:

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

Syntax error in 'condition' tag expression for Thing 'fraAmbas'
-> Invalid tag template specified: 'heromatch[source,Era]'

Mathias March 17th, 2018 09:35 AM

This is a tag expression. Those are all things from the scripting code. You'll probably need to hard code all the comparisons (a separate pre-built comparison for each era).


All times are GMT -8. The time now is 07:37 AM.

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