Requirements (SEV)
From SEWiki
Requirements determine whether a particular game object can be utilized by an empire. Most often, requirements set which technologies at which levels are required. This is especially true of technologies, facilities, and components. Even cultural achievements have requirements. An object may have as many requirements as is necessary to determine whether it can be used, and when there are multiple requirements, they can be evaluated in several different ways.
Contents |
Structure of a Requirement Block
| Field Name | Allowed Values | Description |
|---|---|---|
| Number Of Requirements | Integer | Total Number of All Requirements |
| Requirements Evaluation Availability | Evaluation Type | When using multiple requirements, this determines how they are evaluated together to determine if the requirements are met. |
| Requirements Evaluation Allows Placement | TRUE | FALSE | Tells the game whether the object can be placed in a vehicle. (used for components) |
| Requirements Evaluation Allows Usage | TRUE | FALSE | |
| Requirements <n> Description | Any Text | This is what is displayed in the description when the object is examined in the game, where <n> is the number of the requirement being described. |
| Requirements <n> Formula | Formula Expression | When using multiple requirements, this determines how they are evaluated together to determine if the requirements are met, where <n> is the number of the requirement the formula applies to. |
Sample Requirement Block
Number Of Requirements := 2
Requirements Evaluation Availability := AND
Requirements Evaluation Allows Placement := TRUE
Requirements Evaluation Allows Usage := TRUE
Requirement 1 Description := Empire must have at least tech level 5 in Huge Hull Construction.
Requirement 1 Formula := Get_Empire_Tech_Level("Huge hull Construction") >= 5
Requirement 2 Description := Empire must have at least tech level 5 in Large Base Construction.
Requirement 2 Formula := Get_Empire_Tech_Level("Large Base Construction") >= 5
Uses of Requirements
Requirements determine the availability of an object through the use of functions. Most often a requirement checks for the empire's level in a particular technology or racial trait. However, while this is the most common use, a Requirement may additionally (or only) check a variety of things, such as the existence of another object or even whether an empire has no homeworlds left. If you want to make an object available at all times, simple set the Number of Requirements to 0 and get rid of the other fields below it (they are only required if you have requirements).
Requirements for Facilities and Components
In Facilities and Components, the first Requirement (Requirement 1) stated may also perform the function of setting the Level Progression of that object. The most common progressions are linear progression, such that each time you gain a level in a tech, you gain a level for the linked facility or component. Additionally, though the default game does not utilize this, it may also be used to create many alternative level progressions. Some examples of alternative level progressions are provided below.
Sample Requirement Formulae
Alternative Level Progression Formulae
Linear Progression Formula (at every level)
The following formula increases the level of the object every time a level is gained in the specified Tech Area. This occurs from the Start Level (an integer) and continues until the Maximum Level is reached.
Formula
Formula := Get_Empire_Tech_Level(Tech Area) >= (Start Level + ([%Level%] - 1))
Sample
This sample gives the object a level at every level after the empire reaches level 5 in Centralized Computer Systems.
Requirement 1 Formula := Get_Empire_Tech_Level("Centralized Computer Systems") >= (5 + ([%Level%] - 1))
Linear Progression Formula (at every n levels)
The following formula increases the level of the object every time the number of levels specified by the interval are gained in the specified Tech Area. This continues until the Maximum Level is reached.
Formula
Formula := Get_Empire_Tech_Level(Tech Area) >= ([%Level%] * interval)
Sample
This sample give the object a level every other time the empire gains a level in Centralized Computer Systems.
Requirement 1 Formula := Get_Empire_Tech_Level("Centralized Computer Systems") >= ([%Level%] * 2)
