The Prerequisite System: Difference between revisions
Added SecretLab / TL=11 note, {{yro}} on ThirdPowerPlant, AI notes |
RockPatch is no longer used by community |
||
(18 intermediate revisions by 8 users not shown) | |||
Line 3: | Line 3: | ||
| | | | ||
; Is this object's TechLevel valid? | ; Is this object's TechLevel valid? | ||
: Checks if the TechLevel of the object is above -1 and below [{{ | : Checks if the TechLevel of the object is above -1 and below [{{f|MultiplayerDialogSettings|link}}]→{{f|TechLevel|link}}. | ||
; Is this house not forbidden from owning this object? | ; Is this house not forbidden from owning this object? | ||
: Checks if the house is not listed in {{ | : Checks if the house is not listed in {{f|ForbiddenHouses|link}}. | ||
; Is this house allowed to own this object? | ; Is this house allowed to own this object? | ||
: Checks if the house is listed in {{ | : Checks if the house is listed in {{f|RequiredHouses|link}}. | ||
; Does this house own all the prerequisite structures? | ; Does this house own all the prerequisite structures? | ||
: Checks if the house owns the prerequisite structures listed in {{ | : Checks if the house owns the prerequisite structures listed in {{f|Prerequisite|link}} | ||
; Is this object stolen technology?{{yro}} | |||
: If the unit contains {{f|RequiresStolenAlliedTech|link}}<tt>=yes</tt>, {{f|RequiresStolenSovietTech|link}}<tt>=yes</tt>, or {{f|RequiresStolenThirdTech|link}}<tt>=yes</tt>, has the apropriate lab get spied upon? | |||
|} | |} | ||
If all conditions are met, the house is ''theoretically allowed'' to build that object, signaled by a [[EVA_NewConstructionOptions|"New Construction Options"]] announcement.<br> | If all conditions are met, the house is ''theoretically allowed'' to build that object, signaled by a [[EVA_NewConstructionOptions|"New Construction Options"]] announcement.<br> | ||
Line 17: | Line 17: | ||
:{|style="border: 1px solid #aaaaaa; background:#e5e5e5; border-spacing: 5px;" | :{|style="border: 1px solid #aaaaaa; background:#e5e5e5; border-spacing: 5px;" | ||
| | | | ||
; Does the house own a {{ | ; Does the house own a {{f|Factory|link}} of the appropriate type? | ||
: Checks whether the house has at least one structure with {{ | : Checks whether the house has at least one structure with {{f|Factory|link}} matching the object's type. | ||
; If the object in question is a VehicleType, does the house have a {{ | ; Can this house own this object? | ||
: Checks whether the house has a War Factory if it's trying to build land-based ({{ | : Checks if your {{f|Factory|link}} contains atleast 1 {{f|Owner|link}} listed as this units {{f|Owner|link}}. | ||
; If the object in question is a VehicleType, does the house have a {{f|Factory|VehicleType|link}} with the same {{f|Naval|link}} setting as the object? | |||
: Checks whether the house has a War Factory if it's trying to build land-based ({{f|Naval|no|link}}) vehicles, and whether it has a Shipyard if it's trying to build water-based ({{f|Naval|yes|link}}) vehicles. | |||
|} | |} | ||
'''Note:''' If you do not have the appropriate type of {{ | '''Note:''' If you do not have the appropriate type of {{f|Factory|VehicleType|link}}, but all other prerequisites are fulfilled, you will probably experience the [[EVA_NewContructionOptions#NCO_Bug|NCO bug]]. | ||
==Overrides== | ==Overrides== | ||
*If an object has a {{ | *If an object has a {{f|PrerequisiteOverride|link}} 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 | *The same applies to objects from {{f|SecretLab|yes|link}} 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 {{f|TechLevel|11|link}} set. | ||
*In addition, AI players do not check {{ | *In addition, AI players do not check {{f|Prerequisite|link}} and {{f|TechLevel|link}} tags when they're trying to build the Power Plants listed under {{f|GDIPowerPlant|link}}, {{f|NodRegularPower|link}}, {{f|ThirdPowerPlant|link}}{{yro}}. | ||
*AI players also ignore all {{ | *AI players also ignore all {{f|Prerequisite|link}} settings except {{f|TechLevel|link}} on all other objects, they build objects in the order dictated by the {{Ini|ai}} file (the order of BuildingTypes is controlled by different methods covered [[AI base building|here]]). | ||
''All cases under the presumption that the house owns a factory of the appropriate type.'' | ''All cases under the presumption that the house owns a factory of the appropriate type.'' | ||
==Prerequisite Groups== | ==Prerequisite Groups== | ||
A "prerequisite group" refers to a list of structures, and any single one of them is sufficient to fulfill the "prerequisite group". The following "prerequisite groups" are valid: | A "prerequisite group" refers to a list of structures, and any single one of them is sufficient to fulfill the "prerequisite group". The following "prerequisite groups" are valid: | ||
* POWER (corresponds to {{ | * POWER (corresponds to {{f|PrerequisitePower|link}}) | ||
* PROC (corresponds to {{ | * PROC (corresponds to {{f|PrerequisiteProc|link}} and {{f|PrerequisiteProcAlternate|link}}{{yro}}) | ||
* BARRACKS (corresponds to {{ | * BARRACKS (corresponds to {{f|PrerequisiteBarracks|link}} for human players, {{f|BuildBarracks|link}} for AI) | ||
* FACTORY (corresponds to {{ | * FACTORY (corresponds to {{f|PrerequisiteFactory|link}}) for human players, {{f|BuildWeapons|link}} for AI) | ||
* RADAR (corresponds to {{ | * RADAR (corresponds to {{f|PrerequisiteRadar|link}}) | ||
* TECH (corresponds to {{ | * TECH (corresponds to {{f|PrerequisiteTech|link}}) | ||
In Firestorm, two additional groups | In Firestorm, two additional groups are available: | ||
* GDIFACTORY (corresponds to {{ | * GDIFACTORY (corresponds to {{f|PrerequisiteGDIFactory|link}}) | ||
* NODFACTORY (corresponds to {{ | * NODFACTORY (corresponds to {{f|PrerequisiteNodFactory|link}}) | ||
[[Category: Systems]] | [[Category: Systems]] |
Latest revision as of 18:26, 20 May 2021
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.
Note: If you do not have the appropriate type of Factory=VehicleType, but all other prerequisites are fulfilled, you will probably experience the NCO bug.
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 "prerequisite group". The following "prerequisite groups" are valid:
- POWER (corresponds to PrerequisitePower)
- PROC (corresponds to PrerequisiteProc and PrerequisiteProcAlternate)
- BARRACKS (corresponds to PrerequisiteBarracks for human players, BuildBarracks for AI)
- FACTORY (corresponds to PrerequisiteFactory) for human players, BuildWeapons for AI)
- RADAR (corresponds to PrerequisiteRadar)
- TECH (corresponds to PrerequisiteTech)
In Firestorm, two additional groups are available:
- GDIFACTORY (corresponds to PrerequisiteGDIFactory)
- NODFACTORY (corresponds to PrerequisiteNodFactory)