Difference between revisions of "Requirements"

From HIVE
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 10: Line 10:
  
 
== Requirement Comparisons List ==
 
== Requirement Comparisons List ==
[[File:Requirements3.PNG]]
+
[[File:Requirements3.PNG|300px|thumb]]
This dropdown box contains the possible comparisons to use for your requirements.
+
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'''
  
'''Ability Allowed''' checks whether a particular ability is enabled and useable. For example, if Siege Mode is not yet researched for the Siege Tank, and you check if the Siege Mode Ability is Allowed,  this requirement will return false. If it becomes researched, the requirement will return true.
+
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.
  
'''And''' is placed inbetween two requirements. It means the entire requirement will return false unless both surrounding requirements are true.
+
=== Count category ===
 +
'''Count Ability''', '''Count Behavior''', '''Count Unit''', '''Count Upgrade'''
  
'''Behaviour Allowed''' checks whether a particular behaviour is enabled and useable.  
+
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.
  
'''Constant''' checks if the above requirement is equal to a constant number.
+
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).
  
'''Count Ability'''  
+
=== 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
  
INCOMPLETE
+
=== 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
  
  
Line 30: Line 52:
 
[[Category:Reference]]
 
[[Category:Reference]]
 
[[Category:Data Editor]]
 
[[Category:Data Editor]]
 +
[[Category:Catalogs]]

Latest revision as of 07:50, 17 May 2011

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