The Prerequisite System: Difference between revisions
ares |
Rain-Islet (talk | contribs) m [bot] Batch update {{Bugs}} templates. |
||
| Line 35: | Line 35: | ||
A "prerequisite group" refers to a list of structures, and any single one of them is sufficient to fulfill the type. See: [[Generic Prerequisites]]. | A "prerequisite group" refers to a list of structures, and any single one of them is sufficient to fulfill the type. See: [[Generic Prerequisites]]. | ||
{{bugs}} | =={{bugs}}== | ||
Only one building specified by <tt>PrerequisiteOverride=</tt> activates production, meaning that it's not a cumulative list like <tt>Prerequisites=</tt>. | Only one building specified by <tt>PrerequisiteOverride=</tt> activates production, meaning that it's not a cumulative list like <tt>Prerequisites=</tt>. | ||
* Ares can allow more types of prerequisite alternatives, see: https://ares-developers.github.io/Ares-docs/new/prerequisites.html | * Ares can allow more types of prerequisite alternatives, see: https://ares-developers.github.io/Ares-docs/new/prerequisites.html | ||
Latest revision as of 17:57, 2 July 2025
The Prerequisite System controls the conditions required to build a certain object. Those conditions are:
- Is this object's TechLevel valid?
- Checks if the TechLevel of the object is above -1 and below [MultiplayerDialogSettings]→TechLevel.
- Is this house not forbidden from owning this object?
- Checks if the house is not listed in ForbiddenHouses.
- Is this house allowed to own this object?
- Checks if the house is listed in RequiredHouses.
- Does this house own all the prerequisite structures?
- Checks if the house owns the prerequisite structures listed in Prerequisite
- Is this object stolen technology?

- If the unit contains RequiresStolenAlliedTech=yes, RequiresStolenSovietTech=yes, or RequiresStolenThirdTech=yes, has the apropriate lab get spied upon?
If all conditions are met, the house is theoretically allowed to build that object, signaled by a "New Construction Options" announcement.
Next, the game determines whether the house actually can build the object:
- Does the house own a Factory of the appropriate type?
- Checks whether the house has at least one structure with Factory matching the object's type.
- Can this house own this object?
- Checks if your Factory contains atleast 1 Owner listed as this units Owner.
- If the object in question is a VehicleType, does the house have a Factory=VehicleType with the same Naval setting as the object?
- Checks whether the house has a War Factory if it's trying to build land-based (Naval=no) vehicles, and whether it has a Shipyard if it's trying to build water-based (Naval=yes) vehicles.
Overrides
- If an object has a PrerequisiteOverride BuildingType (or multiple BuildingTypes) set, a house will be allowed to build the object as soon as it possesses any single one of those listed BuildingTypes, no matter what prerequisites the object usually requires. (Hence the name.)
- The same applies to objects from SecretLab=yes buildings: If a house gains an object through a Secret Lab, it will be allowed to build that object immediately, no matter what prerequisites the object usually requires. Such an object will be buildable even if it has TechLevel=11 set.
- In addition, AI players do not check Prerequisite and TechLevel tags when they're trying to build the Power Plants listed under GDIPowerPlant, NodRegularPower, ThirdPowerPlant
. - AI players also ignore all Prerequisite settings except TechLevel on all other objects, they build objects in the order dictated by the ai(md).ini file (the order of BuildingTypes is controlled by different methods covered here).
All cases under the presumption that the house owns a factory of the appropriate type.
Prerequisite Groups
A "prerequisite group" refers to a list of structures, and any single one of them is sufficient to fulfill the type. See: Generic Prerequisites.
Bugs/Side-Effects/Unexpected Limitations
Only one building specified by PrerequisiteOverride= activates production, meaning that it's not a cumulative list like Prerequisites=.
- Ares can allow more types of prerequisite alternatives, see: https://ares-developers.github.io/Ares-docs/new/prerequisites.html
At least in Red Alert 2 and Yuri's Revenge, the AI players ignore Prerequisites= for building queues, limited instead by AIBuildThis, Owner, RequiredHouses, ForbiddenHouses, and stolen tech requirements.
Also in Red Alert 2, the AITriggerTypes in ai(md).ini instruct the AI player to produce TaskForces disregarding Prerequisites altogether, as well as TechLevel, limited by other factors as above.