• 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

Hiding/Disabling links unless Option_A exists?

Mettius

Well-known member
Hello again,

I have several options (via a linkset if it matters) for a given unit that I want only to be selectable/available if another option (call it OptionB) is already present/selected. Basically a prerequisite. Any advice on how to go about this?

From what I can glean from the documentation a live tag expression for the option (or link?) seems like it might be correct? If so, I've had no luck getting it to work.

For example: The option Bear_ArmS appears on a linkset applied to a whole slew of units. However, one of the links is for Bear_ArmS, which should only be available if the unit in question has Bear_Arm. (Some units have Deer_Arm, which aren't to be eligible for the upgrade).

The following code for "Live" on the option Bear_ArmS generates an error.
Code:
option[Bear_Arm]
Army Builder was forced to stop compilation after the following errors were detected:

Code:
Syntax error in 'live' tag expression for Option 'Bear_ArmS'
  -> Invalid tag template specified: 'option[Bear_Arm]'
 
Last edited:
I'm at work so I can't double check, but if I remember correctly, the live field must resolve a tag expression. That is not a tag expression that I'm aware of. To do what you want, have the first option add a tag to the unit and make the live field be a check for that tag.
 
If you need the options to only be visible if OptionB is selected, why not attach the linkset to OptionB? That way, whenever OptionB is selected, the linked options are automatically added to the unit.
 
I'm not sure I follow.

More detail:
I have a linkset for a list of options which are available to all units of the given race. The linkset has a mix of "upgrades" to standard equipment, as well as other flashy options like Medals of Valor/etc.

However, one of the options is an Armour upgrade (call it ArmPlus), however, per the game rules, it can only be taken if the unit as base gear has regular Armour (Arm) as opposed to Super Armour (SupArm), or Mega Armour (MegArm).

What I wanted to do was assign the linkset to all units on the roster, but just hide this particular "upgrade" unless the unit in question has Regular Armour (Arm). The upgrade isn't automatic, just an option that should only appear if the "prerequisite" option already exists.
 
If you add the option ArmPlus to the option Arm rather than in the linkset and have Arm in the universal linkset then when the user selects Arm AB will then display ArmPlus, you can add it the say way you add options to units
 
If you need the options to only be visible if OptionB is selected, why not attach the linkset to OptionB? That way, whenever OptionB is selected, the linked options are automatically added to the unit.

A complication here is that option[Bear_Arm] is defined in a generic.dat file, many races posses option[Bear_Arm] however I'm working in the RedBear.dat file (For the race Red Bears). option [Bear_Arm] is also used by Green Bears (GreenBear.dat) and Blue Bears (BlueBear.dat). However option[Bear_ArmS] is only available to the Red Bears race.

I've so far been confining anything Red Bear specific in the RedBear.dat file.

I was thinking this could be accomplished by a Live Tag Expression on option[Bear_ArmS]
With the code:
Code:
option[Bear_Arm]
or
Code:
Bear_Arm
But, I always get an error "invalid tag template specified".
 
Last edited:
If an option B is only available to certain races then use the roster tag, i.e. roster.RedBears (or what ever the race name is)

A live tag expression takes the format of tag group name.tag name

You can do other manipulation with it using logic tests ("&" or "|") or checking for highest tag etc (p96 of the AB creator pdf)
 
Back
Top