ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

The Prerequisite System: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Marshall (talk | contribs)
m fixed link to redirect
m Replacing Template:TTL with Template:F.
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 [{{TTL|MultiplayerDialogSettings}}]→{{TTL|TechLevel}}.
: 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 {{TTL|ForbiddenHouses}}.
: 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 {{TTL|RequiredHouses}}.
: 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 {{TTL|Prerequisite}}
: Checks if the house owns the prerequisite structures listed in {{f|Prerequisite|link}}
; Is this object stolen technology?{{yro}}
; Is this object stolen technology?{{yro}}
: If the unit contains {{TTL|RequiresStolenAlliedTech}}<tt>=yes</tt>, {{TTL|RequiresStolenSovietTech}}<tt>=yes</tt>, or {{TTL|RequiresStolenThirdTech}}<tt>=yes</tt>, has the apropriate lab get spied upon?
: 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 {{TTL|Factory}} of the appropriate type?
; Does the house own a {{f|Factory|link}} of the appropriate type?
: Checks whether the house has at least one structure with {{TTL|Factory}} matching the object's type.
: Checks whether the house has at least one structure with {{f|Factory|link}} matching the object's type.
; Can this house own this object?
; Can this house own this object?
: Checks if your {{TTL|Factory}} contains atleast 1 {{TTL|Owner}} listed as this units {{TTL|Owner}}.
: 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 {{TTL|Factory|VehicleType}} with the same {{TTL|Naval}} setting as the object?
; 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 ({{TTL|Naval|no}}) vehicles, and whether it has a Shipyard if it's trying to build water-based ({{TTL|Naval|yes}}) vehicles.
: 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 {{TTL|Factory|VehicleType}}, but all other prerequisites are fulfilled, you will probably experience the [[EVA_NewContructionOptions#NCO_Bug|NCO bug]].
'''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 {{TTL|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.)
*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 {{TTL|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 {{TTL|TechLevel|11}} set.
*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 {{TTL|Prerequisite}} and {{TTL|TechLevel}} tags when they're trying to build the Power Plants listed under {{TTL|GDIPowerPlant}}, {{TTL|NodRegularPower}}, {{TTL|ThirdPowerPlant}}{{yro}}.
*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 {{TTL|Prerequisite}} settings except {{TTL|TechLevel}} 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]]).
*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 {{TTL|PrerequisitePower}})
* POWER (corresponds to {{f|PrerequisitePower|link}})
* PROC (corresponds to {{TTL|PrerequisiteProc}} and {{TTL|PrerequisiteProcAlternate}}{{yro}})
* PROC (corresponds to {{f|PrerequisiteProc|link}} and {{f|PrerequisiteProcAlternate|link}}{{yro}})
* BARRACKS (corresponds to {{TTL|PrerequisiteBarracks}})
* BARRACKS (corresponds to {{f|PrerequisiteBarracks|link}})
* FACTORY (corresponds to {{TTL|PrerequisiteFactory}})
* FACTORY (corresponds to {{f|PrerequisiteFactory|link}})
* RADAR (corresponds to {{TTL|PrerequisiteRadar}})
* RADAR (corresponds to {{f|PrerequisiteRadar|link}})
* TECH (corresponds to {{TTL|PrerequisiteTech}})
* TECH (corresponds to {{f|PrerequisiteTech|link}})


In Firestorm, two additional groups were available:
In Firestorm, two additional groups were available:


* GDIFACTORY (corresponds to {{TTL|PrerequisiteGDIFactory}})
* GDIFACTORY (corresponds to {{f|PrerequisiteGDIFactory|link}})
* NODFACTORY (corresponds to {{TTL|PrerequisiteNodFactory}})
* NODFACTORY (corresponds to {{f|PrerequisiteNodFactory|link}})


[[Category: Systems]]
[[Category: Systems]]
Line 53: Line 53:
:If anything on this list is owned by the player, then the object <b>can't</b> be built.
:If anything on this list is owned by the player, then the object <b>can't</b> be built.
* <tt>AlternatePrerequisite=</tt>
* <tt>AlternatePrerequisite=</tt>
:A Clone of {{TTL|Prerequisite}}<tt>=</tt>, if all items on either {{TTL|Prerequisite}}<tt>=</tt>, or <tt>AlternatePrerequisite=</tt> are owned by the player, then the {{TTL|Prerequisite}}<tt>=</tt> condition is considered to be met. (on a side note, more of these clones are wanted)
:A Clone of {{f|Prerequisite|link}}<tt>=</tt>, if all items on either {{f|Prerequisite|link}}<tt>=</tt>, or <tt>AlternatePrerequisite=</tt> are owned by the player, then the {{f|Prerequisite|link}}<tt>=</tt> condition is considered to be met. (on a side note, more of these clones are wanted)
* <tt>SovietAdvancedPower=</tt> RPCE only.
* <tt>SovietAdvancedPower=</tt> RPCE only.
:Revival of {{TTL|NodAdvancedPower}}<tt>=</tt>, but with a new name so as to not conflict with the un-modded game, thereby not allowing the Soviets to build the Nuclear Reactor, which by default is not on that tag, instead the tag is set to NAAPWR, the TS Nod Advanced Power Plant. Basically this tag allows the Soviets to build their 'Advanced Power Plant' when they are low on power, instead of lots of regular Power Plants, as long as they meet the prerequisites for that Advanced Power Plant. in RP v1.10 this was replaced with the new PowerPlants= tag.
:Revival of {{f|NodAdvancedPower|link}}<tt>=</tt>, but with a new name so as to not conflict with the un-modded game, thereby not allowing the Soviets to build the Nuclear Reactor, which by default is not on that tag, instead the tag is set to NAAPWR, the TS Nod Advanced Power Plant. Basically this tag allows the Soviets to build their 'Advanced Power Plant' when they are low on power, instead of lots of regular Power Plants, as long as they meet the prerequisites for that Advanced Power Plant. in RP v1.10 this was replaced with the new PowerPlants= tag.
* <tt>PowerPlant=</tt>
* <tt>PowerPlant=</tt>
:This is the new version of GDIPowerPlant=, NodRegularPower= and ThirdPowerPlant= listed under the sides header ([GDI], [Nod] and [ThirdSide] are the default 3). Although this is automaticly mapped to the original 3 tags for the original 3 sides, FourthPowerPlant is Obsolete.
:This is the new version of GDIPowerPlant=, NodRegularPower= and ThirdPowerPlant= listed under the sides header ([GDI], [Nod] and [ThirdSide] are the default 3). Although this is automaticly mapped to the original 3 tags for the original 3 sides, FourthPowerPlant is Obsolete.
Line 61: Line 61:
:This is a list of power plants per side under the sides header , which lists BuildingType that are randomly selected when that side requires extra power.
:This is a list of power plants per side under the sides header , which lists BuildingType that are randomly selected when that side requires extra power.
* <tt>RequiresStolenTech=</tt>
* <tt>RequiresStolenTech=</tt>
:New stolen tech logic based on {{TTL|RequiresStolenAlliedTech}}<tt>=yes</tt>, {{TTL|RequiresStolenSovietTech}}<tt>=yes</tt>, and {{TTL|RequiresStolenThirdTech}}<tt>=yes</tt>, which allows the modder to specify a new structure that needs to be spied upon to obtain this unit. the building you need to spy on also requires the tags <tt>IsStolenTech=yes</tt> and <tt>Spyable=yes</tt>
:New stolen tech logic based on {{f|RequiresStolenAlliedTech|link}}<tt>=yes</tt>, {{f|RequiresStolenSovietTech|link}}<tt>=yes</tt>, and {{f|RequiresStolenThirdTech|link}}<tt>=yes</tt>, which allows the modder to specify a new structure that needs to be spied upon to obtain this unit. the building you need to spy on also requires the tags <tt>IsStolenTech=yes</tt> and <tt>Spyable=yes</tt>
* <tt>RequiresTheater=</tt>
* <tt>RequiresTheater=</tt>
:A new prerequisite logic based on the theater of the map you are currently playing. This enables modders to make certain structures or units available in, for example, arctic maps only. This, however, does not work correctly with the AI. The available options for this tag are:
:A new prerequisite logic based on the theater of the map you are currently playing. This enables modders to make certain structures or units available in, for example, arctic maps only. This, however, does not work correctly with the AI. The available options for this tag are:

Revision as of 08:42, 27 November 2009

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:

In Firestorm, two additional groups were available:

==RP's 'NEW' Prerequisite System stuff[RockPatch is obsolete; please remove this template from the page] ==

  • NegativePrerequisite=
If anything on this list is owned by the player, then the object can't be built.
  • AlternatePrerequisite=
A Clone of Prerequisite=, if all items on either Prerequisite=, or AlternatePrerequisite= are owned by the player, then the Prerequisite= condition is considered to be met. (on a side note, more of these clones are wanted)
  • SovietAdvancedPower= RPCE only.
Revival of NodAdvancedPower=, but with a new name so as to not conflict with the un-modded game, thereby not allowing the Soviets to build the Nuclear Reactor, which by default is not on that tag, instead the tag is set to NAAPWR, the TS Nod Advanced Power Plant. Basically this tag allows the Soviets to build their 'Advanced Power Plant' when they are low on power, instead of lots of regular Power Plants, as long as they meet the prerequisites for that Advanced Power Plant. in RP v1.10 this was replaced with the new PowerPlants= tag.
  • PowerPlant=
This is the new version of GDIPowerPlant=, NodRegularPower= and ThirdPowerPlant= listed under the sides header ([GDI], [Nod] and [ThirdSide] are the default 3). Although this is automaticly mapped to the original 3 tags for the original 3 sides, FourthPowerPlant is Obsolete.
  • PowerPlants=
This is a list of power plants per side under the sides header , which lists BuildingType that are randomly selected when that side requires extra power.
  • RequiresStolenTech=
New stolen tech logic based on RequiresStolenAlliedTech=yes, RequiresStolenSovietTech=yes, and RequiresStolenThirdTech=yes, which allows the modder to specify a new structure that needs to be spied upon to obtain this unit. the building you need to spy on also requires the tags IsStolenTech=yes and Spyable=yes
  • RequiresTheater=
A new prerequisite logic based on the theater of the map you are currently playing. This enables modders to make certain structures or units available in, for example, arctic maps only. This, however, does not work correctly with the AI. The available options for this tag are:
  • TEMPERATE - the Temperate theater (most maps).
  • SNOW - the Arctic theater (snowy maps).
  • URBAN - the Urban theater (some city maps).
  • DESERT - the Desert theater (, some desert maps, older ones use Temperate).
  • LUNAR - the Lunar theater (, Soviet Mission 5).
  • NEWURBAN - the New Urban theater (, most YR Urban maps).

Note: Other items may have been planned, or wished for future RP versions, but only completed items are on this list.