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
No edit summary
Nighthawk200 (talk | contribs)
Updated RP prerequisite stuff.
Line 62: Line 62:
* <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 {{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>
* <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:
:* TEMPERATE - the Temperate theater (most maps).
:* SNOW - the Arctic theater (snowy maps).
:* URBAN - the Urban theater (some city maps).
:* DESERT - the Desert theater ([[Image:Yro.png]], some desert maps).
:* LUNAR - the Lunar theater ([[Image:Yro.png]], Soviet Mission 5).
:* NEWURBAN - the New Urban theater ([[Image:Yro.png]], most YR Urban maps).


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

Revision as of 21:51, 8 October 2007

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 [[[:Template:TTL]]]→Template:TTL.
Is this house not forbidden from owning this object?
Checks if the house is not listed in Template:TTL.
Is this house allowed to own this object?
Checks if the house is listed in Template:TTL.
Does this house own all the prerequisite structures?
Checks if the house owns the prerequisite structures listed in Template:TTL
Is this object stolen technology?
If the unit contains Template:TTL=yes, Template:TTL=yes, or Template:TTL=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 Template:TTL of the appropriate type?
Checks whether the house has at least one structure with Template:TTL matching the object's type.
Can this house own this object?
Checks if your Template:TTL contains atleast 1 Template:TTL listed as this units Template:TTL.
If the object in question is a VehicleType, does the house have a Template:TTL with the same Template:TTL setting as the object?
Checks whether the house has a War Factory if it's trying to build land-based (Template:TTL) vehicles, and whether it has a Shipyard if it's trying to build water-based (Template:TTL) vehicles.

Note: If you do not have the appropriate type of Template:TTL, but all other prerequisites are fulfilled, you will probably experience the NCO-Bug.

Overrides

  • If an object has a Template:TTL 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 a Secret Lab: 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 Template:TTL set.
  • In addition, AI players do not check Template:TTL and Template:TTL tags when they're trying to build the Power Plants listed under Template:TTL, Template:TTL, Template:TTL.
  • AI players also ignore all Template:TTL settings except Template:TTL 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 Template:TTL=, if all items on either Template:TTL=, or AlternatePrerequisite= are owned by the player, then the Template:TTL= condition is considered to be met. (on a side note, more of these clones are wanted)
  • SovietAdvancedPower= RPCE only.
Revival of Template:TTL=, 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 Template:TTL=yes, Template:TTL=yes, and Template:TTL=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).
  • 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.