Requirements

From HIVE
Jump to navigation Jump to search

Requirements are used by the Data Editor to hide or show abilities, units, and upgrades based on whether the requirement is met or not. Requirements1.png

Requirement Nodes

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.

Requirements2.PNG 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

Requirements3.PNG

This dropdown box contains the possible comparisons to use for your requirements. There are several categories.

Allowed category

Ability Allowed, Behaviour Allowed, Unit Allowed, Upgrade Allowed

These simply return true if the given catalog object is allowed. This has nothing to do with research/tech tree progress, it simply tests whether the unit isn't disabled (via triggers) for this map.

Count category

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).

Mathematical operations

These nodes allow for simple mathematical operations. Mostly, they require two sub-nodes to perform the operation on. Following operations are avaiable:

  • Sum
  • Modulus
  • Division

And following comparsions:

  • Equals
  • 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

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