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

IsBaseDefense: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Crimsonum (talk | contribs)
mNo edit summary
E1 Elite (talk | contribs)
m Updates
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Flag
{{Flag
|name={{PAGENAME}}
|name={{PAGENAME}}
|files={{Categ|ini=Rules}}
|files={{Categ|ini=Rules}}, {{Categ|ini=ai}}, {{Categ|Maps}}
|types={{Categ|BuildingTypes}}
|types={{Categ|BuildingTypes}}, {{Categ|TeamTypes}}
|values={{Values|Boolean}}
|values={{Values|Boolean}}
|default=No
|default=No
|ts=yes
|fs=yes
|ets=yes
|ra2=yes
|yr=yes
}}
}}
Can be set to 'true' or 'false' and specifies whether or not this BuildingType is classed as a base defense structure. This is used by the AI engine to identify defensive structures, enabling the AI logic to target them and consider them in its threat scan as well as labelling them to ensure that the AI builds them specifically for a defensive purpose. Also used to identify potential targets for Ion Cannon superweapon strike.
 
==On Buildings==
 
===In {{ts}} and {{fs}}===
 
{{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.
 
The AI also uses this flag to identify base defense structures for target selection used by AI scripts as well as superweapons.
 
===In {{ra2}}===
 
Similar to TS, except RA2 uses [[AlliedBaseDefenseCounts]] and [[SovietBaseDefenseCounts]] to determine the base defense counts.
 
===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 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==
 
{{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 (see [[AIHateDelays]] for multiplayer maps and Make enemy trigger action for singleplayer maps). 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|AIBuildThis|yes|link}} set.
 
As the AI tries to build base defense teams first, failure to be able to build [[MinimumAIDefensiveTeams]] with {{f|UseMinDefenseRule|yes|link}} will result in an AI that is unable to build any of its applicable teams listed in [[AITriggerTypes|AI Triggers]]

Latest revision as of 02:33, 4 July 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 (see AIHateDelays for multiplayer maps and Make enemy trigger action for singleplayer maps). The total number of such teams is subject to the limits set by MinimumAIDefensiveTeams and MaximumAIDefensiveTeams under the General section.

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 AIBuildThis=yes set.

As the AI tries to build base defense teams first, failure to be able to build MinimumAIDefensiveTeams with UseMinDefenseRule=yes will result in an AI that is unable to build any of its applicable teams listed in AI Triggers