Jump to content

AIBasePlanningSide: Difference between revisions

From ModEnc²
m 9 revisions imported
ATHSE (talk | contribs)
m table update
Line 8: Line 8:
|rp=yes
|rp=yes
}}
}}
{{Tt|AIBasePlanningSide}} must be set on all [[BuildingTypes]] for the AI to be able to use them correctly, only the [[Sides|Side]] it belongs to will build it.


<br>
In {{ra2}} and {{yr}}, every [[Sides|Side]] has its own version of a building, but due to the fact that every building has its [[Owner]] set to every [[Houses|House]], and the AI tends to ignore [[Prerequisites]] values, it needs a simple method of controlling which faction builds which building.


== On All TechnoTypes ==
{| class="wikitable"
 
|-
Influences the [[Cameo Sorting]] order.
! Parameter !! Side Selected
 
== On BuildingTypes only ==
 
=== Stolen Technology ===
 
{{Tt|AIBasePlanningSide}} affects the Technology Centers' role in the [[The Infiltration System#ra2yr|Stolen Tech]] logic.
 
=== AI Base Planning ===
 
In {{ra2}} and  {{yr}}, every [[side]] has its own version of a building, plus some special ones. Due to the wacky way the game is coded, however, many of them have their {{f|Owner|link}} set to everything, and the AI isn't particularly known for adhering the {{tt|[[Prerequisite]]s}}. This, of course, would lead to the AI building every building of every side, without any order, which is most certainly not desired. To prevent this, the coders introduced {{tt|AIBasePlanningSide}}.
 
{{tt|AIBasePlanningSide}} assigns the building it is set on to one specific side's tech tree, which is then followed by the AI<!-- (in its ''base planning'' - get it?)-->.
 
{| align="center" cellpadding="4" class="table_descrow"
!Value
!Side
|-
|-
|&ndash;1
|&dash;1
|All sides
|All sides
|-
|-
|0
|0
|Allied (First country's {{f|Side|link}} on the {{f|Countries|link}} list)
|Allied/GDI
|-
|-
|1
|1
|Soviet (Second defined {{f|Side|link}} derived from the {{f|Countries|link}} list)
|Soviet/NOD
|-
|2
|YuriCountry (YR only)
|-
|-
|2{{yro}}
|3
|Yuri (Third defined {{f|Side|link}} derived from the {{f|Countries|link}} list)
|Fourth Side (Requires engine extension)
|-
|...
|Etc..
|-
|-
|3{{rpo}}
|Fourth Side (Fourth defined {{f|Side|link}} derived from the {{f|Countries|link}} list)(See [[RockPatch Docs:Adding a new Side|here]])
|}
|}


{{Tt|AIBasePlanningSide}} ''must'' be set on all [[BuildingTypes]] for the AI to be able to use them correctly.
==Notes==
On non-building [[TechnoTypes]], this tag only influences the [[Cameo Sorting]] order.
 
{{Tt|AIBasePlanningSide}} affects the [[The Infiltration System#ra2yr|Stolen Tech]] logic.

Revision as of 02:15, 15 April 2025

Tiberian Dawn Red Alert Tiberian Sun Firestorm Red Alert 2 Yuri's Revenge
Flag: AIBasePlanningSide
File(s): rules(md).ini
Values: Signed integers: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
Default: –1
Applicable to: TechnoTypes:

AircraftTypes, BuildingTypes, InfantryTypes and VehicleTypes



AIBasePlanningSide must be set on all BuildingTypes for the AI to be able to use them correctly, only the Side it belongs to will build it.

In Red Alert 2 and Yuri's Revenge, every Side has its own version of a building, but due to the fact that every building has its Owner set to every House, and the AI tends to ignore Prerequisites values, it needs a simple method of controlling which faction builds which building.

Parameter Side Selected
‐1 All sides
0 Allied/GDI
1 Soviet/NOD
2 YuriCountry (YR only)
3 Fourth Side (Requires engine extension)
... Etc..

Notes

On non-building TechnoTypes, this tag only influences the Cameo Sorting order.

AIBasePlanningSide affects the Stolen Tech logic.