Requirements are used by the Data Editor to hide or show abilities, units, and upgrades based on whether the requirement is met or not.
Requirement nodes are the editor's way of displaying the different requirements. The Use node enables an ability, unit, or upgrade if the requirement is true. The Show node only displays the ability, unit, or upgrade.
Here you can see the requirements editor. There are two views you can use to look at your requirements: Tree view, and Expression view. In tree view, you can see there is one main folder, which has the same name as your requirement. This is in fact the requirement. Underneath it, there are the Use and Show nodes. You can add new requirement nodes within those nodes, which will be what actually do the requirements.
Requirement Comparisons List
This dropdown box contains the possible comparisons to use for your requirements. There are several categories.
Ability Allowed, Behaviour Allowed, Unit Allowed, Upgrade Allowed
Count Ability, Count Behavior, Count Unit, Count Upgrade
Generally it counts a number of occurences of given object for current player (the one on whom this requirement is tested). If this is put directly as condition, 0 means false, anything higher than 0 is true.
There are a number of suboptions, specifying which objects to count. This list is same for all 4 count nodes, some combinations doesn't make sense (like count queued behaviors). All on unit nodes specify to count objects belonging to the current unit (the one on which the requirement is tested).
These nodes allow for simple mathematical operations. Mostly, they require two sub-nodes to perform the operation on. Following operations are avaiable:
And following comparsions:
- Not equal to
- Less than
- Less than or equal to
- Greater than
- Greater than or equal to
- Odd number (uses only one sub-node)
And one special:
- Constant - usually used in comparsion nodes
Logical operations allow to build more complex conditions. And - true only if both sub-nodes are true Or - true if at least one sub-node is true Not - true if the sub-node is false Exclusive Or (XOR) - true if exactly one of the subnodes is true