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

Difference between revisions of "IsBaseDefense"

From ModEnc
Jump to: navigation, search
(Added links to AI and map inis/sections.)
(Added a warning about a related bug, and a note about base defense distribution)
Line 12: Line 12:
 
}}
 
}}
  
===On Buildings===
+
==On Buildings==
  
====In TS====
+
===In {{ts}} and {{fs}}===
  
{{f|IsBaseDefense|yes}} on a building makes it a base defense structure. AI uses buildings with this flag set, to build base defenses. Total number of base defense structure to be built in relation to the base size is determined by the values in [[GDIBaseDefenseCoefficient]] and [[NodBaseDefenseCoefficient]]. Depending on the type of weapon attached to these buildings, that is whether it is ground or anti-air weapon, AI distributes the count among these base defense structures.
+
{{f|IsBaseDefense|yes}} on a building makes it a base defense structure. The AI uses buildings with this flag set to build base defenses. The total number of base defense structures to be built in relation to the base size is determined by the values in [[GDIBaseDefenseCoefficient]] and [[NodBaseDefenseCoefficient]]. See [[MaximumBaseDefenseValue]] for more information on how the AI distributes this number along the available defense structures.
  
AI also uses this flag to identify base defense structures for target selection used by AI scripts as well as superweapons.
+
The AI also uses this flag to identify base defense structures for target selection used by AI scripts as well as superweapons.
  
====In RA2====
+
===In {{ra2}}===
  
It is similar to TS. But to determine the base defense counts, RA2 uses [[AlliedBaseDefenseCounts]] and [[SovietBaseDefenseCounts]].
+
Similar to TS, except RA2 uses [[AlliedBaseDefenseCounts]] and [[SovietBaseDefenseCounts]] to determine the base defense counts.
  
====In YR====
+
===In {{yr}}===
  
 
YR doesn't use IsBaseDefense=yes for building AI base defenses. Base defense buildings are built depending on the list provided in [[AlliedBaseDefenses]], [[SovietBaseDefenses]] and [[ThirdBaseDefenses]]. [[AlliedBaseDefenseCounts]], [[SovietBaseDefenseCounts]] and [[ThirdBaseDefenseCounts]] determine the total counts. Proportions of these buildings is calculated based on the values of [[AntiInfantryValue]], [[AntiArmorValue]] and [[AntiAirValue]] and influenced by [[AIForcePredictionFudge]].
 
YR doesn't use IsBaseDefense=yes for building AI base defenses. Base defense buildings are built depending on the list provided in [[AlliedBaseDefenses]], [[SovietBaseDefenses]] and [[ThirdBaseDefenses]]. [[AlliedBaseDefenseCounts]], [[SovietBaseDefenseCounts]] and [[ThirdBaseDefenseCounts]] determine the total counts. Proportions of these buildings is calculated based on the values of [[AntiInfantryValue]], [[AntiArmorValue]] and [[AntiAirValue]] and influenced by [[AIForcePredictionFudge]].
Line 30: Line 30:
 
YR AI uses both the specific base defense buildings as mentioned above and any building having IsBaseDefense=yes to identify base defense structure for target selection.
 
YR AI uses both the specific base defense buildings as mentioned above and any building having IsBaseDefense=yes to identify base defense structure for target selection.
  
===On TeamTypes===
+
==On TeamTypes==
  
{{f|IsBaseDefense|yes}} on a TeamType makes it a base defense team. These type of teams could be produced even without AI choosing an enemy. Total of such teams is subject to the limits set by [[MinimumAIDefensiveTeams]] and [[MaximumAIDefensiveTeams]] under [[General]] section.
+
{{f|IsBaseDefense|yes}} on a [[TeamType]] makes it a base defense team. This type of team can be produced even without the AI choosing an enemy. The total number of such teams is subject to the limits set by [[MinimumAIDefensiveTeams]] and [[MaximumAIDefensiveTeams]] under the [[General]] section.
 +
 
 +
{{bugs}}
 +
Although the TS AI automatically builds buildings with {{f|IsBaseDefense|yes}} set, it cannot use such buildings as [[Prerequisite|prerequisites]] for other buildings unless the defense structure also has {{f|AIBuildsThis|yes|link}} set.

Revision as of 10:00, 21 March 2021

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: IsBaseDefense
File(s): Rules(md).ini, ai(md).ini, Maps
Values: Boolean values: yes or no, true or false, 1 or 0
Default: No
Applicable to: BuildingTypes, TeamTypes


On Buildings

In Tiberian Sun and Firestorm

IsBaseDefense=yes on a building makes it a base defense structure. The AI uses buildings with this flag set to build base defenses. The total number of base defense structures to be built in relation to the base size is determined by the values in GDIBaseDefenseCoefficient and NodBaseDefenseCoefficient. See MaximumBaseDefenseValue for more information on how the AI distributes this number along the available defense structures.

The AI also uses this flag to identify base defense structures for target selection used by AI scripts as well as superweapons.

In Red Alert 2

Similar to TS, except RA2 uses AlliedBaseDefenseCounts and SovietBaseDefenseCounts to determine the base defense counts.

In Yuri's Revenge

YR doesn't use IsBaseDefense=yes for building AI base defenses. Base defense buildings are built depending on the list provided in AlliedBaseDefenses, SovietBaseDefenses and ThirdBaseDefenses. AlliedBaseDefenseCounts, SovietBaseDefenseCounts and ThirdBaseDefenseCounts determine the total counts. Proportions of these buildings is calculated based on the values of AntiInfantryValue, AntiArmorValue and AntiAirValue and influenced by AIForcePredictionFudge.

YR AI uses both the specific base defense buildings as mentioned above and any building having IsBaseDefense=yes to identify base defense structure for target selection.

On TeamTypes

IsBaseDefense=yes on a TeamType makes it a base defense team. This type of team can be produced even without the AI choosing an enemy. The total number of such teams is subject to the limits set by MinimumAIDefensiveTeams and MaximumAIDefensiveTeams under the General section.

Cc alert.png Bugs/Side-Effects/Unexpected Limitations

Although the TS AI automatically builds buildings with IsBaseDefense=yes set, it cannot use such buildings as prerequisites for other buildings unless the defense structure also has AIBuildsThis=yes set.