Colen's suggestion of using "lglx" is definitely the standard way of
enforcing whether a unit does or doesn't appear for a specific race. Aside
from "lglx", there really is no general purpose way of controlling this facet.
The "race" attribute controls whether a unit appears in the PRIMARY list of
units for a particular race. It has nothing to do with allies. For example,
if UnitA belongs to both RaceX and RaceY, you could create the unit under
RaceX and then assign the "race" attribute to also add it to RaceY. The
unit would then appear in the standard unit list for both RaceX and RaceY.
To make sure that units from one race OR another exist in the roster, the
proper solution is to use "trat". Specify a size of '0' for one of the
types and you'll get setup an exclusive relationship. Only one or the other
type can exist in the roster. Then you'll need to assign the appropriate
type to each unit.
To answer your last question, you can use either "tlmt" or "ulmt". Using
your example, the Persion army would be assigned an attribute like
"tlmt:gkskirmish-unit=1@max". The Barbarian army would have something like
"tlmt:gkhoplite-unit=1@max". The Greek skirmishing units would need to be
assigned the proper types of "gkskirmish", and the hoplites would need the
type "gkhoplite".
If you have lots of cross-dependent relationships, you can make effective
use of wildcards within your types. For example, lets say you have various
skirmishing units from different races. You could assign types like
"skirmishgk" for the Greeks and "skirmishba" for the Barbarians. If you
only needed to limit the number of generic skirmishing units, you could use
the type "skirmish?" in your rule, as this would match EITHER of the two
types. If you needed to control a specific type, you could spell the whole
thing out. This gives you a fair bit of flexibility and control, and it
limits the amount of extra work involved when writing the data files.
Hope this helps,
Rob
At 08:22 PM 5/26/2001 +0000, you wrote:
>--- In armybuilder@y..., Colen 'Skrillboy' McAlister <demandred@s...> wrote:
> > In every greek unit that cannot be used by the barbarians, add an
> > external attribute 'lglx:!race=ba' (or whatever the barbarian race
> > prefix is).
>
>
>That doesn't exactly sound like a lot of fun, the next
>few WAB supplements are going to add a LOT more races to
>the mix. The successor supplement (what I'm creating WAB
>files for) currently has about 20, with at least six more
>to add. And, naturally, most of these have their own distinct
>sets of units and a LOT of screwey ally rules. That is a lot
>of units to start delimiting what CANNOT be used where. It
>might be necessary in the end, but I at least want to explore
>my other options first.
>
>I did try the external attribute race:hg,ba with the intent
>that the hellenic greeks (hg) and barbarians (ba) could use
>the unit, but the Epirote successors (sp) could not.
>Unfortunately the race attribute doesn't appear to apply
>to its use with allies. Is that correct?
>
>I also have the case where a particular race (the successors)
>can bring EITHER greek allies OR barbarian allies, but not
>both. Again I tried to use trat in the parent army to enforce
>a limit, but that was unsuccessful.
>
>
>One other question, since I brought it up.

How can
>I limit the number of allied units of a particular unit?
>Say I've got greek hoplites and skirmishers, and they can
>be used as allies by both the persians AND the barbarians.
>The persians can use any amount of allied hoplites but 0-1
>skirmisher unit, and the barbarians can take 0-1 hoplite
>unit but any amount of skirmishers.
>
>I tried using tlmt but that didn't seem to apply to the
>types given to allies.
---------------------------------------------------------------------------
Rob Bowes (rob@wolflair.com) (650) 726-9689
Lone Wolf Development
www.wolflair.com