For some reason, enemy AI is refusing to garrison the building with code below. They are happy to garrison the other civ buildings such as farm houses, but refusing to play ball with my trenches.
The AI script is pretty simple; below is the subroutine:
If True {
Team <This Team> will move towards the nearest CivTrenchBlock07 within area [Skirmish]MyOuterPerimeter.
Team <This Team> garrison a nearby building.
}
The actual trench code is found below:
Code:
; ***DESIGN parameters ***
DisplayName = OBJECT:Trench
Side = TGTWCivilian
EditorSorting = STRUCTURE
BuildCost = 1000
BuildTime = 1.0 ; in seconds
EnergyProduction = 0
WeaponSet
Conditions = None
Weapon = PRIMARY None
End
VisionRange = 360.0 ; Shroud clearing distance AND targeting range
ShroudClearingRange = 360
ArmorSet
Conditions = None
Armor = TrenchArmour
DamageFX = StructureDamageFXNoShake
End
CommandSet = CivTrenchLargeCommandSet
ExperienceValue = 200 200 200 200 ; Experience point value at each level
; *** AUDIO Parameters ***
VoiceSelect = FireBaseSelect
SoundOnDamaged = BuildingDamagedStateLight
SoundOnReallyDamaged = BuildingDestroy
UnitSpecificSounds
UnderConstruction = UnderConstructionLoop
End
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
TurretMoveStart = NoSound
TurretMoveLoop = NoSound ;These aren't playing properly, will revisit (mp) TurretMoveLoopLoud
End
; *** ENGINEERING Parameters ***
IsBridge = Yes
RadarPriority = STRUCTURE
KindOf = PRELOAD LANDMARK_BRIDGE STRUCTURE SELECTABLE IMMOBILE SPAWNS_ARE_THE_WEAPONS SCORE IMMUNE_TO_CAPTURE
GARRISONABLE_UNTIL_DESTROYED
Body = HiveStructureBody ModuleTag_BodyOverride
MaxHealth = 2000.0
InitialHealth = 2000.0
; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
SubdualDamageCap = 1200
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 100
;**Careful with these damage types -- because area damage types will already
;**damage slaves.
PropagateDamageTypesToSlavesWhenExisting = NONE +SNIPER ;+SMALL_ARMS +POISON +RADIATION +SURRENDER
;SwallowDamageTypesIfSlavesNotExisting = NONE +SNIPER +POISON +SURRENDER; Take no damage if no one to pass this to
End
Behavior = BaseRegenerateUpdate ModuleTag_05
;No data
End
Behavior = AIUpdateInterface ModuleTag_06
AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS; defensive weapon
MoodAttackCheckRate = 250
End
Behavior = GarrisonContain ModuleTag_07
ContainMax = 8
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
ImmuneToClearBuildingAttacks = Yes
DamagePercentToUnits = 5%
IsEnclosingContainer = No
End
Behavior = DestroyDie ModuleTag_08
;nothing
End
Behavior = FXListDie ModuleTag_10
DeathFX = FX_StructureMediumDeath
End
Behavior = FlammableUpdate ModuleTag_12
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 5 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Behavior = CreateObjectDie ModuleTag_13
CreationList = OCL_LargeStructureDebris
End
Behavior = TransitionDamageFX ModuleTag_14
;-------------DESIGNED FOR TINY SIZED FACTION BUILDING TRANSITIONS-------------------
DamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionTinySmoke
;---------------------------------------------------------------------------------------
ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionTinySmoke
ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionTinyExplosion
ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionTinyShockwave
End
Behavior = BridgeBehavior ModuleTag_br
LateralScaffoldSpeed = 100.0
VerticalScaffoldSpeed = 70.0
End
Geometry = BOX
GeometryMajorRadius = 110.0
GeometryMinorRadius = 70.0
GeometryHeight = 20.0
GeometryIsSmall = No
End
Am I missing something fundamental that dictates what can and cannot be garrisoned by AI?