IsBaseDefense
Gives a BuildingType the computed ratings the computer picks base defenses by, or counts a TeamType against its house's defensive team total.
Base defense building
- Applies to
- BuildingType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- boolean
- When omitted
no
The flag marks a structure as a base defense for the computer’s base planner. It has these effects:
- Only a flagged type gets anti-air, anti-armor and anti-infantry values computed from its primary weapon. A type whose three values are all zero is never chosen to fill a defense node.
- A flagged structure does not count toward the prerequisites the defense planner checks for its candidates.
- When a computer house places a
WallTower, the next node after it in the base plan whose type is flagged moves onto the tower’s cell. - When a flagged structure is taken off the map, a house that is not following a map plan turns its node back into a placeholder. The planner then picks a new type and cell, so the same defense is not rebuilt in place.
- When the computer takes over a departed player’s house, each standing flagged structure of a type the house can build fills a placeholder node in its base plan.
- A computer house’s ion cannon rates a flagged structure that reaches the base defense test with
AIIonCannonBaseDefenseValue, as the computer’s use describes. SortCameoAsBaseDefensedefaults to this flag’s value.
Defensive team
- Applies to
- TeamType
- File
ai.ini or map file- Section
[<ObjectType ID>]- Value
- boolean
- When omitted
no
IsBaseDefense=yes makes every team of this type a defensive team. Each defensive team counts toward its house’s defensive teams for as long as it exists. The flag and that count have three effects.
Which AI triggers a house considers. An AI trigger is defensive when its first TeamType is defensive and its second is defensive or absent. While UseMinDefenseRule is on and the house has fewer defensive teams than MinimumAIDefensiveTeams, the house considers only defensive triggers. Defensive teams and the enemy gives the full rule.
The team budget. A house with more defensive teams than MaximumAIDefensiveTeams skips defensive triggers. A house that holds at least TotalAITeamCap teams, and whose defensive teams number at least half its team count rounded down, deletes its oldest defensive team. The team budget gives the exact conditions.
Base defense. A member of a defensive team can be called back to defend the base. A member of any other team cannot. A called-back member of a defensive team always takes the Area Guard mission, never Rescue.