;------------------------------------------------------------------------------
Object Boss_PatriotBinaryDataStream
  ; *** ART Parameters ***
  Draw = W3DLaserDraw ModuleTag_01
    Texture = EXBinaryStream32.tga
    NumBeams = 1                      ;Number of overlapping cylinders that make the beam. 1 beam will just use inner data. Current max: 10
    InnerBeamWidth = 4                ;The total width of beam
    InnerColor = R:0 G:255 B:0 A:180  ;The inside color of the laser (hot)
    Tile = Yes                        ;The height of the texture will determine how many times to tile the texture to fit without scaling.
    ScrollRate = -0.25                 ;Scrolls the texture offset this fast -- towards(-) away(+)
    Segments = 20                     ;Number of segments -- more segments give smoother curve (but more joints) Current max: 20
    ArcHeight = 30.0                  ;The height of the arc
    SegmentOverlapRatio = 0.0000      ;This value overlaps(+) or separates(-) the segments by ratio
    TilingScalar = 0.25                ;Stretches tiling if value > 1.0, otherwise shrinks it (1.0 is natural)
 End

  KindOf = IMMOBILE
  ClientUpdate = LaserUpdate ModuleTag_02
    ;nothing
  End

  ; A patriot uses this stream as an event triggered thing, not something turned on and off with a state.
  Behavior = DeletionUpdate ModuleTag_03
    MinLifetime = 600   ; min lifetime in msec
    MaxLifetime = 600   ; max lifetime in msec
  End
End



;------------------------------------------------------------------------------
;USA Construction Dozer or USDozer
Object Boss_VehicleDozer

  ; *** ART Parameters ***
  SelectPortrait         = SACDozer_L
  ButtonImage            = SACDozer
  
  ;UpgradeCameo1 = NONE
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTruckDraw ModuleTag_01

    OkToChangeModelColor = Yes

    DefaultConditionState
      Model             = AVCONSTDOZ_A
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeLight
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End

    ConditionState = PREATTACK_A 
      Animation         = AVCONSTDOZ_A.AVCONSTDOZ_A
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      ParticleSysBone   = DIRTFX01 DozerDirtFall ;gush of dirt
      TransitionKey     = TRANS_DIGGING
    End

    ConditionState = MOVING
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING
    End

    ConditionState      = REALLYDAMAGED RUBBLE
      Model             = AVCONSTDOZ_AD
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End

    ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
      Model             = AVCONSTDOZ_AD
      Animation         = AVCONSTDOZ_AD.AVCONSTDOZ_AD
      AnimationMode     = ONCE
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      TransitionKey     = TRANS_DIGGING_DAMAGED
    End

    ConditionState      = MOVING REALLYDAMAGED RUBBLE
      Model             = AVCONSTDOZ_AD
      ParticleSysBone   = EXHAUSTFX01 DozerSmokeHeavy
      WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
    End


    TrackMarks            = EXTireTrack2.tga
    Dust                  = RocketBuggyDust
    DirtSpray             = RocketBuggyDirtSpray

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.

    LeftFrontTireBone     = TIRE01
    RightFrontTireBone    = TIRE02
    LeftRearTireBone      = TIRE03
    RightRearTireBone     = TIRE04

    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 0   ; This vehicle doesn't powerslide.

  ParticlesAttachedToAnimatedBones = Yes 


  End



  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Dozer
  Side                = Boss
  EditorSorting       = VEHICLE
  TransportSlotCount  = 5 ;how many "slots" we take in a transport (0 == not transportable)
  BuildCost           = 500
  BuildTime           = 1.0 ; in seconds
  VisionRange         = 200
  ShroudClearingRange = 200

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY None
  End
  WeaponSet
    Conditions = MINE_CLEARING_DETAIL 
    Weapon = PRIMARY DozerMineDisarmingWeapon
  End

  ArmorSet
    Conditions        = None
    Armor             = DozerArmor ;Special Explosion-Proof Armor
    DamageFX          = TankDamageFX
  End
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet          = Boss_DozerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect         = DozerChinaVoiceSelect
  VoiceMove           = DozerChinaVoiceMove
  VoiceEnter          = DozerChinaVoiceMove
  VoiceTaskComplete   = DozerChinaVoiceBuildComplete
  SoundMoveStart      = DozerChinaMoveStart
  SoundMoveStartDamaged = DozerChinaMoveStart
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop

  UnitSpecificSounds
    VoiceCreate       = DozerChinaVoiceCreate
    VoiceCrush        = DozerChinaVoiceCrush
    VoiceNoBuild      = DozerChinaVoiceBuildNot
    VoiceRepair       = DozerChinaVoiceRepair
    VoiceDisarm       = DozerChinaVoiceClearMine
    VoiceEnter        = DozerChinaVoiceMove
    VoiceBuildResponse = DozerChinaVoiceBuild
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority       = UNIT
  KindOf              = PRELOAD VEHICLE SCORE SELECTABLE CAN_CAST_REFLECTIONS DOZER
 
  Body                = ActiveBody ModuleTag_02
    MaxHealth         = 250.0
    InitialHealth     = 250.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 = 500
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = DozerAIUpdate ModuleTag_03
    RepairHealthPercentPerSecond = 2%    ; % of max health to repair each second
    BoredTime                    = 5000  ; in milliseconds
    BoredRange                   = 150   ; when bored, we look this far away to do something
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    AutoAcquireEnemiesWhenIdle   = Yes
  End

  Locomotor = SET_NORMAL AmericaVehicleDozerLocomotor

  Behavior            = PhysicsBehavior ModuleTag_04
    Mass              = 75.0
  End

  Behavior = StealthDetectorUpdate ModuleTag_05
    DetectionRate         = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange       = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
    ExtraRequiredKindOf   = MINE  ; we can only detect MINES, not other stealthed things
  End

  Behavior                 = TransitionDamageFX ModuleTag_06
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 100
    DestructionDelay = 1500
    DestructionDelayVariance = 600
    FX  = INITIAL  FX_CrusaderCatchFire
    OCL = FINAL    OCL_AmericaDozerExplode  
    FX  = FINAL    FX_BattleMasterExplosionOneFinal
  End   

  Behavior = CreateCrateDie ModuleTag_CratesChange
    CrateData = SalvageCrateData
  End
  
  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

;;;;;;;;  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_22
;;;;;;;;  End

  Behavior               = FXListDie ModuleTag_23
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX         = FX_CarCrush
  End

  Behavior = DestroyDie ModuleTag_24
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  Behavior = StealthUpdate ModuleTag_09
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Geometry            = BOX
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 10.0
  GeometryHeight      = 15.0     
  GeometryIsSmall     = Yes
  Scale = 1.02
  Shadow              = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length    

End






;------------------------------------------------------------------------------
Object Boss_CommandCenter

  ; *** ART Parameters ***
  
  ; ------------ the main building itself -----------------
  SelectPortrait         = SNComCentr_L
  ButtonImage            = SNComCentr
  Draw                   = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    
    ; DAY ************************************
    DefaultConditionState
      Model              = NBConYard
      Animation          = NBConYard.NBConYard
      AnimationMode      = LOOP    
    End
    ConditionState       = DAMAGED
      Model              = NBConYard_D
      Animation          = NBConYard_D.NBConYard_D
      AnimationMode      = LOOP    
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
    End
    ConditionState       = REALLYDAMAGED RUBBLE
      Model              = NBConYard_E
      Animation          = NBConYard_E.NBConYard_E
      AnimationMode      = LOOP
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Fire04 SmolderingFire
      ParticleSysBone    = Fire05 SmolderingFire
      ParticleSysBone    = Fire06 SmolderingFire
      ParticleSysBone    = Fire07 SmolderingFire
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
    End


    ;NIGHT ***********************************
    ConditionState       = NIGHT
      Model              = NBConYard_N
      Animation          = NBConYard_N.NBConYard_N
      AnimationMode      = LOOP    
    End
    ConditionState       = DAMAGED NIGHT
      Model              = NBConYard_DN
      Animation          = NBConYard_DN.NBConYard_DN
      AnimationMode      = LOOP    
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
    End
    ConditionState    = REALLYDAMAGED RUBBLE NIGHT
      Model           = NBConYard_EN
      Animation       = NBConYard_EN.NBConYard_EN
      AnimationMode   = LOOP
      ParticleSysBone = Fire01 SmolderingFire
      ParticleSysBone = Fire02 SmolderingFire
      ParticleSysBone = Fire03 SmolderingFire
      ParticleSysBone = Fire04 SmolderingFire
      ParticleSysBone = Fire05 SmolderingFire
      ParticleSysBone = Fire06 SmolderingFire
      ParticleSysBone = Fire07 SmolderingFire
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
    End

    
    ;SNOW *************************************
    ConditionState       = SNOW
      Model              = NBConYard_S
      Animation          = NBConYard_S.NBConYard_S
      AnimationMode      = LOOP    
    End
    ConditionState       = DAMAGED SNOW
      Model              = NBConYard_DS
      Animation          = NBConYard_DS.NBConYard_DS
      AnimationMode      = LOOP    
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
    End
    ConditionState       = REALLYDAMAGED RUBBLE SNOW
      Model              = NBConYard_ES
      Animation          = NBConYard_ES.NBConYard_ES
      AnimationMode      = LOOP
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Fire04 SmolderingFire
      ParticleSysBone    = Fire05 SmolderingFire
      ParticleSysBone    = Fire06 SmolderingFire
      ParticleSysBone    = Fire07 SmolderingFire
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
    End

    ;NIGHT SNOW *****************************
    ConditionState       = NIGHT SNOW
      Model              = NBConYard_NS
      Animation          = NBConYard_NS.NBConYard_NS
      AnimationMode      = LOOP    
    End
    ConditionState       = DAMAGED NIGHT SNOW
      Model              = NBConYard_DNS
      Animation          = NBConYard_DNS.NBConYard_DNS
      AnimationMode      = LOOP    
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
    End
    ConditionState    = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model           = NBConYard_ENS
      Animation       = NBConYard_ENS.NBConYard_ENS
      AnimationMode   = LOOP
      ParticleSysBone = Fire01 SmolderingFire
      ParticleSysBone = Fire02 SmolderingFire
      ParticleSysBone = Fire03 SmolderingFire
      ParticleSysBone = Fire04 SmolderingFire
      ParticleSysBone = Fire05 SmolderingFire
      ParticleSysBone = Fire06 SmolderingFire
      ParticleSysBone = Fire07 SmolderingFire
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
    End   
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBConYard
      Animation          = NBConYard.NBConYard
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBConYard_D
      Animation          = NBConYard_D.NBConYard_D
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBConYard_E
      Animation          = NBConYard_E.NBConYard_E
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = NBConYard_N
      Animation          = NBConYard_N.NBConYard_N
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = NBConYard_DN
      Animation          = NBConYard_DN.NBConYard_DN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = NBConYard_EN
      Animation          = NBConYard_EN.NBConYard_EN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = NBConYard_S
      Animation          = NBConYard_S.NBConYard_S
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = NBConYard_DS
      Animation          = NBConYard_DS.NBConYard_DS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = NBConYard_ES
      Animation          = NBConYard_ES.NBConYard_ES
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = NBConYard_NS
      Animation          = NBConYard_NS.NBConYard_NS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = NBConYard_DNS
      Animation          = NBConYard_DNS.NBConYard_DNS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = NBConYard_ENS
      Animation          = NBConYard_ENS.NBConYard_ENS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
  End
  
  ; ------------ Radar Extending -----------------
  Draw                = W3DModelDraw ModuleTag_02

    DefaultConditionState
      Model             = None
    End
    AliasConditionState = DAMAGED
    AliasConditionState = REALLYDAMAGED RUBBLE
       
    ConditionState      = RADAR_EXTENDING RADAR_UPGRADED 
      Model             = NBConYard_A2
      Animation         = NBConYard_A2.NBConYard_A2
      AnimationMode     = ONCE
      Flags             = START_FRAME_FIRST
    End
    
    ConditionState      = RADAR_EXTENDING DAMAGED RADAR_UPGRADED 
      Model             = NBConYard_A2D
      Animation         = NBConYard_A2D.NBConYard_A2D
      AnimationMode     = ONCE
      Flags             = START_FRAME_FIRST
    End
    
    ConditionState      = RADAR_EXTENDING REALLYDAMAGED RUBBLE RADAR_UPGRADED 
      Model             = NBConYard_A2E
      Animation         = NBConYard_A2E.NBConYard_A2E
      AnimationMode     = ONCE
      Flags             = START_FRAME_FIRST
    End
    
    ConditionState      = RADAR_UPGRADED
      Model             = NBConYard_A2
      Animation         = NBConYard_A2.NBConYard_A2
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
    End
    
    ConditionState      = RADAR_UPGRADED DAMAGED
      Model             = NBConYard_A2D
      Animation         = NBConYard_A2D.NBConYard_A2D
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
    End
    
    ConditionState      = RADAR_UPGRADED REALLYDAMAGED RUBBLE
      Model             = NBConYard_A2E
      Animation         = NBConYard_A2E.NBConYard_A2E
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
    End
    
    ConditionState      = RADAR_UPGRADED AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model             = NBConYard_A2
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
       
    ConditionState      = RADAR_UPGRADED AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED 
      Model             = NBConYard_A2D
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End   
    
    ConditionState      = RADAR_UPGRADED AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE 
      Model             = NBConYard_A2E
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End   
    
  End
  PlacementViewAngle = -135

  ; ------------ construction-zone fence -----------------
  Draw                = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A4
      Animation       = NBConYard_A4.NBConYard_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A4N
      Animation       = NBConYard_A4N.NBConYard_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A4S
      Animation       = NBConYard_A4S.NBConYard_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A4SN
      Animation       = NBConYard_A4SN.NBConYard_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBConYard_A4
      Animation       = NBConYard_A4.NBConYard_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBConYard_A4N
      Animation       = NBConYard_A4N.NBConYard_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBConYard_A4S
      Animation       = NBConYard_A4S.NBConYard_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBConYard_A4SN
      Animation       = NBConYard_A4SN.NBConYard_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBConYard_A4
      Animation       = NBConYard_A4.NBConYard_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBConYard_A4N
      Animation       = NBConYard_A4N.NBConYard_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBConYard_A4S
      Animation       = NBConYard_A4S.NBConYard_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBConYard_A4SN
      Animation       = NBConYard_A4SN.NBConYard_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
      ParticleSysBone = Pit SmolderingFire
      ParticleSysBone = Pit01 SmolderingFire
      ParticleSysBone = Pit SmolderingSmoke
      ParticleSysBone = Pit01 SmolderingSmoke
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw                = W3DModelDraw ModuleTag_04
    AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = NBConYard_A6
      Animation       = NBConYard_A6.NBConYard_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = SmokeM01 BuildUpSmokeChina
      ParticleSysBone = SmokeS02 BuildUpSmokeChina
      ParticleSysBone = SparksM01 BuildUpSmokeChina
      ParticleSysBone = SparksM02 BuildUpSmokeChina
      ParticleSysBone = SparksS01 BuildUpSmokeChina
      ParticleSysBone = SparksS02 BuildUpSmokeChina
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBConYard_A6N
      Animation       = NBConYard_A6N.NBConYard_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT

      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = SmokeM01 BuildUpSmokeChina
      ParticleSysBone = SmokeS02 BuildUpSmokeChina
      ParticleSysBone = SparksM01 BuildUpSmokeChina
      ParticleSysBone = SparksM02 BuildUpSmokeChina
      ParticleSysBone = SparksS01 BuildUpSmokeChina
      ParticleSysBone = SparksS02 BuildUpSmokeChina
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = NBConYard_A6S
      Animation       = NBConYard_A6S.NBConYard_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = SmokeM01 BuildUpSnowSmoke
      ParticleSysBone = SmokeS02 BuildUpSnowSmoke
      ParticleSysBone = SparksM01 BuildUpSnowSmoke
      ParticleSysBone = SparksM02 BuildUpSnowSmoke
      ParticleSysBone = SparksS01 BuildUpSnowSmoke
      ParticleSysBone = SparksS02 BuildUpSnowSmoke
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBConYard_A6SN
      Animation       = NBConYard_A6SN.NBConYard_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Dust01 BuildingNightSnowDust
      ParticleSysBone = SmokeM01 BuildUpNightSnowSmoke
      ParticleSysBone = SmokeS02 BuildUpNightSnowSmoke
      ParticleSysBone = SparksM01 BuildUpNightSnowSmoke
      ParticleSysBone = SparksM02 BuildUpNightSnowSmoke
      ParticleSysBone = SparksS01 BuildUpNightSnowSmoke
      ParticleSysBone = SparksS02 BuildUpNightSnowSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = NBConYard_A6
      Animation       = NBConYard_A6.NBConYard_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = NBConYard_A6N
      Animation       = NBConYard_A6N.NBConYard_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = NBConYard_A6S
      Animation       = NBConYard_A6S.NBConYard_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = NBConYard_A6SN
      Animation       = NBConYard_A6SN.NBConYard_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBConYard_A6
      Animation       = NBConYard_A6.NBConYard_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBConYard_A6N
      Animation       = NBConYard_A6N.NBConYard_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBConYard_A6S
      Animation       = NBConYard_A6S.NBConYard_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBConYard_A6SN
      Animation       = NBConYard_A6SN.NBConYard_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_05
    AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    
    ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A5
      Animation       = NBConYard_A5.NBConYard_A5
      AnimationMode   = LOOP
      TransitionKey  = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A5N
      Animation       = NBConYard_A5N.NBConYard_A5N
      AnimationMode   = LOOP
      TransitionKey  = UP_NIGHT
    End
    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A5S
      Animation       = NBConYard_A5S.NBConYard_A5S
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBConYard_A5SN
      Animation       = NBConYard_A5SN.NBConYard_A5SN
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model            = NBConYard_AB
      Animation       = NBConYard_AB.NBConYard_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model            = NBConYard_ABN
      Animation       = NBConYard_ABN.NBConYard_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model            = NBConYard_ABS
      Animation       = NBConYard_ABS.NBConYard_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model            = NBConYard_ABSN
      Animation       = NBConYard_ABSN.NBConYard_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = NBConYard_AB
      Animation       = NBConYard_AB.NBConYard_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = NBConYard_ABN
      Animation       = NBConYard_ABN.NBConYard_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = NBConYard_ABS
      Animation       = NBConYard_ABS.NBConYard_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = NBConYard_ABSN
      Animation       = NBConYard_ABSN.NBConYard_ABSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End
    
; ----------------- the factory door -------------------
  Draw                = W3DModelDraw ModuleTag_06
    DefaultConditionState
      Model           = NBConYard_A7
      Animation       = NBConYard_A7.NBConYard_A7
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT
    AliasConditionState = SNOW
    AliasConditionState = NIGHT SNOW
    
    ConditionState    = DAMAGED
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = NIGHT SNOW DAMAGED
    
    ConditionState    = REALLYDAMAGED RUBBLE
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE
    
    ConditionState    = DOOR_1_OPENING
      Model           = NBConYard_A7
      Animation       = NBConYard_A7.NBConYard_A7
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End   
    AliasConditionState = NIGHT DOOR_1_OPENING
    AliasConditionState = SNOW DOOR_1_OPENING
    AliasConditionState = NIGHT SNOW DOOR_1_OPENING
    
    ConditionState    = DOOR_1_OPENING DAMAGED
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End   
    AliasConditionState = NIGHT DOOR_1_OPENING DAMAGED
    AliasConditionState = SNOW DOOR_1_OPENING DAMAGED
    AliasConditionState = NIGHT SNOW DOOR_1_OPENING DAMAGED
    
    ConditionState    = DOOR_1_OPENING REALLYDAMAGED RUBBLE
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT DOOR_1_OPENING REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW DOOR_1_OPENING REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW DOOR_1_OPENING REALLYDAMAGED RUBBLE
    
    ConditionState    = DOOR_1_CLOSING
      Model           = NBConYard_A7
      Animation       = NBConYard_A7.NBConYard_A7
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End 
    AliasConditionState = NIGHT DOOR_1_CLOSING
    AliasConditionState = SNOW DOOR_1_CLOSING
    AliasConditionState = NIGHT SNOW DOOR_1_CLOSING
      
    ConditionState    = DOOR_1_CLOSING DAMAGED
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_CLOSING DAMAGED
    AliasConditionState = SNOW DOOR_1_CLOSING DAMAGED
    AliasConditionState = NIGHT SNOW DOOR_1_CLOSING DAMAGED
    
    ConditionState    = DOOR_1_CLOSING REALLYDAMAGED RUBBLE
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_CLOSING REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW DOOR_1_CLOSING REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW DOOR_1_CLOSING REALLYDAMAGED RUBBLE
    
    ConditionState    = DOOR_1_WAITING_OPEN
      Model           = NBConYard_A7
      Animation       = NBConYard_A7.NBConYard_A7
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End  
    AliasConditionState = NIGHT DOOR_1_WAITING_OPEN
    AliasConditionState = SNOW DOOR_1_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DOOR_1_WAITING_OPEN
     
    ConditionState    = DOOR_1_WAITING_OPEN DAMAGED
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End  
    AliasConditionState = NIGHT DOOR_1_WAITING_OPEN DAMAGED
    AliasConditionState = SNOW DOOR_1_WAITING_OPEN DAMAGED
    AliasConditionState = NIGHT SNOW DOOR_1_WAITING_OPEN DAMAGED
     
    ConditionState    = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
      Model           = NBConYard_A7D
      Animation       = NBConYard_A7D.NBConYard_A7D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBConYard_A7
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBConYard_A7D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBConYard_A7D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
    
  End
  
  ; Officers club flag
  Draw = W3DModelDraw ModuleTag_OfficersClub
    OkToChangeModelColor = No

    ConditionState       = NONE
      Model              = None
    End
    AliasConditionState  = DAMAGED
    AliasConditionState  = REALLYDAMAGED
    AliasConditionState  = RUBBLE
    AliasConditionState  = REALLYDAMAGED RUBBLE
    ConditionState       = PREORDER
      Model              = OCFlagCHA
      Animation          = OCFlagCHA.OCFlagCHA
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
;    ConditionState       = PREORDER DAMAGED
;      Model              = OCFlagCHA_D
;      Animation          = OCFlagCHA_D.OCFlagCHA_D
;      AnimationMode      = LOOP
;      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
;    End
;    ConditionState       = PREORDER REALLYDAMAGED
;      Model              = OCFlagCHA_E
;      Animation          = OCFlagCHA_E.OCFlagCHA_E
;      AnimationMode      = LOOP
;      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
;    End
  End

  PlacementViewAngle = -135

  ; ***DESIGN parameters ***
  DisplayName       = OBJECT:CommandCenter
  Side              = Boss
  EditorSorting     = STRUCTURE
  BuildCost         = 2000
  BuildTime         = 45.0           ; in seconds
  EnergyProduction  = 0  ;Command center should be free
  CommandSet        = Boss_CommandCenterCommandSet
  VisionRange       = 300.0           ; Shroud clearing distance
  ShroudClearingRange = 300
  ArmorSet
    Conditions      = None
    Armor           = StructureArmorTough
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 200 200 200 200  ; Experience point value at each level

  ; *** AUDIO Parameters ***
  VoiceSelect       = CommandCenterChinaSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority     = STRUCTURE
  KindOf            = PRELOAD STRUCTURE SELECTABLE IMMOBILE COMMANDCENTER SCORE CAPTURABLE FS_FACTORY AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY

  Body              = StructureBody ModuleTag_07
    MaxHealth       = 5000.0
    InitialHealth   = 5000.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 = 5200
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End

  Behavior = PreorderCreate ModuleTag_PreorderCreate
  End

  Behavior = ProductionUpdate ModuleTag_08
    NumDoorAnimations            = 1
    DoorOpeningTime              = 3000  ;in mSeconds
    DoorWaitOpenTime             = 3000  ;in mSeconds
    DoorCloseTime                = 3000  ;in mSeconds
    ConstructionCompleteDuration = 1500  ;in mSeconds
  End
  Behavior = DefaultProductionExitUpdate ModuleTag_09
    UnitCreatePoint   = X:-18.0  Y: 40.0   Z:0.0
    NaturalRallyPoint = X: 60.0  Y: 40.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
  End
  Behavior = RadarUpdate ModuleTag_10
    RadarExtendTime   = 4000     ;in mSeconds
  End

  Behavior             = DestroyDie ModuleTag_11
    ;nothing
  End
  Behavior             = CreateObjectDie ModuleTag_12
    CreationList  = OCL_LargeStructureDebris
  End
  Behavior             = FXListDie ModuleTag_13
    DeathFX       = FX_StructureMediumDeath
  End

  Behavior         = RadarUpgrade ModuleTag_14
    TriggeredBy   = Upgrade_ChinaRadar
  End

  Behavior           = OCLSpecialPower ModuleTag_15
    SpecialPowerTemplate = SuperweaponArtilleryBarrage
    UpgradeOCL           = SCIENCE_ArtilleryBarrage3 SUPERWEAPON_ArtilleryBarrage3
    UpgradeOCL           = SCIENCE_ArtilleryBarrage2 SUPERWEAPON_ArtilleryBarrage2
    OCL                  = SUPERWEAPON_ArtilleryBarrage1
    CreateLocation       = CREATE_AT_EDGE_FARTHEST_FROM_TARGET
  End

  Behavior           = OCLSpecialPower ModuleTag_16
    SpecialPowerTemplate = SuperweaponFrenzy
    UpgradeOCL           = SCIENCE_Frenzy3 SUPERWEAPON_Frenzy3
    UpgradeOCL           = SCIENCE_Frenzy2 SUPERWEAPON_Frenzy2
    OCL                  = SUPERWEAPON_Frenzy1
    CreateLocation       = CREATE_AT_LOCATION
  End

  Behavior           = OCLSpecialPower ModuleTag_17
    SpecialPowerTemplate = SuperweaponEMPPulse
    OCL                  = SUPERWEAPON_EMPPulse
    CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
  End

  Behavior           = CashHackSpecialPower ModuleTag_18
    SpecialPowerTemplate = SuperweaponCashHack
    UpgradeMoneyAmount   = SCIENCE_CashHack3 4000
    UpgradeMoneyAmount   = SCIENCE_CashHack2 2000
    MoneyAmount          = 1000  ; amount of money to steal
  End

  Behavior           = OCLSpecialPower ModuleTag_19
    SpecialPowerTemplate = SuperweaponSneakAttack
    OCL                  = OCL_CreateSneakAttackTunnelStart
    CreateLocation       = CREATE_AT_LOCATION
    ReferenceObject      = GLASneakAttackTunnelNetwork ;So we know what the final product is for script placement calculations
  End

  Behavior = CashBountyPower ModuleTag_20
    SpecialPowerTemplate    = SpecialAbilityCashBounty1
    Bounty                  = 5%
  End
  Behavior = CashBountyPower ModuleTag_21
    SpecialPowerTemplate    = SpecialAbilityCashBounty2
    Bounty                  = 10%
  End
  Behavior = CashBountyPower ModuleTag_22
    SpecialPowerTemplate    = SpecialAbilityCashBounty3
    Bounty                  = 20%
  End

  Behavior           = OCLSpecialPower ModuleTag_23
    SpecialPowerTemplate = SpecialPowerSpySatellite
    OCL                  = SUPERWEAPON_SpySatellite
    CreateLocation       = CREATE_AT_LOCATION
  End

  Behavior                   = SpyVisionSpecialPower SpyTag_1
    SpecialPowerTemplate     = SuperweaponCIAIntelligence   
    BaseDuration             =  30000 ;in milliseconds
    BonusDurationPerCaptured =  10000 ;in milliseconds
    MaxDuration              = 240000 ;in milliseconds    
  End
  Behavior                   = SpyVisionUpdate SpyTag_2
    ;<NO DATA>
  End

  Behavior = FlammableUpdate ModuleTag_24
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_25
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End

Behavior = StealthUpdate ModuleStealth_26
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_27
    TriggeredBy = Upgrade_GLACamoNetting
  END

 Behavior = BaseRegenerateUpdate ModuleTag_28
    ;No data
  End



  Geometry            = BOX
  FactoryExitWidth    = 25
  GeometryMajorRadius = 60.0
  GeometryMinorRadius = 63.0
  GeometryHeight      = 36.0
  GeometryIsSmall     = No
  Shadow              = SHADOW_VOLUME
  BuildCompletion     = PLACED_BY_PLAYER

End
























;------------------------------------------------------------------------------
Object Boss_PowerPlant

  ; *** ART Parameters ***
  SelectPortrait         = SAPowerPlant_L
  ButtonImage            = SAPowerPlant

; ---- the building itself ------
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    ; day ********************************************
    ConditionState       = NONE;
      Model              = ABPWRPLANT
      Animation          = ABPWRPLANT.ABPWRPLANT
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke02 SteamVent
    End
    ConditionState       = DAMAGED
      Model              = ABPWRPLANT_D
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge
      ParticleSysBone    = Sparks01 LiveWireSparks
      ParticleSysBone    = Sparks02 LiveWireSparks
    End
    ConditionState       = REALLYDAMAGED RUBBLE
      Model              = ABPWRPLANT_E
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke 
      ParticleSysBone    = Smoke05 SmolderingSmoke 
      ParticleSysBone    = Smoke06 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge 
      ParticleSysBone    = Fire02 SmolderingFireLarge
      ParticleSysBone    = Fire03 SmolderingFireLarge
      ParticleSysBone    = Spark01 LiveWireSparks
    End

    ; day upgrade
    ConditionState = POWER_PLANT_UPGRADED ;
      Model = ABPWRPLANT
      Animation     = ABPWRPLANT.ABPWRPLANT
      AnimationMode = LOOP
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Spark01 LiveWireSparks
      ParticleSysBone = Spark02 LiveWireSparks02
      ParticleSysBone = Spark03 LiveWireSparks02 
      ParticleSysBone = Spark04 LiveWireSparks
      ParticleSysBone = Spark05 LiveWireSparks02
      ParticleSysBone = Spark06 LiveWireSparks 
    End
    ConditionState = DAMAGED POWER_PLANT_UPGRADED
      Model = ABPWRPLANT_D
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge
      ParticleSysBone = Spark01 LiveWireSparks
      ParticleSysBone = Spark02 LiveWireSparks02
      ParticleSysBone = Spark03 LiveWireSparks02 
      ParticleSysBone = Spark04 LiveWireSparks
      ParticleSysBone = Spark05 LiveWireSparks02
      ParticleSysBone = Spark06 LiveWireSparks 
    End
    ConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADED
      Model = ABPWRPLANT_E
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke 
      ParticleSysBone = Smoke05 SmolderingSmoke 
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge 
      ParticleSysBone = Fire02 SmolderingFireLarge
      ParticleSysBone = Fire03 SmolderingFireLarge
      ParticleSysBone = Spark01 LiveWireSparks
      ParticleSysBone = Spark02 LiveWireSparks02
      ParticleSysBone = Spark03 LiveWireSparks02 
      ParticleSysBone = Spark04 LiveWireSparks
      ParticleSysBone = Spark05 LiveWireSparks02
      ParticleSysBone = Spark06 LiveWireSparks 
    End

    ; night 
    ConditionState = NIGHT;
      Model = ABPWRPLANT_N
      Animation     = ABPWRPLANT_N.ABPWRPLANT_N
      AnimationMode = LOOP
      ParticleSysBone = Smoke02 SteamVent
    End
    ConditionState       = DAMAGED NIGHT
      Model              = ABPWRPLANT_DN
      Animation          = ABPWRPLANT_DN.ABPWRPLANT_DN
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge
      ParticleSysBone    = Sparks01 LiveWireSparks
      ParticleSysBone    = Sparks02 LiveWireSparks
      ParticleSysBone    = Sparks03 LiveWireSparks02
    End
    ConditionState = REALLYDAMAGED RUBBLE NIGHT;
      Model = ABPWRPLANT_EN
      Animation     = ABPWRPLANT_EN.ABPWRPLANT_EN
      AnimationMode = LOOP
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke 
      ParticleSysBone = Smoke05 SmolderingSmoke 
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge 
      ParticleSysBone = Fire02 SmolderingFireLarge
      ParticleSysBone = Fire03 SmolderingFireLarge
      ParticleSysBone = Sparks01 LiveWireSparks
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
    End

    ; night upgraded
    ConditionState = NIGHT POWER_PLANT_UPGRADED
      Model = ABPWRPLANT_N
      Animation     = ABPWRPLANT_N.ABPWRPLANT_N
      AnimationMode = LOOP
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
      ParticleSysBone = Sparks08 LiveWireSparks02
      ParticleSysBone = Sparks09 LiveWireSparks 
      ParticleSysBone = Sparks10 LiveWireSparks02
      ParticleSysBone = Sparks11 LiveWireSparks 
    End
    ConditionState       = DAMAGED NIGHT POWER_PLANT_UPGRADED
      Model              = ABPWRPLANT_DN
      Animation          = ABPWRPLANT_DN.ABPWRPLANT_DN
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
      ParticleSysBone = Sparks08 LiveWireSparks02
      ParticleSysBone = Sparks09 LiveWireSparks 
      ParticleSysBone = Sparks10 LiveWireSparks02
      ParticleSysBone = Sparks11 LiveWireSparks 
    End
    ConditionState = REALLYDAMAGED RUBBLE NIGHT POWER_PLANT_UPGRADED
      Model = ABPWRPLANT_EN
      Animation     = ABPWRPLANT_EN.ABPWRPLANT_EN
      AnimationMode = LOOP
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke 
      ParticleSysBone = Smoke05 SmolderingSmoke 
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge 
      ParticleSysBone = Fire02 SmolderingFireLarge
      ParticleSysBone = Fire03 SmolderingFireLarge
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
      ParticleSysBone = Sparks08 LiveWireSparks02
      ParticleSysBone = Sparks09 LiveWireSparks 
      ParticleSysBone = Sparks10 LiveWireSparks02
      ParticleSysBone = Sparks11 LiveWireSparks 
    End
    
    
        ; day ********************************************
    ConditionState       = SNOW
      Model              = ABPWRPLANT_S
      Animation          = ABPWRPLANT_S.ABPWRPLANT_S
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke02 SteamVent
    End
    ConditionState       = DAMAGED SNOW
      Model              = ABPWRPLANT_DS
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge
      ParticleSysBone    = Sparks01 LiveWireSparks
      ParticleSysBone    = Sparks02 LiveWireSparks
    End
    ConditionState       = REALLYDAMAGED RUBBLE SNOW
      Model              = ABPWRPLANT_ES
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke 
      ParticleSysBone    = Smoke05 SmolderingSmoke 
      ParticleSysBone    = Smoke06 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge 
      ParticleSysBone    = Fire02 SmolderingFireLarge
      ParticleSysBone    = Fire03 SmolderingFireLarge
      ParticleSysBone    = Spark01 LiveWireSparks
    End


    ; day upgrade
    ConditionState = POWER_PLANT_UPGRADED SNOW;
      Model = ABPWRPLANT_S
      Animation     = ABPWRPLANT_S.ABPWRPLANT_S
      AnimationMode = LOOP
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Spark01 LiveWireSparks
      ParticleSysBone = Spark02 LiveWireSparks02
      ParticleSysBone = Spark03 LiveWireSparks02 
      ParticleSysBone = Spark04 LiveWireSparks
      ParticleSysBone = Spark05 LiveWireSparks02
      ParticleSysBone = Spark06 LiveWireSparks 
    End
    ConditionState = DAMAGED POWER_PLANT_UPGRADED SNOW
      Model = ABPWRPLANT_DS
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge
      ParticleSysBone = Spark01 LiveWireSparks
      ParticleSysBone = Spark02 LiveWireSparks02
      ParticleSysBone = Spark03 LiveWireSparks02 
      ParticleSysBone = Spark04 LiveWireSparks
      ParticleSysBone = Spark05 LiveWireSparks02
      ParticleSysBone = Spark06 LiveWireSparks 
    End
    ConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADED SNOW
      Model = ABPWRPLANT_ES
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke 
      ParticleSysBone = Smoke05 SmolderingSmoke 
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge 
      ParticleSysBone = Fire02 SmolderingFireLarge
      ParticleSysBone = Fire03 SmolderingFireLarge
      ParticleSysBone = Spark01 LiveWireSparks
      ParticleSysBone = Spark02 LiveWireSparks02
      ParticleSysBone = Spark03 LiveWireSparks02 
      ParticleSysBone = Spark04 LiveWireSparks
      ParticleSysBone = Spark05 LiveWireSparks02
      ParticleSysBone = Spark06 LiveWireSparks 
    End


    ; night 
    ConditionState = NIGHT SNOW;
      Model = ABPWRPLANT_NS
      Animation     = ABPWRPLANT_NS.ABPWRPLANT_NS
      AnimationMode = LOOP
      ParticleSysBone = Smoke02 SteamVent
    End
    ConditionState       = DAMAGED NIGHT SNOW
      Model              = ABPWRPLANT_DNS
      Animation          = ABPWRPLANT_DNS.ABPWRPLANT_DNS
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge
      ParticleSysBone    = Sparks01 LiveWireSparks
      ParticleSysBone    = Sparks02 LiveWireSparks
      ParticleSysBone    = Sparks03 LiveWireSparks02
    End
    ConditionState = REALLYDAMAGED RUBBLE NIGHT SNOW;
      Model = ABPWRPLANT_ENS
      Animation     = ABPWRPLANT_ENS.ABPWRPLANT_ENS
      AnimationMode = LOOP
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke 
      ParticleSysBone = Smoke05 SmolderingSmoke 
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge 
      ParticleSysBone = Fire02 SmolderingFireLarge
      ParticleSysBone = Fire03 SmolderingFireLarge
      ParticleSysBone = Sparks01 LiveWireSparks
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
    End

    ; night upgraded
    ConditionState = NIGHT POWER_PLANT_UPGRADED SNOW
      Model = ABPWRPLANT_NS
      Animation     = ABPWRPLANT_NS.ABPWRPLANT_NS
      AnimationMode = LOOP
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
      ParticleSysBone = Sparks08 LiveWireSparks02
      ParticleSysBone = Sparks09 LiveWireSparks 
      ParticleSysBone = Sparks10 LiveWireSparks02
      ParticleSysBone = Sparks11 LiveWireSparks 
    End
    ConditionState       = DAMAGED NIGHT POWER_PLANT_UPGRADED SNOW
      Model              = ABPWRPLANT_DNS
      Animation          = ABPWRPLANT_DNS.ABPWRPLANT_DNS
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke 
      ParticleSysBone    = Smoke02 SteamVent
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFireLarge
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
      ParticleSysBone = Sparks08 LiveWireSparks02
      ParticleSysBone = Sparks09 LiveWireSparks 
      ParticleSysBone = Sparks10 LiveWireSparks02
      ParticleSysBone = Sparks11 LiveWireSparks 
    End
    ConditionState = REALLYDAMAGED RUBBLE NIGHT POWER_PLANT_UPGRADED SNOW
      Model = ABPWRPLANT_ENS
      Animation     = ABPWRPLANT_ENS.ABPWRPLANT_ENS
      AnimationMode = LOOP
      ParticleSysBone = Smoke01 SmolderingSmoke 
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke 
      ParticleSysBone = Smoke05 SmolderingSmoke 
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Fire01 SmolderingFireLarge 
      ParticleSysBone = Fire02 SmolderingFireLarge
      ParticleSysBone = Fire03 SmolderingFireLarge
      ParticleSysBone = Sparks02 LiveWireSparks02
      ParticleSysBone = Sparks03 LiveWireSparks02 
      ParticleSysBone = Sparks04 LiveWireSparks
      ParticleSysBone = Sparks05 LiveWireSparks02
      ParticleSysBone = Sparks07 LiveWireSparks 
      ParticleSysBone = Sparks08 LiveWireSparks02
      ParticleSysBone = Sparks09 LiveWireSparks 
      ParticleSysBone = Sparks10 LiveWireSparks02
      ParticleSysBone = Sparks11 LiveWireSparks 
    End
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABPWRPLANT
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABPWRPLANT_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABPWRPLANT_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = ABPWRPLANT_N
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = ABPWRPLANT_DN
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = ABPWRPLANT_EN
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = ABPWRPLANT_S
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = ABPWRPLANT_DS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = ABPWRPLANT_ES
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = ABPWRPLANT_NS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = ABPWRPLANT_DNS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = ABPWRPLANT_ENS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD DAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD REALLYDAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT DAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD SNOW POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD SNOW DAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT SNOW POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED POWER_PLANT_UPGRADED
    ;**************************************************************************************************************************
    
    
 
    

    
  End

  ; ------------ construction-zone fence -----------------

  Draw = W3DModelDraw ModuleTag_02
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A4
      Animation       = ABPwrPlant_A4.ABPwrPlant_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A4N
      Animation       = ABPwrPlant_A4N.ABPwrPlant_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A4S
      Animation       = ABPwrPlant_A4S.ABPwrPlant_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A4S
      Animation       = ABPwrPlant_A4S.ABPwrPlant_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABPwrPlant_A4
      Animation       = ABPwrPlant_A4.ABPwrPlant_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABPwrPlant_A4N
      Animation       = ABPwrPlant_A4N.ABPwrPlant_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABPwrPlant_A4S
      Animation       = ABPwrPlant_A4S.ABPwrPlant_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABPwrPlant_A4SN
      Animation       = ABPwrPlant_A4SN.ABPwrPlant_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABPwrPlant_A4
      Animation       = ABPwrPlant_A4.ABPwrPlant_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABPwrPlant_A4N
      Animation       = ABPwrPlant_A4N.ABPwrPlant_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABPwrPlant_A4S
      Animation       = ABPwrPlant_A4S.ABPwrPlant_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABPwrPlant_A4SN
      Animation       = ABPwrPlant_A4SN.ABPwrPlant_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = ABPwrPlant_A6
      Animation       = ABPwrPlant_A6.ABPwrPlant_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = SparksS01 BuildUpBlueSpark
      ParticleSysBone = SparksS02 BuildUpBlueSpark
      ParticleSysBone = SparksS03 SparksSmall
      ParticleSysBone = SparksS06 BuildUpBlueSpark
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABPwrPlant_A6N
      Animation       = ABPwrPlant_A6N.ABPwrPlant_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = SparksS01 BuildUpBlueSpark
      ParticleSysBone = SparksS02 BuildUpBlueSpark
      ParticleSysBone = SparksS03 SparksSmall
      ParticleSysBone = SparksS06 BuildUpBlueSpark
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = ABPwrPlant_A6S
      Animation       = ABPwrPlant_A6S.ABPwrPlant_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = SparksS01 BuildUpBlueSpark
      ParticleSysBone = SparksS02 BuildUpBlueSpark
      ParticleSysBone = SparksS03 SparksSmall
      ParticleSysBone = SparksS06 BuildUpBlueSpark
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABPwrPlant_A6SN
      Animation       = ABPwrPlant_A6SN.ABPwrPlant_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = SparksS01 BuildUpBlueSpark
      ParticleSysBone = SparksS02 BuildUpBlueSpark
      ParticleSysBone = SparksS03 SparksSmall
      ParticleSysBone = SparksS06 BuildUpBlueSpark
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = ABPwrPlant_A6
      Animation       = ABPwrPlant_A6.ABPwrPlant_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = ABPwrPlant_A6N
      Animation       = ABPwrPlant_A6N.ABPwrPlant_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = ABPwrPlant_A6S
      Animation       = ABPwrPlant_A6S.ABPwrPlant_A6S
      AnimationMode   = ONCE

      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = ABPwrPlant_A6SN
      Animation       = ABPwrPlant_A6SN.ABPwrPlant_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABPwrPlant_A6
      Animation       = ABPwrPlant_A6.ABPwrPlant_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABPwrPlant_A6N
      Animation       = ABPwrPlant_A6N.ABPwrPlant_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABPwrPlant_A6S
      Animation       = ABPwrPlant_A6S.ABPwrPlant_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABPwrPlant_A6SN
      Animation       = ABPwrPlant_A6SN.ABPwrPlant_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_04
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SOLD
      Model           = NONE
    End

    ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A5
      Animation       = ABPwrPlant_A5.ABPwrPlant_A5
      AnimationMode   = LOOP
      TransitionKey  = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A5N
      Animation       = ABPwrPlant_A5N.ABPwrPlant_A5N
      AnimationMode   = LOOP
      TransitionKey  = UP_NIGHT
    End
    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A5S
      Animation       = ABPwrPlant_A5S.ABPwrPlant_A5S
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPwrPlant_A5SN
      Animation       = ABPwrPlant_A5SN.ABPwrPlant_A5SN
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model            = ABPwrPlant_AB
      Animation       = ABPwrPlant_AB.ABPwrPlant_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model            = ABPwrPlant_ABN
      Animation       = ABPwrPlant_ABN.ABPwrPlant_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model            = ABPwrPlant_ABS
      Animation       = ABPwrPlant_ABS.ABPwrPlant_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model            = ABPwrPlant_ABSN
      Animation       = ABPwrPlant_ABSN.ABPwrPlant_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = ABPwrPlant_AB
      Animation       = ABPwrPlant_AB.ABPwrPlant_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = ABPwrPlant_ABN
      Animation       = ABPwrPlant_ABN.ABPwrPlant_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = ABPwrPlant_ABS
      Animation       = ABPwrPlant_ABS.ABPwrPlant_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = ABPwrPlant_ABSN
      Animation       = ABPwrPlant_ABSN.ABPwrPlant_ABSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End
 
; ---- the control rods -----
  Draw = W3DModelDraw ModuleTag_05
    OkToChangeModelColor = Yes

    ; no upgrade
    ConditionState = NONE
      Model ABPWRPLANT_A1
    End
    AliasConditionState = SNOW
    AliasConditionState = NIGHT
    AliasConditionState = SNOW NIGHT

    ConditionState = DAMAGED
      Model ABPWRPLANT_A1D
    End
    AliasConditionState = DAMAGED SNOW
    AliasConditionState = DAMAGED NIGHT
    AliasConditionState = DAMAGED SNOW NIGHT

    ConditionState = REALLYDAMAGED RUBBLE
      Model ABPWRPLANT_A1E
    End
    AliasConditionState = REALLYDAMAGED RUBBLE SNOW
    AliasConditionState = REALLYDAMAGED RUBBLE NIGHT
    AliasConditionState = REALLYDAMAGED RUBBLE SNOW NIGHT


    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABPWRPLANT_A1
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW NIGHT

    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABPWRPLANT_A1D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState = DAMAGED AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState = DAMAGED AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState = DAMAGED AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW NIGHT

    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE
      Model              = ABPWRPLANT_A1E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState = REALLYDAMAGED RUBBLE AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState = REALLYDAMAGED RUBBLE AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState = REALLYDAMAGED RUBBLE AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW NIGHT

    ; first to upgrade
    ConditionState = POWER_PLANT_UPGRADING
      Model ABPWRPLANT_A1
      Animation     = ABPWRPLANT_A1.ABPWRPLANT_A1
      AnimationMode = ONCE
      Flags         = START_FRAME_FIRST
    End
    AliasConditionState = POWER_PLANT_UPGRADING SNOW
    AliasConditionState = POWER_PLANT_UPGRADING NIGHT
    AliasConditionState = POWER_PLANT_UPGRADING SNOW NIGHT

    ConditionState = DAMAGED POWER_PLANT_UPGRADING
      Model ABPWRPLANT_A1D
      Animation     = ABPWRPLANT_A1D.ABPWRPLANT_A1D
      AnimationMode = ONCE
      Flags         = START_FRAME_FIRST
    End
    AliasConditionState = DAMAGED POWER_PLANT_UPGRADING SNOW
    AliasConditionState = DAMAGED POWER_PLANT_UPGRADING NIGHT
    AliasConditionState = DAMAGED POWER_PLANT_UPGRADING SNOW NIGHT

    ConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADING
      Model ABPWRPLANT_A1E
      Animation     = ABPWRPLANT_A1E.ABPWRPLANT_A1E
      AnimationMode = ONCE
      Flags         = START_FRAME_FIRST
    End
    AliasConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADING SNOW
    AliasConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADING NIGHT
    AliasConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADING SNOW NIGHT

    ; already upgraded
    ConditionState = POWER_PLANT_UPGRADED
      Model ABPWRPLANT_A1
      Animation     = ABPWRPLANT_A1.ABPWRPLANT_A1
      AnimationMode = MANUAL
      Flags         = START_FRAME_LAST
    End
    AliasConditionState = POWER_PLANT_UPGRADED SNOW
    AliasConditionState = POWER_PLANT_UPGRADED NIGHT
    AliasConditionState = POWER_PLANT_UPGRADED SNOW NIGHT

    ConditionState = DAMAGED POWER_PLANT_UPGRADED
      Model ABPWRPLANT_A1D
      Animation     = ABPWRPLANT_A1D.ABPWRPLANT_A1D
      AnimationMode = MANUAL
      Flags         = START_FRAME_LAST
    End
    AliasConditionState = DAMAGED POWER_PLANT_UPGRADED SNOW
    AliasConditionState = DAMAGED POWER_PLANT_UPGRADED NIGHT
    AliasConditionState = DAMAGED POWER_PLANT_UPGRADED SNOW NIGHT

    ConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADED
      Model ABPWRPLANT_A1E
      Animation     = ABPWRPLANT_A1E.ABPWRPLANT_A1E
      AnimationMode = MANUAL
      Flags         = START_FRAME_LAST
    End
    AliasConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADED SNOW
    AliasConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADED NIGHT
    AliasConditionState = REALLYDAMAGED RUBBLE POWER_PLANT_UPGRADED SNOW NIGHT
 
  
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD DAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD REALLYDAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT DAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT SNOW POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED POWER_PLANT_UPGRADED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED POWER_PLANT_UPGRADED
    ;**************************************************************************************************************************
  
  End
  
  
 
  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:ColdFusionReactor
  Side             = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
;    Object = Boss_CommandCenter
  End
  BuildCost        = 600
  BuildTime        = 5.0           ; in seconds
  EnergyProduction = 20
  EnergyBonus      = 25

  VisionRange      = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions     = None
    Armor          = StructureArmor
    DamageFX       = StructureDamageFXNoShake
  End
  CommandSet       = AmericaPowerPlantCommandSet
  ExperienceValue     = 100 100 100 100  ; Experience point value at each level

  ; *** AUDIO Parameters ***
  VoiceSelect = ColdFusionReactorSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE CAPTURABLE FS_POWER MP_COUNT_FOR_VICTORY
  Body            = StructureBody ModuleTag_06
    MaxHealth       = 800.0
    InitialHealth   = 800.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 = 1000
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End

  Behavior = PowerPlantUpgrade ModuleTag_07
    TriggeredBy = Upgrade_AmericaAdvancedControlRods
  End

  Behavior = BaseRegenerateUpdate ModuleTag_08
    ;No data
  End
  Behavior = PowerPlantUpdate ModuleTag_09
    RodsExtendTime = 600
  End


  Behavior = DestroyDie ModuleTag_10
    ;nothing
  End
  Behavior             = CreateObjectDie ModuleTag_11
    CreationList  = OCL_ABPowerPlantExplode
  End
  Behavior             = CreateObjectDie ModuleTag_12
  ;**FIX**
    CreationList  = OCL_AmericanRangerDebris02
    ExemptStatus  = UNDER_CONSTRUCTION
  End
  Behavior        = FXListDie ModuleTag_13
    DeathFX       = FX_StructureSmallDeath
  End

  Behavior = ProductionUpdate ModuleTag_14
    ; nothing
  End

  Behavior = FlammableUpdate ModuleTag_16
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_17
    ;-------------DESIGNED FOR SMALL SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionSmallExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionSmallShockwave
  End

Behavior = StealthUpdate ModuleStealth_09
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_23
    TriggeredBy = Upgrade_GLACamoNetting
  END

  

  Geometry            = BOX
  GeometryMajorRadius = 22.0
  GeometryMinorRadius = 30.0
  GeometryHeight      = 46.0
  GeometryIsSmall     = No
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End
































;------------------------------------------------------------------------------
Object Boss_ParticleCannonUplink

  ; *** ART Parameters ***
  SelectPortrait         = SAUplink_L
  ButtonImage            = SAUplink

  Draw = W3DModelDraw ModuleTag_01
    ExtraPublicBone        = FX01
    ExtraPublicBone        = FX02
    ExtraPublicBone        = FX03
    ExtraPublicBone        = FX04
    ExtraPublicBone        = FX05
    OkToChangeModelColor = Yes
    
    
    ; day **************************************
    ConditionState       = NONE
      Model              = ABSDILink
      Animation          = ABSDILink.ABSDILink
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = DAMAGED
      Model              = ABSDILink_D
      Animation          = ABSDILink_D.ABSDILink_D
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = REALLYDAMAGED RUBBLE
      Model              = ABSDILink_E
      Animation          = ABSDILink_E.ABSDILink_E
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End


    ; night *************************************
    ConditionState       = NIGHT
      Model              = ABSDILink_N
      Animation          = ABSDILink_N.ABSDILink_N
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = DAMAGED NIGHT
      Model              = ABSDILink_DN
      Animation          = ABSDILink_DN.ABSDILink_DN
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = REALLYDAMAGED RUBBLE NIGHT
      Model              = ABSDILink_EN
      Animation          = ABSDILink_EN.ABSDILink_EN
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    
    ; day snow **************************************
    ConditionState       = SNOW
      Model              = ABSDILink_S
      Animation          = ABSDILink_S.ABSDILink_S
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = DAMAGED SNOW
      Model              = ABSDILink_DS
      Animation          = ABSDILink_DS.ABSDILink_DS
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = REALLYDAMAGED RUBBLE SNOW
      Model              = ABSDILink_ES
      Animation          = ABSDILink_ES.ABSDILink_ES
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End

    ; night snow *************************************
    ConditionState       = NIGHT SNOW
      Model              = ABSDILink_NS
      Animation          = ABSDILink_NS.ABSDILink_NS
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = DAMAGED NIGHT SNOW
      Model              = ABSDILink_DNS
      Animation          = ABSDILink_DNS.ABSDILink_DNS
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model              = ABSDILink_ENS
      Animation          = ABSDILink_ENS.ABSDILink_ENS
      AnimationMode      = LOOP
      Flags              = MAINTAIN_FRAME_ACROSS_STATES
    End

    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABSDILink
      Animation          = ABSDILink.ABSDILink
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABSDILink_D
      Animation          = ABSDILink_D.ABSDILink_D
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABSDILink_E
      Animation          = ABSDILink_E.ABSDILink_E
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = ABSDILink_N
      Animation          = ABSDILink_N.ABSDILink_N
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = ABSDILink_DN
      Animation          = ABSDILink_DN.ABSDILink_DN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = ABSDILink_EN
      Animation          = ABSDILink_EN.ABSDILink_EN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = ABSDILink_S
      Animation          = ABSDILink_S.ABSDILink_S
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = ABSDILink_DS
      Animation          = ABSDILink_DS.ABSDILink_DS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = ABSDILink_ES
      Animation          = ABSDILink_ES.ABSDILink_ES
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = ABSDILink_NS
      Animation          = ABSDILink_NS.ABSDILink_NS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = ABSDILink_DNS
      Animation          = ABSDILink_DNS.ABSDILink_DNS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = ABSDILink_ENS
      Animation          = ABSDILink_ENS.ABSDILink_ENS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************



  End

  ;------------ the cannon section (hatch, dish animations) -----------
  Draw = W3DModelDraw ModuleTag_02
    ExtraPublicBone        = FXConnector
    ExtraPublicBone        = FXMain
    OkToChangeModelColor = Yes
    ; day **************************************
    ConditionState       = NONE
      Model              = ABSDILink_A1
      Animation          = ABSDILink_A1.ABSDILink_A1
      AnimationMode      = MANUAL
      Flags              = START_FRAME_FIRST
    End
    AliasConditionState  = NIGHT 
    AliasConditionState  = NIGHT SNOW
    AliasConditionState  = SNOW
    
    ConditionState       = DAMAGED
      Model              = ABSDILink_A1D
      Animation          = ABSDILink_A1D.ABSDILink_A1D
      AnimationMode      = MANUAL
      Flags              = START_FRAME_FIRST
    End
    AliasConditionState  = NIGHT DAMAGED
    AliasConditionState  = NIGHT SNOW DAMAGED
    AliasConditionState  = SNOW DAMAGED
    
    ConditionState       = REALLYDAMAGED RUBBLE
      Model              = ABSDILink_A1E
      Animation          = ABSDILink_A1E.ABSDILink_A1E
      AnimationMode      = MANUAL
      Flags              = START_FRAME_FIRST
    End
    AliasConditionState  = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState  = NIGHT SNOW REALLYDAMAGED RUBBLE
    AliasConditionState  = SNOW REALLYDAMAGED RUBBLE
    
    ConditionState       = AWAITING_CONSTRUCTION
      Model              = None
    End
    AliasConditionState  = NIGHT AWAITING_CONSTRUCTION
    AliasConditionState  = NIGHT SNOW AWAITING_CONSTRUCTION
    AliasConditionState  = SNOW AWAITING_CONSTRUCTION
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABSDILink_A1
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
    AliasConditionState  = NIGHT SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
    AliasConditionState  = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABSDILink_A1D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
    AliasConditionState  = NIGHT SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
    AliasConditionState  = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED

    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE
      Model              = ABSDILink_A1E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE
    AliasConditionState  = NIGHT SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE
    AliasConditionState  = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE

    ;Preparing to fire!
    ConditionState       = UNPACKING
      Model              = ABSDILink_A1
      Animation          = ABSDILink_A1.ABSDILink_A1
      AnimationMode      = ONCE
      Flags              = MAINTAIN_FRAME_ACROSS_STATES2
    End
    AliasConditionState  = NIGHT UNPACKING
    AliasConditionState  = NIGHT SNOW UNPACKING
    AliasConditionState  = SNOW UNPACKING
    
    ConditionState       = UNPACKING DAMAGED
      Model              = ABSDILink_A1D
      Animation          = ABSDILink_A1D.ABSDILink_A1D
      AnimationMode      = ONCE
      Flags              = MAINTAIN_FRAME_ACROSS_STATES2
    End
    AliasConditionState  = NIGHT UNPACKING DAMAGED
    AliasConditionState  = NIGHT SNOW UNPACKING DAMAGED
    AliasConditionState  = SNOW UNPACKING DAMAGED
    
    ConditionState       = UNPACKING REALLYDAMAGED RUBBLE
      Model              = ABSDILink_A1E
      Animation          = ABSDILink_A1E.ABSDILink_A1E
      AnimationMode      = ONCE
      Flags              = MAINTAIN_FRAME_ACROSS_STATES2
    End
    AliasConditionState  = NIGHT UNPACKING REALLYDAMAGED RUBBLE
    AliasConditionState  = NIGHT SNOW UNPACKING REALLYDAMAGED RUBBLE
    AliasConditionState  = SNOW UNPACKING REALLYDAMAGED RUBBLE

    ;Ready to fire -- or firing!
    ConditionState       = DEPLOYED
      Model              = ABSDILink_A1
      Animation          = ABSDILink_A1.ABSDILink_A1
      AnimationMode      = MANUAL
      Flags              = START_FRAME_LAST
    End
    AliasConditionState  = NIGHT DEPLOYED
    AliasConditionState  = NIGHT SNOW DEPLOYED
    AliasConditionState  = SNOW DEPLOYED
    
    ConditionState       = DEPLOYED DAMAGED
      Model              = ABSDILink_A1D
      Animation          = ABSDILink_A1D.ABSDILink_A1D
      AnimationMode      = MANUAL
      Flags              = START_FRAME_LAST
    End
    AliasConditionState  = NIGHT DEPLOYED DAMAGED
    AliasConditionState  = NIGHT SNOW DEPLOYED DAMAGED
    AliasConditionState  = SNOW DEPLOYED DAMAGED
    
    ConditionState       = DEPLOYED REALLYDAMAGED RUBBLE
      Model              = ABSDILink_A1E
      Animation          = ABSDILink_A1E.ABSDILink_A1E
      AnimationMode      = MANUAL
      Flags              = START_FRAME_LAST
    End
    AliasConditionState  = NIGHT DEPLOYED REALLYDAMAGED RUBBLE
    AliasConditionState  = NIGHT SNOW DEPLOYED REALLYDAMAGED RUBBLE
    AliasConditionState  = SNOW DEPLOYED REALLYDAMAGED RUBBLE
   
    ;Packing up (recharging for new attack)
    ConditionState       = PACKING
      Model              = ABSDILink_A1
      Animation          = ABSDILink_A1.ABSDILink_A1
      AnimationMode      = ONCE_BACKWARDS
      Flags              = MAINTAIN_FRAME_ACROSS_STATES3
    End
    AliasConditionState  = NIGHT PACKING
    AliasConditionState  = NIGHT SNOW PACKING
    AliasConditionState  = SNOW PACKING
    
    ConditionState       = PACKING DAMAGED
      Model              = ABSDILink_A1D
      Animation          = ABSDILink_A1D.ABSDILink_A1D
      AnimationMode      = ONCE_BACKWARDS
      Flags              = MAINTAIN_FRAME_ACROSS_STATES3
    End
    AliasConditionState  = NIGHT PACKING DAMAGED
    AliasConditionState  = NIGHT SNOW PACKING DAMAGED
    AliasConditionState  = SNOW PACKING DAMAGED
    
    ConditionState       = PACKING REALLYDAMAGED RUBBLE
      Model              = ABSDILink_A1E
      Animation          = ABSDILink_A1E.ABSDILink_A1E
      AnimationMode      = ONCE_BACKWARDS
      Flags              = MAINTAIN_FRAME_ACROSS_STATES3
    End
    AliasConditionState  = NIGHT PACKING REALLYDAMAGED RUBBLE
    AliasConditionState  = NIGHT SNOW PACKING REALLYDAMAGED RUBBLE
    AliasConditionState  = SNOW PACKING REALLYDAMAGED RUBBLE

   
    ConditionState       = SOLD DEPLOYED
      Model              = NONE
    End     
    ConditionState       = SOLD SNOW DEPLOYED
       Model             = NONE
    End   
    ConditionState       = SOLD NIGHT DEPLOYED
       Model             = NONE
    End    
    ConditionState       = SOLD NIGHT SNOW DEPLOYED
       Model             = NONE
    End   
  End


  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A4
      Animation       = ABSDILink_A4.ABSDILink_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A4N
      Animation       = ABSDILink_A4N.ABSDILink_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A4S
      Animation       = ABSDILink_A4S.ABSDILink_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A4SN
      Animation       = ABSDILink_A4SN.ABSDILink_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABSDILink_A4
      Animation       = ABSDILink_A4.ABSDILink_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABSDILink_A4N
      Animation       = ABSDILink_A4N.ABSDILink_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABSDILink_A4S
      Animation       = ABSDILink_A4S.ABSDILink_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABSDILink_A4SN
      Animation       = ABSDILink_A4SN.ABSDILink_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABSDILink_A4
      Animation       = ABSDILink_A4.ABSDILink_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABSDILink_A4N
      Animation       = ABSDILink_A4N.ABSDILink_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABSDILink_A4S
      Animation       = ABSDILink_A4S.ABSDILink_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABSDILink_A4SN
      Animation       = ABSDILink_A4SN.ABSDILink_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_04
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = ABSDILink_A6
      Animation       = ABSDILink_A6.ABSDILink_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABSDILink_A6N
      Animation       = ABSDILink_A6N.ABSDILink_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = ABSDILink_A6S
      Animation       = ABSDILink_A6S.ABSDILink_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABSDILink_A6SN
      Animation       = ABSDILink_A6SN.ABSDILink_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = ABSDILink_A6
      Animation       = ABSDILink_A6.ABSDILink_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = ABSDILink_A6N
      Animation       = ABSDILink_A6N.ABSDILink_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = ABSDILink_A6S
      Animation       = ABSDILink_A6S.ABSDILink_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = ABSDILink_A6SN
      Animation       = ABSDILink_A6SN.ABSDILink_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABSDILink_A6
      Animation       = ABSDILink_A6.ABSDILink_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABSDILink_A6N
      Animation       = ABSDILink_A6N.ABSDILink_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABSDILink_A6S
      Animation       = ABSDILink_A6S.ABSDILink_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABSDILink_A6SN
      Animation       = ABSDILink_A6SN.ABSDILink_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_05
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SOLD
      Model           = NONE
    End

    ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A5
      Animation       = ABSDILink_A5.ABSDILink_A5
      AnimationMode   = LOOP
      TransitionKey  = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A5N
      Animation       = ABSDILink_A5N.ABSDILink_A5N
      AnimationMode   = LOOP
      TransitionKey  = UP_NIGHT
    End
    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A5S
      Animation       = ABSDILink_A5S.ABSDILink_A5S
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSDILink_A5SN
      Animation       = ABSDILink_A5SN.ABSDILink_A5SN
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model            = ABSDILink_AB
      Animation       = ABSDILink_AB.ABSDILink_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model            = ABSDILink_ABN
      Animation       = ABSDILink_ABN.ABSDILink_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model            = ABSDILink_ABS
      Animation       = ABSDILink_ABS.ABSDILink_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model            = ABSDILink_ABSN
      Animation       = ABSDILink_ABSN.ABSDILink_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = ABSDILink_AB
      Animation       = ABSDILink_AB.ABSDILink_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = ABSDILink_ABN
      Animation       = ABSDILink_ABN.ABSDILink_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = ABSDILink_ABS
      Animation       = ABSDILink_ABS.ABSDILink_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = ABSDILink_ABSN
      Animation       = ABSDILink_ABSN.ABSDILink_ABSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End
 
  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:ParticleCannon 
  Side = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_InternetCenter
  End
  BuildCost        = 10000
  BuildTime        = 60.0           ; in seconds
  EnergyProduction = -10
  VisionRange     = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ShroudRevealToAllRange = 60  ; Reveals shroud to all players at a specific amount which can be different. 
                               ; Using same value? Then use KINDOF_REVEAL_TO_ALL instead!
  ArmorSet
    Conditions      = None
    Armor           = StructureArmorTough
    DamageFX        = StructureDamageFXNoShake
  End
  CommandSet        = AmericaParticleUplinkCannonCommandSet
  ExperienceValue     = 400 400 400 400  ; Experience point value at each level

  MaxSimultaneousOfType = DeterminedBySuperweaponRestriction ; Normally unlimited, but can be selected by players in multiplayer games
  MaxSimultaneousLinkKey = Superweapon  ; Count all superweapons **AND THE GLA SCUD STORM REBUILD HOLE** as one "type" for MaxSimultaneousOfType

  ; *** AUDIO Parameters ***
  VoiceSelect = ParticleCannonSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE CAPTURABLE FS_TECHNOLOGY POWERED MP_COUNT_FOR_VICTORY FS_SUPERWEAPON
  Body            = StructureBody ModuleTag_06
    MaxHealth       = 4000.0
    InitialHealth   = 4000.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 = 4200
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End
  Behavior = BaseRegenerateUpdate ModuleTag_07
    ;No data
  End

  Behavior = SpecialPowerCreate ModuleTag_16
    ;nothing
  End
  Behavior = SpecialAbility ModuleTag_11
    SpecialPowerTemplate = SuperweaponParticleUplinkCannon
    UpdateModuleStartsAttack = Yes
  End
  Behavior = ParticleUplinkCannonUpdate ModuleTag_12
    SpecialPowerTemplate            = SuperweaponParticleUplinkCannon

    ;The values trigger the various pre-stages before being ready to actually fire.
    ;The total combined value of these determines the first sign of activity in the 
    ;cannon.
    BeginChargeTime                 = 5000 ;The outer nodes begin to charge.
    RaiseAntennaTime                = 4667 ;The hatch opens and raises antenna (matches animation speed)
    ReadyDelayTime                  = 2000 ;The time after antenna is raised prior to being ready to fire.

    ;***NOTE -- these values effect gameplay*****
    TotalFiringTime                 = 30000     ;The total ground contact time of the beam

    DamagePerSecond                 = 800       ;Amount of damage inflicted per second
    TotalDamagePulses               = 80        ;The total number of damage pulses -- less means more damage per pulse, but less accurate
    WidthGrowTime                   = 2000      ;The amount of time it takes for the beam to reach full diameter (same value used for shrinking)
    BeamTravelTime                  = 2500      ;How long it takes for the beam to hit the ground after leaving the firing dish.
    DamageType                      = PARTICLE_BEAM ;Type of damage inflicted.
    DamageRadiusScalar              = 3.4       ;Multiplies the radius (relative to beam diameter) so that things close to the beam can get hit too!
    RevealRange                     = 50.0      ;Grants gratuitous vision for the player launching the target as the beam cuts it's swath of death.
    ;********************************************

    ;Bone names for required elements
    OuterEffectBoneName             = FX          ;The base name for the outer node bones.
    OuterEffectNumBones             = 5           ;The number of outer nodes.
    ConnectorBoneName               = FXConnector ;The name of the bone where the connector lasers meet.
    FireBoneName                    = FXMain      ;The name of the bone where the main beam is fired from.

    ;These are particle systems tied to the outer nodes in varying intensities.
    OuterNodesLightFlareParticleSystem    = ParticleUplinkCannon_OuterNodeLightFlare
    OuterNodesMediumFlareParticleSystem   = ParticleUplinkCannon_OuterNodeMediumFlare
    OuterNodesIntenseFlareParticleSystem  = ParticleUplinkCannon_OuterNodeIntenseFlare

    ;The connectors system connects each of the outer nodes to the central node that receives
    ;the lasers from outside.
    ConnectorMediumLaserName        = ParticleUplinkCannon_MediumConnectorLaser
    ConnectorIntenseLaserName       = ParticleUplinkCannon_IntenseConnectorLaser

    ;Currently commented out -- These
    ;ConnectorMediumFlare            = ParticleUplinkCannon_InnerConnectorMediumFlare
    ;ConnectorIntenseFlare           = ParticleUplinkCannon_InnerConnectorIntenseFlare

    ;This is the name of the bone on the building where the beam is fired from
    LaserBaseLightFlareParticleSystemName = ParticleUplinkCannon_LaserBaseReadyToFire
    ParticleBeamLaserName           = ParticleUplinkCannon_OrbitalLaser
    GroundHitFX                     = FX_ParticleUplinkCannon_BeamHitsGround     ;TotalScorchMarks determines how many times this gets called.

    ;The flare fxlist that is played over and over during the beam firing process. Be
    ;mindful of the delay because that effects both art and sound.
    BeamLaunchFX                   = FX_ParticleUplinkCannon_BeamLaunchIteration
    DelayBetweenLaunchFX           = 1000

    ;Each scorch mark creates an object in the world, so while making more looks better
    ;it becomes a performance issue. The scalar will calculate the size of the scorch
    ;mark to make based on the current size of the beam (which changes dynamically). The
    ;number also matches the number of times the "GroundHitFX" is called.
    TotalScorchMarks               = 20
    ScorchMarkScalar               = 2.4

    ;***NOTE -- these values effect gameplay***
    ;The swath of death is the path the laser tracers centered on the targeted position.
    ;If the amplitude is zero, the line will go straight, with a higher value, it'll do
    ;a sine wave iteration, but always goes through the target point.
    SwathOfDeathDistance           = 200.0
    SwathOfDeathAmplitude          = 50.0


    ManualDrivingSpeed             = 20
    ManualFastDrivingSpeed         = 40
    DoubleClickToFastDriveDelay    = 500

    ;***SOUNDS!****
    PoweringUpSoundLoop            = ParticleUplinkCannon_PowerupSoundLoop
    UnpackToIdleSoundLoop          = ParticleUplinkCannon_UnpackToIdleSoundLoop
    FiringToPackSoundLoop          = ParticleUplinkCannon_FiringToPackSoundLoop
    GroundAnnihilationSoundLoop    = ParticleUplinkCannon_GroundAnnihilationSoundLoop

    ;The trail left behind creates an object that inflicts extra damage for a short period of time.
    DamagePulseRemnantObjectName   = ParticleUplinkCannonTrailRemnant
  End
  
  Behavior = FlammableUpdate ModuleTag_14
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = ProductionUpdate ModuleTag_15
    ; This is needed in order to get a public timer to work!
  End

  Behavior = TransitionDamageFX ModuleTag_17
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End

  Behavior = SlowDeathBehavior ModuleTag_18
    ; don't run this death if we are under construction...
    ExemptStatus   = UNDER_CONSTRUCTION
    DestructionDelay = 2000
    FX             = INITIAL FX_ParticleUplinkDeathInitial
    OCL            = INITIAL OCL_SDILinkLasers
    FX             = FINAL   FX_StructureMediumDeath
    OCL            = FINAL   OCL_ParticleUplinkDeathFinal
  End

  Behavior = InstantDeathBehavior ModuleTag_19
    ; if we are under construction, use this death instead
    RequiredStatus = UNDER_CONSTRUCTION
    OCL            = OCL_ABPowerPlantExplode
    FX             = FX_StructureMediumDeath
  End

  Behavior = ProductionUpdate ModuleTag_22
    ; nothing
  End

Behavior = StealthUpdate ModuleStealth_09
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_23
    TriggeredBy = Upgrade_GLACamoNetting
  END



  Geometry            = BOX
  GeometryMajorRadius = 64.0
  GeometryMinorRadius = 38.0
  GeometryHeight      = 38.0
  GeometryIsSmall     = No
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End









































;------------------------------------------------------------------------------

Object Boss_Airfield

  ; *** ART Parameters ***
  SelectPortrait         = SAACommand_L
  ButtonImage            = SAACommand
  Draw = W3DModelDraw ModuleTag_01

    ExtraPublicBone = Runway1Parking1 
    ExtraPublicBone = Runway1Parking2 
    ExtraPublicBone = Runway2Parking1 
    ExtraPublicBone = Runway2Parking2 
    ExtraPublicBone = Runway1Park1Han
    ExtraPublicBone = Runway1Park2Han
    ExtraPublicBone = Runway2Park1Han
    ExtraPublicBone = Runway2Park2Han 
    ExtraPublicBone = Runway1Prep1 
    ExtraPublicBone = Runway1Prep2 
    ExtraPublicBone = Runway2Prep1 
    ExtraPublicBone = Runway2Prep2 
    ExtraPublicBone = RunwayStart1 
    ExtraPublicBone = RunwayStart2 
    ExtraPublicBone = RunwayEnd1 
    ExtraPublicBone = RunwayEnd2
    ExtraPublicBone = HeliPark01

    OkToChangeModelColor = Yes

    ; day ********************************************
    DefaultConditionState
      Model              = ABArFrcCmd
      Animation          = ABArFrcCmd.ABArFrcCmd
      AnimationMode      = LOOP
    End
    ConditionState       = DAMAGED
      Model              = ABArFrcCmd_D
      Animation          = ABArFrcCmd_D.ABArFrcCmd_D
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFire
    End
    ConditionState       = REALLYDAMAGED RUBBLE
      Model              = ABArFrcCmd_E
      Animation          = ABArFrcCmd_E.ABArFrcCmd_E
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 FireFactionLarge
      ParticleSysBone    = Spark01 SparksLarge
    End
    
    ConditionState       = SNOW
      Model              = ABArFrcCmd_S
      Animation          = ABArFrcCmd_S.ABArFrcCmd_S
      AnimationMode      = LOOP
    End
    ConditionState       = DAMAGED SNOW
      Model              = ABArFrcCmd_DS
      Animation          = ABArFrcCmd_DS.ABArFrcCmd_DS
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFire
    End
    ConditionState       = REALLYDAMAGED RUBBLE SNOW
      Model              = ABArFrcCmd_ES
      Animation          = ABArFrcCmd_ES.ABArFrcCmd_ES
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 FireFactionLarge
      ParticleSysBone    = Spark01 SparksLarge
    End

    ; night ******************************************
    ConditionState       = NIGHT
      Model              = ABArFrcCmd_N
      Animation          = ABArFrcCmd_N.ABArFrcCmd_N
      AnimationMode      = LOOP
    End
    ConditionState       = DAMAGED NIGHT
      Model              = ABArFrcCmd_ND
      Animation          = ABArFrcCmd_ND.ABArFrcCmd_ND
      AnimationMode      = LOOP
    End
    ConditionState       = REALLYDAMAGED RUBBLE NIGHT
      Model              = ABArFrcCmd_NE
      Animation          = ABArFrcCmd_NE.ABArFrcCmd_NE
      AnimationMode      = LOOP
    End
    
    ConditionState       = NIGHT SNOW
      Model              = ABArFrcCmd_NS
      Animation          = ABArFrcCmd_NS.ABArFrcCmd_NS
      AnimationMode      = LOOP
    End
    ConditionState       = DAMAGED NIGHT SNOW
      Model              = ABArFrcCmd_NDS
      Animation          = ABArFrcCmd_NDS.ABArFrcCmd_NDS
      AnimationMode      = LOOP
    End
    ConditionState       = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model              = ABArFrcCmd_NES
      Animation          = ABArFrcCmd_NES.ABArFrcCmd_NES
      AnimationMode      = LOOP
    End
    
       ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABArFrcCmd
      Animation          = ABArFrcCmd.ABArFrcCmd
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABArFrcCmd_D
      Animation          = ABArFrcCmd_D.ABArFrcCmd_D
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABArFrcCmd_E
      Animation          = ABArFrcCmd_E.ABArFrcCmd_E
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = ABArFrcCmd_N
      Animation          = ABArFrcCmd_N.ABArFrcCmd_N
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = ABArFrcCmd_ND
      Animation          = ABArFrcCmd_ND.ABArFrcCmd_ND
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = ABArFrcCmd_NE
      Animation          = ABArFrcCmd_NE.ABArFrcCmd_NE
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = ABArFrcCmd_S
      Animation          = ABArFrcCmd_S.ABArFrcCmd_S
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       =  PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = ABArFrcCmd_DS
      Animation          = ABArFrcCmd_DS.ABArFrcCmd_DS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = ABArFrcCmd_ES
      Animation          = ABArFrcCmd_ES.ABArFrcCmd_ES
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = ABArFrcCmd_NS
      Animation          = ABArFrcCmd_NS.ABArFrcCmd_NS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = ABArFrcCmd_NDS
      Animation          = ABArFrcCmd_NDS.ABArFrcCmd_NDS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = ABArFrcCmd_NES
      Animation          = ABArFrcCmd_NES.ABArFrcCmd_NES
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************

  End

  ; ------------ blinky production lights -----------------
  Draw = W3DModelDraw ModuleTag_02
    DefaultConditionState
      Model              = None
    End
    ConditionState       = ACTIVELY_CONSTRUCTING
      Model              = ABArFrcCmd_A9
      Animation          = ABArFrcCmd_A9.ABArFrcCmd_A9
      AnimationMode      = LOOP
    End
  End

  ; ----------------- door #1 -------------------
  Draw                = W3DModelDraw ModuleTag_03
    ConditionState    = NONE
      Model           = ABArFrcCmd_A7
      Animation       = ABArFrcCmd_A7.ABArFrcCmd_A7
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT 
    AliasConditionState = SNOW 
    AliasConditionState = NIGHT SNOW 
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = NIGHT SNOW DAMAGED
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE 
       
    ConditionState    = DOOR_1_OPENING
      Model           = ABArFrcCmd_A7
      Animation       = ABArFrcCmd_A7.ABArFrcCmd_A7
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End 
    AliasConditionState = NIGHT DOOR_1_OPENING
    AliasConditionState = SNOW DOOR_1_OPENING
    AliasConditionState = NIGHT SNOW DOOR_1_OPENING
    AliasConditionState = NIGHT DAMAGED DOOR_1_OPENING
    AliasConditionState = SNOW DAMAGED DOOR_1_OPENING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_1_OPENING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_1_OPENING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_1_OPENING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_1_OPENING
     
    ConditionState    = DOOR_1_CLOSING
      Model           = ABArFrcCmd_A7
      Animation       = ABArFrcCmd_A7.ABArFrcCmd_A7
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_CLOSING
    AliasConditionState = SNOW DOOR_1_CLOSING
    AliasConditionState = NIGHT SNOW DOOR_1_CLOSING
    AliasConditionState = NIGHT DAMAGED DOOR_1_CLOSING
    AliasConditionState = SNOW DAMAGED DOOR_1_CLOSING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_1_CLOSING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_1_CLOSING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_1_CLOSING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE  DOOR_1_CLOSING
    
    ConditionState    = DOOR_1_WAITING_OPEN
      Model           = ABArFrcCmd_A7
      Animation       = ABArFrcCmd_A7.ABArFrcCmd_A7
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_WAITING_OPEN
    AliasConditionState = SNOW DOOR_1_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DOOR_1_WAITING_OPEN
    AliasConditionState = NIGHT DAMAGED DOOR_1_WAITING_OPEN
    AliasConditionState = SNOW DAMAGED DOOR_1_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_1_WAITING_OPEN
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_1_WAITING_OPEN
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_1_WAITING_OPEN
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_1_WAITING_OPEN
    
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABArFrcCmd_A7
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABArFrcCmd_A7
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABArFrcCmd_A7
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
    
  End

  ; ----------------- door #2 -------------------
  Draw                = W3DModelDraw ModuleTag_04
    DefaultConditionState
      Model           = ABArFrcCmd_A8
      Animation       = ABArFrcCmd_A8.ABArFrcCmd_A8
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT 
    AliasConditionState = SNOW 
    AliasConditionState = NIGHT SNOW 
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = NIGHT SNOW DAMAGED
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE 
    
    
    ConditionState    = DOOR_2_OPENING
      Model           = ABArFrcCmd_A8
      Animation       = ABArFrcCmd_A8.ABArFrcCmd_A8
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT DOOR_2_OPENING
    AliasConditionState = SNOW DOOR_2_OPENING
    AliasConditionState = NIGHT SNOW DOOR_2_OPENING
    AliasConditionState = NIGHT DAMAGED DOOR_2_OPENING
    AliasConditionState = SNOW DAMAGED DOOR_2_OPENING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_2_OPENING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_2_OPENING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_2_OPENING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_2_OPENING
   
       
    ConditionState    = DOOR_2_CLOSING
      Model           = ABArFrcCmd_A8
      Animation       = ABArFrcCmd_A8.ABArFrcCmd_A8
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_2_CLOSING
    AliasConditionState = SNOW DOOR_2_CLOSING
    AliasConditionState = NIGHT SNOW DOOR_2_CLOSING
    AliasConditionState = NIGHT DAMAGED DOOR_2_CLOSING
    AliasConditionState = SNOW DAMAGED DOOR_2_CLOSING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_2_CLOSING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_2_CLOSING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_2_CLOSING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_2_CLOSING
    
    ConditionState    = DOOR_2_WAITING_OPEN
      Model           = ABArFrcCmd_A8
      Animation       = ABArFrcCmd_A8.ABArFrcCmd_A8
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST 
    End 
    AliasConditionState = NIGHT DOOR_2_WAITING_OPEN
    AliasConditionState = SNOW DOOR_2_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DOOR_2_WAITING_OPEN
    AliasConditionState = NIGHT DAMAGED DOOR_2_WAITING_OPEN
    AliasConditionState = SNOW DAMAGED DOOR_2_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_2_WAITING_OPEN
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_2_WAITING_OPEN
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_2_WAITING_OPEN
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_2_WAITING_OPEN
    
        ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABArFrcCmd_A8
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABArFrcCmd_A8
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABArFrcCmd_A8
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
    
  End
  
  ; ----------------- door #3 -------------------
  Draw                = W3DModelDraw ModuleTag_05
    DefaultConditionState
      Model           = ABArFrcCmd_A2
      Animation       = ABArFrcCmd_A2.ABArFrcCmd_A2
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT 
    AliasConditionState = SNOW 
    AliasConditionState = NIGHT SNOW 
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = NIGHT SNOW DAMAGED
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE
    
    
    ConditionState    = DOOR_3_OPENING
      Model           = ABArFrcCmd_A2
      Animation       = ABArFrcCmd_A2.ABArFrcCmd_A2
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End   
    AliasConditionState = NIGHT DOOR_3_OPENING
    AliasConditionState = SNOW DOOR_3_OPENING
    AliasConditionState = NIGHT SNOW DOOR_3_OPENING
    AliasConditionState = NIGHT DAMAGED DOOR_3_OPENING
    AliasConditionState = SNOW DAMAGED DOOR_3_OPENING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_3_OPENING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_3_OPENING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_3_OPENING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_3_OPENING
    
    ConditionState    = DOOR_3_CLOSING
      Model           = ABArFrcCmd_A2
      Animation       = ABArFrcCmd_A2.ABArFrcCmd_A2
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_3_CLOSING
    AliasConditionState = SNOW DOOR_3_CLOSING
    AliasConditionState = NIGHT SNOW DOOR_3_CLOSING
    AliasConditionState = NIGHT DAMAGED DOOR_3_CLOSING
    AliasConditionState = SNOW DAMAGED DOOR_3_CLOSING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_3_CLOSING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_3_CLOSING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_3_CLOSING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_3_CLOSING
    
    ConditionState    = DOOR_3_WAITING_OPEN
      Model           = ABArFrcCmd_A2
      Animation       = ABArFrcCmd_A2.ABArFrcCmd_A2
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End  
    AliasConditionState = NIGHT DOOR_3_WAITING_OPEN
    AliasConditionState = SNOW DOOR_3_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DOOR_3_WAITING_OPEN
    AliasConditionState = NIGHT DAMAGED DOOR_3_WAITING_OPEN
    AliasConditionState = SNOW DAMAGED DOOR_3_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_3_WAITING_OPEN
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_3_WAITING_OPEN
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_3_WAITING_OPEN
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_3_WAITING_OPEN
        
    
        ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABArFrcCmd_A2
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABArFrcCmd_A2
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABArFrcCmd_A2
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
       
  End

  ; ----------------- door #4 -------------------
  Draw                = W3DModelDraw ModuleTag_06
    DefaultConditionState
      Model           = ABArFrcCmd_A3
      Animation       = ABArFrcCmd_A3.ABArFrcCmd_A3
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT 
    AliasConditionState = SNOW 
    AliasConditionState = NIGHT SNOW 
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = NIGHT SNOW DAMAGED
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE
    
    ConditionState    = DOOR_4_OPENING
      Model           = ABArFrcCmd_A3
      Animation       = ABArFrcCmd_A3.ABArFrcCmd_A3
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End   
    AliasConditionState = NIGHT DOOR_4_OPENING
    AliasConditionState = SNOW DOOR_4_OPENING
    AliasConditionState = NIGHT SNOW DOOR_4_OPENING
    AliasConditionState = NIGHT DAMAGED DOOR_4_OPENING
    AliasConditionState = SNOW DAMAGED DOOR_4_OPENING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_4_OPENING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_4_OPENING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_4_OPENING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_4_OPENING
    
    ConditionState    = DOOR_4_CLOSING
      Model           = ABArFrcCmd_A3
      Animation       = ABArFrcCmd_A3.ABArFrcCmd_A3
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_4_CLOSING
    AliasConditionState = SNOW DOOR_4_CLOSING
    AliasConditionState = NIGHT SNOW DOOR_4_CLOSING
    AliasConditionState = NIGHT DAMAGED DOOR_4_CLOSING
    AliasConditionState = SNOW DAMAGED DOOR_4_CLOSING
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_4_CLOSING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_4_CLOSING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_4_CLOSING
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_4_CLOSING
    
    ConditionState    = DOOR_4_WAITING_OPEN
      Model           = ABArFrcCmd_A3
      Animation       = ABArFrcCmd_A3.ABArFrcCmd_A3
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End 
    AliasConditionState = NIGHT DOOR_4_WAITING_OPEN
    AliasConditionState = SNOW DOOR_4_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DOOR_4_WAITING_OPEN
    AliasConditionState = NIGHT DAMAGED DOOR_4_WAITING_OPEN
    AliasConditionState = SNOW DAMAGED DOOR_4_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DAMAGED DOOR_4_WAITING_OPEN
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE DOOR_4_WAITING_OPEN
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE DOOR_4_WAITING_OPEN
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE DOOR_4_WAITING_OPEN
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABArFrcCmd_A3
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABArFrcCmd_A3
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABArFrcCmd_A3
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
  End

  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_07
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A4
      Animation       = ABArFrcCmd_A4.ABArFrcCmd_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A4N
      Animation       = ABArFrcCmd_A4N.ABArFrcCmd_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A4S
      Animation       = ABArFrcCmd_A4S.ABArFrcCmd_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A4SN
; @todo srj -- missing
      Animation       = ABArFrcCmd_A4SN.ABArFrcCmd_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = SmokeS01 SmokeBuildingSmall
      ParticleSysBone = SparksS01 LiveWireSparks02
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABArFrcCmd_A4
      Animation       = ABArFrcCmd_A4.ABArFrcCmd_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABArFrcCmd_A4N
      Animation       = ABArFrcCmd_A4N.ABArFrcCmd_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABArFrcCmd_A4S
      Animation       = ABArFrcCmd_A4S.ABArFrcCmd_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABArFrcCmd_A4SN
; @todo srj -- missing
      Animation       = ABArFrcCmd_A4SN.ABArFrcCmd_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABArFrcCmd_A4
      Animation       = ABArFrcCmd_A4.ABArFrcCmd_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABArFrcCmd_A4N
      Animation       = ABArFrcCmd_A4N.ABArFrcCmd_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABArFrcCmd_A4S
      Animation       = ABArFrcCmd_A4S.ABArFrcCmd_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABArFrcCmd_A4SN
; @todo srj -- missing
      Animation       = ABArFrcCmd_A4SN.ABArFrcCmd_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_08
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = ABArFrcCmd_A6
      Animation       = ABArFrcCmd_A6.ABArFrcCmd_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
      ParticleSysBone = Sparks06 BuildUpBlueSpark
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABArFrcCmd_A6N
      Animation       = ABArFrcCmd_A6N.ABArFrcCmd_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
      ParticleSysBone = Sparks06 BuildUpBlueSpark
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = ABArFrcCmd_A6S
      Animation       = ABArFrcCmd_A6S.ABArFrcCmd_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
      ParticleSysBone = Sparks06 BuildUpBlueSpark
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABArFrcCmd_A6SN
; @todo srj -- missing
      Animation       = ABArFrcCmd_A6SN.ABArFrcCmd_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
      ParticleSysBone = Sparks03 BuildUpBlueSpark
      ParticleSysBone = Sparks04 BuildUpBlueSpark
      ParticleSysBone = Sparks05 BuildUpBlueSpark
      ParticleSysBone = Sparks06 BuildUpBlueSpark
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = ABArFrcCmd_A6
      Animation       = ABArFrcCmd_A6.ABArFrcCmd_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = ABArFrcCmd_A6N
      Animation       = ABArFrcCmd_A6N.ABArFrcCmd_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = ABArFrcCmd_A6S
      Animation       = ABArFrcCmd_A6S.ABArFrcCmd_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = ABArFrcCmd_A6SN
; @todo srj -- missing
      Animation       = ABArFrcCmd_A6SN.ABArFrcCmd_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABArFrcCmd_A6
      Animation       = ABArFrcCmd_A6.ABArFrcCmd_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABArFrcCmd_A6N
      Animation       = ABArFrcCmd_A6N.ABArFrcCmd_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABArFrcCmd_A6S
      Animation       = ABArFrcCmd_A6S.ABArFrcCmd_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABArFrcCmd_A6SN
; @todo srj -- missing
      Animation       = ABArFrcCmd_A6SN.ABArFrcCmd_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_09
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SOLD
      Model           = NONE
    End

    ConditionState    = ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A5
      Animation       = ABArFrcCmd_A5.ABArFrcCmd_A5
      AnimationMode   = LOOP
      TransitionKey   = UP_DAY
    End

    ConditionState    = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A5N
      Animation       = ABArFrcCmd_A5N.ABArFrcCmd_A5N
      AnimationMode   = LOOP
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A5S
      Animation       = ABArFrcCmd_A5S.ABArFrcCmd_A5S
      AnimationMode   = LOOP
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = ABArFrcCmd_A5SN
      Animation       = ABArFrcCmd_A5SN.ABArFrcCmd_A5SN
      AnimationMode   = LOOP
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABArFrcCmd_AB
      Animation       = ABArFrcCmd_AB.ABArFrcCmd_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABArFrcCmd_ABN
      Animation       = ABArFrcCmd_ABN.ABArFrcCmd_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABArFrcCmd_ABS
      ; @todo srj -- not found
      Animation       = ABArFrcCmd_ABS.ABArFrcCmd_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABArFrcCmd_ABSN
      Animation       = ABArFrcCmd_ABSN.ABArFrcCmd_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABArFrcCmd_AB
      Animation       = ABArFrcCmd_AB.ABArFrcCmd_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABArFrcCmd_ABN
      Animation       = ABArFrcCmd_ABN.ABArFrcCmd_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABArFrcCmd_ABS
      ; @todo srj -- not found
      Animation       = ABArFrcCmd_ABS.ABArFrcCmd_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABArFrcCmd_ABS
      Animation       = ABArFrcCmd_ABS.ABArFrcCmd_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Airfield
  Side             = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_SupplyCenter
  End
  BuildCost           = 1000
  BuildTime           = 5.0           ; in seconds
  EnergyProduction    = -1
  CommandSet          = Boss_AirfieldCommandSet
  VisionRange         = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions        = None
    Armor             = StructureArmor
    DamageFX          = StructureDamageFXNoShake
  End
  ExperienceValue     = 150 150 150 150  ; Experience point value at each level

  ; *** AUDIO Parameters ***
  VoiceSelect         = AirfieldUSASelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority       = STRUCTURE
  KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE CAPTURABLE FS_FACTORY MP_COUNT_FOR_VICTORY AUTO_RALLYPOINT FS_AIRFIELD
  Body                = StructureBody ModuleTag_10
    MaxHealth         = 1500.0
    InitialHealth     = 1500.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 = 1700
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End
  
  Behavior = ParkingPlaceBehavior ModuleTag_11
    HealAmountPerSecond     = 10
    NumRows                 = 2
    NumCols                 = 2
    HasRunways              = Yes
    ApproachHeight          = 50
  End

  Behavior = ProductionUpdate ModuleTag_12
    NumDoorAnimations            = 4
    DoorOpeningTime              = 2000  ;in mSeconds
    DoorWaitOpenTime             = 3000  ;in mSeconds
    DoorCloseTime                = 2000  ;in mSeconds
    ConstructionCompleteDuration = 1000  ;in mSeconds
  End
  Behavior = BaseRegenerateUpdate ModuleTag_13
    ;No data
  End 

  Behavior = DestroyDie ModuleTag_14
    ;nothing
  End
  Behavior             = CreateObjectDie ModuleTag_15
    CreationList  = OCL_ABPowerPlantExplode
  End
  Behavior             = CreateObjectDie ModuleTag_16
    CreationList  = OCL_AmericanRangerDebris02
    ExemptStatus  = UNDER_CONSTRUCTION
  End
  Behavior             = FXListDie ModuleTag_17
    DeathFX       = FX_StructureMediumDeath
  End

  Behavior = FlammableUpdate ModuleTag_19
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_31
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End

Behavior = StealthUpdate ModuleStealth_09
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_23
    TriggeredBy = Upgrade_GLACamoNetting
  END

  Geometry            = BOX
  GeometryMajorRadius = 112.0
  GeometryMinorRadius = 74.0
  GeometryHeight      = 25.0
  GeometryIsSmall     = No
  FactoryExitWidth    = 25
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End







































;------------------------------------------------------------------------------
Object Boss_ScudStorm

  ; *** ART Parameters ***
  SelectPortrait         = SUScudStorm_L
  ButtonImage            = SUScudStorm
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ProjectileBoneFeedbackEnabledSlots = PRIMARY ; WeaponLaunchBone will be shown/hidden, not just used for firing offset

    ; day
    ConditionState = NONE ; lying around
      Model         = UBScudStrm_A1
      Animation     = UBScudStrm_A1.UBScudStrm_A1
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY Trans_ATTACKING ; from lying around to straight up
      Model         = UBScudStrm_A1
      Animation     = UBScudStrm_A1.UBScudStrm_A1
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING  ; Projectile feedback code selectively hiding missiles as they shoot
      Model         = UBScudStrm_A2
      Animation     = UBScudStrm_A2.UBScudStrm_A2
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A

    TransitionState = Trans_ATTACKING Trans_READY ; empty arms going underground, coming up with presents for bad people
      Model         = UBScudStrm_A3
      Animation     = UBScudStrm_A3.UBScudStrm_A3
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = UBScudStrm
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = UBScudStrm_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = UBScudStrm_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ;-------------------------------------------------------------------------------------------------------------------------
    ; day
    ConditionState = DAMAGED
      Model         = UBScudStrm_DA1
      Animation     = UBScudStrm_DA1.UBScudStrm_DA1
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_DAMAGED

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_DAMAGED Trans_ATTACKING_DAMAGED
      Model         = UBScudStrm_DA1
      Animation     = UBScudStrm_DA1.UBScudStrm_DA1
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING DAMAGED
      Model         = UBScudStrm_DA2
      Animation     = UBScudStrm_DA2.UBScudStrm_DA2
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_DAMAGED

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A DAMAGED
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A DAMAGED

    TransitionState = Trans_ATTACKING_DAMAGED Trans_READY_DAMAGED
      Model         = UBScudStrm_DA3
      Animation     = UBScudStrm_DA3.UBScudStrm_DA3
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End

    ;-------------------------------------------------------------------------------------------------------------------------
    ConditionState = REALLYDAMAGED RUBBLE
      Model         = UBScudStrm_EA1
      Animation     = UBScudStrm_EA1.UBScudStrm_EA1
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_REALLYDAMAGED

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_REALLYDAMAGED Trans_ATTACKING_REALLYDAMAGED
      Model         = UBScudStrm_EA1
      Animation     = UBScudStrm_EA1.UBScudStrm_EA1
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING REALLYDAMAGED RUBBLE
      Model         = UBScudStrm_EA2
      Animation     = UBScudStrm_EA2.UBScudStrm_EA2
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_REALLYDAMAGED

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A REALLYDAMAGED RUBBLE
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A REALLYDAMAGED RUBBLE

    TransitionState = Trans_ATTACKING_REALLYDAMAGED Trans_READY_REALLYDAMAGED
      Model         = UBScudStrm_EA3
      Animation     = UBScudStrm_EA3.UBScudStrm_EA3
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
    
        ;-------------------------------------------------------------------------------------------------------------------------
        ;  SNOW
    ConditionState =  SNOW ; from underground to lying around
      Model         = UBScudStrm_A1S
      Animation     = UBScudStrm_A1S.UBScudStrm_A1S
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_SNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_SNOW Trans_ATTACKING_SNOW
      Model         = UBScudStrm_A1S
      Animation     = UBScudStrm_A1S.UBScudStrm_A1S
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING  SNOW ; Projectile feedback code selectively hiding missiles as they shoot
      Model         = UBScudStrm_A2S
      Animation     = UBScudStrm_A2S.UBScudStrm_A2S
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_SNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A  SNOW
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A  SNOW

    TransitionState = Trans_ATTACKING_SNOW Trans_READY_SNOW ; empty arms going underground
      Model         = UBScudStrm_A3S
      Animation     = UBScudStrm_A3S.UBScudStrm_A3S
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End

    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED  SNOW
      Model              = UBScudStrm
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED  SNOW
      Model              = UBScudStrm_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED  SNOW
      Model              = UBScudStrm_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ;-------------------------------------------------------------------------------------------------------------------------
    ConditionState = DAMAGED SNOW
      Model         = UBScudStrm_DA1
      Animation     = UBScudStrm_DA1.UBScudStrm_DA1
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_DAMAGED_SNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_DAMAGED_SNOW Trans_ATTACKING_DAMAGED_SNOW
      Model         = UBScudStrm_DA1
      Animation     = UBScudStrm_DA1.UBScudStrm_DA1
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING DAMAGED SNOW
      Model         = UBScudStrm_DA2
      Animation     = UBScudStrm_DA2.UBScudStrm_DA2
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_DAMAGED_SNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A DAMAGED SNOW
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A DAMAGED SNOW

    TransitionState = Trans_ATTACKING_DAMAGED_SNOW Trans_READY_DAMAGED_SNOW
      Model         = UBScudStrm_DA3
      Animation     = UBScudStrm_DA3.UBScudStrm_DA3
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
       
    ;-------------------------------------------------------------------------------------------------------------------------
    
    ConditionState = REALLYDAMAGED RUBBLE SNOW
      Model         = UBScudStrm_EA1
      Animation     = UBScudStrm_EA1.UBScudStrm_EA1
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_REALLYDAMAGED_SNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_REALLYDAMAGED_SNOW Trans_ATTACKING_REALLYDAMAGED_SNOW
      Model         = UBScudStrm_EA1
      Animation     = UBScudStrm_EA1.UBScudStrm_EA1
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End


    ConditionState = ATTACKING REALLYDAMAGED RUBBLE SNOW
      Model         = UBScudStrm_EA2
      Animation     = UBScudStrm_EA2.UBScudStrm_EA2
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_REALLYDAMAGED_SNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A REALLYDAMAGED RUBBLE SNOW
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A REALLYDAMAGED RUBBLE SNOW

    TransitionState = Trans_ATTACKING_REALLYDAMAGED_SNOW Trans_READY_REALLYDAMAGED_SNOW
      Model         = UBScudStrm_EA3
      Animation     = UBScudStrm_EA3.UBScudStrm_EA3
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
    
    ;-------------------------------------------------------------------------------------------------------------------------
        ; NIGHT
    ConditionState = NIGHT ; from underground to lying around
      Model         = UBScudStrm_A1
      Animation     = UBScudStrm_A1.UBScudStrm_A1
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_NIGHT

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_NIGHT Trans_ATTACKING_NIGHT
      Model         = UBScudStrm_A1
      Animation     = UBScudStrm_A1.UBScudStrm_A1
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING NIGHT  ; Projectile feedback code selectively hiding missiles as they shoot
      Model         = UBScudStrm_A2
      Animation     = UBScudStrm_A2.UBScudStrm_A2
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_NIGHT

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A NIGHT
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A NIGHT

    TransitionState = Trans_ATTACKING_NIGHT Trans_READY_NIGHT ; empty arms going underground
      Model         = UBScudStrm_A3
      Animation     = UBScudStrm_A3.UBScudStrm_A3
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End

    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = UBScudStrm
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
      Model              = UBScudStrm_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
      Model              = UBScudStrm_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ;-------------------------------------------------------------------------------------------------------------------------
    ConditionState = DAMAGED NIGHT
      Model         = UBScudStrm_DA1N
      Animation     = UBScudStrm_DA1N.UBScudStrm_DA1N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_DAMAGED_NIGHT

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_DAMAGED_NIGHT Trans_ATTACKING_DAMAGED_NIGHT
      Model         = UBScudStrm_DA1N
      Animation     = UBScudStrm_DA1N.UBScudStrm_DA1N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING DAMAGED NIGHT
      Model         = UBScudStrm_DA2N
      Animation     = UBScudStrm_DA2N.UBScudStrm_DA2N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_DAMAGED_NIGHT

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A NIGHT DAMAGED
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A NIGHT DAMAGED

    TransitionState = Trans_ATTACKING_DAMAGED_NIGHT Trans_READY_DAMAGED_NIGHT
      Model         = UBScudStrm_DA3N
      Animation     = UBScudStrm_DA3N.UBScudStrm_DA3N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
       
    ;-------------------------------------------------------------------------------------------------------------------------
    
    ConditionState = REALLYDAMAGED RUBBLE NIGHT
      Model         = UBScudStrm_EA1N
      Animation     = UBScudStrm_EA1N.UBScudStrm_EA1N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_REALLYDAMAGED_NIGHT

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_REALLYDAMAGED_NIGHT Trans_ATTACKING_REALLYDAMAGED_NIGHT
      Model         = UBScudStrm_EA1N
      Animation     = UBScudStrm_EA1N.UBScudStrm_EA1N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End


    ConditionState = ATTACKING REALLYDAMAGED RUBBLE NIGHT
      Model         = UBScudStrm_EA2N
      Animation     = UBScudStrm_EA2N.UBScudStrm_EA2N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_REALLYDAMAGED_NIGHT

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A NIGHT REALLYDAMAGED RUBBLE

    TransitionState = Trans_ATTACKING_REALLYDAMAGED_NIGHT Trans_READY_REALLYDAMAGED_NIGHT
      Model         = UBScudStrm_EA3N
      Animation     = UBScudStrm_EA3N.UBScudStrm_EA3N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
    
        ;-------------------------------------------------------------------------------------------------------------------------
        ; NIGHT SNOW
    ConditionState = NIGHT SNOW ; from underground to lying around
      Model         = UBScudStrm_A1NS
      Animation     = UBScudStrm_A1NS.UBScudStrm_A1NS
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_NIGHTSNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_NIGHTSNOW Trans_ATTACKING_NIGHTSNOW
      Model         = UBScudStrm_A1NS
      Animation     = UBScudStrm_A1NS.UBScudStrm_A1NS
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING NIGHT SNOW ; Projectile feedback code selectively hiding missiles as they shoot
      Model         = UBScudStrm_A2NS
      Animation     = UBScudStrm_A2NS.UBScudStrm_A2NS
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_NIGHTSNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A NIGHT SNOW
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A NIGHT SNOW

    TransitionState = Trans_ATTACKING_NIGHTSNOW Trans_READY_NIGHTSNOW ; empty arms going underground
      Model         = UBScudStrm_A3NS
      Animation     = UBScudStrm_A3NS.UBScudStrm_A3NS
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End

    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = UBScudStrm
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
      Model              = UBScudStrm_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
      Model              = UBScudStrm_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ;-------------------------------------------------------------------------------------------------------------------------
    ConditionState = DAMAGED NIGHT SNOW
      Model         = UBScudStrm_DA1N
      Animation     = UBScudStrm_DA1N.UBScudStrm_DA1N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_DAMAGED_NIGHTSNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_DAMAGED_NIGHTSNOW Trans_ATTACKING_DAMAGED_NIGHTSNOW
      Model         = UBScudStrm_DA1N
      Animation     = UBScudStrm_DA1N.UBScudStrm_DA1N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End

    ConditionState = ATTACKING DAMAGED NIGHT SNOW
      Model         = UBScudStrm_DA2N
      Animation     = UBScudStrm_DA2N.UBScudStrm_DA2N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_DAMAGED_NIGHTSNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A NIGHT DAMAGED SNOW
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A NIGHT DAMAGED SNOW

    TransitionState = Trans_ATTACKING_DAMAGED_NIGHTSNOW Trans_READY_DAMAGED_NIGHTSNOW
      Model         = UBScudStrm_DA3N
      Animation     = UBScudStrm_DA3N.UBScudStrm_DA3N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
       
    ;-------------------------------------------------------------------------------------------------------------------------
    
    ConditionState = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model         = UBScudStrm_EA1N
      Animation     = UBScudStrm_EA1N.UBScudStrm_EA1N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      ShowSubObject = WeaponA01 WeaponA02 WeaponA03 WeaponA04 WeaponA05 WeaponA06 WeaponA07 WeaponA08 WeaponA09 
      TransitionKey = Trans_READY_REALLYDAMAGED_NIGHTSNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium
    End

    TransitionState = Trans_READY_REALLYDAMAGED_NIGHTSNOW Trans_ATTACKING_REALLYDAMAGED_NIGHTSNOW
      Model         = UBScudStrm_EA1N
      Animation     = UBScudStrm_EA1N.UBScudStrm_EA1N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
      WeaponLaunchBone = PRIMARY WeaponA

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End


    ConditionState = ATTACKING REALLYDAMAGED RUBBLE NIGHT SNOW
      Model         = UBScudStrm_EA2N
      Animation     = UBScudStrm_EA2N.UBScudStrm_EA2N
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
      WeaponLaunchBone = PRIMARY WeaponA
      TransitionKey = Trans_ATTACKING_REALLYDAMAGED_NIGHTSNOW

      ParticleSysBone      = SteamM01 SteamLarge
      ParticleSysBone      = SteamS01 SteamMedium

      ParticleSysBone      = FXBone01 ScudStormBuildingGoo
      ParticleSysBone      = FXBone02 ScudStormBuildingGoo
      ParticleSysBone      = FXBone03 ScudStormBuildingGoo
    End
    AliasConditionState = ATTACKING FIRING_A NIGHT REALLYDAMAGED RUBBLE SNOW
    AliasConditionState = ATTACKING BETWEEN_FIRING_SHOTS_A NIGHT REALLYDAMAGED RUBBLE SNOW

    TransitionState = Trans_ATTACKING_REALLYDAMAGED_NIGHTSNOW Trans_READY_REALLYDAMAGED_NIGHTSNOW
      Model         = UBScudStrm_EA3N
      Animation     = UBScudStrm_EA3N.UBScudStrm_EA3N
      AnimationMode = ONCE
      Flags         = MAINTAIN_FRAME_ACROSS_STATES2

      ParticleSysBone      = SteamM01 SteamVent
      ParticleSysBone      = SteamS01 SteamVent
    End
    
    
    ConditionState       = SOLD
      Model              = NONE
    End    
    AliasConditionState       = SOLD DAMAGED
    AliasConditionState       = SOLD REALLYDAMAGED
    AliasConditionState       = SOLD SNOW
    AliasConditionState       = SOLD DAMAGED SNOW
    AliasConditionState       = SOLD REALLYDAMAGED SNOW
    AliasConditionState       = SOLD NIGHT
    AliasConditionState       = SOLD DAMAGED NIGHT
    AliasConditionState       = SOLD REALLYDAMAGED NIGHT
    AliasConditionState       = SOLD NIGHT SNOW
    AliasConditionState       = SOLD DAMAGED NIGHT SNOW
    AliasConditionState       = SOLD REALLYDAMAGED NIGHT SNOW
  End

    ;-------------------------------------------------------------------------------------------------------------------------
    ;-------------------------------------------------------------------------------------------------------------------------
    ;-------------------------------------------------------------------------------------------------------------------------
  Draw = W3DModelDraw ModuleTag_02
    OkToChangeModelColor = Yes
  
    ConditionState = None
      Model         = UBScudStrm_A5
      Animation     = UBScudStrm_A5.UBScudStrm_A5
      AnimationMode = MANUAL
      Flags         = START_FRAME_FIRST
    End

    ConditionState       = SOLD
      Model              = NONE
    End    
    ConditionState       = SOLD SNOW
       Model             = NONE
    End   
    ConditionState       = SOLD NIGHT
       Model             = NONE
    End    
    ConditionState       = SOLD NIGHT SNOW
       Model             = NONE
    End  
  
    ConditionState = PREATTACK_A ATTACKING
      Model         = UBScudStrm_A5
      Animation     = UBScudStrm_A5.UBScudStrm_A5
      AnimationMode = LOOP
      Flags         = START_FRAME_FIRST
    End

    ConditionState = ATTACKING
      Model         = UBScudStrm_A5
      Animation     = UBScudStrm_A5.UBScudStrm_A5
      AnimationMode = LOOP
      Flags         = START_FRAME_FIRST
    End
    
    ;These assets are missing (KM: removed to get rid of assert)
    ;ConditionState =  DAMAGED
    ;  Model         = UBScudStrm_DA5
    ;  Animation     = UBScudStrm_DA5.UBScudStrm_DA5
    ;  AnimationMode = MANUAL
    ;  Flags         = START_FRAME_FIRST
    ;End

    ;These assets are missing (KM: removed to get rid of assert)
    ;ConditionState = PREATTACK_A ATTACKING DAMAGED
    ;  Model         = UBScudStrm_DA5
    ;  Animation     = UBScudStrm_DA5.UBScudStrm_DA5
    ;  AnimationMode = LOOP
    ;  Flags         = START_FRAME_FIRST
    ;End

    ;These assets are missing (KM: removed to get rid of assert)
    ;ConditionState = ATTACKING DAMAGED
    ;  Model         = UBScudStrm_DA5
    ;  Animation     = UBScudStrm_DA5.UBScudStrm_DA5
    ;  AnimationMode = LOOP
    ;  Flags         = START_FRAME_FIRST
    ;End
    
    ;These assets are missing (KM: removed to get rid of assert)
    ;ConditionState =  REALLYDAMAGED
    ;  Model         = UBScudStrm_EA5
    ;  Animation     = UBScudStrm_EA5.UBScudStrm_EA5
    ;  AnimationMode = MANUAL
    ;  Flags         = START_FRAME_FIRST
    ;End

    ;These assets are missing (KM: removed to get rid of assert)
    ;ConditionState = PREATTACK_A ATTACKING REALLYDAMAGED
    ;  Model         = UBScudStrm_EA5
    ;  Animation     = UBScudStrm_EA5.UBScudStrm_EA5
    ;  AnimationMode = LOOP
    ;  Flags         = START_FRAME_FIRST
    ;End

    ;These assets are missing (KM: removed to get rid of assert)
    ;ConditionState = ATTACKING REALLYDAMAGED
    ;  Model         = UBScudStrm_EA5
    ;  Animation     = UBScudStrm_EA5.UBScudStrm_EA5
    ;  AnimationMode = LOOP
    ;  Flags         = START_FRAME_FIRST
    ;End
    
  End

  Draw = W3DModelDraw ModuleTag_03
    OkToChangeModelColor = Yes
  
    ConditionState = None
      Model         = UBScudStrm_A6
      Animation     = UBScudStrm_A6.UBScudStrm_A6
      AnimationMode = LOOP
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
    End
    
    ConditionState =  DAMAGED
      Model         = UBScudStrm_DA6
      Animation     = UBScudStrm_DA6.UBScudStrm_DA6
      AnimationMode = LOOP
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
    End
    
    ConditionState =  REALLYDAMAGED RUBBLE
      Model         = UBScudStrm_EA6
      Animation     = UBScudStrm_EA6.UBScudStrm_EA6
      AnimationMode = LOOP
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = UBScudStrm_A6
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED

      Model              = UBScudStrm_DA6
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE
      Model              = UBScudStrm_EA6
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = SOLD
      Model              = NONE
    End    
    ConditionState       = SOLD SNOW
       Model             = NONE
    End   
    ConditionState       = SOLD NIGHT
       Model             = NONE
    End    
    ConditionState       = SOLD NIGHT SNOW
       Model             = NONE
    End  
    
  End

  Draw = W3DModelDraw ModuleTag_04
    OkToChangeModelColor = Yes
  
    ConditionState = None
      Model         = UBScudStrm_F
      Animation     = UBScudStrm_F.UBScudStrm_F
      AnimationMode = LOOP
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
    End
    
    ConditionState =  DAMAGED
      Model         = UBScudStrm_DF
      Animation     = UBScudStrm_DF.UBScudStrm_DF
      AnimationMode = LOOP
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
    End
    
    ConditionState =  REALLYDAMAGED RUBBLE
      Model         = UBScudStrm_EF
      Animation     = UBScudStrm_EF.UBScudStrm_EF
      AnimationMode = LOOP
      Flags         = MAINTAIN_FRAME_ACROSS_STATES
    End
    
    ConditionState       = SOLD
      Model              = NONE
    End    
    AliasConditionState       = SOLD DAMAGED
    AliasConditionState       = SOLD REALLYDAMAGED
    AliasConditionState       = SOLD SNOW
    AliasConditionState       = SOLD DAMAGED SNOW
    AliasConditionState       = SOLD REALLYDAMAGED SNOW
    AliasConditionState       = SOLD NIGHT
    AliasConditionState       = SOLD DAMAGED NIGHT
    AliasConditionState       = SOLD REALLYDAMAGED NIGHT
    AliasConditionState       = SOLD NIGHT SNOW
    AliasConditionState       = SOLD DAMAGED NIGHT SNOW
    AliasConditionState       = SOLD REALLYDAMAGED NIGHT SNOW
  End
   
  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_05
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBScudStrm_AB
      Animation       = UBScudStrm_AB.UBScudStrm_AB
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBScudStrm_ABN
      Animation       = UBScudStrm_ABN.UBScudStrm_ABN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBScudStrm_ABS
      Animation       = UBScudStrm_ABS.UBScudStrm_ABS
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBScudStrm_ABSN
      Animation       = UBScudStrm_ABSN.UBScudStrm_ABSN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = UBScudStrm_AB
      Animation       = UBScudStrm_AB.UBScudStrm_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = UBScudStrm_ABN
      Animation       = UBScudStrm_ABN.UBScudStrm_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = UBScudStrm_ABS
      Animation       = UBScudStrm_ABS.UBScudStrm_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = UBScudStrm_ABSN
      Animation       = UBScudStrm_ABSN.UBScudStrm_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = UBScudStrm_AB
      Animation       = UBScudStrm_AB.UBScudStrm_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = UBScudStrm_ABN
      Animation       = UBScudStrm_ABN.UBScudStrm_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = UBScudStrm_ABS
      Animation       = UBScudStrm_ABS.UBScudStrm_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = UBScudStrm_ABSN
      Animation       = UBScudStrm_ABSN.UBScudStrm_ABSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_06
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = UBScudStrm_AC
      Animation       = UBScudStrm_AC.UBScudStrm_AC
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Dust01 BuildingDust
      ParticleSysBone = Smoke01 BuildUpSmoke
      ParticleSysBone = Smoke02 BuildUpSmoke
      ParticleSysBone = Smoke03 BuildUpSmoke
      ParticleSysBone = Smoke04 BuildUpSmoke
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = UBScudStrm_ACN
      Animation       = UBScudStrm_ACN.UBScudStrm_ACN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Dust01 BuildingDust
      ParticleSysBone = Smoke01 BuildUpSmoke
      ParticleSysBone = Smoke02 BuildUpSmoke
      ParticleSysBone = Smoke03 BuildUpSmoke
      ParticleSysBone = Smoke04 BuildUpSmoke
    End    
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = UBScudStrm_ACS
      Animation       = UBScudStrm_ACS.UBScudStrm_ACS
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
    End   
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = UBScudStrm_ACSN
      Animation       = UBScudStrm_ACSN.UBScudStrm_ACSN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Dust01 BuildingNightSnowDust
      ParticleSysBone = Smoke01 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke02 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke03 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke04 BuildUpNightSnowSmoke
    End 
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = UBScudStrm_AC
      Animation       = UBScudStrm_AC.UBScudStrm_AC
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = UBScudStrm_ACN
      Animation       = UBScudStrm_ACN.UBScudStrm_ACN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = UBScudStrm_ACS
      Animation       = UBScudStrm_ACS.UBScudStrm_ACS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = UBScudStrm_ACSN
      Animation       = UBScudStrm_ACSN.UBScudStrm_ACSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = UBScudStrm_AC
      Animation       = UBScudStrm_AC.UBScudStrm_AC
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = UBScudStrm_ACN
      Animation       = UBScudStrm_ACN.UBScudStrm_ACN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = UBScudStrm_ACS
      Animation       = UBScudStrm_ACS.UBScudStrm_ACS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = UBScudStrm_ACSN
      Animation       = UBScudStrm_ACSN.UBScudStrm_ACSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:ScudStorm
  Side = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_InternetCenter
  End
  BuildCost        = 10000
  BuildTime        = 10.0           ; in seconds
  EnergyProduction = 0
  CommandSet       = GLAScudStormCommandSet
  VisionRange     = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ShroudRevealToAllRange = 60  ; Reveals shroud to all players at a specific amount which can be different. 
                               ; Using same value? Then use KINDOF_REVEAL_TO_ALL instead!
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY ScudStormWeapon
    AutoChooseSources = PRIMARY NONE
  End
  ArmorSet
    Conditions      = None
    Armor           = StructureArmorTough
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 400 400 400 400  ; Experience point value at each level
  MaxSimultaneousOfType = DeterminedBySuperweaponRestriction ; Normally unlimited, but can be selected by players in multiplayer games
  MaxSimultaneousLinkKey = Superweapon  ; Count all superweapons **AND THE GLA SCUD STORM REBUILD HOLE** as one "type" for MaxSimultaneousOfType

  ; *** AUDIO Parameters ***
  VoiceSelect = ScudStormSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    TurretMoveStart = NoSound
    TurretMoveLoop = OverlordTankTurretMoveLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE CAPTURABLE FS_TECHNOLOGY MP_COUNT_FOR_VICTORY SCORE_CREATE FS_SUPERWEAPON
  Body            = StructureBody ModuleTag_07
    MaxHealth       = 4000.0
    InitialHealth   = 4000.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 = 4200
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End
  Behavior        = RebuildHoleExposeDie ModuleTag_08
    HoleName      = GLAHoleScudStorm
    HoleMaxHealth = 500.0
  End 

  Behavior = AIUpdateInterface ModuleTag_09
  End

  Behavior    = OCLSpecialPower ModuleTag_10
    SpecialPowerTemplate = SuperweaponScudStorm
    OCL                  = SUPERWEAPON_ScudStorm
  End
  Behavior = SpecialPowerCreate ModuleTag_11
    ;nothing
  End

  Behavior = DestroyDie ModuleTag_12
    ;nothing
  End
  Behavior        = CreateObjectDie ModuleTag_13
    CreationList  = OCL_PoisonFieldMedium
    ExemptStatus  = UNDER_CONSTRUCTION
  End
  Behavior        = FXListDie ModuleTag_14
    DeathFX       = WeaponFX_BombTruckHighExplosiveBioBombDetonation
    ExemptStatus  = UNDER_CONSTRUCTION
  End

  Behavior = FlammableUpdate ModuleTag_15
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = RadiusDecalUpdate ModuleTag_16
    ; nothing
  End

  Behavior = TransitionDamageFX ModuleTag_17
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End

  Behavior        = FXListDie ModuleTag_18
    DeathFX       = FX_BuildingDie
  End

  Behavior = ProductionUpdate ModuleTag_19
    ; nothing
  End

 Behavior = BaseRegenerateUpdate ModuleTag_20
    ;No data
  End

Behavior = StealthUpdate ModuleStealth_21
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_22
    TriggeredBy = Upgrade_GLACamoNetting
  End

  Geometry            = BOX
  GeometryMajorRadius = 71.0
  GeometryMinorRadius = 67.0
  GeometryHeight      = 25.0
  GeometryIsSmall     = No
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End







;------------------------------------------------------------------------------
;China Neutron Missile, NukeSilo, Nuke Silo
Object Boss_NuclearMissileLauncher

  ; *** ART Parameters ***
  SelectPortrait         = SNNukeMisl_L
  ButtonImage            = SNNukeMisl
  SelectPortrait = SNNukeMisl_L
  ButtonImage            = SNNukeMisl
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ; day
    ConditionState      = NONE
      Model             = NBNMissle
    End
    ConditionState      = SOLD
      Model             = NONE
    End  
    ConditionState      = SOLD SNOW
      Model             = NONE

    End   
    ConditionState      = SOLD NIGHT
      Model             = NONE
    End    
    ConditionState      = SOLD NIGHT SNOW
      Model             = NONE
    End     
    
    
    ConditionState      = DAMAGED
      Model             = NBNMissle_D
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
    End
     ConditionState     = REALLYDAMAGED RUBBLE
      Model             = NBNMissle_E
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End 
    ConditionState      = AWAITING_CONSTRUCTION
      Model             = None
    End
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model             = NBNMissle
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END   
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model             = NBNMissle_D
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END   
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE
      Model             = NBNMissle_E
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END   
    ConditionState      = DOOR_1_OPENING
      Model             = NBNMissle_A2
      Animation         = NBNMissle_A2.NBNMissle_A2
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
    End   
    ConditionState      = DOOR_1_WAITING_OPEN
      Model             = NBNMissle_A2
      Animation         = NBNMissle_A2.NBNMissle_A2
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE
      Model             = NBNMissle_A3
      Animation         = NBNMissle_A3.NBNMissle_A3
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
    End   
    ConditionState      = DOOR_1_CLOSING
      Model             = NBNMissle_A3
      Animation         = NBNMissle_A3.NBNMissle_A3
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
    End   
    ConditionState      = DOOR_1_OPENING DAMAGED 
      Model             = NBNMissle_A2D
      Animation         = NBNMissle_A2D.NBNMissle_A2D
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire

      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN DAMAGED 
      Model             = NBNMissle_A2D
      Animation         = NBNMissle_A2D.NBNMissle_A2D
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED 
      Model             = NBNMissle_A3D
      Animation         = NBNMissle_A3D.NBNMissle_A3D
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING DAMAGED 
      Model             = NBNMissle_A3D
      Animation         = NBNMissle_A3D.NBNMissle_A3D
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE 
      Model             = NBNMissle_A2E
      Animation         = NBNMissle_A2E.NBNMissle_A2E
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE 
      Model             = NBNMissle_A2E
      Animation         = NBNMissle_A2E.NBNMissle_A2E
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE 
      Model             = NBNMissle_A3E
      Animation         = NBNMissle_A3E.NBNMissle_A3E
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE 
      Model             = NBNMissle_A3E
      Animation         = NBNMissle_A3E.NBNMissle_A3E
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   

    ; night
    ConditionState      = NIGHT
      Model             = NBNMissle_N
    End
    ConditionState      = DAMAGED NIGHT
      Model             = NBNMissle_DN
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
    End
     ConditionState     = REALLYDAMAGED RUBBLE NIGHT
      Model             = NBNMissle_EN
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    ConditionState      = AWAITING_CONSTRUCTION NIGHT
      Model             = None
    End
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model             = NBNMissle_N
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END       
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model             = NBNMissle_DN
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END       
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model             = NBNMissle_EN
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END       
    ConditionState      = DOOR_1_OPENING NIGHT
      Model             = NBNMissle_A2N
      Animation         = NBNMissle_A2N.NBNMissle_A2N
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
    End   
    ConditionState      = DOOR_1_WAITING_OPEN NIGHT
      Model             = NBNMissle_A2N
      Animation         = NBNMissle_A2N.NBNMissle_A2N
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE NIGHT
      Model             = NBNMissle_A3N
      Animation         = NBNMissle_A3N.NBNMissle_A3N
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
    End   
    ConditionState      = DOOR_1_CLOSING NIGHT
      Model             = NBNMissle_A3N
      Animation         = NBNMissle_A3N.NBNMissle_A3N
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
    End   
    ConditionState      = DOOR_1_OPENING DAMAGED NIGHT
      Model             = NBNMissle_A2DN
      Animation         = NBNMissle_A2DN.NBNMissle_A2DN
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN DAMAGED NIGHT
      Model             = NBNMissle_A2DN
      Animation         = NBNMissle_A2DN.NBNMissle_A2DN
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED NIGHT
      Model             = NBNMissle_A3DN
      Animation         = NBNMissle_A3DN.NBNMissle_A3DN
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING DAMAGED NIGHT
      Model             = NBNMissle_A3DN
      Animation         = NBNMissle_A3DN.NBNMissle_A3DN
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE NIGHT
      Model             = NBNMissle_A2EN
      Animation         = NBNMissle_A2EN.NBNMissle_A2EN
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE NIGHT
      Model             = NBNMissle_A2EN
      Animation         = NBNMissle_A2EN.NBNMissle_A2EN
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE NIGHT
      Model             = NBNMissle_A3EN
      Animation         = NBNMissle_A3EN.NBNMissle_A3EN
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE NIGHT
      Model             = NBNMissle_A3EN
      Animation         = NBNMissle_A3EN.NBNMissle_A3EN
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    
    ;-------------- SNOW! --------------------
    
        ConditionState      = SNOW
      Model             = NBNMissle_S
    End
    
    ConditionState      = DAMAGED SNOW
      Model             = NBNMissle_DS
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
    End
     ConditionState     = REALLYDAMAGED RUBBLE SNOW
      Model             = NBNMissle_ES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End 
    ConditionState      = AWAITING_CONSTRUCTION SNOW
      Model             = None
    End
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model             = NBNMissle_S
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END   
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model             = NBNMissle_DS
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END   
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model             = NBNMissle_ES
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END   
    ConditionState      = DOOR_1_OPENING SNOW
      Model             = NBNMissle_A2S
      Animation         = NBNMissle_A2S.NBNMissle_A2S
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
    End   
    ConditionState      = DOOR_1_WAITING_OPEN SNOW
      Model             = NBNMissle_A2S
      Animation         = NBNMissle_A2S.NBNMissle_A2S
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE SNOW
      Model             = NBNMissle_A3S
      Animation         = NBNMissle_A3S.NBNMissle_A3S
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
    End   
    ConditionState      = DOOR_1_CLOSING SNOW
      Model             = NBNMissle_A3S
      Animation         = NBNMissle_A3S.NBNMissle_A3S
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
    End   
    ConditionState      = DOOR_1_OPENING DAMAGED SNOW
      Model             = NBNMissle_A2DS
      Animation         = NBNMissle_A2DS.NBNMissle_A2DS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN DAMAGED SNOW
      Model             = NBNMissle_A2DS
      Animation         = NBNMissle_A2DS.NBNMissle_A2DS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED SNOW
      Model             = NBNMissle_A3DS
      Animation         = NBNMissle_A3DS.NBNMissle_A3DS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING DAMAGED SNOW
      Model             = NBNMissle_A3DS
      Animation         = NBNMissle_A3DS.NBNMissle_A3DS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE SNOW
      Model             = NBNMissle_A2ES
      Animation         = NBNMissle_A2ES.NBNMissle_A2ES
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE SNOW
      Model             = NBNMissle_A2ES
      Animation         = NBNMissle_A2ES.NBNMissle_A2ES
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE SNOW
      Model             = NBNMissle_A3ES
      Animation         = NBNMissle_A3ES.NBNMissle_A3ES
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE SNOW
      Model             = NBNMissle_A3ES
      Animation         = NBNMissle_A3ES.NBNMissle_A3ES
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   

    ; night
    ConditionState      = NIGHT SNOW
      Model             = NBNMissle_NS
    End
    ConditionState      = DAMAGED NIGHT SNOW
      Model             = NBNMissle_DNS
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
    End
     ConditionState     = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model             = NBNMissle_ENS
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    ConditionState      = AWAITING_CONSTRUCTION NIGHT SNOW
      Model             = None
    End
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model             = NBNMissle_NS
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END       
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model             = NBNMissle_DNS
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END       
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model             = NBNMissle_ENS
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END       
    ConditionState      = DOOR_1_OPENING NIGHT SNOW
      Model             = NBNMissle_A2NS
      Animation         = NBNMissle_A2NS.NBNMissle_A2NS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
    End   
    ConditionState      = DOOR_1_WAITING_OPEN NIGHT SNOW
      Model             = NBNMissle_A2NS
      Animation         = NBNMissle_A2NS.NBNMissle_A2NS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE NIGHT SNOW
      Model             = NBNMissle_A3NS
      Animation         = NBNMissle_A3NS.NBNMissle_A3NS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
    End   
    ConditionState      = DOOR_1_CLOSING NIGHT SNOW
      Model             = NBNMissle_A3NS
      Animation         = NBNMissle_A3NS.NBNMissle_A3NS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
    End   
    ConditionState      = DOOR_1_OPENING DAMAGED NIGHT SNOW
      Model             = NBNMissle_A2DNS
      Animation         = NBNMissle_A2DNS.NBNMissle_A2DNS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN DAMAGED NIGHT SNOW
      Model             = NBNMissle_A2DNS
      Animation         = NBNMissle_A2DNS.NBNMissle_A2DNS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED NIGHT SNOW
      Model             = NBNMissle_A3DNS
      Animation         = NBNMissle_A3DNS.NBNMissle_A3DNS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING DAMAGED NIGHT SNOW
      Model             = NBNMissle_A3DNS
      Animation         = NBNMissle_A3DNS.NBNMissle_A3DNS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE NIGHT SNOW
      Model             = NBNMissle_A2ENS
      Animation         = NBNMissle_A2ENS.NBNMissle_A2ENS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE NIGHT SNOW
      Model             = NBNMissle_A2ENS
      Animation         = NBNMissle_A2ENS.NBNMissle_A2ENS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End   
    ConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE NIGHT SNOW
      Model             = NBNMissle_A3ENS
      Animation         = NBNMissle_A3ENS.NBNMissle_A3ENS
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPos
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End   
    ConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE NIGHT SNOW
      Model             = NBNMissle_A3ENS
      Animation         = NBNMissle_A3ENS.NBNMissle_A3ENSS
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End     
  End

  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_02
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBNMissle_A4
      Animation       = NBNMissle_A4.NBNMissle_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBNMissle_A4N
      Animation       = NBNMissle_A4N.NBNMissle_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBNMissle_A4S
      Animation       = NBNMissle_A4S.NBNMissle_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBNMissle_A4SN
      Animation       = NBNMissle_A4SN.NBNMissle_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBNMissle_A4
      Animation       = NBNMissle_A4.NBNMissle_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBNMissle_A4N
      Animation       = NBNMissle_A4N.NBNMissle_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBNMissle_A4S
      Animation       = NBNMissle_A4S.NBNMissle_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBNMissle_A4SN
      Animation       = NBNMissle_A4SN.NBNMissle_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBNMissle_A4
      Animation       = NBNMissle_A4.NBNMissle_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBNMissle_A4N
      Animation       = NBNMissle_A4N.NBNMissle_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBNMissle_A4S
      Animation       = NBNMissle_A4S.NBNMissle_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBNMissle_A4SN
      Animation       = NBNMissle_A4SN.NBNMissle_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = NBNMissle_A6
      Animation       = NBNMissle_A6.NBNMissle_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBNMissle_A6N
      Animation       = NBNMissle_A6N.NBNMissle_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = NBNMissle_A6S
      Animation       = NBNMissle_A6S.NBNMissle_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
      ParticleSysBone = Smoke05 BuildUpSnowSmoke
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBNMissle_A6SN
      Animation       = NBNMissle_A6SN.NBNMissle_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
      ParticleSysBone = Smoke05 BuildUpSnowSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBNMissle_A6
      Animation       = NBNMissle_A6.NBNMissle_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBNMissle_A6N
      Animation       = NBNMissle_A6N.NBNMissle_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBNMissle_A6S
      Animation       = NBNMissle_A6S.NBNMissle_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBNMissle_A6SN
      Animation       = NBNMissle_A6SN.NBNMissle_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End 
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = NBNMissle_A6
      Animation       = NBNMissle_A6.NBNMissle_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = NBNMissle_A6N
      Animation       = NBNMissle_A6N.NBNMissle_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = NBNMissle_A6S
      Animation       = NBNMissle_A6S.NBNMissle_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = NBNMissle_A6SN
      Animation       = NBNMissle_A6SN.NBNMissle_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_04
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SOLD
      Model           = NONE
    End

    ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      Model         = NBNMissle_A5
      Animation     = NBNMissle_A5.NBNMissle_A5
      AnimationMode = LOOP
      TransitionKey = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model         = NBNMissle_A5N
      Animation     = NBNMissle_A5N.NBNMissle_A5N
      AnimationMode = LOOP
      TransitionKey = UP_NIGHT
    End
    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model         = NBNMissle_A5S
      Animation     = NBNMissle_A5S.NBNMissle_A5S
      AnimationMode = LOOP
      TransitionKey = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model         = NBNMissle_A5SN
      Animation     = NBNMissle_A5SN.NBNMissle_A5SN
      AnimationMode = LOOP
      TransitionKey = UP_SNOWNIGHT
    End
    TransitionState = DOWN_DEFAULT UP_DAY
      Model         = NBNMissle_AB
      Animation     = NBNMissle_AB.NBNMissle_AB
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags         = START_FRAME_FIRST
    End

    TransitionState = DOWN_DEFAULT UP_NIGHT
      Model         = NBNMissle_ABN
      Animation     = NBNMissle_ABN.NBNMissle_ABN
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags         = START_FRAME_FIRST
    End
    TransitionState = DOWN_DEFAULT UP_SNOW
      Model         = NBNMissle_ABS
      Animation     = NBNMissle_ABS.NBNMissle_ABS
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags         = START_FRAME_FIRST
    End
    TransitionState = DOWN_DEFAULT UP_SNOWNIGHT
      Model         = NBNMissle_ABSN
      Animation     = NBNMissle_ABSN.NBNMissle_ABSN
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags         = START_FRAME_FIRST
    End
    TransitionState = UP_DAY DOWN_DEFAULT
      Model         = NBNMissle_AB
      Animation     = NBNMissle_AB.NBNMissle_AB
      AnimationMode = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags         = START_FRAME_LAST
    End
    TransitionState = UP_NIGHT DOWN_DEFAULT
      Model         = NBNMissle_ABN
      Animation     = NBNMissle_ABN.NBNMissle_ABN
      AnimationMode = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags         = START_FRAME_LAST
    End
    TransitionState = UP_SNOW DOWN_DEFAULT
      Model         = NBNMissle_ABS
      Animation     = NBNMissle_ABS.NBNMissle_ABS
      AnimationMode = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags         = START_FRAME_LAST
    End
    TransitionState = UP_SNOWNIGHT DOWN_DEFAULT
      Model         = NBNMissle_ABSN
      Animation     = NBNMissle_ABSN.NBNMissle_ABSN
      AnimationMode = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags         = START_FRAME_LAST
    End 
  End

  ; Blinking lights
  Draw = W3DModelDraw ModuleTag_05
    OkToChangeModelColor = Yes
    ; day
    ConditionState    = NONE
      Model           = NBNMissle_AC
      Animation       = NONE
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBNMissle_AC
      Flags           = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState    = AWAITING_CONSTRUCTION
      Model           = NONE
    End
    ConditionState    = DOOR_1_OPENING
      Model           = NBNMissle_AC
      Animation       = NBNMissle_AC.NBNMissle_AC
      AnimationMode   = LOOP
      Flags           = START_FRAME_FIRST
    End   
    ConditionState    = DOOR_1_WAITING_OPEN
      Model           = NBNMissle_AC
      Animation       = NBNMissle_AC.NBNMissle_AC
      AnimationMode   = LOOP
      Flags           = START_FRAME_LAST
    End
    ConditionState    = DOOR_1_WAITING_TO_CLOSE
      Model           = NBNMissle_AC
      Animation       = NBNMissle_AC.NBNMissle_AC
      AnimationMode   = LOOP
      Flags           = START_FRAME_FIRST
      ;WeaponLaunchBone = PRIMARY RockPos
    End   
    ConditionState    = DOOR_1_CLOSING
      Model           = NBNMissle_AC
      Animation       = NBNMissle_AC.NBNMissle_AC
      AnimationMode   = LOOP
      Flags           = START_FRAME_FIRST
    End
  End

  PlacementViewAngle = -135

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:NuclearMissile
  Side = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_InternetCenter
  End
  BuildCost        = 3500
  BuildTime        = 5.0            ; in seconds
  EnergyProduction = -5
  VisionRange      = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ShroudRevealToAllRange = 60  ; Reveals shroud to all players at a specific amount which can be different. 
                               ; Using same value? Then use KINDOF_REVEAL_TO_ALL instead!
  CommandSet       = Nuke_ChinaNuclearMissileCommandSet
  ArmorSet
    Conditions      = None
    Armor           = StructureArmorTough
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 400 400 400 400  ; Experience point value at each level
  MaxSimultaneousOfType = DeterminedBySuperweaponRestriction ; Normally unlimited, but can be selected by players in multiplayer games
  MaxSimultaneousLinkKey = Superweapon  ; Count all superweapons **AND THE GLA SCUD STORM REBUILD HOLE** as one "type" for MaxSimultaneousOfType

  ; *** AUDIO Parameters ***
  VoiceSelect = NuclearMissileSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE CAPTURABLE FS_TECHNOLOGY POWERED MP_COUNT_FOR_VICTORY FS_SUPERWEAPON
  Body            = StructureBody ModuleTag_06
    MaxHealth       = 4000.0
    InitialHealth   = 4000.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 = 4200
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End

  Behavior    = OCLSpecialPower ModuleTag_07
    SpecialPowerTemplate = SuperweaponNeutronMissile
    OCL                  = SUPERWEAPON_NeutronMissile
  End
  Behavior = SpecialPowerCreate ModuleTag_08
    ;nothing
  End
  Behavior = MissileLauncherBuildingUpdate ModuleTag_09
    SpecialPowerTemplate = SuperweaponNeutronMissile
    DoorOpenTime         = 8000
    DoorWaitOpenTime     = 2000
    DoorCloseTime        = 8000

    ; FXLists to play at transitions:
    DoorOpeningFX        = ChinaNuclearMissileLauncherDoorOpen
    ;DoorOpenFX           = FX_ABPowerPlantExplode
    DoorWaitingToCloseFX = ChinaNuclearMissileLauncherLaunch
    ;DoorClosingFX        = FX_ABPowerPlantExplode
    ;DoorClosedFX         = FX_ABPowerPlantExplode

    ; looping sound to play while open:
    DoorOpenIdleAudio = BuildingNeutronMissileHiss
  End

  Behavior = ProductionUpdate ModuleTag_10
    DisabledTypesToProcess = DISABLED_HELD DISABLED_UNDERPOWERED
  End

  Behavior = DestroyDie ModuleTag_11
    ;Nothing
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_12
    DeathWeapon = ChinaPowerPlantDeathWeapon
    StartsActive  = Yes
  End

  Behavior = FlammableUpdate ModuleTag_13
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_14
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End
  
  Behavior             = CreateObjectDie ModuleTag_15
    CreationList  = OCL_LargeStructureDebris
  End
  
  Behavior        = FXListDie ModuleTag_16
    ExemptStatus  = UNDER_CONSTRUCTION
    DeathFX       = FX_NukeGLA
  End

Behavior = StealthUpdate ModuleStealth_17
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_18
    TriggeredBy = Upgrade_GLACamoNetting
  END

 Behavior = BaseRegenerateUpdate ModuleTag_19
    ;No data
  End
  
  
  Geometry            = BOX
  GeometryMajorRadius = 45.0
  GeometryMinorRadius = 55.0
  GeometryHeight      = 64.0
  GeometryIsSmall     = No
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End









;------------------------------------------------------------------------------
;China Neutron Missile, NukeSilo, Nuke Silo
Object Boss_ICBMSilo

  ; *** ART Parameters ***
  SelectPortrait         = SAICBM_L
  ButtonImage            = SAICBM
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ; day
    ConditionState      = NONE
      Model             = ABNukeSilo
    End
    AliasConditionState      = SNOW

    ConditionState      = SOLD
      Model             = NONE
    End  
    ConditionState      = SOLD SNOW
      Model             = NONE

    End   
    ConditionState      = SOLD NIGHT
      Model             = NONE
    End    
    ConditionState      = SOLD NIGHT SNOW
      Model             = NONE
    End     
    
    ConditionState      = DAMAGED
      Model             = ABNukeSilo_D
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
    End
    AliasConditionState      = DAMAGED SNOW

     ConditionState     = REALLYDAMAGED RUBBLE
      Model             = ABNukeSilo_E
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    AliasConditionState      = REALLYDAMAGED RUBBLE SNOW

    ConditionState      = AWAITING_CONSTRUCTION
      Model             = None
    End
    AliasConditionState      = AWAITING_CONSTRUCTION SNOW

    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model             = ABNukeSilo
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END 
    AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
  
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model             = ABNukeSilo_D
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END   
    AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
 
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE
      Model             = ABNukeSilo_E
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END
    AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE SNOW 
    ConditionState      = DOOR_1_OPENING
      Model             = ABNukeSilo_A2
      Animation         = ABNukeSilo_A2.ABNukeSilo_A2
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
    End
    AliasConditionState      = DOOR_1_OPENING SNOW

   
    ConditionState      = DOOR_1_WAITING_OPEN
      Model             = ABNukeSilo_A2
      Animation         = ABNukeSilo_A2.ABNukeSilo_A2
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End 
    AliasConditionState      = DOOR_1_WAITING_OPEN SNOW

    ConditionState      = DOOR_1_WAITING_TO_CLOSE
      Model             = ABNukeSilo_A3
      Animation         = ABNukeSilo_A3.ABNukeSilo_A3
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPost
    End 
    AliasConditionState      = DOOR_1_WAITING_TO_CLOSE SNOW 
   
    ConditionState      = DOOR_1_CLOSING
      Model             = ABNukeSilo_A3
      Animation         = ABNukeSilo_A3.ABNukeSilo_A3
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
    End
    AliasConditionState      = DOOR_1_CLOSING SNOW  
 
    ConditionState      = DOOR_1_OPENING DAMAGED 
      Model             = ABNukeSilo_A2D
      Animation         = ABNukeSilo_A2D.ABNukeSilo_A2D
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End  
    AliasConditionState      = DOOR_1_OPENING DAMAGED SNOW  

    ConditionState      = DOOR_1_WAITING_OPEN DAMAGED 
      Model             = ABNukeSilo_A2D
      Animation         = ABNukeSilo_A2D.ABNukeSilo_A2D
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End 
    AliasConditionState      = DOOR_1_WAITING_OPEN DAMAGED SNOW  
  
    ConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED 
      Model             = ABNukeSilo_A3D
      Animation         = ABNukeSilo_A3D.ABNukeSilo_A3D
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    AliasConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED SNOW  

    ConditionState      = DOOR_1_CLOSING DAMAGED 
      Model             = ABNukeSilo_A3D
      Animation         = ABNukeSilo_A3D.ABNukeSilo_A3D
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End 
    AliasConditionState      = DOOR_1_CLOSING DAMAGED SNOW
     
    ConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE 
      Model             = ABNukeSilo_A2E
      Animation         = ABNukeSilo_A2E.ABNukeSilo_A2E
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End
    AliasConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE SNOW 

    ConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE 
      Model             = ABNukeSilo_A2E
      Animation         = ABNukeSilo_A2E.ABNukeSilo_A2E
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End
    AliasConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE SNOW   
 
    ConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE 
      Model             = ABNukeSilo_A3E
      Animation         = ABNukeSilo_A3E.ABNukeSilo_A3E
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End  
    AliasConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE SNOW 

    ConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE 
      Model             = ABNukeSilo_A3E
      Animation         = ABNukeSilo_A3E.ABNukeSilo_A3E
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End 
    AliasConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE SNOW        

    ; night

    ConditionState      = NIGHT
      Model             = ABNukeSilo
    End
    AliasConditionState      = NIGHT SNOW

    ConditionState      = DAMAGED NIGHT
      Model             = ABNukeSilo_D
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
    End
    AliasConditionState      = DAMAGED NIGHT SNOW

     ConditionState     = REALLYDAMAGED RUBBLE NIGHT
      Model             = ABNukeSilo_E
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    AliasConditionState      = REALLYDAMAGED RUBBLE NIGHT SNOW

    ConditionState      = AWAITING_CONSTRUCTION NIGHT
      Model             = None
    End
    AliasConditionState      = AWAITING_CONSTRUCTION NIGHT SNOW

    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model             = ABNukeSilo
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END
    AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW      
      
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model             = ABNukeSilo_D
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END 
    AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED SNOW      
    
    ConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model             = ABNukeSilo_E
      Flags             = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    END
    AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED SNOW       
         
    ConditionState      = DOOR_1_OPENING NIGHT
      Model             = ABNukeSilo_A2
      Animation         = ABNukeSilo_A2.ABNukeSilo_A2
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
    End 
    AliasConditionState      = DOOR_1_OPENING NIGHT SNOW 
     
    ConditionState      = DOOR_1_WAITING_OPEN NIGHT
      Model             = ABNukeSilo_A2
      Animation         = ABNukeSilo_A2.ABNukeSilo_A2
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End
    AliasConditionState      = DOOR_1_WAITING_OPEN NIGHT SNOW 
    
    ConditionState      = DOOR_1_WAITING_TO_CLOSE NIGHT
      Model             = ABNukeSilo_A3
      Animation         = ABNukeSilo_A3.ABNukeSilo_A3
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      ;WeaponLaunchBone  = PRIMARY RockPost
    End
    AliasConditionState      = DOOR_1_WAITING_TO_CLOSE NIGHT SNOW  
 
    ConditionState      = DOOR_1_CLOSING NIGHT
      Model             = ABNukeSilo_A3
      Animation         = ABNukeSilo_A3.ABNukeSilo_A3
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
    End
    AliasConditionState      = DOOR_1_CLOSING NIGHT SNOW  
 
    ConditionState      = DOOR_1_OPENING DAMAGED NIGHT
      Model             = ABNukeSilo_A2D
      Animation         = ABNukeSilo_A2D.ABNukeSilo_A2D
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End
    AliasConditionState      = DOOR_1_OPENING DAMAGED NIGHT SNOW  
      
    ConditionState      = DOOR_1_WAITING_OPEN DAMAGED NIGHT
      Model             = ABNukeSilo_A2D
      Animation         = ABNukeSilo_A2D.ABNukeSilo_A2D
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End 
    AliasConditionState      = DOOR_1_WAITING_OPEN DAMAGED NIGHT SNOW   
  
    ConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED NIGHT
      Model             = ABNukeSilo_A3D
      Animation         = ABNukeSilo_A3D.ABNukeSilo_A3D
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    AliasConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED NIGHT SNOW  
   
    ConditionState      = DOOR_1_CLOSING DAMAGED NIGHT
      Model             = ABNukeSilo_A3D
      Animation         = ABNukeSilo_A3D.ABNukeSilo_A3D
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    AliasConditionState      = DOOR_1_CLOSING DAMAGED NIGHT SNOW   
 
    ConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE NIGHT
      Model             = ABNukeSilo_A2E
      Animation         = ABNukeSilo_A2E.ABNukeSilo_A2E
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End
    AliasConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE NIGHT SNOW  
   
    ConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE NIGHT
      Model             = ABNukeSilo_A2E
      Animation         = ABNukeSilo_A2E.ABNukeSilo_A2E
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST PRISTINE_BONE_POS_IN_FINAL_FRAME
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
      ParticleSysBone   = Steam01 BigMissileSteam
      ParticleSysBone   = Steam02 BigMissileSteam
    End 
    AliasConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE NIGHT SNOW  
     
    ConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE NIGHT
      Model             = ABNukeSilo_A3E
      Animation         = ABNukeSilo_A3E.ABNukeSilo_A3E
      AnimationMode     = MANUAL
      Flags             = START_FRAME_FIRST
      WeaponLaunchBone  = PRIMARY RockPost
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    AliasConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE NIGHT SNOW   
 
    ConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE NIGHT
      Model             = ABNukeSilo_A3E
      Animation         = ABNukeSilo_A3E.ABNukeSilo_A3E
      AnimationMode     = ONCE
      Flags             = MAINTAIN_FRAME_ACROSS_STATES2
      ParticleSysBone   = Smoke01 SmolderingSmoke
      ParticleSysBone   = Smoke02 SmolderingSmoke
      ParticleSysBone   = Smoke03 SmolderingSmoke
      ParticleSysBone   = Smoke04 SmolderingSmoke
      ParticleSysBone   = Smoke05 SmolderingSmoke
      ParticleSysBone   = Smoke06 SmolderingSmoke
      ParticleSysBone   = Smoke01 SmolderingFire
      ParticleSysBone   = Smoke02 SmolderingFire
      ParticleSysBone   = Smoke03 SmolderingFire
      ParticleSysBone   = Smoke04 SmolderingFire
      ParticleSysBone   = Smoke05 SmolderingFire
      ParticleSysBone   = Smoke06 SmolderingFire
    End
    AliasConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE NIGHT SNOW     
    
    ;-------------- SNOW! --------------------
    
    ;AliasConditionState      = SNOW
    ;AliasConditionState      = DAMAGED SNOW
    ;AliasConditionState      = REALLYDAMAGED RUBBLE SNOW
    ;AliasConditionState      = AWAITING_CONSTRUCTION SNOW
    ;AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW   
    ;AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW  
    ;AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED RUBBLE SNOW  
    ;AliasConditionState      = DOOR_1_OPENING SNOW 
    ;AliasConditionState      = DOOR_1_WAITING_OPEN SNOW   
    ;AliasConditionState      = DOOR_1_WAITING_TO_CLOSE SNOW   
    ;AliasConditionState      = DOOR_1_CLOSING SNOW 
    ;AliasConditionState      = DOOR_1_OPENING DAMAGED SNOW  
    ;AliasConditionState      = DOOR_1_WAITING_OPEN DAMAGED SNOW  
    ;AliasConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED SNOW  
    ;AliasConditionState      = DOOR_1_CLOSING DAMAGED SNOW
    ;AliasConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE SNOW 
    ;AliasConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE SNOW   
    ;AliasConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE SNOW 
    ;AliasConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE SNOW
    ;End   

   ; night

    ;AliasConditionState      = NIGHT SNOW
    ;AliasConditionState      = DAMAGED NIGHT SNOW
    ;AliasConditionState      = REALLYDAMAGED RUBBLE NIGHT SNOW
    ;AliasConditionState      = AWAITING_CONSTRUCTION NIGHT SNOW
    ;AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW      
    ;AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED SNOW      
    ;AliasConditionState      = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED SNOW       
    ;AliasConditionState      = DOOR_1_OPENING NIGHT SNOW 
    ;AliasConditionState      = DOOR_1_WAITING_OPEN NIGHT SNOW 
    ;AliasConditionState      = DOOR_1_WAITING_TO_CLOSE NIGHT SNOW  
    ;AliasConditionState      = DOOR_1_CLOSING NIGHT SNOW  
    ;AliasConditionState      = DOOR_1_OPENING DAMAGED NIGHT SNOW  
    ;AliasConditionState      = DOOR_1_WAITING_OPEN DAMAGED NIGHT SNOW   
    ;AliasConditionState      = DOOR_1_WAITING_TO_CLOSE DAMAGED NIGHT SNOW  
    ;AliasConditionState      = DOOR_1_CLOSING DAMAGED NIGHT SNOW   
    ;AliasConditionState      = DOOR_1_OPENING REALLYDAMAGED RUBBLE NIGHT SNOW  
    ;AliasConditionState      = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE NIGHT SNOW  
    ;AliasConditionState      = DOOR_1_WAITING_TO_CLOSE REALLYDAMAGED RUBBLE NIGHT SNOW   
    ;AliasConditionState      = DOOR_1_CLOSING REALLYDAMAGED RUBBLE NIGHT SNOW
    ;End
   End   
       
  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_02
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSupDrop_A4
      Animation       = ABSupDrop_A4.ABSupDrop_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSupDrop_A4N
      Animation       = ABSupDrop_A4N.ABSupDrop_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSupDrop_A4S
      Animation       = ABSupDrop_A4S.ABSupDrop_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABSupDrop_A4SN
      Animation       = ABSupDrop_A4SN.ABSupDrop_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABSupDrop_A4
      Animation       = ABSupDrop_A4.ABSupDrop_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABSupDrop_A4N
      Animation       = ABSupDrop_A4N.ABSupDrop_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABSupDrop_A4S
      Animation       = ABSupDrop_A4S.ABSupDrop_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABSupDrop_A4SN
      Animation       = ABSupDrop_A4SN.ABSupDrop_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABSupDrop_A4
      Animation       = ABSupDrop_A4.ABSupDrop_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABSupDrop_A4N
      Animation       = ABSupDrop_A4N.ABSupDrop_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABSupDrop_A4S
      Animation       = ABSupDrop_A4S.ABSupDrop_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABSupDrop_A4SN
      Animation       = ABSupDrop_A4SN.ABSupDrop_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = ABSupDrop_A6
      Animation       = ABSupDrop_A6.ABSupDrop_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABSupDrop_A6N
      Animation       = ABSupDrop_A6N.ABSupDrop_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = ABSupDrop_A6S
      Animation       = ABSupDrop_A6S.ABSupDrop_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
      ParticleSysBone = Smoke05 BuildUpSnowSmoke
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABSupDrop_A6SN
      Animation       = ABSupDrop_A6SN.ABSupDrop_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
      ParticleSysBone = Smoke05 BuildUpSnowSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABSupDrop_A6
      Animation       = ABSupDrop_A6.ABSupDrop_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABSupDrop_A6N
      Animation       = ABSupDrop_A6N.ABSupDrop_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABSupDrop_A6S
      Animation       = ABSupDrop_A6S.ABSupDrop_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABSupDrop_A6SN
      Animation       = ABSupDrop_A6SN.ABSupDrop_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End 
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = ABSupDrop_A6
      Animation       = ABSupDrop_A6.ABSupDrop_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = ABSupDrop_A6N
      Animation       = ABSupDrop_A6N.ABSupDrop_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = ABSupDrop_A6S
      Animation       = ABSupDrop_A6S.ABSupDrop_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = ABSupDrop_A6SN
      Animation       = ABSupDrop_A6SN.ABSupDrop_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ being-constructed crane -----------------
  ;Draw = W3DModelDraw ModuleTag_04
  ;AnimationsRequirePower = No
    ;DefaultConditionState
      ;Model           = None
      ;TransitionKey   = DOWN_DEFAULT
    ;End
    ;ConditionState    = NIGHT
      ;Model           = None
      ;TransitionKey   = DOWN_DEFAULT
    ;End
    ;ConditionState    = SNOW
      ;Model           = None
      ;TransitionKey   = DOWN_DEFAULT
    ;End
    ;ConditionState    = SNOW NIGHT
      ;Model           = None
      ;TransitionKey   = DOWN_DEFAULT
    ;End
    ;ConditionState    = SOLD
      ;Model           = NONE
    ;End

    ;ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      ;Model         = NBNMissle_A5
      ;Animation     = NBNMissle_A5.NBNMissle_A5
      ;AnimationMode = LOOP
      ;TransitionKey = UP_DAY
    ;End

    ;ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      ;Model         = NBNMissle_A5N
      ;Animation     = NBNMissle_A5N.NBNMissle_A5N
      ;AnimationMode = LOOP
      ;TransitionKey = UP_NIGHT
    ;End
    ;ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      ;Model         = NBNMissle_A5S
      ;Animation     = NBNMissle_A5S.NBNMissle_A5S
      ;AnimationMode = LOOP
      ;TransitionKey = UP_SNOW
    ;End
    ;ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      ;Model         = NBNMissle_A5SN
      ;Animation     = NBNMissle_A5SN.NBNMissle_A5SN
      ;AnimationMode = LOOP
      ;TransitionKey = UP_SNOWNIGHT
    ;End
    ;TransitionState = DOWN_DEFAULT UP_DAY
      ;Model         = NBNMissle_AB
      ;Animation     = NBNMissle_AB.NBNMissle_AB
      ;AnimationMode = ONCE
      ;AnimationSpeedFactorRange = 1.0 1.0
      ;Flags         = START_FRAME_FIRST
    ;End

    ;TransitionState = DOWN_DEFAULT UP_NIGHT
      ;Model         = NBNMissle_ABN
      ;Animation     = NBNMissle_ABN.NBNMissle_ABN
      ;AnimationMode = ONCE
      ;AnimationSpeedFactorRange = 1.0 1.0
      ;Flags         = START_FRAME_FIRST
    ;End
    ;TransitionState = DOWN_DEFAULT UP_SNOW
      ;Model         = NBNMissle_ABS
      ;Animation     = NBNMissle_ABS.NBNMissle_ABS
      ;AnimationMode = ONCE
      ;AnimationSpeedFactorRange = 1.0 1.0
      ;Flags         = START_FRAME_FIRST
    ;End
    ;TransitionState = DOWN_DEFAULT UP_SNOWNIGHT
      ;Model         = NBNMissle_ABSN
      ;Animation     = NBNMissle_ABSN.NBNMissle_ABSN
      ;AnimationMode = ONCE
      ;AnimationSpeedFactorRange = 1.0 1.0
      ;Flags         = START_FRAME_FIRST
    ;End
    ;TransitionState = UP_DAY DOWN_DEFAULT
      ;Model         = NBNMissle_AB
      ;Animation     = NBNMissle_AB.NBNMissle_AB
      ;AnimationMode = ONCE_BACKWARDS
      ;AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      ;Flags         = START_FRAME_LAST
    ;End
    ;TransitionState = UP_NIGHT DOWN_DEFAULT
      ;Model         = NBNMissle_ABN
      ;Animation     = NBNMissle_ABN.NBNMissle_ABN
      ;AnimationMode = ONCE_BACKWARDS
      ;AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      ;Flags         = START_FRAME_LAST
    ;End
    ;TransitionState = UP_SNOW DOWN_DEFAULT
      ;Model         = NBNMissle_ABS
      ;Animation     = NBNMissle_ABS.NBNMissle_ABS
      ;AnimationMode = ONCE_BACKWARDS
      ;AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      ;Flags         = START_FRAME_LAST
    ;End
    ;TransitionState = UP_SNOWNIGHT DOWN_DEFAULT
      ;Model         = NBNMissle_ABSN
      ;Animation     = NBNMissle_ABSN.NBNMissle_ABSN
      ;AnimationMode = ONCE_BACKWARDS
      ;AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      ;Flags         = START_FRAME_LAST
    ;End 
  ;End

  ; Blinking lights
  ;Draw = W3DModelDraw ModuleTag_05
    ;OkToChangeModelColor = Yes
    ; day
    ;ConditionState    = NONE
      ;Model           = NBNMissle_AC
      ;Animation       = NONE
    ;End
    ;ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      ;Model           = NBNMissle_AC
      ;Flags           = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    ;End
    ;ConditionState    = AWAITING_CONSTRUCTION
      ;Model           = NONE
    ;End
    ;ConditionState    = DOOR_1_OPENING
      ;Model           = NBNMissle_AC
      ;Animation       = NBNMissle_AC.NBNMissle_AC
      ;AnimationMode   = LOOP
      ;Flags           = START_FRAME_FIRST
    ;End   
    ;ConditionState    = DOOR_1_WAITING_OPEN
      ;Model           = NBNMissle_AC
      ;Animation       = NBNMissle_AC.NBNMissle_AC
      ;AnimationMode   = LOOP
      ;Flags           = START_FRAME_LAST
    ;End
    ;ConditionState    = DOOR_1_WAITING_TO_CLOSE
      ;Model           = NBNMissle_AC
      ;Animation       = NBNMissle_AC.NBNMissle_AC
      ;AnimationMode   = LOOP
      ;Flags           = START_FRAME_FIRST
      ;WeaponLaunchBone = PRIMARY RockPos
    ;End   
    ;ConditionState    = DOOR_1_CLOSING
      ;Model           = NBNMissle_AC
      ;Animation       = NBNMissle_AC.NBNMissle_AC
      ;AnimationMode   = LOOP
      ;Flags           = START_FRAME_FIRST
    ;End
  ;End

  PlacementViewAngle = 135

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:ICBMSilo
  Side = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_InternetCenter
  End
  BuildCost        = 3500
  BuildTime        = 60.0            ; in seconds
  EnergyProduction = -10
  VisionRange      = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ShroudRevealToAllRange = 60  ; Reveals shroud to all players at a specific amount which can be different. 
                               ; Using same value? Then use KINDOF_REVEAL_TO_ALL instead!
  CommandSet       = ICBMCommandSet
  ArmorSet
    Conditions      = None
    Armor           = StructureArmorTough
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 400 400 400 400  ; Experience point value at each level
  MaxSimultaneousOfType = DeterminedBySuperweaponRestriction ; Normally unlimited, but can be selected by players in multiplayer games
  MaxSimultaneousLinkKey = Superweapon  ; Count all superweapons **AND THE GLA SCUD STORM REBUILD HOLE** as one "type" for MaxSimultaneousOfType

  ; *** AUDIO Parameters ***
  VoiceSelect = NuclearMissileSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE CAPTURABLE FS_TECHNOLOGY POWERED MP_COUNT_FOR_VICTORY FS_SUPERWEAPON
  Body            = StructureBody ModuleTag_06
    MaxHealth       = 4000.0
    InitialHealth   = 4000.0
  End


 
  Behavior    = OCLSpecialPower ModuleTag_07
    SpecialPowerTemplate = SupW_SuperweaponNeutronMissile
    OCL                  = SupW_SUPERWEAPON_NeutronMissile
  End
  Behavior = SpecialPowerCreate ModuleTag_08
    ;nothing
  End
  Behavior = MissileLauncherBuildingUpdate ModuleTag_09
    SpecialPowerTemplate = SupW_SuperweaponNeutronMissile
    DoorOpenTime         = 8000
    DoorWaitOpenTime     = 2000
    DoorCloseTime        = 8000

    ; FXLists to play at transitions:
    DoorOpeningFX        = ChinaNuclearMissileLauncherDoorOpen
    ;DoorOpenFX           = FX_ABPowerPlantExplode
    DoorWaitingToCloseFX = ChinaNuclearMissileLauncherLaunch
    ;DoorClosingFX        = FX_ABPowerPlantExplode
    ;DoorClosedFX         = FX_ABPowerPlantExplode

    ; looping sound to play while open:
    DoorOpenIdleAudio = BuildingNeutronMissileHiss
  End

  Behavior = ProductionUpdate ModuleTag_10
    DisabledTypesToProcess = DISABLED_HELD DISABLED_UNDERPOWERED
  End

  Behavior = DestroyDie ModuleTag_11
    ;Nothing
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_12
    DeathWeapon = ChinaPowerPlantDeathWeapon
    StartsActive  = Yes
  End

  Behavior = FlammableUpdate ModuleTag_14
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_15
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End
  
  Behavior             = CreateObjectDie ModuleTag_20
    CreationList  = OCL_LargeStructureDebris
  End
  
  Behavior        = FXListDie ModuleTag_21
    ExemptStatus  = UNDER_CONSTRUCTION
    DeathFX       = FX_NukeGLA
  End

  Behavior = ProductionUpdate ModuleTag_22
    ; This is needed in order to get a public timer to work!
  End
  
  Behavior                = CountermeasuresBehavior ModuleTag_23
    ;TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = RockPost ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 4     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 1.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 800  ; Time between flare volleys
    NumberOfVolleys       = 4     ; Number of times the volleys will fire before reloading
    ReloadTime            = 1000     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

Behavior = StealthUpdate ModuleStealth_24
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_25
    TriggeredBy = Upgrade_GLACamoNetting
  END

  Geometry            = BOX
  GeometryMajorRadius = 45.0
  GeometryMinorRadius = 55.0
  GeometryHeight      = 64.0
  GeometryIsSmall     = No
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End















; -----------------------------------------------------------------------------
Object Boss_TunnelNetwork

  ; *** ART Parameters ***
  SelectPortrait         = SUTunnel_L
  ButtonImage            = SUTunnel

  UpgradeCameo1          = Chem_Upgrade_GLAAnthraxGamma
  ;UpgradeCameo2           = NONE
  ;UpgradeCameo3           = NONE
  ;UpgradeCameo4           = NONE
  ;UpgradeCameo5           = NONE

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    
    DefaultConditionState
      Model             = UBUndTunn
      Turret            = Turret01
      WeaponFireFXBone  = PRIMARY BarrelMS
      WeaponMuzzleFlash = PRIMARY BarrelFX
    End
    ConditionState      = DAMAGED
      Model             = UBUndTunn_D
    End
    ConditionState      = REALLYDAMAGED RUBBLE
      Model             = UBUndTunn_E
      ParticleSysBone   = Steam01 SteamVent
    End
    
    
    ConditionState      = SNOW
      Model             = UBUndTunn_S
    End
    ConditionState      = DAMAGED SNOW
      Model             = UBUndTunn_DS
    End
    ConditionState      = REALLYDAMAGED RUBBLE SNOW
      Model             = UBUndTunn_ES
      ParticleSysBone   = Steam01 SteamVent
    End
    
    
    
    
    ConditionState      = NIGHT
      Model             = UBUndTunn_N
    End
    ConditionState      = DAMAGED NIGHT
      Model             = UBUndTunn_DN
    End
    ConditionState      = REALLYDAMAGED RUBBLE NIGHT
      Model             = UBUndTunn_EN
      ParticleSysBone   = Steam01 SteamVent
    End
    
    
    ConditionState      = SNOW NIGHT
      Model             = UBUndTunn_NS
    End
    ConditionState      = DAMAGED SNOW NIGHT
      Model             = UBUndTunn_DNS
    End
    ConditionState      = REALLYDAMAGED RUBBLE SNOW NIGHT
      Model             = UBUndTunn_ENS
      ParticleSysBone   = Steam01 SteamVent
    End

    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = UBUndTunn
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = UBUndTunn_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = UBUndTunn_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = UBUndTunn_N
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = UBUndTunn_DN
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = UBUndTunn_EN
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = UBUndTunn_S
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = UBUndTunn_DS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = UBUndTunn_ES
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = UBUndTunn_NS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = UBUndTunn_DNS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = UBUndTunn_ENS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
    
  End
  
  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_02
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBUndTunn_A4
      Animation       = UBUndTunn_A4.UBUndTunn_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBUndTunn_A4N
      Animation       = UBUndTunn_A4N.UBUndTunn_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBUndTunn_A4S
      Animation       = UBUndTunn_A4S.UBUndTunn_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBUndTunn_A4SN
      Animation       = UBUndTunn_A4SN.UBUndTunn_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = UBUndTunn_A4
      Animation       = UBUndTunn_A4.UBUndTunn_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = UBUndTunn_A4N
      Animation       = UBUndTunn_A4N.UBUndTunn_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = UBUndTunn_A4S
      Animation       = UBUndTunn_A4S.UBUndTunn_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = UBUndTunn_A4SN
      Animation       = UBUndTunn_A4SN.UBUndTunn_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = UBUndTunn_A4
      Animation       = UBUndTunn_A4.UBUndTunn_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = UBUndTunn_A4N
      Animation       = UBUndTunn_A4N.UBUndTunn_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = UBUndTunn_A4S
      Animation       = UBUndTunn_A4S.UBUndTunn_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = UBUndTunn_A4SN
      Animation       = UBUndTunn_A4SN.UBUndTunn_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    =  PARTIALLY_CONSTRUCTED 
      Model           = UBUndTunn_A6
      Animation       = UBUndTunn_A6.UBUndTunn_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT  PARTIALLY_CONSTRUCTED 
      Model           = UBUndTunn_A6N
      Animation       = UBUndTunn_A6N.UBUndTunn_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW  PARTIALLY_CONSTRUCTED 
      Model           = UBUndTunn_A6S
      Animation       = UBUndTunn_A6S.UBUndTunn_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT  PARTIALLY_CONSTRUCTED 
      Model           = UBUndTunn_A6SN
      Animation       = UBUndTunn_A6SN.UBUndTunn_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = UBUndTunn_A6
      Animation       = UBUndTunn_A6.UBUndTunn_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = UBUndTunn_A6N
      Animation       = UBUndTunn_A6N.UBUndTunn_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = UBUndTunn_A6S
      Animation       = UBUndTunn_A6S.UBUndTunn_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = UBUndTunn_A6SN
      Animation       = UBUndTunn_A6SN.UBUndTunn_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = UBUndTunn_A6
      Animation       = UBUndTunn_A6.UBUndTunn_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = UBUndTunn_A6N
      Animation       = UBUndTunn_A6N.UBUndTunn_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = UBUndTunn_A6S
      Animation       = UBUndTunn_A6S.UBUndTunn_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = UBUndTunn_A6SN
      Animation       = UBUndTunn_A6SN.UBUndTunn_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  PlacementViewAngle = -135

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:TunnelNetwork
  Side = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_Barracks
  End
  BuildCost        = 100
  RefundValue      = 100 ; With nothing (or zero) listed, we sell for half price. 
  BuildTime        = 2.0           ; in seconds
  EnergyProduction = 0
  VisionRange     = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY TunnelNetworkGun
  End
  WeaponSet 
    Conditions        = PLAYER_UPGRADE
    Weapon            = PRIMARY     Chem_TunnelNetworkGunGamma
  End

  CommandSet       = GLATunnelNetworkCommandSet
  ExperienceValue     = 100 100 100 100  ; Experience point value at each level

  ; *** AUDIO Parameters ***
  VoiceSelect = TunnelNetworkSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy
  SoundEnter = GarrisonEnter
  SoundExit = GarrisonExit

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
    TurretMoveLoop        = NoSound
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT IMMOBILE FS_BASE_DEFENSE IMMUNE_TO_CAPTURE SCORE_CREATE AUTO_RALLYPOINT
  Body            = StructureBody ModuleTag_04
    MaxHealth       = 1000.0
    InitialHealth   = 1000.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
  End

  Behavior = StealthDetectorUpdate ModuleTag_13
    DetectionRate     = 500   ; how often to rescan for stealthed things in my sight (msec)
    DetectionRange   = 150   ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End

  Behavior = AIUpdateInterface ModuleTag_16
    Turret
      TurretTurnRate        = 180   // turn rate, in degrees per sec
      ControlledWeaponSlots = PRIMARY
    End

    AutoAcquireEnemiesWhenIdle = Yes Stealthed; defensive weapon
  End

  Behavior = TunnelContain ModuleTag_05
    TimeForFullHeal     = 5000   ;(in milliseconds)
  End

  ;Kris: Removed this module from because units exiting the container would extract information 
  ;from the wrong exit interface. And we don't appear to need it for the spawns because they
  ;use OpenContain instead.
  ;Behavior = DefaultProductionExitUpdate ModuleTag_06
  ;  UnitCreatePoint   = X:  5.0  Y:  0.0   Z:0.0
  ;  NaturalRallyPoint = X: 35.0  Y:  0.0   Z:0.0
  ;End

  Behavior            = SpawnBehavior ModuleTag_07
    SpawnNumber       = 2
    SpawnReplaceDelay = 9999
    ;**FIX**
    SpawnTemplateName = GLAInfantryTunnelDefender
    OneShot           = Yes
    CanReclaimOrphans = No
    SlavesHaveFreeWill = Yes
  End
  Behavior             = RebuildHoleExposeDie ModuleTag_09
    HoleName      = GLAHoleTunnelNetwork
    HoleMaxHealth = 500.0
  End
  Behavior = DestroyDie ModuleTag_10
    ;nothing
  End
  Behavior             = CreateObjectDie ModuleTag_11
    CreationList  = OCL_ABTunnelNetworkDebris
  End
  Behavior             = FXListDie ModuleTag_12
    DeathFX       = FX_StructureSmallDeath
  End

  Behavior = FlammableUpdate ModuleTag_15

    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  ;Kris: Cut camo-netting from Boss General
  Behavior = StealthUpdate ModuleTag_17
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY
    MoveThresholdSpeed          = 3
    InnateStealth               = Yes ;Requires upgrade first
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_18
    TriggeredBy = Upgrade_GLACamoNetting
  End
  ;Behavior = ProductionUpdate ModuleTag_19
  ;End

  Behavior = TransitionDamageFX ModuleTag_20
    ;-------------DESIGNED FOR SMALL SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionSmallExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionSmallShockwave
  End

  Behavior = ProductionUpdate ModuleTag_23
    ; nothing
  End

 Behavior = BaseRegenerateUpdate ModuleTag_08
    ;No data
  End



  Geometry = CYLINDER
  GeometryMajorRadius = 25.0
  GeometryHeight = 20.0    
  GeometryIsSmall     = No
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End
















;------------------------------------------------------------------------------
Object Boss_SupplyCenter

  ; *** ART Parameters ***
  SelectPortrait         = SNSupplyCenter_L
  ButtonImage            = SNSupplyCenter
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ;day
    ConditionState = NONE
      Model = NBSupCent
      ;Animation       = NBSupCent.NBSupCent
      ;AnimationMode   = LOOP
    End
    ConditionState = DAMAGED
      Model = NBSupCent_D
      ;Animation       = NBSupCent_D.NBSupCent_D
      ;AnimationMode   = LOOP
    End
    ConditionState = REALLYDAMAGED RUBBLE
      Model = NBSupCent_E
      ;Animation       = NBSupCent_E.NBSupCent_E
      ;AnimationMode   = LOOP
    End
    
    
    ConditionState = SNOW
      Model = NBSupCent_S
      ;Animation       = NBSupCent.NBSupCent
      ;AnimationMode   = LOOP
    End
    ConditionState = DAMAGED SNOW
      Model = NBSupCent_DS
      ;Animation       = NBSupCent_D.NBSupCent_D
      ;AnimationMode   = LOOP
    End
    ConditionState = REALLYDAMAGED RUBBLE SNOW
      Model = NBSupCent_ES
      ;Animation       = NBSupCent_E.NBSupCent_E
      ;AnimationMode   = LOOP
    End
    
    
    ConditionState = SNOW NIGHT
      Model = NBSupCent_NS
      ;Animation       = NBSupCent.NBSupCent
      ;AnimationMode   = LOOP
    End
    ConditionState = DAMAGED SNOW NIGHT
      Model = NBSupCent_DNS
      ;Animation       = NBSupCent_D.NBSupCent_D
      ;AnimationMode   = LOOP
    End
    ConditionState = REALLYDAMAGED RUBBLE SNOW NIGHT
      Model = NBSupCent_ENS
      ;Animation       = NBSupCent_E.NBSupCent_E
      ;AnimationMode   = LOOP
    End
    

    ConditionState = NIGHT
      Model           = NBSupCent_N
      ;Animation       = NBSupCent_N.NBSupCent_N
      ;AnimationMode   = LOOP
    End  
    ConditionState = NIGHT DAMAGED
      Model           = NBSupCent_DN

      ;Animation       = NBSupCent_N.NBSupCent_N
      ;AnimationMode   = LOOP
    End  
    ConditionState = NIGHT REALLYDAMAGED RUBBLE
      Model           = NBSupCent_EN
      ;Animation       = NBSupCent_N.NBSupCent_N
      ;AnimationMode   = LOOP
    End  
    
    
        ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBSupCent
      ;Animation          = NBSupCent.NBSupCent
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBSupCent_D
      ;Animation          = NBSupCent_D.NBSupCent_D
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBSupCent_E
      ;Animation          = NBSupCent_E.NBSupCent_E
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = NBSupCent_N
      ;Animation          = NBSupCent_N.NBSupCent_N
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = NBSupCent_DN
      ;Animation          = NBSupCent_DN.NBSupCent_DN
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = NBSupCent_EN
      ;Animation          = NBSupCent_EN.NBSupCent_EN
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = NBSupCent_S
      ;Animation          = NBSupCent_S.NBSupCent_S
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = NBSupCent_DS
      ;Animation          = NBSupCent_DS.NBSupCent_DS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = NBSupCent_ES
      ;Animation          = NBSupCent_ES.NBSupCent_ES
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = NBSupCent_NS
      ;Animation          = NBSupCent_NS.NBSupCent_NS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = NBSupCent_DNS
      ;Animation          = NBSupCent_DNS.NBSupCent_DNS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = NBSupCent_ENS
      ;Animation          = NBSupCent_ENS.NBSupCent_ENS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
  End
    
  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_02
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4
      Animation       = NBSupCent_A4.NBSupCent_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4N
      Animation       = NBSupCent_A4N.NBSupCent_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4S
      Animation       = NBSupCent_A4S.NBSupCent_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4SN
      Animation       = NBSupCent_A4SN.NBSupCent_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBSupCent_A4
      Animation       = NBSupCent_A4.NBSupCent_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBSupCent_A4N
      Animation       = NBSupCent_A4N.NBSupCent_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBSupCent_A4S
      Animation       = NBSupCent_A4S.NBSupCent_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBSupCent_A4SN
      Animation       = NBSupCent_A4SN.NBSupCent_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBSupCent_A4
      Animation       = NBSupCent_A4.NBSupCent_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBSupCent_A4N
      Animation       = NBSupCent_A4N.NBSupCent_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBSupCent_A4S
      Animation       = NBSupCent_A4S.NBSupCent_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBSupCent_A4SN
      Animation       = NBSupCent_A4SN.NBSupCent_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6
      Animation       = NBSupCent_A6.NBSupCent_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6N
      Animation       = NBSupCent_A6N.NBSupCent_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6S
      Animation       = NBSupCent_A6S.NBSupCent_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
      ParticleSysBone = Smoke05 BuildUpSnowSmoke
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6SN
      Animation       = NBSupCent_A6SN.NBSupCent_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Dust01 BuildingNightSnowDust
      ParticleSysBone = Smoke01 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke02 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke03 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke04 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke05 BuildUpNightSnowSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = NBSupCent_A6
      Animation       = NBSupCent_A6.NBSupCent_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = NBSupCent_A6N
      Animation       = NBSupCent_A6N.NBSupCent_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = NBSupCent_A6S
      Animation       = NBSupCent_A6S.NBSupCent_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = NBSupCent_A6SN
      Animation       = NBSupCent_A6SN.NBSupCent_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBSupCent_A6
      Animation       = NBSupCent_A6.NBSupCent_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End    
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBSupCent_A6N
      Animation       = NBSupCent_A6N.NBSupCent_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBSupCent_A6S
      Animation       = NBSupCent_A6S.NBSupCent_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBSupCent_A6SN
      Animation       = NBSupCent_A6SN.NBSupCent_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_04
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SOLD
      Model           = NONE
    End

    ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5
      Animation       = NBSupCent_A5.NBSupCent_A5
      AnimationMode   = LOOP
      TransitionKey  = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5N
      Animation       = NBSupCent_A5N.NBSupCent_A5N
      AnimationMode   = LOOP
      TransitionKey  = UP_NIGHT
    End
    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5S
      Animation       = NBSupCent_A5S.NBSupCent_A5S
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5SN
      Animation       = NBSupCent_A5SN.NBSupCent_A5SN
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model            = NBSupCent_AB
      Animation       = NBSupCent_AB.NBSupCent_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model            = NBSupCent_ABN
      Animation       = NBSupCent_ABN.NBSupCent_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model            = NBSupCent_ABS
      Animation       = NBSupCent_ABS.NBSupCent_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model            = NBSupCent_ABSN
      Animation       = NBSupCent_ABSN.NBSupCent_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = NBSupCent_AB
      Animation       = NBSupCent_AB.NBSupCent_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = NBSupCent_ABN
      Animation       = NBSupCent_ABN.NBSupCent_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = NBSupCent_ABS
      Animation       = NBSupCent_ABS.NBSupCent_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = NBSupCent_ABSN
      Animation       = NBSupCent_ABSN.NBSupCent_ABSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End
  
  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:SupplyCenter
  Side             = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_PowerPlant 
  End
  BuildCost        = 1200
  RefundValue      = 450 ; With nothing (or zero) listed, we sell for half price. 
  BuildTime        = 1.0           ; in seconds
  EnergyProduction = -1
  CommandSet       = Boss_SupplyCenterCommandSet
  VisionRange     = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 200 200 200 200  ; Experience point value at each level

  ; *** AUDIO Parameters ***
  VoiceSelect = SupplyCenterChinaSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority       = STRUCTURE
  KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE CASH_GENERATOR SCORE CAPTURABLE AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY CANNOT_BUILD_NEAR_SUPPLIES FS_SUPPLY_CENTER
  Body                = StructureBody ModuleTag_05
    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 = 2200
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End
  Behavior = SupplyCenterCreate ModuleTag_06
    ;nothing
  End
  Behavior = DestroyDie ModuleTag_07
    ;nothing
  End
  Behavior                 = CreateObjectDie ModuleTag_08
    CreationList      = OCL_SmallStructureDebris
  End
  Behavior                 = FXListDie ModuleTag_09
    DeathFX           = FX_StructureSmallDeath
  End
  Behavior = ProductionUpdate ModuleTag_10
    ; nothing
  End
  Behavior = SupplyCenterProductionExitUpdate ModuleTag_11
    UnitCreatePoint   = X:  0.0  Y:  0.0   Z:0.0
    NaturalRallyPoint = X: 52.0  Y:  0.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
  End

  Behavior            = SpawnBehavior ModuleTag_12
    SpawnNumber       = 1
    SpawnReplaceDelay = 9999
    SpawnTemplateName = Boss_VehicleSupplyTruck
    OneShot           = Yes
    CanReclaimOrphans = No
    SlavesHaveFreeWill = Yes
  End

  Behavior = SupplyCenterDockUpdate ModuleTag_13
    AllowsPassthrough = No ;You can't drive through this guy while docking.  Use this when the dock points are all outside
    NumberApproachPositions = -1 ; This is a Boneless dock, so this means infinite can approach
  End

  Behavior = FlammableUpdate ModuleTag_14
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_15
    ;-------------DESIGNED FOR SMALL SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionSmallExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionSmallShockwave
  End

 Behavior = BaseRegenerateUpdate ModuleTag_16
    ;No data
  End

Behavior = StealthUpdate ModuleStealth_17
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_18
    TriggeredBy = Upgrade_GLACamoNetting
  END
  

  Geometry            = BOX
  GeometryMajorRadius = 52.0
  GeometryMinorRadius = 47.0
  GeometryHeight      = 30.0
  GeometryIsSmall     = No
  Shadow              = SHADOW_VOLUME
  BuildCompletion     = PLACED_BY_PLAYER

End






















;------------------------------------------------------------------------------
Object Boss_Barracks

  ; *** ART Parameters ***
  SelectPortrait         = SUBarracks_L
  ButtonImage            = SUBarracks

;  UpgradeCameo1 = Upgrade_GLAFortifiedStructure

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ; day
    ConditionState = NONE
      Model = UBBARRACKS
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      Animation     = UBBarracks.UBBarracks
      AnimationMode = LOOP
    End
    ConditionState = DAMAGED
      Model = UBBarracks_D
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
;     ParticleSysBone = Smoke03 SmokeFactionMedium
;     ParticleSysBone = Flame01 FireFactionMedium
      Animation     = UBBarracks_D.UBBarracks_D
      AnimationMode = LOOP
    End
    ConditionState = REALLYDAMAGED RUBBLE
      Model = UBBarracks_E
      ParticleSysBone = Smoke01 ChimneySmokeSmall
;     ParticleSysBone = Smoke02 SteamVent
;     ParticleSysBone = Smoke03 SmokeFactionMedium
;     ParticleSysBone = Smoke04 SmokeFactionLarge
;     ParticleSysBone = Smoke05 SmokeFactionLarge
;     ParticleSysBone = Flame01 FireFactionMedium
;     ParticleSysBone = Flame02 FireFactionLarge
      Animation     = UBBarracks_E.UBBarracks_E
      AnimationMode = LOOP
    End
    ConditionState         = GARRISONED
      Model                = UBBarrksEG
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG.UBBarrksEG
      AnimationMode        = LOOP
    End
    ConditionState         = DAMAGED GARRISONED
      Model                = UBBarrksEG_D
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_D.UBBarrksEG_D
      AnimationMode        = LOOP
    End
    ConditionState         = REALLYDAMAGED GARRISONED
      Model                = UBBarrksEG_E
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_E.UBBarrksEG_E
      AnimationMode        = LOOP
    End
        
        ; day
    ConditionState = SNOW
      Model = UBBARRACKS_S
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      Animation     = UBBarracks_S.UBBarracks_S
      AnimationMode = LOOP
    End
    ConditionState = DAMAGED SNOW
      Model = UBBarracks_DS
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
;     ParticleSysBone = Smoke03 SmokeFactionMedium
;     ParticleSysBone = Flame01 FireFactionMedium
      Animation     = UBBarracks_DS.UBBarracks_DS
      AnimationMode = LOOP
    End
    ConditionState = REALLYDAMAGED RUBBLE SNOW
      Model = UBBarracks_ES
      ParticleSysBone = Smoke01 ChimneySmokeSmall
;     ParticleSysBone = Smoke02 SteamVent
;     ParticleSysBone = Smoke03 SmokeFactionMedium
;     ParticleSysBone = Smoke04 SmokeFactionLarge
;     ParticleSysBone = Smoke05 SmokeFactionLarge
;     ParticleSysBone = Flame01 FireFactionMedium
;     ParticleSysBone = Flame02 FireFactionLarge
      Animation     = UBBarracks_ES.UBBarracks_ES
      AnimationMode = LOOP
    End
    ConditionState         = GARRISONED SNOW
      Model                = UBBarrksEG_S
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_S.UBBarrksEG_S
      AnimationMode        = LOOP
    End
    ConditionState         = DAMAGED GARRISONED SNOW
      Model                = UBBarrksEG_DS
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_DS.UBBarrksEG_DS
      AnimationMode        = LOOP
    End
    ConditionState         = REALLYDAMAGED GARRISONED SNOW
      Model                = UBBarrksEG_ES
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_ES.UBBarrksEG_ES
      AnimationMode        = LOOP
    End

    ; night
    ConditionState = NIGHT
      Model = UBBARRACKS_N
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      Animation     = UBBarracks_N.UBBarracks_N
      AnimationMode = LOOP
    End
    ConditionState = DAMAGED NIGHT
      Model = UBBarracks_DN
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 GLAPowerPlantSmoke
      ParticleSysBone = Flame01 GLAPowerPlantFlame
      Animation     = UBBarracks_DN.UBBarracks_DN
      AnimationMode = LOOP
    End
    ConditionState = REALLYDAMAGED RUBBLE NIGHT
      Model = UBBarracks_EN
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 GLAPowerPlantSmoke
      ParticleSysBone = Smoke04 GLAPowerPlantSmoke
      ParticleSysBone = Smoke05 GLAPowerPlantSmoke
      ParticleSysBone = Flame01 FireSmallContinuous
      ParticleSysBone = Flame02 GLAPowerPlantFlame
      Animation     = UBBarracks_EN.UBBarracks_EN
      AnimationMode = LOOP
    End
    ConditionState         = GARRISONED NIGHT
      Model                = UBBarrksEG_N
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_N.UBBarrksEG_N
      AnimationMode        = LOOP
    End
    ConditionState         = DAMAGED GARRISONED NIGHT
      Model                = UBBarrksEG_DN
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_DN.UBBarrksEG_DN
      AnimationMode        = LOOP
    End
    ConditionState         = REALLYDAMAGED GARRISONED NIGHT
      Model                = UBBarrksEG_EN
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_EN.UBBarrksEG_EN
      AnimationMode        = LOOP
    End

    ; night snow
    ConditionState = NIGHT SNOW
      Model = UBBARRACKS_NS
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      Animation     = UBBarracks_NS.UBBarracks_NS
      AnimationMode = LOOP
    End
    ConditionState = DAMAGED NIGHT SNOW
      Model = UBBarracks_DNS
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 GLAPowerPlantSmoke
      ParticleSysBone = Flame01 GLAPowerPlantFlame
      Animation     = UBBarracks_DNS.UBBarracks_DNS
      AnimationMode = LOOP
    End
    ConditionState = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model = UBBarracks_ENS
      ParticleSysBone = Smoke01 ChimneySmokeSmall
      ParticleSysBone = Smoke02 SteamVent
      ParticleSysBone = Smoke03 GLAPowerPlantSmoke
      ParticleSysBone = Smoke04 GLAPowerPlantSmoke
      ParticleSysBone = Smoke05 GLAPowerPlantSmoke
      ParticleSysBone = Flame01 FireSmallContinuous
      ParticleSysBone = Flame02 GLAPowerPlantFlame
      Animation     = UBBarracks_ENS.UBBarracks_ENS
      AnimationMode = LOOP
    End
    ConditionState         = GARRISONED NIGHT SNOW
      Model                = UBBarrksEG_NS
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_NS.UBBarrksEG_NS
      AnimationMode        = LOOP
    End
    ConditionState         = DAMAGED GARRISONED NIGHT SNOW
      Model                = UBBarrksEG_DNS
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_DNS.UBBarrksEG_DNS
      AnimationMode        = LOOP
    End
    ConditionState         = REALLYDAMAGED GARRISONED NIGHT SNOW
      Model                = UBBarrksEG_ENS
      ParticleSysBone      = Smoke01 SmolderingSmoke
      Animation            = UBBarrksEG_ENS.UBBarrksEG_ENS
      AnimationMode        = LOOP
    End

    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = UBBarracks
      Animation          = UBBarracks.UBBarracks
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = UBBarracks_D
      Animation          = UBBarracks_D.UBBarracks_D
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = UBBarracks_E
      Animation          = UBBarracks_E.UBBarracks_E
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = UBBarracks_N
      Animation          = UBBarracks_N.UBBarracks_N
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = UBBarracks_DN
      Animation          = UBBarracks_DN.UBBarracks_DN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = UBBarracks_EN
      Animation          = UBBarracks_EN.UBBarracks_EN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = UBBarracks_S
      Animation          = UBBarracks_S.UBBarracks_S
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = UBBarracks_DS
      Animation          = UBBarracks_DS.UBBarracks_DS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = UBBarracks_ES
      Animation          = UBBarracks_ES.UBBarracks_ES
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = UBBarracks_NS
      Animation          = UBBarracks_NS.UBBarracks_NS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = UBBarracks_DNS
      Animation          = UBBarracks_DNS.UBBarracks_DNS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = UBBarracks_ENS
      Animation          = UBBarracks_ENS.UBBarracks_ENS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = GARRISONED SOLD 
    AliasConditionState  = GARRISONED SOLD DAMAGED
    AliasConditionState  = GARRISONED SOLD REALLYDAMAGED
    AliasConditionState  = GARRISONED SOLD NIGHT
    AliasConditionState  = GARRISONED SOLD NIGHT DAMAGED
    AliasConditionState  = GARRISONED SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = GARRISONED SOLD SNOW
    AliasConditionState  = GARRISONED SOLD SNOW DAMAGED
    AliasConditionState  = GARRISONED SOLD SNOW REALLYDAMAGED
    AliasConditionState  = GARRISONED SOLD NIGHT SNOW
    AliasConditionState  = GARRISONED SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = GARRISONED SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
  End
  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_02
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBBarracks_A4
      Animation       = UBBarracks_A4.UBBarracks_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBBarracks_A4N
      Animation       = UBBarracks_A4N.UBBarracks_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBBarracks_A4S
      Animation       = UBBarracks_A4S.UBBarracks_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = UBBarracks_A4SN
      Animation       = UBBarracks_A4SN.UBBarracks_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = UBBarracks_A4
      Animation       = UBBarracks_A4.UBBarracks_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = UBBarracks_A4N
      Animation       = UBBarracks_A4N.UBBarracks_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = UBBarracks_A4S
      Animation       = UBBarracks_A4S.UBBarracks_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = UBBarracks_A4SN
      Animation       = UBBarracks_A4SN.UBBarracks_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = UBBarracks_A4
      Animation       = UBBarracks_A4.UBBarracks_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = UBBarracks_A4N
      Animation       = UBBarracks_A4N.UBBarracks_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = UBBarracks_A4S
      Animation       = UBBarracks_A4S.UBBarracks_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = UBBarracks_A4SN
      Animation       = UBBarracks_A4SN.UBBarracks_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = UBBarracks_A6
      Animation       = UBBarracks_A6.UBBarracks_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Dust01 BuildingDust
      ParticleSysBone = Smoke01 BuildUpSmoke
      ParticleSysBone = Smoke02 BuildUpSmoke
      ParticleSysBone = Smoke03 BuildUpSmoke
      ParticleSysBone = Smoke04 BuildUpSmoke
      ParticleSysBone = Smoke05 BuildUpSmoke
      ParticleSysBone = Smoke06 BuildUpSmoke
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = UBBarracks_A6N
      Animation       = UBBarracks_A6N.UBBarracks_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Dust01 BuildingDust
      ParticleSysBone = Smoke01 BuildUpSmoke
      ParticleSysBone = Smoke02 BuildUpSmoke
      ParticleSysBone = Smoke03 BuildUpSmoke
      ParticleSysBone = Smoke04 BuildUpSmoke
      ParticleSysBone = Smoke05 BuildUpSmoke
      ParticleSysBone = Smoke06 BuildUpSmoke
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = UBBarracks_A6S
      Animation       = UBBarracks_A6S.UBBarracks_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
      ParticleSysBone = Smoke05 BuildUpSnowSmoke
      ParticleSysBone = Smoke06 BuildUpSnowSmoke
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = UBBarracks_A6SN
      Animation       = UBBarracks_A6SN.UBBarracks_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Dust01 BuildingNightSnowDust
      ParticleSysBone = Smoke01 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke02 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke03 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke04 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke05 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke06 BuildUpNightSnowSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = UBBarracks_A6
      Animation       = UBBarracks_A6.UBBarracks_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = UBBarracks_A6N
      Animation       = UBBarracks_A6N.UBBarracks_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = UBBarracks_A6S
      Animation       = UBBarracks_A6S.UBBarracks_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = UBBarracks_A6SN
      Animation       = UBBarracks_A6SN.UBBarracks_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = UBBarracks_A6
      Animation       = UBBarracks_A6.UBBarracks_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = UBBarracks_A6N
      Animation       = UBBarracks_A6N.UBBarracks_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = UBBarracks_A6S
      Animation       = UBBarracks_A6S.UBBarracks_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = UBBarracks_A6SN
      Animation       = UBBarracks_A6SN.UBBarracks_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  PlacementViewAngle = -90

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Barracks
  Side             = Boss
  EditorSorting    = STRUCTURE
  BuildCost        = 250
  BuildTime        = 5.0           ; in seconds
  EnergyProduction = 0
  CommandSet       = Boss_BarracksCommandSet
  VisionRange      = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = GLAUpgradedStructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 100 100 100 100  ; Experience point value at each level

  Prerequisites
;    Object = GLASupplyStash
  End


  ; *** AUDIO Parameters ***
  VoiceSelect = BarracksGLASelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE HEAL_PAD CAPTURABLE FS_FACTORY AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY SCORE_CREATE FS_BARRACKS
  Body            = StructureBody ModuleTag_04
    MaxHealth     = 1000.0
    InitialHealth = 1000.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
  End

  Behavior        = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy   = Upgrade_GLAFortifiedStructure
  End

  Behavior        = ModelConditionUpgrade ModuleTag_Armor01Visual
    ConditionFlag = GARRISONED
    TriggeredBy   = Upgrade_GLAFortifiedStructure
  End

  Behavior = HealContain ModuleTag_05
    ContainMax          = 10 ;way bigger than the # of objects we can have  
    TimeForFullHeal     = 2000   ;(in milliseconds)
    AllowInsideKindOf   = INFANTRY
    AllowAlliesInside   = Yes
    AllowNeutralInside  = No
    AllowEnemiesInside  = No
  End

  Behavior        = RebuildHoleExposeDie ModuleTag_06
    HoleName      = GLAHoleBarracks
    HoleMaxHealth = 500.0
  End
  Behavior = DestroyDie ModuleTag_07
    ;nothing
  End
  Behavior        = CreateObjectDie ModuleTag_08
    CreationList  = OCL_LargeStructureDebris
  End
  Behavior        = FXListDie ModuleTag_09
    DeathFX       = FX_StructureSmallDeath
  End
  Behavior = ProductionUpdate ModuleTag_10
    ; nothing
  End
  Behavior = DefaultProductionExitUpdate ModuleTag_11
    UnitCreatePoint   = X:  0.0  Y:  0.0   Z:0.0
    NaturalRallyPoint = X: 42.0  Y:  0.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
  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 = TransitionDamageFX ModuleTag_13
    ;-------------DESIGNED FOR SMALL MEDIUM FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionSmallExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionSmallShockwave
  End


Behavior = StealthUpdate ModuleStealth_14
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_15
    TriggeredBy = Upgrade_GLACamoNetting
  END

 Behavior = BaseRegenerateUpdate ModuleTag_16
    ;No data
  End


  Geometry            = BOX
  GeometryMajorRadius = 42.0
  GeometryMinorRadius = 52.0
  GeometryHeight      = 20.0
  GeometryIsSmall     = No
  FactoryExitWidth    = 25 
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End


























;------------------------------------------------------------------------------
Object Boss_WarFactory

  ; *** ART Parameters ***
  SelectPortrait         = SNWarFact_L
  ButtonImage            = SNWarFact

  ; ------------ the main factory itself -----------------
  Draw                = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ; day
    DefaultConditionState
      Model           = NBWarFact  
    End
    ConditionState    = DAMAGED
      Model           = NBWarFact_D
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
    End
    ConditionState    = REALLYDAMAGED RUBBLE
      Model           = NBWarFact_E
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Smoke07 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
      ParticleSysBone = Fire03  SmolderingFire
      ParticleSysBone = Fire03  SmolderingFlameCore
    End
    
    ConditionState    = SNOW
      Model           = NBWarFact_S  
    End
    ConditionState = DAMAGED SNOW
      Model           = NBWarFact_DS
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
    End
    ConditionState = REALLYDAMAGED RUBBLE SNOW
      Model           = NBWarFact_ES
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Smoke07 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
      ParticleSysBone = Fire03  SmolderingFire
      ParticleSysBone = Fire03  SmolderingFlameCore
    End
    

    ; night **********************************************
    ConditionState  = NIGHT
      Model           = NBWarFact_N     
    End
    ConditionState    = DAMAGED NIGHT
      Model           = NBWarFact_DN
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
    End
    ConditionState    = REALLYDAMAGED RUBBLE NIGHT
      Model           = NBWarFact_EN
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Smoke07 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
      ParticleSysBone = Fire03  SmolderingFire
      ParticleSysBone = Fire03  SmolderingFlameCore
    End
        
    ; night   SNOW
      ConditionState = NIGHT SNOW
      Model           = NBWarFact_NS   
    End
    ConditionState = DAMAGED NIGHT SNOW
      Model           = NBWarFact_DNS
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
    End
    ConditionState = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model           = NBWarFact_ENS
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Smoke03 SmolderingSmoke
      ParticleSysBone = Smoke04 SmolderingSmoke
      ParticleSysBone = Smoke05 SmolderingSmoke
      ParticleSysBone = Smoke06 SmolderingSmoke
      ParticleSysBone = Smoke07 SmolderingSmoke
      ParticleSysBone = Fire01  SmolderingFire
      ParticleSysBone = Fire01  SmolderingFlameCore
      ParticleSysBone = Fire02  SmolderingFire
      ParticleSysBone = Fire02  SmolderingFlameCore
      ParticleSysBone = Fire03  SmolderingFire
      ParticleSysBone = Fire03  SmolderingFlameCore
    End
    
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBWarFact
      ;Animation          = NBWarFact.NBWarFact
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBWarFact_D
      ;Animation          = NBWarFact_D.NBWarFact_D
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBWarFact_E
      ;Animation          = NBWarFact_E.NBWarFact_E
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = NBWarFact_N
      ;Animation          = NBWarFact_N.NBWarFact_N
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = NBWarFact_DN
      ;Animation          = NBWarFact_DN.NBWarFact_DN
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = NBWarFact_EN
      ;Animation          = NBWarFact_EN.NBWarFact_EN
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = NBWarFact_S
      ;Animation          = NBWarFact_S.NBWarFact_S
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = NBWarFact_DS
      ;Animation          = NBWarFact_DS.NBWarFact_DS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = NBWarFact_ES
      ;Animation          = NBWarFact_ES.NBWarFact_ES
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = NBWarFact_NS
      ;Animation          = NBWarFact_NS.NBWarFact_NS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = NBWarFact_DNS
      ;Animation          = NBWarFact_DNS.NBWarFact_DNS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = NBWarFact_ENS
      ;Animation          = NBWarFact_ENS.NBWarFact_ENS
      ;AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************


  End
  
  ; ------------------ the construction crane ------------
  Draw                   = W3DModelDraw ModuleTag_02
    OkToChangeModelColor = Yes
    ConditionState       = None
      Model              = NBWarFact_A1
      Animation          = NBWarFact_A1.NBWarFact_A1
      AnimationMode      = LOOP
      WaitForStateToFinishIfPossible = TransitionFinishBeforeSwitch
    End
    ConditionState       = DAMAGED
      Model              = NBWarFact_A1D
      Animation          = NBWarFact_A1D.NBWarFact_A1D
      AnimationMode      = LOOP
      WaitForStateToFinishIfPossible = TransitionFinishBeforeSwitch
    End
    ConditionState       = REALLYDAMAGED RUBBLE
      Model              = NBWarFact_A1E
      Animation          = NBWarFact_A1E.NBWarFact_A1E
      AnimationMode      = LOOP
      WaitForStateToFinishIfPossible = TransitionFinishBeforeSwitch
    End
    ConditionState       = ACTIVELY_CONSTRUCTING
      Model              = NBWarFact_A2
      Animation          = NBWarFact_A2.NBWarFact_A2
      AnimationMode      = ONCE
      TransitionKey      = TransitionFinishBeforeSwitch
    End
    ConditionState       = ACTIVELY_CONSTRUCTING DAMAGED
      Model              = NBWarFact_A2D
      Animation          = NBWarFact_A2D.NBWarFact_A2D
      AnimationMode      = ONCE
      TransitionKey      = TransitionFinishBeforeSwitch
    End
    ConditionState       = ACTIVELY_CONSTRUCTING REALLYDAMAGED RUBBLE
      Model              = NBWarFact_A2E
      Animation          = NBWarFact_A2E.NBWarFact_A2E
      AnimationMode      = ONCE
      TransitionKey      = TransitionFinishBeforeSwitch
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBWarFact_A1
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = SOLD DAMAGED REALLYDAMAGED RUBBLE
      Model              = NONE
    End
  End


  ; ------------ construction-zone fence -----------------
  Draw                = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A4
      Animation       = NBWarFact_A4.NBWarFact_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone =  Fire01 SmolderingFire
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone =  Fire02 SmolderingFire
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A4N
      Animation       = NBWarFact_A4N.NBWarFact_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone =  Fire01 SmolderingFire
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone =  Fire02 SmolderingFire
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A4S
      Animation       = NBWarFact_A4S.NBWarFact_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone =  Fire01 SmolderingFire
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone =  Fire02 SmolderingFire
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A4SN
      Animation       = NBWarFact_A4SN.NBWarFact_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone =  Fire01 SmolderingFire
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone =  Fire02 SmolderingFire
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBWarFact_A4
      Animation       = NBWarFact_A4.NBWarFact_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBWarFact_A4N
      Animation       = NBWarFact_A4N.NBWarFact_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBWarFact_A4S
      Animation       = NBWarFact_A4S.NBWarFact_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBWarFact_A4SN
      Animation       = NBWarFact_A4SN.NBWarFact_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBWarFact_A4
      Animation       = NBWarFact_A4.NBWarFact_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBWarFact_A4N
      Animation       = NBWarFact_A4N.NBWarFact_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBWarFact_A4S
      Animation       = NBWarFact_A4S.NBWarFact_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBWarFact_A4SN
      Animation       = NBWarFact_A4SN.NBWarFact_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw                 = W3DModelDraw ModuleTag_04
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model            = None
      TransitionKey    = DOWN_DEFAULT
    End
    ConditionState     = NIGHT
      Model            = None
      TransitionKey    = DOWN_DEFAULT
    End
    ConditionState     = SNOW
      Model            = None
      TransitionKey    = DOWN_DEFAULT
    End
    ConditionState     = SNOW NIGHT
      Model            = None
      TransitionKey    = DOWN_DEFAULT
    End
    ConditionState     = PARTIALLY_CONSTRUCTED
      Model            = NBWarFact_A6
      Animation        = NBWarFact_A6.NBWarFact_A6
      AnimationMode    = MANUAL
      Flags            = START_FRAME_LAST
      TransitionKey    = UP_DAY
      ParticleSysBone  = Dust01 BuildingDustChina
      ParticleSysBone  = Smoke01 BuildUpSmokeChina
      ParticleSysBone  = Smoke02 BuildUpSmokeChina
      ParticleSysBone  = Smoke03 BuildUpSmokeChina
      ParticleSysBone  = Smoke04 BuildUpSmokeChina
      ParticleSysBone  = Smoke05 BuildUpSmokeChina
    End
    ConditionState     = NIGHT PARTIALLY_CONSTRUCTED
      Model            = NBWarFact_A6N
      Animation        = NBWarFact_A6N.NBWarFact_A6N
      AnimationMode    = MANUAL
      Flags            = START_FRAME_LAST
      TransitionKey    = UP_NIGHT
      ParticleSysBone  = Dust01 BuildingDustChina
      ParticleSysBone  = Smoke01 BuildUpSmokeChina
      ParticleSysBone  = Smoke02 BuildUpSmokeChina
      ParticleSysBone  = Smoke03 BuildUpSmokeChina
      ParticleSysBone  = Smoke04 BuildUpSmokeChina
      ParticleSysBone  = Smoke05 BuildUpSmokeChina
    End
    ConditionState     = SNOW PARTIALLY_CONSTRUCTED
      Model            = NBWarFact_A6S
      Animation        = NBWarFact_A6S.NBWarFact_A6S
      AnimationMode    = MANUAL
      Flags            = START_FRAME_LAST
      TransitionKey    = UP_SNOW
      ParticleSysBone  = Dust01 BuildingSnowDust
      ParticleSysBone  = Smoke01 BuildUpSnowSmoke
      ParticleSysBone  = Smoke02 BuildUpSnowSmoke
      ParticleSysBone  = Smoke03 BuildUpSnowSmoke
      ParticleSysBone  = Smoke04 BuildUpSnowSmoke
      ParticleSysBone  = Smoke05 BuildUpSnowSmoke
    End
    ConditionState     = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model            = NBWarFact_A6SN
      Animation        = NBWarFact_A6SN.NBWarFact_A6SN
      AnimationMode    = MANUAL
      Flags            = START_FRAME_LAST
      TransitionKey    = UP_SNOWNIGHT
      ParticleSysBone  = Dust01 BuildingNightSnowDust
      ParticleSysBone  = Smoke01 BuildUpNightSnowSmoke
      ParticleSysBone  = Smoke02 BuildUpNightSnowSmoke
      ParticleSysBone  = Smoke03 BuildUpNightSnowSmoke
      ParticleSysBone  = Smoke04 BuildUpNightSnowSmoke
      ParticleSysBone  = Smoke05 BuildUpNightSnowSmoke
    End
    TransitionState    = DOWN_DEFAULT UP_DAY
     Model             = NBWarFact_A6
      Animation        = NBWarFact_A6.NBWarFact_A6
      AnimationMode    = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags            = START_FRAME_FIRST
    End
    TransitionState    = DOWN_DEFAULT UP_NIGHT
     Model             = NBWarFact_A6N
      Animation        = NBWarFact_A6N.NBWarFact_A6N
      AnimationMode    = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags            = START_FRAME_FIRST
    End
    TransitionState    = DOWN_DEFAULT UP_SNOW
     Model             = NBWarFact_A6S
      Animation        = NBWarFact_A6S.NBWarFact_A6S
      AnimationMode    = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags            = START_FRAME_FIRST
    End
    TransitionState    = DOWN_DEFAULT UP_SNOWNIGHT
     Model             = NBWarFact_A6SN
      Animation        = NBWarFact_A6SN.NBWarFact_A6SN
      AnimationMode    = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags            = START_FRAME_FIRST
    End
    TransitionState    = UP_DAY DOWN_DEFAULT
      Model            = NBWarFact_A6
      Animation        = NBWarFact_A6.NBWarFact_A6
      AnimationMode    = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags            = START_FRAME_LAST
    End
    TransitionState    = UP_NIGHT DOWN_DEFAULT
      Model            = NBWarFact_A6N
      Animation        = NBWarFact_A6N.NBWarFact_A6N
      AnimationMode    = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags            = START_FRAME_LAST
    End
    TransitionState    = UP_SNOW DOWN_DEFAULT
      Model            = NBWarFact_A6S
      Animation        = NBWarFact_A6S.NBWarFact_A6S
      AnimationMode    = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags            = START_FRAME_LAST
    End
    TransitionState    = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = NBWarFact_A6SN
      Animation        = NBWarFact_A6SN.NBWarFact_A6SN
      AnimationMode    = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags            = START_FRAME_LAST
    End
  End

  ; ------------------ the construction conveyor belt ------------
  Draw = W3DModelDraw ModuleTag_05
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model           = NBWarFact_A7
      Animation       = NBWarFact_A7.NBWarFact_A7
      AnimationMode   = LOOP
    ;  Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT
    AliasConditionState = SNOW
    AliasConditionState = SNOW NIGHT
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = SNOW NIGHT DAMAGED
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW NIGHT REALLYDAMAGED RUBBLE
    
    ConditionState    = ACTIVELY_CONSTRUCTING
      Model           = NBWarFact_A7
      Animation       = NBWarFact_A7.NBWarFact_A7
      AnimationMode   = LOOP
    ;  Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT ACTIVELY_CONSTRUCTING
    AliasConditionState = SNOW ACTIVELY_CONSTRUCTING
    AliasConditionState = SNOW NIGHT ACTIVELY_CONSTRUCTING
    AliasConditionState = NIGHT DAMAGED ACTIVELY_CONSTRUCTING
    AliasConditionState = SNOW DAMAGED ACTIVELY_CONSTRUCTING
    AliasConditionState = SNOW NIGHT DAMAGED ACTIVELY_CONSTRUCTING
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE ACTIVELY_CONSTRUCTING
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE ACTIVELY_CONSTRUCTING
    AliasConditionState = SNOW NIGHT REALLYDAMAGED RUBBLE ACTIVELY_CONSTRUCTING

    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBWarFact_A7
      Animation          = NBWarFact_A7.NBWarFact_A7
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
  End

  ; ----------------- the factory door -------------------
  Draw = W3DModelDraw ModuleTag_06
    DefaultConditionState
      Model           = NBWarFact_A8
      Animation       = NBWarFact_A8.NBWarFact_A8
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT 
    AliasConditionState = SNOW
    AliasConditionState = NIGHT SNOW

    ConditionState    = DAMAGED
      Model           = NBWarFact_A8D
      Animation       = NBWarFact_A8D.NBWarFact_A8D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = NIGHT SNOW DAMAGED

    ConditionState    = REALLYDAMAGED RUBBLE
      Model           = NBWarFact_A8E
      Animation       = NBWarFact_A8E.NBWarFact_A8E
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW REALLYDAMAGED RUBBLE
    
    ConditionState    = DOOR_1_OPENING
      Model           = NBWarFact_A8
      Animation       = NBWarFact_A8.NBWarFact_A8
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End  
    AliasConditionState = NIGHT DOOR_1_OPENING
    AliasConditionState = SNOW DOOR_1_OPENING
    AliasConditionState = NIGHT SNOW DOOR_1_OPENING
     

    ConditionState    = DOOR_1_OPENING DAMAGED
      Model           = NBWarFact_A8D
      Animation       = NBWarFact_A8D.NBWarFact_A8D
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
   End   
   AliasConditionState = NIGHT DOOR_1_OPENING DAMAGED
   AliasConditionState = SNOW DOOR_1_OPENING DAMAGED
   AliasConditionState = NIGHT SNOW DOOR_1_OPENING DAMAGED

    ConditionState    = DOOR_1_OPENING REALLYDAMAGED RUBBLE
      Model           = NBWarFact_A8E
      Animation       = NBWarFact_A8E.NBWarFact_A8E
      AnimationMode   = ONCE
      Flags           = START_FRAME_FIRST
    End
    AliasConditionState = NIGHT DOOR_1_OPENING REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW DOOR_1_OPENING REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW DOOR_1_OPENING REALLYDAMAGED RUBBLE

    ConditionState    = DOOR_1_CLOSING
      Model           = NBWarFact_A8
      Animation       = NBWarFact_A8.NBWarFact_A8
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_CLOSING
    AliasConditionState = SNOW DOOR_1_CLOSING
    AliasConditionState = NIGHT SNOW DOOR_1_CLOSING
    

    ConditionState    = DOOR_1_CLOSING DAMAGED
      Model           = NBWarFact_A8D
      Animation       = NBWarFact_A8D.NBWarFact_A8D
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_CLOSING DAMAGED
    AliasConditionState = SNOW DOOR_1_CLOSING DAMAGED
    AliasConditionState = NIGHT SNOW DOOR_1_CLOSING DAMAGED

    ConditionState    = DOOR_1_CLOSING REALLYDAMAGED RUBBLE
      Model           = NBWarFact_A8E
      Animation       = NBWarFact_A8E.NBWarFact_A8E
      AnimationMode   = ONCE_BACKWARDS
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_CLOSING REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW DOOR_1_CLOSING REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW DOOR_1_CLOSING REALLYDAMAGED RUBBLE

    ConditionState    = DOOR_1_WAITING_OPEN
      Model           = NBWarFact_A8
      Animation       = NBWarFact_A8.NBWarFact_A8
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End  
    AliasConditionState = NIGHT DOOR_1_WAITING_OPEN
    AliasConditionState = SNOW DOOR_1_WAITING_OPEN
    AliasConditionState = NIGHT SNOW DOOR_1_WAITING_OPEN
     

    ConditionState    = DOOR_1_WAITING_OPEN DAMAGED
      Model           = NBWarFact_A8D
      Animation       = NBWarFact_A8D.NBWarFact_A8D
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_WAITING_OPEN DAMAGED
    AliasConditionState = SNOW DOOR_1_WAITING_OPEN DAMAGED
    AliasConditionState = NIGHT SNOW DOOR_1_WAITING_OPEN DAMAGED

    ConditionState    = DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
      Model           = NBWarFact_A8E
      Animation       = NBWarFact_A8E.NBWarFact_A8E
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
    End   
    AliasConditionState = NIGHT DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
    AliasConditionState = SNOW DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
    AliasConditionState = NIGHT SNOW DOOR_1_WAITING_OPEN REALLYDAMAGED RUBBLE
    
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBWarFact_A8
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBWarFact_A8D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBWarFact_A8E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED

    
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
    
    
  End

  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_07
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SOLD
      Model           = NONE
    End

    ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A5
      Animation       = NBWarFact_A5.NBWarFact_A5
      AnimationMode   = LOOP
      TransitionKey  = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A5N
      Animation       = NBWarFact_A5N.NBWarFact_A5N
      AnimationMode   = LOOP
      TransitionKey  = UP_NIGHT
    End

    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A5S
      Animation       = NBWarFact_A5S.NBWarFact_A5S
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBWarFact_A5SN
      Animation       = NBWarFact_A5SN.NBWarFact_A5SN
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model            = NBWarFact_AB
      Animation       = NBWarFact_AB.NBWarFact_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model            = NBWarFact_ABN
      Animation       = NBWarFact_ABN.NBWarFact_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model            = NBWarFact_ABS
      Animation       = NBWarFact_ABS.NBWarFact_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model            = NBWarFact_ABSN
      Animation       = NBWarFact_ABSN.NBWarFact_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = NBWarFact_AB
      Animation       = NBWarFact_AB.NBWarFact_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = NBWarFact_ABN
      Animation       = NBWarFact_ABN.NBWarFact_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = NBWarFact_ABS
      Animation       = NBWarFact_ABS.NBWarFact_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = NBWarFact_ABSN
      Animation       = NBWarFact_ABSN.NBWarFact_ABSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  PlacementViewAngle = -90

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:WarFactory
  Side             = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object = Boss_SupplyCenter
  End
  BuildCost        = 2000
  BuildTime        = 10.0           ; in seconds
  EnergyProduction = -1
  CommandSet       = Boss_WarFactoryCommandSet
  VisionRange      = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 200 200 200 200  ; Experience point value at each level

  ; *** AUDIO Parameters ***
  VoiceSelect = WarFactoryChinaSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE REPAIR_PAD SCORE CAPTURABLE FS_FACTORY AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY FS_WARFACTORY
  Body            = StructureBody ModuleTag_08
    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 = 2200
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End

  Behavior = DestroyDie ModuleTag_09
    ;nothing
  End
  Behavior             = CreateObjectDie ModuleTag_10
    CreationList  = OCL_LargeStructureDebris
  End
  Behavior             = FXListDie ModuleTag_11
    DeathFX       = FX_StructureMediumDeath
  End

  Behavior = ProductionUpdate ModuleTag_12
    NumDoorAnimations            = 1
    DoorOpeningTime              = 4000  ;in mSeconds
    DoorWaitOpenTime             = 2000  ;in mSeconds
    DoorCloseTime                = 5000  ;in mSeconds
    ConstructionCompleteDuration = 1500  ;in mSeconds
  End
  Behavior = DefaultProductionExitUpdate ModuleTag_13
    UnitCreatePoint   = X:  0.0  Y:-27.0   Z:0.0
    NaturalRallyPoint = X: 57.0  Y:-27.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
  End
  Behavior = RepairDockUpdate ModuleTag_14
    TimeForFullHeal   = 5000   ;(in milliseconds)     
    NumberApproachPositions = 5
  End

  Behavior = FlammableUpdate ModuleTag_15
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_16
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End

 Behavior = BaseRegenerateUpdate ModuleTag_17
    ;No data
  End

Behavior = StealthUpdate ModuleStealth_18
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_19
    TriggeredBy = Upgrade_GLACamoNetting
  END
  

  Geometry            = BOX
  GeometryMajorRadius = 57.0
  GeometryMinorRadius = 61.0
  GeometryHeight      = 30.0
  GeometryIsSmall     = No
  FactoryExitWidth    = 25 
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End














;------------------------------------------------------------------------------
Object Boss_InternetCenter

  ; *** ART Parameters ***
  
  ; ------------ the main building itself -----------------
  SelectPortrait         = SNIntCnt_L
  ButtonImage            = SNIntCnt
  Draw                   = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    
    ; DAY ************************************
    DefaultConditionState
      Model              = NBINTCNT
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState = USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2
      Animation = NBINTCNT_A2.NBINTCNT_A2
      AnimationMode = ONCE
    End

    ConditionState = USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2F
      Animation = NBINTCNT_A2F.NBINTCNT_A2F
      AnimationMode = ONCE
    End

    ConditionState       = DAMAGED
      Model              = NBINTCNT_D
    End

    ConditionState = DAMAGED USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2D
      Animation = NBINTCNT_A2D.NBINTCNT_A2D
      AnimationMode = ONCE
    End

    ConditionState = DAMAGED USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FD
      Animation = NBINTCNT_A2FD.NBINTCNT_A2FD
      AnimationMode = ONCE
    End

    ConditionState       = REALLYDAMAGED
      Model              = NBINTCNT_E
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 FireFactionLarge
    End
    AliasConditionState = RUBBLE

    ConditionState = REALLYDAMAGED USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2E
      Animation = NBINTCNT_A2E.NBINTCNT_A2E
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE USER_1

    ConditionState = REALLYDAMAGED USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FE
      Animation = NBINTCNT_A2FE.NBINTCNT_A2FE
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE USER_1 USER_2

    ;NIGHT ***********************************
    ConditionState       = NIGHT
      Model              = NBINTCNT_N
    End

    ConditionState = NIGHT USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2N
      Animation = NBINTCNT_A2N.NBINTCNT_A2N
      AnimationMode = ONCE
    End

    ConditionState = NIGHT USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FN
      Animation = NBINTCNT_A2FN.NBINTCNT_A2FN
      AnimationMode = ONCE
    End

    ConditionState       = DAMAGED NIGHT
      Model              = NBINTCNT_DN
    End

    ConditionState = DAMAGED NIGHT USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2DN
      Animation = NBINTCNT_A2DN.NBINTCNT_A2DN
      AnimationMode = ONCE
    End

    ConditionState = DAMAGED NIGHT USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FDN
      Animation = NBINTCNT_A2FDN.NBINTCNT_A2FDN
      AnimationMode = ONCE
    End

    ConditionState    = REALLYDAMAGED NIGHT
      Model           = NBINTCNT_EN
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 FireFactionLarge
    End
    AliasConditionState = RUBBLE NIGHT

    ConditionState = REALLYDAMAGED NIGHT USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2EN
      Animation = NBINTCNT_A2EN.NBINTCNT_A2EN
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE NIGHT USER_1

    ConditionState = REALLYDAMAGED NIGHT USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FEN
      Animation = NBINTCNT_A2FEN.NBINTCNT_A2FEN
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE NIGHT USER_1 USER_2
    
    ;SNOW *************************************
    ConditionState       = SNOW
      Model              = NBINTCNT_S
    End

    ConditionState = SNOW USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2S
      Animation = NBINTCNT_A2S.NBINTCNT_A2S
      AnimationMode = ONCE
    End

    ConditionState = SNOW USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FS
      Animation = NBINTCNT_A2FS.NBINTCNT_A2FS
      AnimationMode = ONCE
    End

    ConditionState       = DAMAGED SNOW
      Model              = NBINTCNT_DS
    End

    ConditionState = DAMAGED SNOW USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2DS
      Animation = NBINTCNT_A2DS.NBINTCNT_A2DS
      AnimationMode = ONCE
    End

    ConditionState = DAMAGED SNOW USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FDS
      Animation = NBINTCNT_A2FDS.NBINTCNT_A2FDS
      AnimationMode = ONCE
    End

    ConditionState       = REALLYDAMAGED SNOW
      Model              = NBINTCNT_ES
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 FireFactionLarge
    End
    AliasConditionState = RUBBLE SNOW

    ConditionState = REALLYDAMAGED SNOW USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2ES
      Animation = NBINTCNT_A2ES.NBINTCNT_A2ES
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE SNOW USER_1

    ConditionState = REALLYDAMAGED SNOW USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FES
      Animation = NBINTCNT_A2FES.NBINTCNT_A2FES
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE SNOW USER_1 USER_2

    ;NIGHT SNOW *****************************
    ConditionState       = NIGHT SNOW
      Model              = NBINTCNT_NS
    End

    ConditionState = NIGHT SNOW USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2NS
      Animation = NBINTCNT_A2NS.NBINTCNT_A2NS
      AnimationMode = ONCE
    End

    ConditionState = NIGHT SNOW USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FNS
      Animation = NBINTCNT_A2FNS.NBINTCNT_A2FNS
      AnimationMode = ONCE
    End

    ConditionState       = DAMAGED NIGHT SNOW
      Model              = NBINTCNT_DNS
    End

    ConditionState = DAMAGED NIGHT SNOW USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2DNS
      Animation = NBINTCNT_A2DNS.NBINTCNT_A2DNS
      AnimationMode = ONCE
    End

    ConditionState = DAMAGED NIGHT SNOW USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FDNS
      Animation = NBINTCNT_A2FDNS.NBINTCNT_A2FDNS
      AnimationMode = ONCE
    End

    ConditionState    = REALLYDAMAGED NIGHT SNOW
      Model           = NBINTCNT_ENS
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 FireFactionLarge
    End   
    AliasConditionState = RUBBLE NIGHT SNOW

    ConditionState = REALLYDAMAGED NIGHT SNOW USER_1   ; User 1 is set by an upgrade module.  First doors opening
      Model = NBINTCNT_A2ENS
      Animation = NBINTCNT_A2ENS.NBINTCNT_A2ENS
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE NIGHT SNOW USER_1

    ConditionState = REALLYDAMAGED NIGHT SNOW USER_1 USER_2   ; Second doors opening (Can't get the second without the first)
      Model = NBINTCNT_A2FENS
      Animation = NBINTCNT_A2FENS.NBINTCNT_A2FENS
      AnimationMode = ONCE
    End
    AliasConditionState = RUBBLE NIGHT SNOW USER_1 USER_2
    
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBINTCNT
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBINTCNT_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBINTCNT_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = NBINTCNT_N
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = NBINTCNT_DN
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = NBINTCNT_EN
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = NBINTCNT_S
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = NBINTCNT_DS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = NBINTCNT_ES
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = NBINTCNT_NS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = NBINTCNT_DNS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = NBINTCNT_ENS
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED USER_1 USER_2
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED USER_1 USER_2
    AliasConditionState  = SOLD  USER_1 USER_2
    AliasConditionState  = SOLD DAMAGED USER_1 USER_2
    AliasConditionState  = SOLD REALLYDAMAGED USER_1 USER_2
    AliasConditionState  = SOLD NIGHT USER_1 USER_2
    AliasConditionState  = SOLD NIGHT DAMAGED USER_1 USER_2
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED USER_1 USER_2
    AliasConditionState  = SOLD SNOW USER_1 USER_2
    AliasConditionState  = SOLD SNOW DAMAGED USER_1 USER_2
    AliasConditionState  = SOLD SNOW REALLYDAMAGED USER_1 USER_2
    AliasConditionState  = SOLD NIGHT SNOW USER_1 USER_2
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED USER_1 USER_2
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED USER_1 USER_2
    ;**************************************************************************************************************************
  End

  ; ------------ Fan in back --------------
  Draw = W3DModelDraw ModuleTag_02
    DefaultConditionState
      Model           = NBINTCNT_F
      Animation = NBINTCNT_F.NBINTCNT_F
      AnimationMode = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
  End

  ; ------------- First Satellite -----------
  Draw = W3DModelDraw ModuleTag_03
    ConditionState = NONE
      Model           = None
      TransitionKey = Trans_Down
    End
    AliasConditionState = SOLD
    AliasConditionState = AWAITING_CONSTRUCTION
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED
    AliasConditionState = AWAITING_CONSTRUCTION USER_1
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED USER_1

    ConditionState = DAMAGED
      Model           = None
      TransitionKey = Trans_Down_Damaged
    End
    AliasConditionState = SOLD DAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED DAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION USER_1 DAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED USER_1 DAMAGED

    ConditionState = REALLYDAMAGED
      Model           = None
      TransitionKey = Trans_Down_Really_Damaged
    End
    AliasConditionState = SOLD REALLYDAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION USER_1 REALLYDAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED USER_1 REALLYDAMAGED


    TransitionState = Trans_Down Trans_Up
      Model           = NBINTCNT_AB
      Animation = NBINTCNT_AB.NBINTCNT_AB
      AnimationMode = ONCE
    End
    TransitionState = Trans_Down_Damaged Trans_Up_Damaged
      Model           = NBINTCNT_DAB
      Animation = NBINTCNT_DAB.NBINTCNT_DAB
      AnimationMode = ONCE
    End
    TransitionState = Trans_Down_Really_Damaged Trans_Up_Really_Damaged
      Model           = NBINTCNT_EAB
      Animation = NBINTCNT_EAB.NBINTCNT_EAB
      AnimationMode = ONCE
    End


    ConditionState = USER_1
      Model           = NBINTCNT_AC
      Animation = NBINTCNT_AC.NBINTCNT_AC
      AnimationMode = LOOP
      TransitionKey = Trans_Up
      Flags = MAINTAIN_FRAME_ACROSS_STATES
    End

    ConditionState = USER_1 DAMAGED
      Model           = NBINTCNT_DAC
      Animation = NBINTCNT_DAC.NBINTCNT_DAC
      AnimationMode = LOOP
      TransitionKey = Trans_Up_Damaged
      Flags = MAINTAIN_FRAME_ACROSS_STATES
    End

    ConditionState = USER_1 REALLYDAMAGED
      Model           = NBINTCNT_EAC
      Animation = NBINTCNT_EAC.NBINTCNT_EAC
      AnimationMode = LOOP
      TransitionKey = Trans_Up_Really_Damaged
      Flags = MAINTAIN_FRAME_ACROSS_STATES
    End


    TransitionState = Trans_Up Trans_Down
      Model           = NBINTCNT_AB
      Animation = NBINTCNT_AB.NBINTCNT_AB
      AnimationMode = ONCE_BACKWARDS
    End
    TransitionState = Trans_Up_Damaged Trans_Down_Damaged
      Model           = NBINTCNT_DAB
      Animation = NBINTCNT_DAB.NBINTCNT_DAB
      AnimationMode = ONCE_BACKWARDS
    End
    TransitionState = Trans_Up_Really_Damaged Trans_Down_Really_Damaged
      Model           = NBINTCNT_EAB
      Animation = NBINTCNT_EAB.NBINTCNT_EAB
      AnimationMode = ONCE_BACKWARDS
    End
  End

  ; ------------- Second Satellite -----------
  Draw = W3DModelDraw ModuleTag_04
    ConditionState = NONE
      Model           = None
      TransitionKey = Trans_Down
    End
    AliasConditionState = SOLD
    AliasConditionState = AWAITING_CONSTRUCTION
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED
    AliasConditionState = AWAITING_CONSTRUCTION USER_1
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED USER_1

    ConditionState = DAMAGED
      Model           = None
      TransitionKey = Trans_Down_Damaged
    End
    AliasConditionState = SOLD DAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED DAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION USER_1 DAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED USER_1 DAMAGED

    ConditionState = REALLYDAMAGED
      Model           = None
      TransitionKey = Trans_Down_Really_Damaged
    End
    AliasConditionState = SOLD REALLYDAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
    AliasConditionState = AWAITING_CONSTRUCTION USER_1 REALLYDAMAGED
    AliasConditionState = ACTIVELY_BEING_CONSTRUCTED USER_1 REALLYDAMAGED


    TransitionState = Trans_Down Trans_Up
      Model           = NBINTCNT_AF
      Animation = NBINTCNT_AF.NBINTCNT_AF
      AnimationMode = ONCE
    End
    TransitionState = Trans_Down_Damaged Trans_Up_Damaged
      Model           = NBINTCNT_DAF
      Animation = NBINTCNT_DAF.NBINTCNT_DAF
      AnimationMode = ONCE
    End
    TransitionState = Trans_Down_Really_Damaged Trans_Up_Really_Damaged
      Model           = NBINTCNT_EAF
      Animation = NBINTCNT_EAF.NBINTCNT_EAF
      AnimationMode = ONCE
    End

    ConditionState = USER_2
      Model           = NBINTCNT_AG
      Animation = NBINTCNT_AG.NBINTCNT_AG
      AnimationMode = LOOP
      TransitionKey = Trans_Up
      Flags = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState = USER_2 DAMAGED
      Model           = NBINTCNT_DAG
      Animation = NBINTCNT_DAG.NBINTCNT_DAG
      AnimationMode = LOOP
      TransitionKey = Trans_Up_Damaged
      Flags = MAINTAIN_FRAME_ACROSS_STATES
    End
    ConditionState = USER_2 REALLYDAMAGED
      Model           = NBINTCNT_EAG
      Animation = NBINTCNT_EAG.NBINTCNT_EAG
      AnimationMode = LOOP
      TransitionKey = Trans_Up_Really_Damaged
      Flags = MAINTAIN_FRAME_ACROSS_STATES
    End

    TransitionState = Trans_Up Trans_Down
      Model           = NBINTCNT_AF
      Animation = NBINTCNT_AF.NBINTCNT_AF
      AnimationMode = ONCE_BACKWARDS
    End
    TransitionState = Trans_Up_Damaged Trans_Down_Damaged
      Model           = NBINTCNT_DAF
      Animation = NBINTCNT_DAF.NBINTCNT_DAF
      AnimationMode = ONCE_BACKWARDS
    End
    TransitionState = Trans_Up_Really_Damaged Trans_Down_Really_Damaged
      Model           = NBINTCNT_EAF
      Animation = NBINTCNT_EAF.NBINTCNT_EAF
      AnimationMode = ONCE_BACKWARDS
    End

  End

  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_05
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4
      Animation       = NBSupCent_A4.NBSupCent_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4N
      Animation       = NBSupCent_A4N.NBSupCent_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4S
      Animation       = NBSupCent_A4S.NBSupCent_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A4SN
      Animation       = NBSupCent_A4SN.NBSupCent_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBSupCent_A4
      Animation       = NBSupCent_A4.NBSupCent_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBSupCent_A4N
      Animation       = NBSupCent_A4N.NBSupCent_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBSupCent_A4S
      Animation       = NBSupCent_A4S.NBSupCent_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBSupCent_A4SN
      Animation       = NBSupCent_A4SN.NBSupCent_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBSupCent_A4
      Animation       = NBSupCent_A4.NBSupCent_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBSupCent_A4N
      Animation       = NBSupCent_A4N.NBSupCent_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBSupCent_A4S
      Animation       = NBSupCent_A4S.NBSupCent_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBSupCent_A4SN
      Animation       = NBSupCent_A4SN.NBSupCent_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_06
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6
      Animation       = NBSupCent_A6.NBSupCent_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6N
      Animation       = NBSupCent_A6N.NBSupCent_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Dust01 BuildingDustChina
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
      ParticleSysBone = Smoke04 BuildUpSmokeChina
      ParticleSysBone = Smoke05 BuildUpSmokeChina
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6S
      Animation       = NBSupCent_A6S.NBSupCent_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Dust01 BuildingSnowDust
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
      ParticleSysBone = Smoke04 BuildUpSnowSmoke
      ParticleSysBone = Smoke05 BuildUpSnowSmoke
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBSupCent_A6SN
      Animation       = NBSupCent_A6SN.NBSupCent_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Dust01 BuildingNightSnowDust
      ParticleSysBone = Smoke01 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke02 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke03 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke04 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke05 BuildUpNightSnowSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = NBSupCent_A6
      Animation       = NBSupCent_A6.NBSupCent_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = NBSupCent_A6N
      Animation       = NBSupCent_A6N.NBSupCent_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = NBSupCent_A6S
      Animation       = NBSupCent_A6S.NBSupCent_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = NBSupCent_A6SN
      Animation       = NBSupCent_A6SN.NBSupCent_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBSupCent_A6
      Animation       = NBSupCent_A6.NBSupCent_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End    
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBSupCent_A6N
      Animation       = NBSupCent_A6N.NBSupCent_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBSupCent_A6S
      Animation       = NBSupCent_A6S.NBSupCent_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBSupCent_A6SN
      Animation       = NBSupCent_A6SN.NBSupCent_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End
  ; ------------ being-constructed crane -----------------
  Draw = W3DModelDraw ModuleTag_07
  AnimationsRequirePower = No
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SOLD
      Model           = NONE
    End

    ConditionState  = ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5
      Animation       = NBSupCent_A5.NBSupCent_A5
      AnimationMode   = LOOP
      TransitionKey  = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5N
      Animation       = NBSupCent_A5N.NBSupCent_A5N
      AnimationMode   = LOOP
      TransitionKey  = UP_NIGHT
    End
    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5S
      Animation       = NBSupCent_A5S.NBSupCent_A5S
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBSupCent_A5SN
      Animation       = NBSupCent_A5SN.NBSupCent_A5SN
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model            = NBSupCent_AB
      Animation       = NBSupCent_AB.NBSupCent_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model            = NBSupCent_ABN
      Animation       = NBSupCent_ABN.NBSupCent_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model            = NBSupCent_ABS
      Animation       = NBSupCent_ABS.NBSupCent_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model            = NBSupCent_ABSN
      Animation       = NBSupCent_ABSN.NBSupCent_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = NBSupCent_AB
      Animation       = NBSupCent_AB.NBSupCent_AB
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model            = NBSupCent_ABN
      Animation       = NBSupCent_ABN.NBSupCent_ABN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model            = NBSupCent_ABS
      Animation       = NBSupCent_ABS.NBSupCent_ABS
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model            = NBSupCent_ABSN
      Animation       = NBSupCent_ABSN.NBSupCent_ABSN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End
  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName       = OBJECT:InternetCenter
  Side              = Boss
  EditorSorting     = STRUCTURE
  Prerequisites
    Object            = Boss_WarFactory
  End
  BuildCost         = 2200
  BuildTime         = 15.0           ; in seconds
  EnergyProduction  = 0  
  CommandSet        = Boss_InternetCenterCommandSetOne
  VisionRange       = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions      = None
    Armor           = StructureArmorInternetCenter
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 200 200 200 200  ; Experience point value at each level

  ;*******************************************************************************************************************
  MaxSimultaneousOfType = 1 ; *** Kris: DO NOT INCREASE THIS NUMBER -- UNLESS YOU WANT TO INTRODUCE A LOT OF BUGS! ***
  ;*******************************************************************************************************************

  ; *** AUDIO Parameters ***
  VoiceSelect       = InternetCenterSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority     = STRUCTURE
  KindOf            = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE IMMUNE_TO_CAPTURE MP_COUNT_FOR_VICTORY FS_INTERNET_CENTER

  Body              = StructureBody ModuleTag_08
    MaxHealth       = 2500.0
    InitialHealth   = 2500.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 = 2700
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End

  Behavior = InternetHackContain ModuleTag_09 ; Contain module that gives aiHackInternet command to passengers
    PassengersAllowedToFire = No
    Slots                 = 8
    ScatterNearbyOnExit   = No
    HealthRegen%PerSec    = 10
    DamagePercentToUnits  = 50% 
    AllowInsideKindOf     = MONEY_HACKER
    ExitDelay         = 500
    NumberOfExitPaths = 1 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
    GoAggressiveOnExit = No ; AI Will tell people to set their mood to Aggressive on exiting
  End

  Behavior             = DestroyDie ModuleTag_10
    ;nothing
  End
  Behavior             = CreateObjectDie ModuleTag_11
    CreationList  = OCL_LargeStructureDebris
  End
  Behavior             = FXListDie ModuleTag_12
    DeathFX       = FX_StructureMediumDeath
  End

  Behavior         = SpyVisionUpdate ModuleTag_13
    NeedsUpgrade  = Yes
    SelfPowered   = Yes        ; No SpecialPower module, turns self on and off on timers (No timers means always on)
    SpyOnKindof   = COMMANDCENTER ; Defaults to ALL
    TriggeredBy   = Upgrade_ChinaSatelliteHackOne
  End

  Behavior         = SpyVisionUpdate ModuleTag_14
    NeedsUpgrade  = Yes
    SelfPowered   = Yes         ; No SpecialPower module, turns self on and off on timers
    SelfPoweredDuration = 20000
    SelfPoweredInterval = 240000
    TriggeredBy   = Upgrade_ChinaSatelliteHackTwo
  End

  Behavior = ArmorUpgrade ModuleTag_15
    TriggeredBy = Upgrade_ChinaEMPMines
  End
  Behavior = CommandSetUpgrade ModuleTag_16
    CommandSet = ChinaInternetCenterCommandSetOneUpgrade
    TriggeredBy = Upgrade_ChinaMines

    CommandSetAlt = ChinaInternetCenterCommandSetTwoUpgrade
    TriggerAlt = Upgrade_ChinaSatelliteHackOne
  End
  Behavior = CommandSetUpgrade ModuleTag_17
    CommandSet = Boss_InternetCenterCommandSetTwo
    TriggeredBy = Upgrade_ChinaSatelliteHackOne

    CommandSetAlt = ChinaInternetCenterCommandSetTwoUpgrade
    TriggerAlt = Upgrade_ChinaMines
  End

  Behavior = ModelConditionUpgrade ModuleTag_18
    ConditionFlag = USER_1
    TriggeredBy = Upgrade_ChinaSatelliteHackOne
  End

  Behavior = ModelConditionUpgrade ModuleTag_19
    ConditionFlag = USER_2
    TriggeredBy   = Upgrade_ChinaSatelliteHackTwo
  End

  Behavior = ProductionUpdate ModuleTag_20
  End

  Behavior = GenerateMinefieldBehavior     ModuleTag_21
    TriggeredBy           = Upgrade_ChinaMines
    MineName              = ChinaStandardMine
    SmartBorder           = Yes
    AlwaysCircular        = Yes

    Upgradable            = Yes
    UpgradedTriggeredBy   = Upgrade_ChinaEMPMines
    UpgradedMineName      = ChinaEMPMine
  End


  Behavior = FlammableUpdate ModuleTag_22
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_23
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End

 Behavior = BaseRegenerateUpdate ModuleTag_24
    ;No data
  End

Behavior = StealthUpdate ModuleStealth_25
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_26
    TriggeredBy = Upgrade_GLACamoNetting
  END

  Geometry            = BOX
  GeometryMajorRadius = 50.0
  GeometryMinorRadius = 50.0
  GeometryHeight      = 36.0
  GeometryIsSmall     = No
  Shadow              = SHADOW_VOLUME
  BuildCompletion     = PLACED_BY_PLAYER

End


















;------------------------------------------------------------------------------
Object Boss_PatriotBattery

  ; *** ART Parameters ***
  SelectPortrait         = SALaserPatr_L
  ButtonImage            = SALaserPatr
  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes

    DefaultConditionState
      Model             = ABLaserTrt
      Turret            = TURRET01
      TurretPitch       = TURRETEL
      ;WeaponLaunchBone  = PRIMARY   WeaponA
      ;WeaponLaunchBone  = SECONDARY WeaponA
      ;WeaponLaunchBone  = TERTIARY  WeaponA
      ;WeaponFireFXBone  = PRIMARY   WeaponA
      ;WeaponFireFXBone  = SECONDARY WeaponA
      ;WeaponFireFXBone  = TERTIARY  WeaponA
    End
    AliasConditionState = NIGHT
    
    ConditionState      = DAMAGED
      Model             = ABLaserTrt_D
    End
    AliasConditionState = DAMAGED NIGHT
    
    ConditionState      = REALLYDAMAGED RUBBLE
      Model             = ABLaserTrt_E
    End
    AliasConditionState = REALLYDAMAGED RUBBLE NIGHT
    
    
    ConditionState      = SNOW
      Model             = ABLaserTrt
    End
    AliasConditionState = SNOW NIGHT
    
    ConditionState      = DAMAGED SNOW
      Model             = ABLaserTrt_D
    End
    AliasConditionState = SNOW NIGHT DAMAGED
    
    ConditionState      = REALLYDAMAGED RUBBLE SNOW
      Model             = ABLaserTrt_E
    End
    AliasConditionState = SNOW NIGHT REALLYDAMAGED RUBBLE
   
    ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = ABLaserTrt
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
    

    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = ABLaserTrt
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = ABLaserTrt_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT
    
    
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED SNOW
      Model              = ABLaserTrt_D
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED NIGHT SNOW
    
    
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = ABLaserTrt_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT
    
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED SNOW
      Model              = ABLaserTrt_E
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    AliasConditionState  = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED NIGHT SNOW
    
    
    
    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
       

    
  End

  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_02
    AnimationsRequirePower = No ; Do not pause the construction anims when low power disabled
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPatriot_A4
      Animation       = ABPatriot_A4.ABPatriot_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPatriot_A4N
      Animation       = ABPatriot_A4N.ABPatriot_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPatriot_A4S
      Animation       = ABPatriot_A4S.ABPatriot_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = ABPatriot_A4SN
      Animation       = ABPatriot_A4SN.ABPatriot_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABPatriot_A4
      Animation       = ABPatriot_A4.ABPatriot_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABPatriot_A4N
      Animation       = ABPatriot_A4N.ABPatriot_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABPatriot_A4S
      Animation       = ABPatriot_A4S.ABPatriot_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABPatriot_A4SN
      Animation       = ABPatriot_A4SN.ABPatriot_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABPatriot_A4
      Animation       = ABPatriot_A4.ABPatriot_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABPatriot_A4N
      Animation       = ABPatriot_A4N.ABPatriot_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABPatriot_A4S
      Animation       = ABPatriot_A4S.ABPatriot_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABPatriot_A4SN
      Animation       = ABPatriot_A4SN.ABPatriot_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
    AnimationsRequirePower = No ; Do not pause the construction anims when low power disabled
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = ABPatriot_A6
      Animation       = ABPatriot_A6.ABPatriot_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABPatriot_A6N
      Animation       = ABPatriot_A6N.ABPatriot_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = ABPatriot_A6S
      Animation       = ABPatriot_A6S.ABPatriot_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = ABPatriot_A6SN
      Animation       = ABPatriot_A6SN.ABPatriot_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Sparks01 BuildUpBlueSpark
      ParticleSysBone = Sparks02 BuildUpBlueSpark
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = ABPatriot_A6
      Animation       = ABPatriot_A6.ABPatriot_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = ABPatriot_A6N
      Animation       = ABPatriot_A6N.ABPatriot_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = ABPatriot_A6S
      Animation       = ABPatriot_A6S.ABPatriot_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = ABPatriot_A6SN
      Animation       = ABPatriot_A6SN.ABPatriot_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = ABPatriot_A6
      Animation       = ABPatriot_A6.ABPatriot_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = ABPatriot_A6N
      Animation       = ABPatriot_A6N.ABPatriot_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = ABPatriot_A6S
      Animation       = ABPatriot_A6S.ABPatriot_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = ABPatriot_A6SN
      Animation       = ABPatriot_A6SN.ABPatriot_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName       = OBJECT:Lazr_PatriotBattery
  Side              = Boss
  EditorSorting     = STRUCTURE
  Prerequisites
    Object = Boss_PowerPlant
  End
  BuildCost        = 600
  BuildTime        = 5.0           
  EnergyProduction = -3
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     Lazr_PatriotMissileWeapon
    Weapon              = SECONDARY   Lazr_PatriotMissileAssistWeapon
    Weapon              = TERTIARY    Lazr_PatriotMissileWeaponAir
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_AI FROM_SCRIPT
    AutoChooseSources   = SECONDARY   NONE
    AutoChooseSources   = TERTIARY    FROM_PLAYER FROM_AI FROM_SCRIPT  
    PreferredAgainst    = PRIMARY     VEHICLE INFANTRY
    PreferredAgainst    = SECONDARY   BALLISTIC_MISSILE AIRCRAFT
    PreferredAgainst    = TERTIARY    BALLISTIC_MISSILE AIRCRAFT
    ShareWeaponReloadTime = Yes
  End
  VisionRange    = 360.0           ; Shroud clearing distance AND targeting range
  ShroudClearingRange = 360
  ArmorSet
    Conditions      = None
    Armor           = BaseDefenseArmor
    DamageFX        = StructureDamageFXNoShake
  End
  CommandSet        = AmericaPatriotBatteryCommandSet
  ExperienceValue     = 200 200 200 200  ; Experience point value at each level

  ;Behavior = AIUpdateInterface ModuleTag_20
  ;  AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS
  ;  MoodAttackCheckRate        = 250
  ;End

  ; *** AUDIO Parameters ***
  VoiceSelect = PatriotBatterySelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    TurretMoveStart = NoSound
    TurretMoveLoop = NukeCannonTurretMoveLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT IMMOBILE SCORE FS_TECHNOLOGY POWERED FS_BASE_DEFENSE IMMUNE_TO_CAPTURE
  Body            = StructureBody ModuleTag_04
    MaxHealth     = 1000.0
    InitialHealth = 1000.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
  End
 
  Behavior = StealthDetectorUpdate ModuleTag_05
    DetectionRate     = 500   ; how often to rescan for stealthed things in my sight (msec)
    DetectionRange   =  200 ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End

  Behavior = BaseRegenerateUpdate ModuleTag_06
    ;No data
  End 
  Behavior = AIUpdateInterface ModuleTag_07
    Turret
      TurretTurnRate        = 180   // turn rate, in degrees per sec
      TurretPitchRate       = 180
      AllowsPitch           = Yes
      NaturalTurretPitch    = 45   
      GroundUnitPitch       = 0
      MinPhysicalPitch      = -20
      ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
      MinIdleScanInterval   = 250    ; in milliseconds
      MaxIdleScanInterval   = 250    ; in milliseconds
      MinIdleScanAngle      = 0       ; in degrees off the natural turret angle
      MaxIdleScanAngle      = 360     ; in degrees off the natural turret angle
    End

    AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS; defensive weapon
    MoodAttackCheckRate        = 250
  End

  Behavior = AssistedTargetingUpdate ModuleTag_08
    AssistingClipSize = 4                       ; How many shots to make when asked by someone of my kind who has a RequestAssistRange weapon
    AssistingWeaponSlot = SECONDARY             ; And the weapon to use.  Should have huge range and no natural clip.
    LaserFromAssisted = PatriotBinaryDataStream ; Stream to draw from the requestor to me
    LaserToTarget = PatriotBinaryDataStream     ; Stream to draw from me to the target
  End

  Behavior = DestroyDie ModuleTag_09
    ;nothing
  End
  Behavior             = CreateObjectDie ModuleTag_10
    CreationList  = Lazr_OCL_AmericanRangerDebris03
    ExemptStatus  = UNDER_CONSTRUCTION
  End
  Behavior             = FXListDie ModuleTag_11
    DeathFX       = FX_StructureTinyDeath
  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 = TransitionDamageFX ModuleTag_13
    ;-------------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

  Geometry            = CYLINDER
  GeometryMajorRadius = 12.0
  GeometryMinorRadius = 1.0
  GeometryHeight      = 14.0
  GeometryIsSmall     = No
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End




















;------------------------------------------------------------------------------
Object Boss_GattlingCannon

  ; *** ART Parameters ***
  SelectPortrait         = SNGatTower_L
  ButtonImage            = SNGatTower
  UpgradeCameo1           = Upgrade_ChinaChainGuns
  Draw                    = W3DModelDraw ModuleTag_01
    OkToChangeModelColor  = Yes

;--------------------- IDLE --------------------------------------------------
;-------------------------------------------------------------------------------    
    
    ; DAY
    DefaultConditionState 
      Model               = NBGattling
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
    End
    ConditionState        = DAMAGED
      Model               = NBGattling_D
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = SmokeM01 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
    End
    ConditionState        = REALLYDAMAGED RUBBLE
      Model               = NBGattling_E
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = Smoke01 SmokeFactionMedium
      ParticleSysBone     = Smoke02 SmokeFactionMedium
      ParticleSysBone     = Smoke03 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
      ParticleSysBone     = SparkM02 SparksMedium
    End
        
    
    
    ; NIGHT    --------------------------------------------------------------- 
    ConditionState        = NIGHT
      Model               = NBGattling_N
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
    End
    ConditionState        = DAMAGED NIGHT
      Model               = NBGattling_DN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = SmokeM01 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
    End
    ConditionState        = REALLYDAMAGED RUBBLE NIGHT
      Model               = NBGattling_EN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = Smoke01 SmokeFactionMedium
      ParticleSysBone     = Smoke02 SmokeFactionMedium
      ParticleSysBone     = Smoke03 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
      ParticleSysBone     = SparkM02 SparksMedium
    End
    
    
    ;SNOW    --------------------------------------------------------------- 
    ConditionState         = SNOW
      Model               = NBGattling_S
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
    End
    
    ConditionState        = DAMAGED SNOW
      Model               = NBGattling_DS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = SmokeM01 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
    End
    
    ConditionState        = REALLYDAMAGED RUBBLE SNOW
      Model               = NBGattling_ES
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = Smoke01 SmokeFactionMedium
      ParticleSysBone     = Smoke02 SmokeFactionMedium
      ParticleSysBone     = Smoke03 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
      ParticleSysBone     = SparkM02 SparksMedium
    End
    

    ; NIGHT SNOW    --------------------------------------------------------------- 
    ConditionState         = NIGHT SNOW
      Model               = NBGattling_NS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
    End
    
    ConditionState        = DAMAGED NIGHT SNOW
      Model               = NBGattling_DNS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = SmokeM01 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
    End
    
    ConditionState        = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model               = NBGattling_ENS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = MANUAL
      Turret              = TURRET
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      ParticleSysBone     = Smoke01 SmokeFactionMedium
      ParticleSysBone     = Smoke02 SmokeFactionMedium
      ParticleSysBone     = Smoke03 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
      ParticleSysBone     = SparkM02 SparksMedium
    End
    

    
;---------------- ATTACKING ----------------------------------
;-------------------------------------------------------------
   ; DAY   
   ConditionState        = ATTACKING
      Model               = NBGattling
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    ConditionState        = ATTACKING DAMAGED
      Model               = NBGattling_D
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    ConditionState        = ATTACKING REALLYDAMAGED
      Model               = NBGattling_E
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    
    
    ;NIGHT     ---------------------------------------------------------------
    ConditionState        = ATTACKING NIGHT
      Model               = NBGattling_N
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = ATTACKING DAMAGED NIGHT
      Model               = NBGattling_DN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = ATTACKING REALLYDAMAGED NIGHT
      Model               = NBGattling_EN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    
    
    
    ;SNOW     ---------------------------------------------------------------
    ConditionState        = ATTACKING SNOW
      Model               = NBGattling_S
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = ATTACKING DAMAGED SNOW
      Model               = NBGattling_DS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = ATTACKING REALLYDAMAGED SNOW
      Model               = NBGattling_ES
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    
    
    ;SNOW NIGHT  ---------------------------------------------------------------
    ConditionState        = ATTACKING NIGHT SNOW
      Model               = NBGattling_NS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = ATTACKING DAMAGED SNOW NIGHT
      Model               = NBGattling_DNS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = ATTACKING REALLYDAMAGED NIGHT SNOW
      Model               = NBGattling_ENS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End
    
;---------------- CONTINUOUS_FIRE_SLOW -----------------------
;-------------------------------------------------------------
   ; DAY   
   ConditionState        = CONTINUOUS_FIRE_SLOW ATTACKING
      Model               = NBGattling
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    ConditionState        = CONTINUOUS_FIRE_SLOW DAMAGED ATTACKING
      Model               = NBGattling_D
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    ConditionState        = CONTINUOUS_FIRE_SLOW REALLYDAMAGED ATTACKING
      Model               = NBGattling_E
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    
    
    ;NIGHT     ---------------------------------------------------------------
    ConditionState        = CONTINUOUS_FIRE_SLOW NIGHT ATTACKING
      Model               = NBGattling_N
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = CONTINUOUS_FIRE_SLOW DAMAGED NIGHT ATTACKING
      Model               = NBGattling_DN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = CONTINUOUS_FIRE_SLOW REALLYDAMAGED NIGHT ATTACKING
      Model               = NBGattling_EN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    
    
    
    ;SNOW     ---------------------------------------------------------------
    ConditionState        = CONTINUOUS_FIRE_SLOW SNOW ATTACKING
      Model               = NBGattling_S
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = CONTINUOUS_FIRE_SLOW DAMAGED SNOW ATTACKING
      Model               = NBGattling_DS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = CONTINUOUS_FIRE_SLOW REALLYDAMAGED SNOW ATTACKING
      Model               = NBGattling_ES
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    
    
    ;SNOW NIGHT  ---------------------------------------------------------------
    ConditionState        = CONTINUOUS_FIRE_SLOW NIGHT SNOW ATTACKING
      Model               = NBGattling_NS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = CONTINUOUS_FIRE_SLOW DAMAGED SNOW NIGHT ATTACKING
      Model               = NBGattling_DNS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    ConditionState        = CONTINUOUS_FIRE_SLOW REALLYDAMAGED NIGHT SNOW ATTACKING
      Model               = NBGattling_ENS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End
    
    
    
    
;------------- CONTINUOUS_FIRE_MEAN ------------------------
;-----------------------------------------------------------
    ;DAY
    ConditionState       = CONTINUOUS_FIRE_MEAN ATTACKING
      Model               = NBGattling
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
     ConditionState       = CONTINUOUS_FIRE_MEAN DAMAGED ATTACKING
      Model               = NBGattling_D
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    ConditionState       = CONTINUOUS_FIRE_MEAN REALLYDAMAGED ATTACKING
      Model               = NBGattling_E
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    
    
    
    ;NIGHT    ---------------------------------------------------------------
    ConditionState       = CONTINUOUS_FIRE_MEAN NIGHT ATTACKING
      Model               = NBGattling_N
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    ConditionState       = CONTINUOUS_FIRE_MEAN DAMAGED NIGHT ATTACKING
      Model               = NBGattling_DN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    ConditionState        = CONTINUOUS_FIRE_MEAN REALLYDAMAGED NIGHT ATTACKING
      Model               = NBGattling_EN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    
    
    ;SNOW    ---------------------------------------------------------------
    ConditionState       = CONTINUOUS_FIRE_MEAN SNOW ATTACKING
      Model               = NBGattling_S
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    ConditionState       = CONTINUOUS_FIRE_MEAN DAMAGED SNOW ATTACKING
      Model               = NBGattling_DS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    ConditionState        = CONTINUOUS_FIRE_FAST REALLYDAMAGED SNOW ATTACKING
      Model               = NBGattling_ES
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
      
    
    ;NIGHT SNOW ---------------------------------------------------------------
    ConditionState       = CONTINUOUS_FIRE_MEAN NIGHT SNOW ATTACKING
      Model               = NBGattling_NS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    ConditionState       = CONTINUOUS_FIRE_MEAN DAMAGED SNOW NIGHT ATTACKING
      Model               = NBGattling_DNS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    ConditionState       = CONTINUOUS_FIRE_MEAN REALLYDAMAGED NIGHT SNOW ATTACKING
      Model               = NBGattling_ENS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End
    





;------------- CONTINUOUS_FIRE_FAST ------------------------
    ;DAY  
    ConditionState        = CONTINUOUS_FIRE_FAST ATTACKING
      Model               = NBGattling
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    ConditionState        = CONTINUOUS_FIRE_FAST DAMAGED ATTACKING
      Model               = NBGattling_D
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    ConditionState        = CONTINUOUS_FIRE_FAST REALLYDAMAGED ATTACKING
      Model               = NBGattling_E
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    
    
    
    ;NIGHT     ---------------------------------------------------------------
    ConditionState        = CONTINUOUS_FIRE_FAST NIGHT ATTACKING
      Model               = NBGattling_N
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    ConditionState        = CONTINUOUS_FIRE_FAST DAMAGED NIGHT ATTACKING
      Model               = NBGattling_DN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
     ConditionState       = CONTINUOUS_FIRE_FAST REALLYDAMAGED NIGHT ATTACKING
      Model               = NBGattling_EN
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    
    
    ;SNOW      ---------------------------------------------------------------
    ConditionState        = CONTINUOUS_FIRE_FAST SNOW ATTACKING
      Model               = NBGattling_S
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    ConditionState        = CONTINUOUS_FIRE_FAST DAMAGED SNOW ATTACKING
      Model               = NBGattling_NS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    ConditionState       = CONTINUOUS_FIRE_MEAN REALLYDAMAGED SNOW ATTACKING
      Model               = NBGattling_ES
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
    End
    
    
    ;NIGHT SNOW ---------------------------------------------------------------
    ConditionState        = CONTINUOUS_FIRE_FAST NIGHT SNOW ATTACKING
      Model               = NBGattling_NS
      Animation           = NBGattling_A2.NBGattling_A2

      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    ConditionState        = CONTINUOUS_FIRE_FAST DAMAGED SNOW NIGHT ATTACKING
      Model               = NBGattling_DNS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End
    ConditionState        = CONTINUOUS_FIRE_FAST REALLYDAMAGED NIGHT SNOW ATTACKING
      Model               = NBGattling_ENS
      Animation           = NBGattling_A2.NBGattling_A2
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke  
    End
    


    
       ;**************************************************************************************************************************
    ;This block handles every possible case with construction process, selling process, awaiting construction, and sold states
    ;for this draw module
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model              = NBGattling
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBGattling_D
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBGattling_E
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = NBGattling_N
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = NBGattling_DN
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = NBGattling_EN
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = NBGattling_S
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = NBGattling_DS
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = NBGattling_ES
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = NBGattling_NS
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = NBGattling_DNS
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = NBGattling_ENS
      Animation          = NBGattling_A2.NBGattling_A2
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End

    ConditionState       = AWAITING_CONSTRUCTION 
      Model              = NONE
    End
    AliasConditionState  = AWAITING_CONSTRUCTION DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION SNOW REALLYDAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW DAMAGED
    AliasConditionState  = AWAITING_CONSTRUCTION NIGHT SNOW REALLYDAMAGED
    AliasConditionState  = SOLD 
    AliasConditionState  = SOLD DAMAGED
    AliasConditionState  = SOLD REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT
    AliasConditionState  = SOLD NIGHT DAMAGED
    AliasConditionState  = SOLD NIGHT REALLYDAMAGED
    AliasConditionState  = SOLD SNOW
    AliasConditionState  = SOLD SNOW DAMAGED
    AliasConditionState  = SOLD SNOW REALLYDAMAGED
    AliasConditionState  = SOLD NIGHT SNOW
    AliasConditionState  = SOLD NIGHT SNOW DAMAGED
    AliasConditionState  = SOLD NIGHT SNOW REALLYDAMAGED
    ;**************************************************************************************************************************
   
  End
  
  


  ; ------------ construction-zone fence -----------------
  Draw = W3DModelDraw ModuleTag_02
  AnimationsRequirePower = No

    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBGattling_A4
      Animation       = NBGattling_A4.NBGattling_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBGattling_A4N
      Animation       = NBGattling_A4N.NBGattling_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBGattling_A4S
      Animation       = NBGattling_A4S.NBGattling_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBGattling_A4SN
      Animation       = NBGattling_A4SN.NBGattling_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBGattling_A4
      Animation       = NBGattling_A4.NBGattling_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBGattling_A4N
      Animation       = NBGattling_A4N.NBGattling_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBGattling_A4S
      Animation       = NBGattling_A4S.NBGattling_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBGattling_A4SN
      Animation       = NBGattling_A4SN.NBGattling_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBGattling_A4
      Animation       = NBGattling_A4.NBGattling_A4
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBGattling_A4N
      Animation       = NBGattling_A4N.NBGattling_A4N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBGattling_A4S
      Animation       = NBGattling_A4S.NBGattling_A4S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBGattling_A4SN
      Animation       = NBGattling_A4SN.NBGattling_A4SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  ; ------------ under-construction scaffolding -----------------
  Draw = W3DModelDraw ModuleTag_03
  AnimationsRequirePower = No
    MinLODRequired = MEDIUM
    DefaultConditionState
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = SNOW NIGHT
      Model           = None
      TransitionKey   = DOWN_DEFAULT
    End
    ConditionState    = PARTIALLY_CONSTRUCTED
      Model           = NBGattling_A6
      Animation       = NBGattling_A6.NBGattling_A6
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
    End
    ConditionState    = NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBGattling_A6N
      Animation       = NBGattling_A6N.NBGattling_A6N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
      ParticleSysBone = Smoke01 BuildUpSmokeChina
      ParticleSysBone = Smoke02 BuildUpSmokeChina
      ParticleSysBone = Smoke03 BuildUpSmokeChina
    End
    ConditionState    = SNOW PARTIALLY_CONSTRUCTED
      Model           = NBGattling_A6S
      Animation       = NBGattling_A6S.NBGattling_A6S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
      ParticleSysBone = Smoke01 BuildUpSnowSmoke
      ParticleSysBone = Smoke02 BuildUpSnowSmoke
      ParticleSysBone = Smoke03 BuildUpSnowSmoke
    End
    ConditionState    = SNOW NIGHT PARTIALLY_CONSTRUCTED
      Model           = NBGattling_A6SN
      Animation       = NBGattling_A6SN.NBGattling_A6SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
      ParticleSysBone = Smoke01 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke02 BuildUpNightSnowSmoke
      ParticleSysBone = Smoke03 BuildUpNightSnowSmoke
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
     Model            = NBGattling_A6
      Animation       = NBGattling_A6.NBGattling_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = NBGattling_A6N
      Animation       = NBGattling_A6N.NBGattling_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = NBGattling_A6S
      Animation       = NBGattling_A6S.NBGattling_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = NBGattling_A6SN
      Animation       = NBGattling_A6SN.NBGattling_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBGattling_A6
      Animation       = NBGattling_A6.NBGattling_A6
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_NIGHT DOWN_DEFAULT
      Model           = NBGattling_A6N
      Animation       = NBGattling_A6N.NBGattling_A6N
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOW DOWN_DEFAULT
      Model           = NBGattling_A6S
      Animation       = NBGattling_A6S.NBGattling_A6S
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
    TransitionState   = UP_SNOWNIGHT DOWN_DEFAULT
      Model           = NBGattling_A6SN
      Animation       = NBGattling_A6SN.NBGattling_A6SN
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2.0 2.0   ; play teardown animations more quickly
      Flags           = START_FRAME_LAST
    End
  End

  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:GattlingCannon
  Side             = Boss
  EditorSorting    = STRUCTURE
  Prerequisites
    Object         = Boss_Barracks
  End
  BuildCost        = 300
  BuildTime        = 2.0           ; in seconds
  EnergyProduction = -1

  ExperienceValue     = 200 200 200 200  ; Experience point value at each level

  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY GattlingBuildingGun
    AutoChooseSources   = PRIMARY FROM_PLAYER FROM_AI FROM_SCRIPT
    Weapon              = SECONDARY GattlingBuildingGunAir
    AutoChooseSources   = SECONDARY FROM_PLAYER FROM_AI FROM_SCRIPT
    PreferredAgainst    = SECONDARY BALLISTIC_MISSILE AIRCRAFT
  End
  
  VisionRange      = 360.0           ; Shroud clearing distance AND targeting range
  ShroudClearingRange = 360
  
  ArmorSet
    Conditions     = None
    Armor          = BaseDefenseArmor
    DamageFX       = StructureDamageFXNoShake
  End
  CommandSet       = Boss_GattlingCannonCommandSet

  ;Behavior = AIUpdateInterface ModuleTag_04
  ;  AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS
  ;  MoodAttackCheckRate        = 250
  ;End

  ; *** AUDIO Parameters ***
  VoiceSelect      = GattlingCannonSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
    VoiceRapidFire        = NoSound
  End

  UnitSpecificSounds
    TurretMoveStart = NoSound
    TurretMoveLoop  = OverlordTankTurretMoveLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority     = STRUCTURE
  KindOf            = PRELOAD STRUCTURE SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT IMMOBILE SCORE FS_BASE_DEFENSE POWERED IMMUNE_TO_CAPTURE
  Body              = StructureBody ModuleTag_05
    MaxHealth       = 1000.0
    InitialHealth   = 1000.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
  End

  Behavior = StealthDetectorUpdate ModuleTag_06
    DetectionRate     = 500   ; how often to rescan for stealthed things in my sight (msec)
    DetectionRange   = 200   ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End

  Behavior = AIUpdateInterface ModuleTag_07
    Turret
      ControlledWeaponSlots = PRIMARY SECONDARY
      TurretTurnRate      = 180   // turn rate, in degrees per sec
      TurretPitchRate     = 180
      AllowsPitch         = Yes
      FiresWhileTurning   = Yes
      NaturalTurretPitch  = 45 ; this keeps it aimed half way between land and sky
      MinIdleScanInterval   = 250    ; in milliseconds
      MaxIdleScanInterval   = 250   ; in milliseconds
      MinIdleScanAngle      = 0       ; in degrees off the natural turret angle
      MaxIdleScanAngle      = 360     ; in degrees off the natural turret angle
    End
    AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS; defensive weapon
    MoodAttackCheckRate        = 250
  End

  Behavior = ProductionUpdate ModuleTag_08
    ; nothing, but is required if we have any Object-level Upgrades!
  End

  Behavior             = DestroyDie ModuleTag_09
    ;nothing
  End
  Behavior             = FXListDie ModuleTag_10
    DeathFX       = FX_StructureTinyDeath
  End

  Behavior = ProductionUpdate ModuleTag_11
    ; nothing
  End
  
  Behavior        = CreateObjectDie ModuleTag_12
    CreationList  = OCL_LargeStructureDebris
  End

  Behavior = FlammableUpdate ModuleTag_13
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  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 = WeaponBonusUpgrade ModuleTag_15
    TriggeredBy = Upgrade_ChinaChainGuns
  End

 Behavior = BaseRegenerateUpdate ModuleTag_16
    ;No data
  End

  

  Geometry            = BOX
  GeometryMajorRadius = 8.0
  GeometryMinorRadius = 8.0
  GeometryHeight      = 20.0
  GeometryIsSmall     = No      
  Shadow              = SHADOW_VOLUME
  BuildCompletion     = PLACED_BY_PLAYER

End














;------------------------------------------------------------------------------
Object Boss_TechRepairbay

  ; *** ART Parameters ***
  SelectPortrait         = RepairBay_L
  ButtonImage            = RepairBay
  Draw                 = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes   
    ConditionState       = NONE
      Model              = ZBRprBay
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay.ZBRprBay
      AnimationMode      = LOOP
    End
    
    ConditionState       = DAMAGED
      Model              = ZBRprBay_D
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_D.ZBRprBay_D
      AnimationMode      = LOOP
    End
   
    ConditionState     = REALLYDAMAGED RUBBLE
      Model              = ZBRprBay_E
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_E.ZBRprBay_E
      AnimationMode      = LOOP
    End
    
    ConditionState       = NIGHT
      Model              = ZBRprBay_N
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_N.ZBRprBay_N
      AnimationMode      = LOOP
    End
    
    ConditionState       = DAMAGED NIGHT
      Model              = ZBRprBay_D
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_D.ZBRprBay_D
      AnimationMode      = LOOP
    End
   
    ConditionState     = REALLYDAMAGED RUBBLE NIGHT
      Model              = ZBRprBay_E
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_E.ZBRprBay_E
      AnimationMode      = LOOP
    End
    
    ;----------- SNOW
    
    ConditionState       = SNOW
      Model              = ZBRprBay_S
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_S.ZBRprBay_S
      AnimationMode      = LOOP
    End
    
    ConditionState       = DAMAGED SNOW
      Model              = ZBRprBay_DS
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_DS.ZBRprBay_DS

      AnimationMode      = LOOP
    End
   
    ConditionState     = REALLYDAMAGED RUBBLE SNOW
      Model              = ZBRprBay_ES
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_ES.ZBRprBay_ES
      AnimationMode      = LOOP
    End
    
    ;---------- SNOW NIGHT
    
    ConditionState       = NIGHT SNOW
      Model              = ZBRprBay_NS
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_NS.ZBRprBay_NS
      AnimationMode      = LOOP
    End
    
    ConditionState       = DAMAGED NIGHT SNOW
      Model              = ZBRprBay_DSN
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_DSN.ZBRprBay_DSN
      AnimationMode      = LOOP
    End
   
    ConditionState     = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model              = ZBRprBay_ES
      ;ParticleSysBone    = Flare01 LandingZoneSmoke
      Animation          = ZBRprBay_ES.ZBRprBay_ES
      AnimationMode      = LOOP
    End

  End  
    ; ========================= Flag Model ===============================
  Draw = W3DModelDraw ModuleTag_02
    OkToChangeModelColor = Yes
    
    ; DEFAULT & DAMAGED ************************************************
    ConditionState  = NONE
      Model         = ZBRprBay_F
      Animation     = ZBRprBay_F.ZBRprBay_F
      AnimationMode = LOOP
    End
    AliasConditionState = DAMAGED
    
    ; REALLYDAMAGED*****************************************************
    ConditionState  = REALLYDAMAGED
      Model         = ZBRprBay_FE
      Animation     = ZBRprBay_FE.ZBRprBay_FE
      AnimationMode = LOOP
    End
    
    ; RUBBLE ***********************************************************
    ConditionState  = RUBBLE
      Model         = None
    End
  End
  PlacementViewAngle = 45

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:TechRepairBay
  Side               = Boss
  EditorSorting       = STRUCTURE
  BuildCost         = 2000
  BuildTime         = 25.0           ; in seconds
  EnergyProduction  = -5
  CommandSet        = Boss_RepairBayCommandSet
  Prerequisites
    Object = Boss_PowerPlant
    Object = Boss_SupplyCenter
  End
  VisionRange       = 200.0
  ShroudClearingRange = 200
  ArmorSet
    Conditions        = None
    Armor             = StructureArmor
    DamageFX          = StructureDamageFXNoShake
  End
  ExperienceValue     = 200 200 200 200  ; Experience point value at each level
  ; *** AUDIO Parameters ***
  VoiceSelect = SupplyDropZoneSelect

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***  
  KindOf              = STRUCTURE SELECTABLE IMMOBILE SCORE TECH_BUILDING CAPTURABLE NO_COLLIDE CONSERVATIVE_BUILDING
  RadarPriority       = STRUCTURE
  
  Body                = ActiveBody ModuleTag_04
    MaxHealth         = 1000.0
    InitialHealth     = 1000.0
  End
 
  Behavior                  = CreateObjectDie ModuleTag_05
    CreationList       = OCL_LargeStructureDebris
  End

  Behavior             = FlammableUpdate ModuleTag_06
    AflameDuration     = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay  = 500       ; this often.
  End
  Behavior                  = FXListDie ModuleTag_07
    DeathFX            = FX_StructureMediumDeath
  End
  Behavior = TechBuildingBehavior ModuleTag_08
  End
  Behavior = KeepObjectDie ModuleTag_IWantRubble
  End
  Behavior = BaseRegenerateUpdate ModuleTag_09
  End 
  
  ;Kris: Cut, functionality changed to grant autoheal to army.
  ;Behavior = RepairDockUpdate ModuleTag_10
  ;  TimeForFullHeal   = 5000   ;(in milliseconds)     
  ;  NumberApproachPositions = 5
  ;End

  Behavior = AutoHealBehavior ModuleTag_AutoHeal01
    HealingAmount     = 2
    HealingDelay      = 1000 ; msec
    AffectsWholePlayer = Yes
    StartsActive      = Yes
    KindOf            = VEHICLE
    ForbiddenKindOf   = AIRCRAFT
  End

Behavior = StealthUpdate ModuleStealth_09
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_10
    TriggeredBy = Upgrade_GLACamoNetting
  END


  Behavior = TransitionDamageFX ModuleTag_11
    ;-------------DESIGNED FOR SMALL SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionSmallExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionSmallShockwave
  End
  Geometry            = BOX
  GeometryMajorRadius = 27.0
  GeometryMinorRadius = 27.0
  GeometryHeight      = 9.0
  GeometryIsSmall     = No
  Shadow              = SHADOW_VOLUME

End





















;------------------------------------------------------------------------------
Object Boss_TechOilDerrick

  ; *** ART Parameters ***
  SelectPortrait         = SSTechOilDerrick_L
  
  ; ========================= Main Model ===============================
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
  
    ; DAY **************************************************************
    ConditionState  = NONE
      Model         = ZBODerrick
      Animation     = ZBODerrick.ZBODerrick
      AnimationMode = LOOP
    End
    ConditionState  = CAPTURED
      Model         = ZBODerrick
      Animation     = ZBODerrick.ZBODerrick
      AnimationMode = LOOP
    End
    
    ; DAMAGED **********************************************************
    ConditionState  = DAMAGED
      Model         = ZBODerrick_D
      Animation     = ZBODerrick_D.ZBODerrick_D
      AnimationMode = LOOP
    End
    ConditionState  = DAMAGED CAPTURED
      Model         = ZBODerrick_D
      Animation     = ZBODerrick_D.ZBODerrick_D
      AnimationMode = LOOP
    End
    
    ; REALLYDAMAGED ****************************************************
    ConditionState  = REALLYDAMAGED
      Model         = ZBODerrick_E
      Animation     = ZBODerrick_E.ZBODerrick_E
      AnimationMode = LOOP
    End
    ConditionState  = REALLYDAMAGED CAPTURED
      Model         = ZBODerrick_E
      Animation     = ZBODerrick_E.ZBODerrick_E
      AnimationMode = LOOP
    End

    ; RUBBLE ***********************************************************
    ConditionState  = RUBBLE
      Model         = ZBODerrick_R
    End

    ; NIGHT ************************************************************
    ConditionState  = NIGHT
      Model         = ZBODerrick_N
      Animation     = ZBODerrick_N.ZBODerrick_N
      AnimationMode = LOOP
    End
    ConditionState  = NIGHT CAPTURED
      Model         = ZBODerrick_N
      Animation     = ZBODerrick_N.ZBODerrick_N
      AnimationMode = LOOP
    End
    
    ; NIGHT DAMAGED ****************************************************
    ConditionState  = DAMAGED NIGHT
      Model         = ZBODerrick_DN
      Animation     = ZBODerrick_DN.ZBODerrick_DN
      AnimationMode = LOOP
    End
    ConditionState  = DAMAGED NIGHT CAPTURED
      Model         = ZBODerrick_DN
      Animation     = ZBODerrick_DN.ZBODerrick_DN
      AnimationMode = LOOP
    End
    
    ; NIGHT REALLYDAMAGED **********************************************
    ConditionState  = REALLYDAMAGED NIGHT
      Model         = ZBODerrick_EN
      Animation     = ZBODerrick_EN.ZBODerrick_EN
      AnimationMode = LOOP
    End
    ConditionState  = REALLYDAMAGED NIGHT CAPTURED
      Model         = ZBODerrick_EN
      Animation     = ZBODerrick_EN.ZBODerrick_EN
      AnimationMode = LOOP
    End

    ; NIGHT RUBBLE *****************************************************
    ConditionState  = NIGHT RUBBLE
      Model         = ZBODerrick_R
    End
    
    ; SNOW *************************************************************
    ConditionState  = SNOW
      Model         = ZBODerrick_S
      Animation     = ZBODerrick_S.ZBODerrick_S
      AnimationMode = LOOP
    End
    ConditionState  = SNOW CAPTURED
      Model         = ZBODerrick_S
      Animation     = ZBODerrick_S.ZBODerrick_S
      AnimationMode = LOOP
    End
    
    ; SNOW DAMAGED *****************************************************
    ConditionState  = DAMAGED SNOW
      Model         = ZBODerrick_DS
      Animation     = ZBODerrick_DS.ZBODerrick_DS
      AnimationMode = LOOP
    End
    ConditionState  = DAMAGED SNOW CAPTURED
      Model         = ZBODerrick_DS
      Animation     = ZBODerrick_DS.ZBODerrick_DS
      AnimationMode = LOOP
    End
    
    ; SNOW REALLYDAMAGED ***********************************************
    ConditionState  = REALLYDAMAGED SNOW
      Model         = ZBODerrick_ES
      Animation     = ZBODerrick_ES.ZBODerrick_ES
      AnimationMode = LOOP
    End
    ConditionState  = REALLYDAMAGED SNOW CAPTURED
      Model         = ZBODerrick_ES
      Animation     = ZBODerrick_ES.ZBODerrick_ES
      AnimationMode = LOOP
    End

    ; SNOW RUBBLE ******************************************************
    ConditionState  = SNOW RUBBLE
      Model         = ZBODerrick_RS
    End
    
    ; SNOW NIGHT *******************************************************
    ConditionState  = SNOW NIGHT
      Model         = ZBODerrick_NS
      Animation     = ZBODerrick_NS.ZBODerrick_NS
      AnimationMode = LOOP
    End
    ConditionState  = SNOW NIGHT CAPTURED
      Model         = ZBODerrick_NS
      Animation     = ZBODerrick_NS.ZBODerrick_NS
      AnimationMode = LOOP
    End
    
    ; SNOW NIGHT DAMAGED ***********************************************
    ConditionState  = SNOW NIGHT DAMAGED
      Model         = ZBODerrick_DNS
      Animation     = ZBODerrick_DNS.ZBODerrick_DNS
      AnimationMode = LOOP
    End
    ConditionState  = SNOW NIGHT DAMAGED CAPTURED
      Model         = ZBODerrick_DNS
      Animation     = ZBODerrick_DNS.ZBODerrick_DNS
      AnimationMode = LOOP
    End
    
    ; SNOW NIGHT REALLYDAMAGED *****************************************
    ConditionState  = SNOW NIGHT REALLYDAMAGED
      Model         = ZBODerrick_ENS
      Animation     = ZBODerrick_EN.ZBODerrick_ENS
      AnimationMode = LOOP
    End
    ConditionState  = SNOW NIGHT REALLYDAMAGED CAPTURED
      Model         = ZBODerrick_ENS
      Animation     = ZBODerrick_EN.ZBODerrick_ENS
      AnimationMode = LOOP
    End
    
    ; SNOW NIGHT RUBBLE ************************************************
    ConditionState  = SNOW NIGHT RUBBLE
      Model         = ZBODerrick_RS
    End
    
  End

  ; ========================= Flag Model ===============================
  Draw = W3DModelDraw ModuleTag_02
    OkToChangeModelColor = Yes
    
    ; DEFAULT & DAMAGED ************************************************
    ConditionState  = NONE
      Model         = ZBODerrick_F
      Animation     = ZBODerrick_F.ZBODerrick_F
      AnimationMode = LOOP
    End
    AliasConditionState = DAMAGED
    
    ; REALLYDAMAGED*****************************************************
    ConditionState  = REALLYDAMAGED
      Model         = ZBODerrick_FE
      Animation     = ZBODerrick_FE.ZBODerrick_FE
      AnimationMode = LOOP
    End
    
    ; RUBBLE ***********************************************************
    ConditionState  = RUBBLE
      Model         = None
    End
 End
     ; ------------ New Animations fence -----------------
  Draw = W3DModelDraw ModuleTag_LightingAnimations
  AnimationsRequirePower = No
  
    DefaultConditionState
      Model           = ZBODerrick_A1
      Animation       = ZBODerrick_A1.ZBODerrick_A1
      AnimationMode   = LOOP
    End
    
    ConditionState    = DAMAGED
      Model           = ZBODerrick_A1D
      Animation       = ZBODerrick_A1D.ZBODerrick_A1D
      AnimationMode   = LOOP
    End
    
    ConditionState    = REALLYDAMAGED
      Model           = ZBODerrick_A1E
      Animation       = ZBODerrick_A1E.ZBODerrick_A1E
      AnimationMode   = LOOP
    End
    
    ConditionState    = RUBBLE
      Model           = NONE
    End
    
  End
  
  ; *** AUDIO Parameters ***
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  
  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:TechOilDerrick
  Side               = Boss
  EditorSorting       = STRUCTURE
  BuildCost         = 2000
  BuildTime         = 25.0           ; in seconds
  EnergyProduction  = -3
  MaxSimultaneousOfType = 6
  CommandSet        = Boss_OilDerrickCommandSet
  Prerequisites
    Object = Boss_PowerPlant
    Object = Boss_SupplyCenter
  End
  VisionRange       = 100.0
  ShroudClearingRange = 100

  ; *** ENGINEERING Parameters ***  
  KindOf            = STRUCTURE SELECTABLE IMMOBILE CAPTURABLE TECH_BUILDING CONSERVATIVE_BUILDING
  Body              = ActiveBody ModuleTag_03
    MaxHealth       = 2000.0
    InitialHealth   = 2000.0
  End
  ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End

  Behavior              = AutoDepositUpdate ModuleTag_04
    DepositTiming       = 12000  ; in milliseconds
    DepositAmount       = 200    ; cash amount to deposit every Deposit Timings
    InitialCaptureBonus = 1000   ;capture bonus only happens once
    UpgradedBoost       = UpgradeType:Upgrade_AmericaSupplyLines  Boost:20
  End
    
  Behavior                = FlammableUpdate ModuleTag_05
    FlameDamageLimit      = 20    ; Catch fire if I take this much fire damage...
    FlameDamageExpiration = 2000  ; in a span of this long
    AflameDuration        = 5000  ; If I catch fire, I'll burn for this long...
    AflameDamageAmount    = 25    ; taking this much damage...
    AflameDamageDelay     = 500   ; this often.
  End
  
  Behavior             = FXListDie ModuleTag_06
    DeathFX            = WeaponFX_BombTruckDefaultBombDetonation
  End

  Behavior = TransitionDamageFX ModuleTag_07
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionSmallExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionSmallShockwave
  End

  Behavior = TechBuildingBehavior ModuleTag_08
    ;<NO DATA>
  End

  Behavior = FXListDie ModuleTag_09
    DeathFX = FX_BuildingDie
  End

  ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  ; buildings automatically stick around because GarrisonContain has it's own DieModule
  Behavior = KeepObjectDie ModuleTag_IWantRubble
  End

  Behavior = AutoDepositUpdate ModuleTag_10
    DepositTiming       = 5000   ; in milliseconds
    DepositAmount       = 200   ; cash amount to deposit every DepositTiming
    InitialCaptureBonus = 0  ; no initial bonus
    ActualMoney = Yes 
  End

  Behavior           = OCLSpecialPower ModuleTag_11
    SpecialPowerTemplate = SuperweaponMoneyDrop
    OCL                  = SUPERWEAPON_MoneyDropGLA
    CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
  End

Behavior = StealthUpdate ModuleStealth_12
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_13
    TriggeredBy = Upgrade_GLACamoNetting
  END

  Geometry              = BOX
  GeometryMajorRadius   = 23.0
  GeometryMinorRadius   = 21.0
  GeometryHeight        = 30.0
  GeometryIsSmall       = No
  Shadow                = SHADOW_VOLUME


End










;------------------------------------------------------------------------------
Object Boss_TechHospital

  ; *** ART Parameters ***
  SelectPortrait         = SSTechHospital_L
  Draw                   = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    ; DAY ************************************
    ConditionState       = NONE
      Model              = ZBHospital
      ;Animation          = ZBHospital.ZBHospital
      ;AnimationMode      = LOOP
    End
    
    ; DAMAGED *********************************
    ConditionState       = DAMAGED
      Model              = ZBHospital_D
      Animation          = ZBHospital_D.ZBHospital_D
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmolderingSmoke
      ParticleSysBone    = Smoke06 SmolderingSmoke
      ParticleSysBone    = Smoke07 SmolderingSmoke
      ParticleSysBone    = Smoke08 SmolderingSmoke
      ParticleSysBone    = Smoke09 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Fire04 SmolderingFire
      ParticleSysBone    = Fire05 SmolderingFire
      ParticleSysBone    = Fire06 SmolderingFire
      ParticleSysBone    = Fire07 SmolderingFire
      ParticleSysBone    = Fire08 SmolderingFire
      ParticleSysBone    = Fire09 SmolderingFire
    End

    ; REALLYDAMAGED *******************************
    ConditionState       = REALLYDAMAGED
      Model              = ZBHospital_E
      Animation          = ZBHospital_E.ZBHospital_E
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmokeFactionLarge
      ParticleSysBone    = Smoke02 SmokeFactionLarge
      ParticleSysBone    = Smoke03 SmokeFactionLarge
      ParticleSysBone    = Smoke04 SmokeFactionLarge
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Smoke07 SmokeFactionLarge
      ParticleSysBone    = Smoke08 SmokeFactionLarge
      ParticleSysBone    = Smoke09 SmokeFactionLarge
      ParticleSysBone    = Smoke10 SmokeFactionLarge
      ParticleSysBone    = Smoke11 SmokeFactionLarge
      ParticleSysBone    = Fire01 FireFactionLarge
      ParticleSysBone    = Fire02 FireFactionLarge
      ParticleSysBone    = Fire03 FireFactionLarge
      ParticleSysBone    = Fire04 FireFactionLarge
      ParticleSysBone    = Fire05 FireFactionLarge
      ParticleSysBone    = Fire06 FireFactionLarge
      ParticleSysBone    = Fire07 FireFactionLarge
      ParticleSysBone    = Fire08 FireFactionLarge
      ParticleSysBone    = Fire09 FireFactionLarge
      ParticleSysBone    = Fire10 FireFactionLarge
      ParticleSysBone    = Fire11 FireFactionLarge
    End

    ; RUBBLE *****************************************
    ConditionState       = RUBBLE
      Model              = ZBHospital_R
    End

    ; NIGHT ************************************
    ConditionState       = NIGHT
      Model              = ZBHospital_N
      Animation          = ZBHospital_N.ZBHospital_N
      AnimationMode      = LOOP
    End
    
    ; NIGHT DAMAGED *********************************
    ConditionState       = NIGHT DAMAGED
      Model              = ZBHospital_DN
      Animation          = ZBHospital_DN.ZBHospital_DN
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmolderingSmoke
      ParticleSysBone    = Smoke06 SmolderingSmoke
      ParticleSysBone    = Smoke07 SmolderingSmoke
      ParticleSysBone    = Smoke08 SmolderingSmoke
      ParticleSysBone    = Smoke09 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Fire04 SmolderingFire
      ParticleSysBone    = Fire05 SmolderingFire
      ParticleSysBone    = Fire06 SmolderingFire
      ParticleSysBone    = Fire07 SmolderingFire
      ParticleSysBone    = Fire08 SmolderingFire
      ParticleSysBone    = Fire09 SmolderingFire
    End

    ; NIGHT REALLYDAMAGED *****************************
    ConditionState       = NIGHT REALLYDAMAGED 
      Model              = ZBHospital_EN
      Animation          = ZBHospital_EN.ZBHospital_EN
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmokeFactionLarge
      ParticleSysBone    = Smoke02 SmokeFactionLarge
      ParticleSysBone    = Smoke03 SmokeFactionLarge
      ParticleSysBone    = Smoke04 SmokeFactionLarge
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Smoke07 SmokeFactionLarge
      ParticleSysBone    = Smoke08 SmokeFactionLarge
      ParticleSysBone    = Smoke09 SmokeFactionLarge
      ParticleSysBone    = Smoke10 SmokeFactionLarge
      ParticleSysBone    = Smoke11 SmokeFactionLarge
      ParticleSysBone    = Fire01 FireFactionLarge
      ParticleSysBone    = Fire02 FireFactionLarge
      ParticleSysBone    = Fire03 FireFactionLarge
      ParticleSysBone    = Fire04 FireFactionLarge
      ParticleSysBone    = Fire05 FireFactionLarge
      ParticleSysBone    = Fire06 FireFactionLarge
      ParticleSysBone    = Fire07 FireFactionLarge
      ParticleSysBone    = Fire08 FireFactionLarge
      ParticleSysBone    = Fire09 FireFactionLarge
      ParticleSysBone    = Fire10 FireFactionLarge
      ParticleSysBone    = Fire11 FireFactionLarge
    End

    ; NIGHT RUBBLE ********************************
    ConditionState       = RUBBLE NIGHT
      Model              = ZBHospital_R
    End

    ; SNOW ************************************
    ConditionState       = SNOW
      Model              = ZBHospital_S
      Animation          = ZBHospital_S.ZBHospital_S
      AnimationMode      = LOOP
    End
    
    ; SNOW DAMAGED *********************************
    ConditionState       = SNOW DAMAGED
      Model              = ZBHospital_DS
      Animation          = ZBHospital_DS.ZBHospital_DS
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmolderingSmoke
      ParticleSysBone    = Smoke06 SmolderingSmoke
      ParticleSysBone    = Smoke07 SmolderingSmoke
      ParticleSysBone    = Smoke08 SmolderingSmoke
      ParticleSysBone    = Smoke09 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Fire04 SmolderingFire
      ParticleSysBone    = Fire05 SmolderingFire
      ParticleSysBone    = Fire06 SmolderingFire
      ParticleSysBone    = Fire07 SmolderingFire
      ParticleSysBone    = Fire08 SmolderingFire
      ParticleSysBone    = Fire09 SmolderingFire
    End

    ; SNOW REALLYDAMAGED **************************
    ConditionState       = SNOW REALLYDAMAGED 
      Model              = ZBHospital_ES
      Animation          = ZBHospital_ES.ZBHospital_ES
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmokeFactionLarge
      ParticleSysBone    = Smoke02 SmokeFactionLarge
      ParticleSysBone    = Smoke03 SmokeFactionLarge
      ParticleSysBone    = Smoke04 SmokeFactionLarge
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Smoke07 SmokeFactionLarge
      ParticleSysBone    = Smoke08 SmokeFactionLarge
      ParticleSysBone    = Smoke09 SmokeFactionLarge
      ParticleSysBone    = Smoke10 SmokeFactionLarge
      ParticleSysBone    = Smoke11 SmokeFactionLarge
      ParticleSysBone    = Fire01 FireFactionLarge
      ParticleSysBone    = Fire02 FireFactionLarge
      ParticleSysBone    = Fire03 FireFactionLarge
      ParticleSysBone    = Fire04 FireFactionLarge
      ParticleSysBone    = Fire05 FireFactionLarge
      ParticleSysBone    = Fire06 FireFactionLarge
      ParticleSysBone    = Fire07 FireFactionLarge
      ParticleSysBone    = Fire08 FireFactionLarge
      ParticleSysBone    = Fire09 FireFactionLarge
      ParticleSysBone    = Fire10 FireFactionLarge
      ParticleSysBone    = Fire11 FireFactionLarge
    End

    ; SNOW RUBBLE *************************************
    ConditionState       = SNOW RUBBLE
      Model              = ZBHospital_RS
    End
    
    ; NIGHT SNOW ************************************
    ConditionState       = NIGHT SNOW
      Model              = ZBHospital_NS
      Animation          = ZBHospital_NS.ZBHospital_NS
      AnimationMode      = LOOP
    End
    
    ; NIGHT SNOW DAMAGED *********************************
    ConditionState       = NIGHT SNOW DAMAGED
      Model              = ZBHospital_DNS
      Animation          = ZBHospital_DNS.ZBHospital_DNS
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmolderingSmoke
      ParticleSysBone    = Smoke02 SmolderingSmoke
      ParticleSysBone    = Smoke03 SmolderingSmoke
      ParticleSysBone    = Smoke04 SmolderingSmoke
      ParticleSysBone    = Smoke05 SmolderingSmoke
      ParticleSysBone    = Smoke06 SmolderingSmoke
      ParticleSysBone    = Smoke07 SmolderingSmoke
      ParticleSysBone    = Smoke08 SmolderingSmoke
      ParticleSysBone    = Smoke09 SmolderingSmoke
      ParticleSysBone    = Fire01 SmolderingFire
      ParticleSysBone    = Fire02 SmolderingFire
      ParticleSysBone    = Fire03 SmolderingFire
      ParticleSysBone    = Fire04 SmolderingFire
      ParticleSysBone    = Fire05 SmolderingFire
      ParticleSysBone    = Fire06 SmolderingFire
      ParticleSysBone    = Fire07 SmolderingFire
      ParticleSysBone    = Fire08 SmolderingFire
      ParticleSysBone    = Fire09 SmolderingFire
    End

    ; NIGHT SNOW REALLYDAMAGED ************************
    ConditionState       = NIGHT SNOW REALLYDAMAGED
      Model              = ZBHospital_ENS
      Animation          = ZBHospital_ENS.ZBHospital_ENS
      AnimationMode      = LOOP
      ParticleSysBone    = Smoke01 SmokeFactionLarge
      ParticleSysBone    = Smoke02 SmokeFactionLarge
      ParticleSysBone    = Smoke03 SmokeFactionLarge
      ParticleSysBone    = Smoke04 SmokeFactionLarge
      ParticleSysBone    = Smoke05 SmokeFactionLarge
      ParticleSysBone    = Smoke06 SmokeFactionLarge
      ParticleSysBone    = Smoke07 SmokeFactionLarge
      ParticleSysBone    = Smoke08 SmokeFactionLarge
      ParticleSysBone    = Smoke09 SmokeFactionLarge
      ParticleSysBone    = Smoke10 SmokeFactionLarge
      ParticleSysBone    = Smoke11 SmokeFactionLarge
      ParticleSysBone    = Fire01 FireFactionLarge
      ParticleSysBone    = Fire02 FireFactionLarge
      ParticleSysBone    = Fire03 FireFactionLarge
      ParticleSysBone    = Fire04 FireFactionLarge
      ParticleSysBone    = Fire05 FireFactionLarge
      ParticleSysBone    = Fire06 FireFactionLarge
      ParticleSysBone    = Fire07 FireFactionLarge
      ParticleSysBone    = Fire08 FireFactionLarge
      ParticleSysBone    = Fire09 FireFactionLarge
      ParticleSysBone    = Fire10 FireFactionLarge
      ParticleSysBone    = Fire11 FireFactionLarge
    End
    
    ; NIGHT SNOW RUBBLE ****************************
    ConditionState       = NIGHT SNOW RUBBLE
      Model              = ZBHospital_R
    End
    
  End

  ; ========================= Flag Model ===============================
  Draw = W3DModelDraw ModuleTag_02
    OkToChangeModelColor = Yes
    
    ; DEFAULT & DAMAGED ************************************************
    ConditionState  = NONE
      Model         = ZBHospital_F
      Animation     = ZBHospital_F.ZBHospital_F
      AnimationMode = LOOP
    End
    AliasConditionState = DAMAGED
    
    ; REALLYDAMAGED ****************************************************
    ConditionState  = REALLYDAMAGED
      Model         = ZBHospital_FE
      Animation     = ZBHospital_FE.ZBHospital_FE
      AnimationMode = LOOP
    End
    
    ; RUBBLE ***********************************************************
    ConditionState  = RUBBLE
      Model         = None
    End
    
  End
  
  ; ------------ New Animations fence -----------------
  Draw = W3DModelDraw ModuleTag_LightingAnimations
  AnimationsRequirePower = No
  
    DefaultConditionState
      Model           = ZBHospital_A1
      Animation       = ZBHospital_A1.ZBHospital_A1
      AnimationMode   = LOOP
    End
    
    ConditionState    = DAMAGED
      Model           = ZBHospital_A1D
      Animation       = ZBHospital_A1D.ZBHospital_A1D
      AnimationMode   = LOOP
    End
    
    ConditionState    = REALLYDAMAGED
      Model           = ZBHospital_A1E
      Animation       = ZBHospital_A1E.ZBHospital_A1E
      AnimationMode   = LOOP
    End
    
    ConditionState    = RUBBLE
      Model           = NONE
    End
    
  End
  
  ; *** AUDIO Parameters ***
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  ; ***DESIGN parameters ***
  DisplayName            = OBJECT:TechHospital
  Side               = Boss
  EditorSorting       = STRUCTURE
  BuildCost         = 2000
  BuildTime         = 25.0           ; in seconds
  EnergyProduction  = -5
  CommandSet        = Boss_HospitalCommandSet
  Prerequisites
    Object = Boss_PowerPlant
    Object = Boss_SupplyCenter
  End
  VisionRange       = 100.0
  ShroudClearingRange    = 100
  ArmorSet
    Conditions           = None
    Armor                = StructureArmor
    DamageFX              = StructureDamageFXNoShake
  End

  ; *** ENGINEERING Parameters ***  
  KindOf                 = STRUCTURE SELECTABLE IMMOBILE CAPTURABLE TECH_BUILDING CONSERVATIVE_BUILDING
  Body                   = ActiveBody ModuleTag_03
    MaxHealth            = 2000.0
    InitialHealth        = 2000.0
  End

  Behavior = FlammableUpdate ModuleTag_04
    FlameDamageLimit      = 20    ; Catch fire if I take this much fire damage...
    FlameDamageExpiration = 2000  ; in a span of this long
    AflameDuration        = 5000  ; If I catch fire, I'll burn for this long...
    AflameDamageAmount    = 25    ; taking this much damage...
    AflameDamageDelay     = 500   ; this often.
  End
  
  Behavior             = FXListDie ModuleTag_05
    DeathFX            = FX_StructureMediumDeath
  End

  Behavior = TransitionDamageFX ModuleTag_06
    ;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ;---------------------------------------------------------------------------------------
    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
  End

  Behavior = TechBuildingBehavior ModuleTag_07
    ;<NO DATA>
  End

  Behavior = AutoHealBehavior ModuleTag_08
    HealingAmount     = 2
    HealingDelay      = 1000 ; msec
    AffectsWholePlayer = Yes
    StartsActive      = Yes
    KindOf            = INFANTRY
  End

  Behavior = FXListDie ModuleTag_09
    DeathFX = FX_BuildingDie
  End

Behavior = StealthUpdate ModuleStealth_10
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes 
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = StealthUpgrade ModuleTag_11
    TriggeredBy = Upgrade_GLACamoNetting
  END

  Geometry              = BOX
  GeometryMajorRadius   = 35.0
  GeometryMinorRadius   = 58.0
  GeometryHeight        = 69.0
  GeometryIsSmall       = No
  Shadow                = SHADOW_VOLUME

End











;------------------------------------------------------------------------------
;China Supply Truck
Object Boss_VehicleSupplyTruck

  ; *** ART Parameters ***
  
  SelectPortrait         = SNSupplyTruck_L
  ButtonImage            = SNSupplyTruck
  
  ;UpgradeCameo1 = NONE
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes
    
    DefaultConditionState
      Model           = NVSSUPPLYTK
      HideSubObject   = Cargo01
    End
    
    ConditionState    = REALLYDAMAGED
      Model           = NVSSUPPLYTK_D
    End
    
    ConditionState    = RUBBLE
      Model           = NVSSUPPLYTK_D
    End
    
    ConditionState    = CARRYING
      ShowSubObject   = Cargo01
    End
    
    ConditionState    = REALLYDAMAGED CARRYING
      Model           = NVSSUPPLYTK_D
      ShowSubObject   = Cargo01
    End
    
    ConditionState    = RUBBLE CARRYING
      Model           = NVSSUPPLYTK_D
      ShowSubObject   = Cargo01
    End
    
    TrackMarks              = EXTireTrack.tga

    LeftFrontTireBone           = Tire01
    RightFrontTireBone          = Tire02
    MidLeftRearTireBone         = Tire03
    MidRightRearTireBone        = Tire04
    LeftRearTireBone            = Tire05
    RightRearTireBone           = Tire06
    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 2.5   ; This speed is added to the rotation speed when powersliding.

    Dust                    = RocketBuggyDust
    DirtSpray               = RocketBuggyDirtSpray
    PowerslideSpray         = RocketBuggyDirtPowerSlide

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:SupplyTruck
  Side                = Boss
  EditorSorting       = VEHICLE
  TransportSlotCount  = 2                 ;how many "slots" we take in a transport (0 == not transportable)
  BuildCost           = 150
  BuildTime           = 4.0      ;in seconds
  VisionRange         = 150
  ShroudClearingRange = 300
  Prerequisites
    Object = Boss_SupplyCenter
  End

  ArmorSet
    Conditions      = None
    Armor           = TruckArmor
    DamageFX        = TankDamageFX
  End
  CrusherLevel            = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel          = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet              = ChinaSupplyTruckCommandSet
  ; *** AUDIO Parameters ***
  VoiceSelect             = SupplyTruckVoiceSelect
  VoiceMove               = SupplyTruckVoiceMove
  VoiceAttack             = NoSound
  SoundMoveStart          = SupplyTruckMoveStart
  SoundMoveStartDamaged = SupplyTruckMoveStart
  UnitSpecificSounds
    VoiceCreate           = SupplyTruckVoiceCreate
    TruckLandingSound     = NoSound
    TruckPowerslideSound  = NoSound
    VoiceSupply           = SupplyTruckVoiceSupply
    VoiceCrush            = SupplyTruckVoiceCrush
    VoiceEnter            = SupplyTruckVoiceMove

  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  ;@todo lorenzen removed the CAN_ATTACK from the chinasupplytruck... ok?
  KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS VEHICLE HARVESTER SCORE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 300.0
    InitialHealth   = 300.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 = 600
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = SupplyTruckAIUpdate ModuleTag_03
    MaxBoxes = 6
    SupplyCenterActionDelay = 400     ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay = 1000 ; ms per box (many small transactions)
    SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home.  (Direct dock command on warehouse overrides, and no max on Center Scan)
    SuppliesDepletedVoice = SupplyTruckVoiceSuppliesDepleted
  End
  Locomotor = SET_NORMAL SupplyTruckLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 5.0
  End

  ExperienceValue    = 50 50 50 50 ;Experience point value at each level

  Behavior = SlowDeathBehavior ModuleTag_05
    DeathTypes = ALL -CRUSHED -SPLATTED
    DestructionDelay = 200
    DestructionDelayVariance = 100
    FX  = FINAL    FX_SupplyTruckExplosionOneFinal
    OCL = FINAL    OCL_ChinaSupplyTruckDeathEffect
  End
    
  Behavior = FXListDie ModuleTag_06
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  
  Behavior = CreateObjectDie ModuleTag_07
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_ChinaSupplyTruck_CrushEffect
  End

  Behavior                       = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_NukeCannonDamageTransition
  End

  Behavior = FlammableUpdate ModuleTag_10
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  ; A crushing defeat
  Behavior = DestroyDie ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  Behavior        = CreateCrateDie ModuleTag_12
    CrateData     = SalvageCrateData
  End

  Behavior = StealthUpdate ModuleTag_09
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Geometry = BOX
  GeometryMajorRadius = 17.0
  GeometryMinorRadius = 7.0
  GeometryHeight = 14.0     
  GeometryIsSmall = No
  Scale = 1.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length    

End


















;------------------------------------------------------------------------------
Object Boss_InfantryWorker

  ; *** ART Parameters ***
  SelectPortrait         = SUWorker_L
  ButtonImage            = SUWorker
  
  UpgradeCameo1 = Upgrade_GLAWorkerShoes
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model         = UIWRKR_SKN
      IdleAnimation = UIWRKR_SKL.UIWRKR_STA 0 9
      IdleAnimation = UIWRKR_SKL.UIWRKR_IDA
      AnimationMode = ONCE
      TransitionKey = TRANS_Stand
    End

    ConditionState  = MOVING
      Animation     = UIWRKR_SKL.UIWRKR_RNA 16
      AnimationMode = LOOP
      Flags         = RANDOMSTART
      TransitionKey = TRANS_Moving
      ParticleSysBone = None InfantryDustTrails
    End
    ; it is legal to be ACTIVELY_CONSTRUCTING and MOVING at the same time,
    ; since we flip the bit once we get pretty close to the target. but it looks
    ; funky to do the construction animation while moving. 
    ; so just use the normal move animation in that case.
    AliasConditionState = ACTIVELY_CONSTRUCTING MOVING

    ConditionState = ATTACKING
      ShowSubObject = MINED_SKIN
      Animation = UIWRKR_SKL.UIWRKR_MS
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey = TRANS_MetalDetector_Standing
    End

    ConditionState = MOVING ATTACKING
      ShowSubObject = MINED_SKIN
      Animation = UIWRKR_SKL.UIWRKR_MSW 50
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey = TRANS_MetalDetector_Moving
      ParticleSysBone = None InfantryDustTrails
    End
    AliasConditionState = MOVING ATTACKING CARRYING

    TransitionState = TRANS_Stand TRANS_MetalDetector_Standing    ;STANDING -> ATTACKING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRB1;take out standing
      AnimationMode = ONCE
    End
    TransitionState = TRANS_MetalDetector_Standing TRANS_Stand    ;ATTACKING -> STANDING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRB2;put away standing
      AnimationMode = ONCE
    End

    TransitionState = TRANS_Carry TRANS_MetalDetector_Standing    ;CARRYING -> ATTACKING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRB1;take out standing
      AnimationMode = ONCE
    End
    TransitionState = TRANS_MetalDetector_Standing TRANS_Carry    ;ATTACKING -> CARRYING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRB2;put away standing
      AnimationMode = ONCE
    End
    TransitionState = TRANS_Carry TRANS_MetalDetector_Moving      ;CARRYING -> MOVING ATTACKING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRC1;take out moving [NEW NON-SKATING ANIMATION]
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 2.0 2.0
    End

    TransitionState = TRANS_MetalDetector_Moving TRANS_Stand      ;MOVING ATTACKING -> STANDING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRB2;put away moving
      AnimationMode = ONCE
    End
    TransitionState = TRANS_Stand TRANS_MetalDetector_Moving      ;STANDING -> MOVING ATTACKING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRC1;take out moving [NEW NON-SKATING ANIMATION]
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 2.0 2.0
    End

    TransitionState = TRANS_Moving TRANS_MetalDetector_Standing   ;MOVING -> ATTACKING [STANDING]
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRB1;take out standing
      AnimationMode = ONCE
    End
    TransitionState = TRANS_MetalDetector_Standing TRANS_Moving   ;ATTACKING [STANDING] -> MOVING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRC2;put away moving [NEW NON-SKATING ANIMATION]
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 2.0 2.0
    End

    TransitionState = TRANS_Moving TRANS_MetalDetector_Moving     ;MOVING -> MOVING ATTACKING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRC1;take out moving [NEW NON-SKATING ANIMATION]
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 2.0 2.0
    End
    TransitionState = TRANS_MetalDetector_Moving TRANS_Moving     ;MOVING ATTACKING -> MOVING
      ShowSubObject = MINED_SKIN
      Animation     = UIWRKR_SKL.UIWRKR_TRC2;put away moving [NEW NON-SKATING ANIMATION]
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 2.0 2.0
    End


    ConditionState = MOVING CARRYING
      ShowSubObject = BOX
      Animation = UIWRKR_SKL.UIWRKR_CARY 12
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey = TRANS_Carry
      ParticleSysBone = None InfantryDustTrails
    End
    ; it is legal to be ACTIVELY_CONSTRUCTING and MOVING at the same time,
    ; since we flip the bit once we get pretty close to the target. but it looks
    ; funky to do the construction animation while moving. 
    ; so just use the normal move animation in that case.
    AliasConditionState = ACTIVELY_CONSTRUCTING MOVING CARRYING

    ConditionState = CARRYING
      ShowSubObject = BOX
      Animation = UIWRKR_SKL.UIWRKR_CARST 30 
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey = TRANS_Carry
    End

    ConditionState = DYING
      Animation = UIWRKR_SKL.UIWRKR_DTA
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End
    AliasConditionState = DYING CARRYING

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = UIWRKR_SKL.UIWRKR_ADTE1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = UIWRKR_SKL.UIWRKR_ADTE2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = UIWRKR_SKL.UIWRKR_ADTE3
      AnimationMode = ONCE
      TransitionKey = None
    End

    ConditionState  = SPECIAL_CHEERING
      Animation     = UIWRKR_SKL.UIWRKR_CHA
      AnimationMode = ONCE
    End
    
    ConditionState  = ACTIVELY_CONSTRUCTING
      Animation     = UIWRKR_SKL.UIWRKR_BDA
      AnimationMode = LOOP
      TransitionKey = TRANS_Constructing
    End
    AliasConditionState = ACTIVELY_CONSTRUCTING CARRYING

    ; --------------------

    TransitionState = TRANS_Stand TRANS_Carry
      ShowSubObject = BOX
      Animation     = UIWRKR_SKL.UIWRKR_PIK
      AnimationMode = ONCE
    End

    TransitionState = TRANS_Carry TRANS_Stand
      ShowSubObject = BOX
      Animation     = UIWRKR_SKL.UIWRKR_PIK
      AnimationMode = ONCE_BACKWARDS
      Flags         = START_FRAME_LAST
    End
    
    TransitionState = TRANS_Stand TRANS_Constructing
      Animation     = UIWRKR_SKL.UIWRKR_TRA1
      AnimationMode = ONCE
    End

    TransitionState = TRANS_Constructing TRANS_Stand
      Animation     = UIWRKR_SKL.UIWRKR_TRA2
      AnimationMode = ONCE
    End
  End

  ; ***DESIGN parameters ***
  DisplayName = OBJECT:Worker
  Side = Boss
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)


  WeaponSet
    Conditions = None 
    Weapon = PRIMARY None
  End
  WeaponSet
    Conditions = MINE_CLEARING_DETAIL 
    Weapon = PRIMARY WorkerMineDisarmingWeapon
  End


  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange = 100
  ShroudClearingRange = 200
 Prerequisites
   Object = Boss_SupplyCenter
 End
  BuildCost = 50
  BuildTime = 1.0          ;in seconds    
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = Boss_WorkerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = WorkerVoiceSelect
  VoiceMove = WorkerVoiceMove
  VoiceAttack = WorkerVoiceMove
  VoiceGuard = WorkerVoiceMove
  VoiceFear = WorkerVoiceFear
  VoiceTaskComplete = WorkerVoiceBuildComplete
  UnitSpecificSounds
    VoiceEnter        = WorkerVoiceMoveUpgraded
    VoiceEnterHostile = WorkerVoiceMoveUpgraded
    VoiceGarrison     = WorkerVoiceGarrison
    VoiceCreate       = WorkerVoiceCreate
    VoiceSupply       = WorkerVoiceSupply
    VoiceNoBuild      = WorkerVoiceBuildNot
    VoiceRepair       = WorkerVoiceRepair
    VoiceDisarm       = WorkerVoiceClearMine
    VoiceBuildResponse = WorkerVoiceBuild
    VoiceGetHealed    = WorkerVoiceMoveUpgraded
    VoiceMoveUpgraded = WorkerVoiceMoveUpgraded
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY SALVAGER DOZER HARVESTER SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = WorkerAIUpdate ModuleTag_03
    RepairHealthPercentPerSecond  = 2%    ; % of max health to repair each second
    BoredTime                     = 5000  ; in milliseconds
    BoredRange                    = 150   ; when bored, we look this far away to do something 
    MaxBoxes                      = 1
    UpgradedSupplyBoost           = 8 ; gives this much more cash for every box collected
    SupplyCenterActionDelay       = 150 ;400 ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay    = 150 ;400 ;ms per box (many small transactions)
    SupplyWarehouseScanDistance   = 700 ;350 ; Max distance to look for a warehouse, or we go home.  (Direct dock command on warehouse overrides, and no max on Center Scan)
    SuppliesDepletedVoice = WorkerVoiceSuppliesDepleted
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    AutoAcquireEnemiesWhenIdle    = Yes
  End
  Locomotor = SET_NORMAL FastHumanLocomotor
  Locomotor = SET_NORMAL_UPGRADED WorkerShoesLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 5.0
  End
 
  Behavior = SquishCollide ModuleTag_06
    ;nothing
  End
  Behavior = LocomotorSetUpgrade ModuleTag_07
    TriggeredBy = Upgrade_GLAWorkerShoes
  End

; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_WorkerDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_WorkerDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireGLA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End
  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End

; --- end Death modules ---

  Behavior = StealthDetectorUpdate ModuleTag_12
    DetectionRate         = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange       = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
    ExtraRequiredKindOf   = MINE  ; we can only detect MINES, not other stealthed things
  End

  Behavior = PoisonedBehavior ModuleTag_13
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End

  Behavior = CommandSetUpgrade ModuleTag_14
    TriggeredBy = Upgrade_GLAWorkerFakeCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerRealCommandSet
    CommandSet = GLAWorkerFakeBuildingsCommandSet
  End
 
  Behavior = CommandSetUpgrade ModuleTag_15
    TriggeredBy = Upgrade_GLAWorkerRealCommandSet
    RemovesUpgrades = Upgrade_GLAWorkerFakeCommandSet Upgrade_GLAWorkerRealCommandSet
    CommandSet = GLAWorkerCommandSet
  End
 
  Behavior = ProductionUpdate ModuleTag_16
    MaxQueueEntries = 1; For the command set switching upgrade
  End

  Behavior = StealthUpdate ModuleTag_09
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  ShadowTexture = ShadowI;
  Scale = 0.94
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
Object Boss_JetAurora

  ; *** ART Parameters ***
  SelectPortrait         = SAAurora_L
  ButtonImage            = SAAurora
  
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model               = AVAurora
      HideSubObject       = BurnerFX03 BurnerFX04
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState        = JETEXHAUST
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburner
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = AVAurora_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End
    
    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = AVAurora_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = AVAurora_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; afterburner
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE
      Model               = AVAurora_D1
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = AVAurora_D1
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Aurora
  EditorSorting       = VEHICLE
  Side                = Boss
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 180.0 
  ShroudClearingRange = 600
  Prerequisites
    Object = Boss_Airfield
  End
  BuildCost           = 2300
  BuildTime           = 5.0          ;in seconds     
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY Nuke_EF2000NukeWeapon
  End
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End

  ExperienceValue = 200 200 400 400   ;Experience point value at each level
  ExperienceRequired = 0 200 400 800  ;Experience points needed to gain each level
  IsTrainable = Yes                   ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet        = AmericaJetAuroraCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = AuroraBomberVoiceSelect
  VoiceMove = AuroraBomberVoiceMove
  VoiceGuard = AuroraBomberVoiceMove
  VoiceAttack = AuroraBomberVoiceAttack
  SoundAmbient = AuroraBomberAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    VoiceCreate          = AuroraBomberVoiceCreate
    SoundEject           = PilotSoundEject
    VoiceEject           = PilotVoiceEject
    Afterburner          = RaptorAfterburner
    VoiceLowFuel         = AuroraBomberVoiceLowFuel
    VoiceGarrison        = AuroraBomberVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 80.0
    InitialHealth   = 80.0
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_AuroraDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_AuroraDeathInitial
    ;OCLInitialDeath                = None
    DelaySecondaryFromInitialDeath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    ;OCLSecondary                   = None
    FXHitGround                     = FX_JetDeathHitGround
    ;OCLHitGround                   = None
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_AuroraDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior = EjectPilotDie ModuleTag_04
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    ExemptStatus = HIJACKED
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_06
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = JetAIUpdate ModuleTag_07
    OutOfAmmoDamagePerSecond    = 10%    ; amount of damage to take per SEC (not per frame) when out of ammo
                                         ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift       = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause                = 500
    MinHeight                   = 5
    SneakyOffsetWhenAttacking   = -20.0  ; this is how far behind us people aim when we are in attack mode
    AttackLocomotorType         = SET_SUPERSONIC
    AttackLocomotorPersistTime  = 100    ; we start slowing down almost immediately
    AttackersMissPersistTime    = 2000   ; but remain untargetable fer a bit longer
    ReturnForAmmoLocomotorType  = SET_SLUGGISH
    ReturnToBaseIdleTime        = 10000         ; if idle for this long, return to base, even if not out of ammo
  End
  Locomotor = SET_NORMAL      AuroraJetLocomotor
  Locomotor = SET_SUPERSONIC  AuroraJetSupersonicLocomotor
  Locomotor = SET_SLUGGISH    AuroraJetSluggishLocomotor
  Locomotor = SET_TAXIING     BasicJetTaxiLocomotor

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 50%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior                 = TransitionDamageFX ModuleTag_22
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = AirF_PointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 0
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 1.0
  End

  Behavior = StealthUpdate ModuleTag_09
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Geometry                 = Box
  GeometryIsSmall          = Yes
  GeometryMajorRadius      = 14.0
  GeometryMinorRadius      = 7.0
  GeometryHeight           = 5.0
  Shadow                   = SHADOW_VOLUME
  ShadowSizeX              = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End

;--------------------------------------------------------------------------
Object Boss_JetMIG

  ; *** ART Parameters ***
  SelectPortrait         = SNMig_L
  ButtonImage            = SNMig
  
  UpgradeCameo1 = Upgrade_ChinaAircraftArmor
  ;UpgradeCameo2 = NONE
  UpgradeCameo3 = Upgrade_ChinaTacticalNukeMig
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes

    DefaultConditionState
      Model               = NVMIG
      HideSubObject       = BurnerFX01 BurnerFX02
      WeaponLaunchBone    = PRIMARY WeaponA
    End

    ConditionState        = JETEXHAUST
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState       = JETEXHAUST JETAFTERBURNER
      ShowSubObject      = BurnerFX01 BurnerFX02
      ParticleSysBone     = Exhaust01 JetExhaust
      ParticleSysBone     = Exhaust02 JetExhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED
      Model               = NVMIG_D
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE
      Model               = NVMIG_D
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = NVMIG_D
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = NVMIG_D
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      ; @todo srj -- model missing
      ;Model              = NVMIG_D1B
      Model               = NVMIG_D
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

  End

  ; ***DESIGN parameters ***
  DisplayName             = OBJECT:MiG
  EditorSorting           = VEHICLE
  Side                    = Boss
  TransportSlotCount      = 0          ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange             = 200.0 
  ShroudClearingRange     = 300.0

  Prerequisites
    Object                = Boss_Airfield
  End

  WeaponSet
    Conditions        = None 
    Weapon            = PRIMARY     NapalmMissileWeapon
    Weapon            = SECONDARY   BlackNapalmMissileWeapon
;   AutoChooseSources = PRIMARY     NONE
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon            = PRIMARY     Nuke_NukeMissileWeapon
;   AutoChooseSources = PRIMARY     NONE
  End

  ArmorSet
    Conditions           = None
    Armor                = AirplaneArmor
    DamageFX             = None
  End

  BuildCost               = 900
  BuildTime               = 3   
  ExperienceValue         = 50 50 100 150   ;Experience point value at each level
  ExperienceRequired      = 0 100 200 400  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet             = ChinaJetMIGCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect             = MigVoiceSelect
  VoiceMove               = MigVoiceMove
  VoiceAttack             = MigVoiceAttack
  VoiceAttackAir          = MigVoiceAttackAir
  VoiceGuard              = MigVoiceAirPatrol
  SoundAmbient            = MigAmbientLoop
  UnitSpecificSounds
    VoiceCreate           = MigVoiceCreate
    Afterburner           = RaptorAfterburner
    VoiceGarrison         = MigVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority          = UNIT
  KindOf                 = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body                   = ActiveBody ModuleTag_02
    MaxHealth            = 220.0
    InitialHealth        = 220.0
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_MIGDeathFinalBlowUp
    DestructionDelay                = 99999999  ; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100%      ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%    ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_MigDeathInitial
    OCLInitialDeath                 = OCL_MIGDeathInitial
    DelaySecondaryFromInitialDeath  = 500       ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = OCL_MIGDeathSecondary
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_MIGDeathHitGround
    DelayFinalBlowUpFromHitGround   = 200       ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_MIGDeathFinalBlowUp
  End

  Behavior = WeaponSetUpgrade ModuleTag_04
    TriggeredBy = Upgrade_ChinaTacticalNukeMig
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  Behavior = JetAIUpdate ModuleTag_06
    OutOfAmmoDamagePerSecond  = 10%     ; amount of damage to take per SEC (not per frame) when out of ammo
                                        ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
  End

  Locomotor = SET_NORMAL MIGLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor


  Behavior = FlammableUpdate ModuleTag_07
    AflameDuration = 5000        ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500      ; this often.
  End

  Behavior                       = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior        = MaxHealthUpgrade ModuleTag_09
    TriggeredBy   = Upgrade_ChinaAircraftArmor
    AddMaxHealth  = 40.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = AirF_PointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 0
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 1.0
  End

  Behavior = StealthUpdate ModuleTag_10
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End


  Geometry                 = Box
  GeometryIsSmall          = Yes
  GeometryMajorRadius      = 14.0
  GeometryMinorRadius      = 7.0
  GeometryHeight           = 5.0
  Shadow                   = SHADOW_VOLUME
  
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object Boss_JetRaptor

  ; *** ART Parameters ***
  SelectPortrait         = SAKingRap_L
  ButtonImage            = SAKingRap
  
  UpgradeCameo1 = Upgrade_AmericaLaserMissiles
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw                   = W3DModelDraw ModuleTag_01
    ExtraPublicBone = WeaponA01
    DefaultConditionState
      Model               = AVRaptorAG
      HideSubObject       = BurnerFX01 BurnerFX02
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState        = JETEXHAUST
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = AVRaptorAG_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End
    
    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = AVRaptorAG_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = AVRaptorAG_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE
      Model               = AVRaptor_D1B
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = AVRaptor_D1B
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    OkToChangeModelColor = Yes

  End

  ; ***DESIGN parameters ***
  DisplayName             = OBJECT:KingRaptor
  EditorSorting           = VEHICLE
  Side                    = Boss
  TransportSlotCount      = 0 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange             = 180.0 
  ShroudClearingRange     = 400
  Prerequisites
    Object                = Boss_Airfield
  End

  WeaponSet
    Conditions            = NONE
    Weapon                = PRIMARY SpectreGattlingGun
    Weapon                = SECONDARY AirF_RaptorJetMissileWeapon
  End
  WeaponSet
    Conditions            = PLAYER_UPGRADE 
    Weapon                = PRIMARY SpectreGattlingGun
    Weapon                = SECONDARY AirF_RaptorJetLaserGuidedMissileWeapon
  End
  ArmorSet
    Conditions            = None
    Armor                 = AirplaneArmor
    DamageFX              = None
  End

  BuildCost               = 1250
  BuildTime               = 5   
  ExperienceValue         = 50 50 100 150  ;Experience point value at each level
  ExperienceRequired      = 0 100 200 400   ;Experience points needed to gain each level
  IsTrainable             = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet              = AmericaJetRaptorCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect            = RaptorVoiceSelect
  VoiceMove              = RaptorVoiceMove
  VoiceAttack            = RaptorVoiceAttack
  VoiceAttackAir         = RaptorVoiceAttackAir
  VoiceGuard             = RaptorVoiceAirPatrol
  SoundAmbient           = RaptorAmbientLoop
  SoundAmbientRubble     = NoSound
  ; SoundMoveLoop          = RaptorAmbientLoop  ; don't want sound while sitting at airfield
  ; SoundAmbient           = NoSound
  UnitSpecificSounds
    VoiceCreate          = RaptorVoiceCreate
    SoundEject           = PilotSoundEject
    VoiceEject           = PilotVoiceEject
    Afterburner          = RaptorAfterburner
    VoiceLowFuel         = RaptorVoiceLowFuel
    VoiceGarrison        = RaptorVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority          = UNIT
  KindOf                 = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body                   = ActiveBody ModuleTag_02
    MaxHealth            = 450.0
    InitialHealth        = 450.0
  End

  Behavior                = WeaponSetUpgrade ModuleTag_03
    TriggeredBy          = Upgrade_AmericaLaserMissiles
  End
  Behavior = ExperienceScalarUpgrade ModuleTag_04
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_05
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_RaptorDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_RaptorDeathInitial
    OCLInitialDeath                 = OCL_RaptorDeathInitial
    DelaySecondaryFromInitialDeath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = OCL_RaptorDeathSecondary
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_RaptorDeathHitGround
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_RaptorDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior                    = EjectPilotDie ModuleTag_06
    ExemptStatus         = HIJACKED
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End
  
  Behavior               = PhysicsBehavior ModuleTag_07
    Mass                 = 500.0
  End

  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond  = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ParkingOffset             = 3             ; scooch it a little forward so the tail doesn't hit the doors
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
  End
  Locomotor = SET_NORMAL RaptorJetLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End
  Behavior = PointDefenseLaserUpdate ModuleTag_22
    WeaponTemplate        = AirF_RaptorPointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 10
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 2.0
  End
  Behavior = StealthDetectorUpdate ModuleTag_23
    DetectionRate   = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End

  Behavior = StealthUpdate ModuleTag_24
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Geometry                 = Box
  GeometryIsSmall          = Yes
  GeometryMajorRadius      = 14.0
  GeometryMinorRadius      = 7.0
  GeometryHeight           = 5.0
  Shadow                   = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length.

End

;------------------------------------------------------------------------------
Object Boss_JetStealthFighter

  ; *** ART Parameters ***
  SelectPortrait         = SAStealth_L
  ButtonImage            = SAStealth
  
  UpgradeCameo1 = Upgrade_AmericaLaserMissiles
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  UpgradeCameo4 = Upgrade_AmericaBunkerBusters
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model                           = AVStealth
      HideSubObject                   = BurnerFX03 BurnerFX04
      WeaponLaunchBone  = PRIMARY WeaponA
    End
    
    ConditionState        = JETEXHAUST
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburners
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = AVStealth_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = AVStealth_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = AVStealth_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburners
      ShowSubObject       = BurnerFX03 BurnerFX04
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = RUBBLE
      Model               = AVStealth_D1
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = AVStealth_D1
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End
    
    OkToChangeModelColor = Yes

  End

  ; ***DESIGN parameters ***
  DisplayName           = OBJECT:StealthFighter
  EditorSorting         = VEHICLE
  Side                  = Boss
  TransportSlotCount    = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange           = 180.0 
  ShroudClearingRange   = 300.0
  Prerequisites
    Object = Boss_Airfield
  End
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY SupW_AuroraFuelBombWeapon
  End
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End

  BuildCost           = 2800
  BuildTime           = 10.0            ;in seconds  
  ExperienceValue     = 100 100 200 300 ;Experience point value at each level
  ExperienceRequired  = 0 200 300 600   ; Experience points needed to gain each level
  IsTrainable         = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = AmericaJetStealthFighterCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect     = StealthFighterVoiceSelect
  VoiceMove       = StealthFighterVoiceMove
  VoiceAttack     = StealthFighterVoiceAttack
  VoiceAttackAir  = StealthFighterVoiceAttackAir
  VoiceGuard      = StealthFighterVoiceAirPatrol
  SoundAmbient    = StealthFighterAmbientLoop
  SoundAmbientRubble    = NoSound
  SoundStealthOn  = StealthOn
  SoundStealthOff = StealthOff
  UnitSpecificSounds
    VoiceCreate   = StealthFighterVoiceCreate
    SoundEject    = PilotSoundEject
    VoiceEject    = PilotVoiceEject
    Afterburner   = RaptorAfterburner
    VoiceLowFuel  = AuroraBomberVoiceLowFuel
    VoiceGarrison = StealthFighterVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = LOCAL_UNIT_ONLY
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 120.0
    InitialHealth   = 120.0
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_StealthDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_StealthFighterDeathInitial
    ;OCLInitialDeath                = None
    DelaySecondaryFromInitialDeath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    ;OCLSecondary                   = None
    FXHitGround                     = FX_JetDeathHitGround
    ;OCLHitGround                   = None
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_StealthDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior = EjectPilotDie ModuleTag_04
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    ExemptStatus = HIJACKED
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End
 
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  Behavior = JetAIUpdate ModuleTag_06
    OutOfAmmoDamagePerSecond = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause           = 500
    MinHeight              = 5
    ReturnToBaseIdleTime   = 10000         ; if idle for this long, return to base, even if not out of ammo
  End

  Behavior = WeaponSetUpgrade ModuleTag_07
    TriggeredBy = Upgrade_AmericaLaserMissiles
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_08
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = StealthUpdate ModuleTag_09
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Locomotor = SET_NORMAL StealthJetLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = FlammableUpdate ModuleTag_11
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior                 = TransitionDamageFX ModuleTag_12
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = AirF_PointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 0
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 1.0
  End


  Geometry = Cylinder
  GeometryIsSmall = Yes
  GeometryMajorRadius = 7.0
  GeometryMinorRadius = 7.0
  GeometryHeight = 7.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object Boss_VehicleComanche

  ; *** ART Parameters ***
  SelectPortrait         = SACCommanche_L
  ButtonImage            = SACCommanche
  
  UpgradeCameo1 = Upgrade_ComancheRocketPods
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    DefaultConditionState
      Model                           = AVComanche
      HideSubObject                   = MissileUpgrade
      Animation                       = AVComanche.AVComanche
      AnimationMode                   = LOOP
      WeaponMuzzleFlash               = PRIMARY TurretFX
      WeaponFireFXBone                = PRIMARY Muzzle
      WeaponFireFXBone                = SECONDARY Muzzle
      WeaponLaunchBone  = SECONDARY Muzzle
    End

    ConditionState = REALLYDAMAGED
      Model                           = AVComanche_d
      Animation                       = AVComanche_d.AVComanche_d
      AnimationMode                   = LOOP
    End

    ConditionState = WEAPONSET_PLAYER_UPGRADE
      ShowSubObject                   = MissileUpgrade
      Animation                       = AVComanche.AVComanche
      AnimationMode                   = LOOP
      WeaponFireFXBone                = TERTIARY WeaponB
      WeaponLaunchBone  = TERTIARY WeaponB
    End

    ConditionState = WEAPONSET_PLAYER_UPGRADE REALLYDAMAGED
      Model                           = AVComanche_d
      ShowSubObject                   = MissileUpgrade
      Animation                       = AVComanche_d.AVComanche_d
      AnimationMode                   = LOOP
      WeaponFireFXBone                = TERTIARY WeaponB
      WeaponLaunchBone  = TERTIARY WeaponB
    End

    ConditionState = RUBBLE
      Model                           = AVComanche_d
      Animation                       = AVComanche_d.AVComanche_d
      AnimationMode                   = LOOP
    End

    ConditionState = RUBBLE SPECIAL_DAMAGED
      Model                           = AVComanche_d
      HideSubObject                   = AVComanche_Prop
    End

    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Comanche
  EditorSorting       = VEHICLE
  Side                = Boss
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 200.0 
  ShroudClearingRange = 600
  Prerequisites
    Object            = Boss_Airfield
  End

  WeaponSet
    Conditions          = None 
    ; -----
    Weapon              = PRIMARY     GattlingBuildingGun
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   A+AntiTankMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    NONE
  End
  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    ; -----
    Weapon              = PRIMARY     GattlingBuildingGun
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = SECONDARY   A+AntiTankMissileWeapon
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE
    AutoChooseSources   = SECONDARY   FROM_PLAYER FROM_SCRIPT FROM_AI
    ; -----
    Weapon              = TERTIARY    ComancheRocketPodWeapon
    AutoChooseSources   = TERTIARY    NONE
  End
  ArmorSet
    Conditions      = None
    Armor           = ComancheArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresComancheArmor
    DamageFX              = None
  End
  BuildCost           = 500
  BuildTime           = 7               ; in seconds  
  ExperienceValue     = 50 50 100 200   ; Experience point value at each level
  ExperienceRequired  = 0 100 200 400   ; Experience points needed to gain each level
  IsTrainable         = Yes             ; Can gain experience
  CommandSet          = AmericaVehicleComancheCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect           = ComancheVoiceSelect
  VoiceMove             = ComancheVoiceMove
  VoiceGuard            = ComancheVoiceMove
  VoiceAttack           = ComancheVoiceAttack
  SoundAmbient          = ComancheAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate         = ComancheVoiceCreate
    SoundEject          = PilotSoundEject
    VoiceEject          = PilotVoiceEject
    Afterburner         = RaptorAfterburner
    VoiceGarrison       = ComancheVoiceMove
    TurretMoveStart     = NoSound
    TurretMoveLoop      = NoSound
    VoiceFireRocketPods = ComancheVoiceAttackRocket
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority   = UNIT
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT PRODUCED_AT_HELIPAD

  Behavior = WeaponSetUpgrade ModuleTag_02
    TriggeredBy = Upgrade_ComancheRocketPods
  End
  Behavior = ExperienceScalarUpgrade ModuleTag_03
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Body = ActiveBody ModuleTag_04
    MaxHealth       = 350.0
    InitialHealth   = 350.0
  End

  Behavior = FXListDie ModuleTag_05
    DeathFX = FX_ComancheStartDeath
  End

  Behavior = JetAIUpdate ModuleTag_06
    MinHeight                     = 5
    NeedsRunway                   = No
    KeepsParkingSpaceWhenAirborne = No
    AutoAcquireEnemiesWhenIdle    = Yes
    ; note that comanches do not return to base when idle
    
    ; this is a bit of a trick... normally, units cannot move-and-fire at
    ; the same time. we need the comanche to be able to. so we give it
    ; a "turret" (invisible) and put the two main weapons on it, but with
    ; no turn rate. voila!
    Turret
      TurretTurnRate = 0      ; this "turret" does not turn
      TurretPitchRate = 0     ; nor does it pitch
      ControlledWeaponSlots = PRIMARY SECONDARY
    End

  End
  Locomotor = SET_NORMAL  ComancheLocomotor
  Locomotor = SET_TAXIING BasicHelicopterTaxiLocomotor

  Behavior = PhysicsBehavior ModuleTag_07
    Mass = 50.0
  End
  Behavior = HelicopterSlowDeathBehavior ModuleTag_08
    DestructionDelay                = 99999999        ; the destruction delay
    SpiralOrbitTurnRate             = 140.0           ; in degrees per second, bigger # = tighter spiral
    SpiralOrbitForwardSpeed         = 350.0           ; bigger # = larger spiral
    SpiralOrbitForwardSpeedDamping  = .9999           ; smaller #'s = slow down faster
    MaxBraking                      = 190   ; max braking we can use during death spiral (lower num = wilder spiral)    
    SoundDeathLoop                  = ComancheDamagedLoop
    MinSelfSpin                     = 100                     ; in degrees per second
    MaxSelfSpin                     = 300                     ; in degrees per second
    SelfSpinUpdateDelay             = 100             ; in milliseconds
    SelfSpinUpdateAmount            = 10             ; in degrees   
    FallHowFast                     = 12.0%  ; fraction of gravity, lower = take longer to fall
    MinBladeFlyOffDelay             = 1500            ; in milliseconds
    MaxBladeFlyOffDelay             = 1500            ; in milliseconds
    AttachParticle                  = SootySmokeTrail
    AttachParticleBone              = Propeller02
    BladeObjectName                 = ComancheBlades
    BladeBoneName                   = Propeller01    
    ; Most things that eject pilots do so immediately upon death,
    ; via use of EjectPilotDie, but Helicopters are a special case...
    ; they need to do so after their blades are ejected. 
    OCLEjectPilot                   = OCL_EjectPilotViaParachute
    FXBlade                         = FX_HelicopterBladeExplosion
    OCLBlade                        = OCL_HelicopterBladeExplosion
    FXHitGround                     = FX_HelicopterHitGround
    OCLHitGround                    = OCL_HelicopterHitGround
    FXFinalBlowUp                   = FX_GroundedHelicopterBlowUp
    OCLFinalBlowUp                  = OCL_GroundedHelicopterBlowUp
    DelayFromGroundToFinalDeath     = 1500
    FinalRubbleObject               = ComancheRubbleHull
  End

  Behavior = TransitionDamageFX ModuleTag_09
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuousDown
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_ComancheDamageTransition
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 3     ; Number of times the volleys will fire before reloading
    ReloadTime            = 4000  ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

  Behavior = FlammableUpdate ModuleTag_11
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = StealthUpdate ModuleTag_12
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY ATTACKING USING_ABILITY
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = No
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior = StealthUpgrade ModuleTag_13
    TriggeredBy = AirF_Upgrade_StealthComanche
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = AirF_PointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 0
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 1.0
  End

  Geometry = BOX
  GeometryMajorRadius = 20.0
  GeometryMinorRadius = 3.0
  GeometryHeight = 25.0     
  GeometryIsSmall = No
  Shadow = SHADOW_VOLUME    
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End














;------------------------------------------------------------------------------
Object Boss_VehicleChinook

  ; *** ART Parameters ***
  SelectPortrait         = SAChinook_L
  ButtonImage            = SAChinook
  
  ;UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw                         ModuleTag_01 ; Helicopter 

    ExtraPublicBone = RopeStart
    ExtraPublicBone = RopeEnd

    DefaultConditionState
      Model = AVChinook
      Animation = AVChinook.AVChinook
      AnimationMode = LOOP
    End

    ConditionState = REALLYDAMAGED
      Model = AVChinook_d
      Animation = AVChinook_d.AVChinook_d
      AnimationMode = LOOP
    End

    ConditionState = RUBBLE
      Model = AVChinook_d
      Animation = AVChinook_d.AVChinook_d
      AnimationMode = LOOP
    End

    ConditionState = RUBBLE SPECIAL_DAMAGED
      Model = AVChinook_d
      HideSubObject = Props01
      HideSubObject = Props02
    End

    OkToChangeModelColor = Yes
  End

  Draw = W3DModelDraw                         ModuleTag_02 ; Cargo net 
    ConditionState = NONE
      Model = None  ; Nothing here
      TransitionKey = TRANS_Empty
      WaitForStateToFinishIfPossible = TRANS_Unloading
    End

    ConditionState = DYING 
      Model = None  ; Nothing here
    End
    AliasConditionState = RUBBLE
    AliasConditionState = CARRYING RUBBLE
    AliasConditionState = DOCKING RUBBLE
    AliasConditionState = DOCKING CARRYING RUBBLE
 
     ConditionState = CARRYING
      Model = AVChinook_A ;Carrying a full wobbly net of stuff
      Animation = AVChinook_A.AVChinook_A
      AnimationMode = LOOP
      TransitionKey = TRANS_Full
      WaitForStateToFinishIfPossible = TRANS_PickingUp
    End

    ConditionState = DOCKING
      Model = AVChinook_A1MSH ;Lowering an empty net, pulling up with stuff
      Animation = AVChinook_A1SK.AVChinook_A1
      AnimationMode = ONCE_BACKWARDS
      Flags = START_FRAME_LAST
      AnimationSpeedFactorRange = .75 .75
      TransitionKey = TRANS_PickingUp
      WaitForStateToFinishIfPossible = TRANS_Unloading  ;Trick.  Without hardcoding the difference between what we are docking with, need to use DOCKING for both.
    End

    ConditionState = DOCKING CARRYING
      Model = AVChinook_A1MSH ; Lowering a full net, letting stuff fall out, and pulling up an empty net
      Animation = AVChinook_A1SK.AVChinook_A1
      AnimationMode = ONCE
      AnimationSpeedFactorRange = 2.75 2.75
      TransitionKey = TRANS_Unloading
      WaitForStateToFinishIfPossible = TRANS_PickingUp  ;Trick.  Without hardcoding the difference between what we are docking with, need to use DOCKING for both.
    End
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Chinook
  EditorSorting       = VEHICLE
  Side                = Boss
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 300.0 
  ShroudClearingRange = 600
  BuildCost           = 250
  BuildTime           = 5.0          ;in seconds  
  Prerequisites
    Object = Boss_SupplyCenter
  End
  ExperienceValue     = 50 50 50 50 ;Experience point value at each level
  IsTrainable         = No  
  CommandSet          = AmericaVehicleChinookCommandSet
  ArmorSet
    Conditions      = None
    Armor           = ChinookArmor
    DamageFX        = None
  End

  ; *** AUDIO Parameters ***
  VoiceSelect     = ChinookVoiceSelect
  VoiceMove       = ChinookVoiceMove
  VoiceAttack     = ChinookVoiceAttack
  SoundAmbient    = ChinookAmbientLoop
  SoundAmbientRubble    = NoSound
  SoundEnter      = HumveeEnter
  SoundExit       = HumveeExit
  UnitSpecificSounds
    VoiceCreate         = ChinookVoiceCreate
    VoiceSupply         = ChinookVoiceSupply
    VoiceUnload         = ChinookVoiceUnload
    VoiceCombatDrop     = ChinookVoiceCombatDrop
    VoiceClearBuilding  = RangerVoiceClearBuilding ;Special combat drop that clears buildings!
    VoiceGarrison       = ChinookVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = UNIT
  ; note that, although Chinooks aren't produced at helipads, we want to set this KINDOF so that they can land at
  ; (well, "near" actually) an Airfield to get healed...
  ; also note that we should NOT set CAN_ATTACK for chinooks. they can't attack. so there.
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS SELECTABLE VEHICLE TRANSPORT AIRCRAFT HARVESTER SCORE PRODUCED_AT_HELIPAD

  Body = ActiveBody ModuleTag_03
    MaxHealth       = 300.0
    InitialHealth   = 300.0
  End

  Behavior = FXListDie ModuleTag_05
    DeathFX = FX_HelicopterStartDeath
  End

  Behavior                       = TransitionDamageFX ModuleTag_06
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuousDown
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_ComancheDamageTransition
  End

  Behavior = ChinookAIUpdate ModuleTag_07
    MaxBoxes                = 10
    SupplyCenterActionDelay = 2900 ;3000     ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay = 1200 ;1250  ; 875 ; ms per box (many small transactions)
    SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home.  (Direct dock command on warehouse overrides, and no max on Center Scan)
    SuppliesDepletedVoice = ChinookVoiceSuppliesDepleted
    NumRopes                = 4
    ; these define how long we can wait, once a guy is on-rope, before throwing another
    ; guy onto that same rope. (Hint: you don't want to use zero.) Omit entirely
    ; and we'll wait for each guy to clear before spawning another.
    PerRopeDelayMin         = 900
    PerRopeDelayMax         = 1500
    RopeWidth               = 0.5
    RopeColor               = R:0 G:0 B:0
    RopeWobbleLen           = 10
    RopeWobbleAmplitude     = 0.25
    RopeWobbleRate          = 180
    RopeFinalHeight         = 10    ; stop this far above ground
    RappelSpeed             = 30
    MinDropHeight           = 40    ; if dropping into a tall bldg, go at least this far above it
    UpgradedSupplyBoost     = 60    ; increase in value of the crates when supply lines has been upgraded
  End
  Locomotor = SET_NORMAL    ChinookLocomotor
  Locomotor = SET_TAXIING   BasicHelicopterTaxiLocomotor

  Behavior = TransportContain ModuleTag_08
    Slots                 = 10
    DamagePercentToUnits  = 100%
    AllowInsideKindOf     = INFANTRY VEHICLE
    ForbidInsideKindOf    = AIRCRAFT HUGE_VEHICLE
    ExitDelay             = 100
    NumberOfExitPaths     = 1
  End
  Behavior = PhysicsBehavior ModuleTag_09
    Mass = 50.0
  End
  Behavior = HelicopterSlowDeathBehavior ModuleTag_10
    DestructionDelay                = 99999999        ; the destruction delay
    SpiralOrbitTurnRate             = 140.0           ; in degrees per second, bigger # = tighter spiral
    SpiralOrbitForwardSpeed         = 350.0           ; bigger # = larger spiral
    SpiralOrbitForwardSpeedDamping  = .9999           ; smaller #'s = slow down faster
    MaxBraking                      = 190   ; max braking we can use during death spiral (lower num = wilder spiral)    
    SoundDeathLoop                  = ComancheDamagedLoop
    MinSelfSpin                     = 100                     ; in degrees per second
    MaxSelfSpin                     = 300                     ; in degrees per second
    SelfSpinUpdateDelay             = 100                     ; in milliseconds
    SelfSpinUpdateAmount            = 10                      ; in degrees   
    FallHowFast                     = 12.0%                   ; fraction of gravity, lower = take longer to fall
    MinBladeFlyOffDelay             = 1500                    ; in milliseconds
    MaxBladeFlyOffDelay             = 1500                    ; in milliseconds
    AttachParticle                  = SootySmokeTrail
    AttachParticleBone              = Propeller02
    BladeObjectName                 = ComancheBlades
    BladeBoneName                   = Propeller01    
    FXBlade                         = FX_HelicopterBladeExplosion
    OCLBlade                        = OCL_HelicopterBladeExplosion
    FXHitGround                     = FX_HelicopterHitGround
    OCLHitGround                    = OCL_HelicopterHitGround
    FXFinalBlowUp                   = FX_GroundedHelicopterBlowUp
    OCLFinalBlowUp                  = OCL_GroundedHelicopterBlowUp
    DelayFromGroundToFinalDeath     = 30
    FinalRubbleObject               = ChinookRubbleHull
  End

  Behavior = FlammableUpdate ModuleTag_11
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = StealthUpdate ModuleTag_12
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Geometry              = BOX
  GeometryMajorRadius   = 20.0
  GeometryMinorRadius   = 6.0
  GeometryHeight        = 12.0     
  GeometryIsSmall       = No
  Scale = 1.05
  Shadow                = SHADOW_VOLUME    
  ShadowSizeX           = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End


;------------------------------------------------------------------------------
Object Boss_InfantryColonelBurton

  ; *** ART Parameters ***
  SelectPortrait         = SABurton_L
  ButtonImage            = SABurton
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaChemicalSuits

  Draw = W3DModelDraw ModuleTag_01
  OkToChangeModelColor = Yes

    ; idle
    DefaultConditionState
      Model               = AIHERO_SKN
      IdleAnimation       = AIHERO_SKL.AIHERO_STA 0 25
      IdleAnimation       = AIHERO_SKL.AIHERO_IDA
      IdleAnimation       = AIHERO_SKL.AIHERO_IDB
      AnimationMode       = ONCE
      TransitionKey       = TRANS_Stand
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponMuzzleFlash   = SECONDARY NONE
      HideSubObject     = MUZZLEFX01
    End
 
    
    ; injured idle
    ConditionState        = REALLYDAMAGED
      IdleAnimation       = AIHERO_SKL.AIHERO_ISTA 0 30
      IdleAnimation       = AIHERO_SKL.AIHERO_IIDA
      IdleAnimation       = AIHERO_SKL.AIHERO_IIDB
      AnimationMode       = ONCE
      TransitionKey       = TRANS_StandInjured
    End


    TransitionState     = TRANS_Stand TRANS_StandInjured
      Animation         = AIHERO_SKL.AIHERO_ISTAHIT
      AnimationMode     = ONCE
    End
    
    ; moving
    ConditionState        = MOVING
      Animation           = AIHERO_SKL.AIHERO_RNA 26
      AnimationMode       = LOOP
      Flags               = RANDOMSTART
      TransitionKey       = TRANS_Walking
      ParticleSysBone     = None InfantryDustTrails
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = MOVING FIRING_B
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B
    AliasConditionState = MOVING RELOADING_B

    ; injured moving
    ConditionState     = MOVING REALLYDAMAGED
      Animation        = AIHERO_SKL.AIHERO_IRNA 26
      AnimationMode    = LOOP
      Flags            = RANDOMSTART
      TransitionKey    = TRANS_WalkingInjured
      ParticleSysBone  = None InfantryDustTrails
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = MOVING FIRING_A REALLYDAMAGED
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
    AliasConditionState = MOVING RELOADING_A REALLYDAMAGED
    AliasConditionState = MOVING FIRING_B REALLYDAMAGED
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
    AliasConditionState = MOVING RELOADING_B REALLYDAMAGED

    ; Firing animation
    ConditionState      = FIRING_A
      Animation         = AIHERO_SKL.AIHERO_ATA
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 1.5 1.5
      TransitionKey     = TRANS_FiringA
    End

    ConditionState      = BETWEEN_FIRING_SHOTS_A
      Animation         = AIHERO_SKL.AIHERO_ATA
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      WaitForStateToFinishIfPossible = TRANS_FiringA
    End
    AliasConditionState = RELOADING_A

    ; Injured Firing animation
    ConditionState      = FIRING_A REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATA
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 1.5 1.5
      TransitionKey     = TRANS_FiringAInjured
    End

    ConditionState      = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATA
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      WaitForStateToFinishIfPossible = TRANS_FiringAInjured
    End
    AliasConditionState = RELOADING_A REALLYDAMAGED

    TransitionState     = TRANS_FiringA TRANS_FiringAInjured
      Animation         = AIHERO_SKL.AIHERO_IATAHIT
      AnimationMode     = ONCE
    End

    ; Placing charge animation
    ConditionState      = UNPACKING
      Animation         = AIHERO_SKL.AIHERO_ATB1
      AnimationMode     = ONCE
    End
    AliasConditionState = MOVING UNPACKING

    ; Injured Placing charge animation
    ConditionState      = UNPACKING REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATB1
      AnimationMode     = ONCE
    End
    AliasConditionState = MOVING UNPACKING REALLYDAMAGED

    ; Stab animations
    ConditionState      = PREATTACK_B 
      Animation         = AIHERO_SKL.AIHERO_ATC
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Stabbing
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = PREATTACK_B MOVING
    AliasConditionState = PREATTACK_B FIRING_B
    AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B

    ConditionState      = FIRING_B
      Animation         = AIHERO_SKL.AIHERO_ATC
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_Stabbing
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_B
    AliasConditionState = RELOADING_B

    TransitionState     = TRANS_Stabbing TRANS_Stand
      Animation         = AIHERO_SKL.AIHERO_ATC2
      AnimationMode     = ONCE
    End

    ; Injured Stab animations
    ConditionState      = PREATTACK_B REALLYDAMAGED 
      Animation         = AIHERO_SKL.AIHERO_IATC1
      AnimationMode     = ONCE
      TransitionKey     = TRANS_StabbingInjured
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = PREATTACK_B MOVING REALLYDAMAGED
    AliasConditionState = PREATTACK_B FIRING_B REALLYDAMAGED
    AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B REALLYDAMAGED

    ConditionState      = FIRING_B REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_IATC2
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_StabbingInjured
      HideSubObject     = MUZZLEFX01
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
    AliasConditionState = RELOADING_B REALLYDAMAGED

    TransitionState     = TRANS_StabbingInjured TRANS_StandInjured
      Animation         = AIHERO_SKL.AIHERO_IATC2
      AnimationMode     = ONCE
    End

    ; cheering
    ConditionState      = SPECIAL_CHEERING
      Animation         = AIHERO_SKL.AIHERO_CHA
      AnimationMode     = ONCE
    End
    
    ; injured cheering
    ConditionState      = SPECIAL_CHEERING REALLYDAMAGED
      Animation         = AIHERO_SKL.AIHERO_ICHA
      AnimationMode     = ONCE
    End
    
    ; climbing
    ConditionState      = CLIMBING
      Animation         = AIHERO_SKL.AIHERO_CLMID
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Climbing
    End
    AliasConditionState = RAPPELLING
    AliasConditionState = CLIMBING REALLYDAMAGED
    AliasConditionState = RAPPELLING REALLYDAMAGED

    ConditionState      = CLIMBING MOVING
      Animation         = AIHERO_SKL.AIHERO_CLMUP
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Climbing
    End
    AliasConditionState = CLIMBING MOVING REALLYDAMAGED

    ConditionState      = RAPPELLING MOVING
      Animation         = AIHERO_SKL.AIHERO_CLMUP
      AnimationMode     = LOOP_BACKWARDS
      TransitionKey     = TRANS_Climbing
    End
    AliasConditionState = RAPPELLING MOVING REALLYDAMAGED

; these transitions don't really work well with our code. leave 'em out.
;    TransitionState     = TRANS_Climbing TRANS_Stand
;      Animation         = AIHERO_SKL.AIHERO_CLMST
;      AnimationMode     = ONCE
;    End
;
;    TransitionState     = TRANS_Stand TRANS_Climbing
;      Animation         = AIHERO_SKL.AIHERO_CLMST
;      AnimationMode     = ONCE_BACKWARDS
;    End

    ; dying anims
    ConditionState      = DYING
      Animation         = AIHERO_SKL.AIHERO_DTA
      Animation         = AIHERO_SKL.AIHERO_DTB
      Animation         = AIHero_SKL.AIHero_IDTA
      Animation         = AIHero_SKL.AIHero_IDTB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End
    AliasConditionState = RAPPELLING DYING
    AliasConditionState = CLIMBING DYING

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = AIHERO_SKL.AIHERO_ADTG21
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = AIHERO_SKL.AIHERO_ADTG22
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = AIHERO_SKL.AIHERO_ADTG23
      AnimationMode     = ONCE
      TransitionKey     = None
    End

    ; misc anims
    ConditionState      = FREEFALL
      Animation         = AIHERO_SKL.AIHERO_PFL
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState      = PARACHUTING
      Animation         = AIHERO_SKL.AIHERO_PHG
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING

    TransitionState     = TRANS_Falling TRANS_Chute
      Animation         = AIHERO_SKL.AIHERO_POP
      AnimationMode     = ONCE
      Flags             = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
    End

    TransitionState     = TRANS_Chute TRANS_Stand
      Animation         = AIHERO_SKL.AIHERO_PTD
      AnimationMode     = ONCE
    End

    TransitionState     = TRANS_Chute TRANS_StandInjured
      Animation         = AIHERO_SKL.AIHERO_PTD
      AnimationMode     = ONCE
    End

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:ColonelBurton
  Side                = Boss
  EditorSorting       = INFANTRY
  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     ColonelBurtonSniperRifleWeapon
    Weapon              = SECONDARY   ColonelBurtonKnifeWeapon
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   NONE
  End
  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = ChemSuitHumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange         = 150
  ShroudClearingRange = 500
  Prerequisites
    Object = Boss_Barracks
  End
  BuildCost = 1500
  BuildTime = 20.0          ;in seconds  

  ExperienceValue     = 50 100 100 150  ; Experience point value at each level
  ExperienceRequired  = 0 200 300 600   ; Experience points needed to gain each level
  IsTrainable         = Yes             ; Can gain experience
  CrushableLevel      = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet          = AmericaInfantryColonelBurtonCommandSet

  MaxSimultaneousOfType = 1

  ; *** AUDIO Parameters ***
  VoiceSelect = ColonelBurtonVoiceSelect
  VoiceMove = ColonelBurtonVoiceMove
  VoiceAttack = ColonelBurtonVoiceAttack
  VoiceFear = ColonelBurtonVoiceFear
  VoiceGuard = ColonelBurtonVoiceMove
  SoundStealthOn = StealthOn
  SoundStealthOff = StealthOff
  
  UnitSpecificSounds
    VoiceMelee = ColonelBurtonVoiceAttackKnife
    VoiceCreate           = ColonelBurtonVoiceCreate
    VoiceGarrison         = ColonelBurtonVoiceGarrison
    VoiceEnter            = ColonelBurtonVoiceMove
    VoiceEnterHostile     = ColonelBurtonVoiceMove
    VoiceGetHealed        = ColonelBurtonVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SCORE HERO CANNOT_RETALIATE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 200.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = CommandButtonHuntUpdate  ModuleTag_04 ; allows use of command button hunt script with this unit. 
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_05 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 300 ;
    NeverHeal = 0.85 ;  don't heal if we are > 85% healthy.
    AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
  End

  Locomotor = SET_NORMAL ColonelBurtonGroundLocomotor ColonelBurtonCliffLocomotor

  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 5.0
  End

  Behavior = StealthUpdate ModuleTag_07
    StealthDelay                = 2000 ; msec
    StealthForbiddenConditions  = FIRING_PRIMARY
    HintDetectableConditions    = IS_FIRING_WEAPON 
    FriendlyOpacityMin          = 50.0%
    FriendlyOpacityMax          = 100.0%
    InnateStealth               = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
    EnemyDetectionEvaEvent      = EnemyColonelBurtonDetected
    OwnDetectionEvaEvent        = OwnColonelBurtonDetected
  End

  Behavior = SpecialAbility ModuleTag_08
    SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
    UpdateModuleStartsAttack = Yes
    InitiateSound             = ColonelBurtonVoicePlantRemoteCharge
  End
  Behavior = SpecialAbilityUpdate ModuleTag_09
    SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
    StartAbilityRange = 0.0
    PreparationTime = 0
    SpecialObject = RemoteC4Charge
    MaxSpecialObjects = 8
    SpecialObjectsPersistWhenOwnerDies = No ;Charges are removed instantly when owner dies (nobody can detonate).
    AlwaysValidateSpecialObjects = Yes      ;Coupled with the above setting, this one is necessary for code optimization.
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = Yes        ;This prevents multiple charges placed on the same object.
    UnpackTime              = 5500          ;NOTE: Modifying this value will require modifying the delay for ColonelBurtonPlantCharge
    PackTime                = 0
    SkipPackingWithNoTarget = Yes           ;When yes, the packing/unpacking will be ignored when detonating charges.
    FlipOwnerAfterUnpacking = Yes
    FleeRangeAfterCompletion = 100.0         ;Runs away after finishing ability
    UnpackSound               = ColonelBurtonPlantCharge
    LoseStealthOnTrigger      = Yes
    PreTriggerUnstealthTime   = 5000 ; in milliseconds
  End

  Behavior = SpecialAbility ModuleTag_10
    SpecialPowerTemplate = SpecialAbilityColonelBurtonTimedCharges
    UpdateModuleStartsAttack = Yes
    InitiateSound             = ColonelBurtonVoicePlantTimedCharge
  End
  Behavior = SpecialAbilityUpdate ModuleTag_11
    SpecialPowerTemplate = SpecialAbilityColonelBurtonTimedCharges
    StartAbilityRange = 0.0
    PreparationTime = 0
    SpecialObject = TimedC4Charge
    MaxSpecialObjects = 10
    SpecialObjectsPersistWhenOwnerDies = Yes 
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = Yes        ;This prevents multiple charges placed on the same object.
    UnpackTime              = 5500          ;NOTE: Modifying this value will require modifying the delay for ColonelBurtonPlantCharge
    FlipOwnerAfterUnpacking = Yes
    FleeRangeAfterCompletion = 100.0         ;Runs away after finishing ability
    UnpackSound               = ColonelBurtonPlantCharge
    LoseStealthOnTrigger      = Yes
    PreTriggerUnstealthTime   = 5000 ; in milliseconds

  End
 
  Behavior = ExperienceScalarUpgrade ModuleTag_12
    TriggeredBy   = Upgrade_AmericaAdvancedTraining
    AddXPScalar   = 1.0 ;Increases experience gained by an additional 100%
  End
 
  ;Hero units can't be squished!
  ;Behavior = SquishCollide ModuleTag_13
  ;  ;nothing
  ;End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_ColonelBurtonDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_ColonelBurtonDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireUSA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinUSA
    OCL                 = INITIAL OCL_ToxicInfantry
  End
    Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinUSA
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End

  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinUSA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_14
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14
  ShadowSizeY = 14
  Scale = 0.88
  ShadowTexture = ShadowI
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
Object Boss_InfantryRebel

  ; *** ART Parameters ***
  SelectPortrait         = SUToxinRebel_L
  ButtonImage            = SUToxinRebel

  UpgradeCameo1 = Chem_Upgrade_GLAAnthraxGamma
  UpgradeCameo2 = Upgrade_InfantryCaptureBuilding
  UpgradeCameo3 = Upgrade_GLACamouflage


  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes
  ParticlesAttachedToAnimatedBones = Yes


    
    ; this says "we don't use these condition states at all, so completely
    ; ignore them for purposes of matchmaking"... this is useful to help
    ; reduce the number of AliasConditionState clauses you must add in
    ; order to avoid ambiguity in some cases.
    IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A

    ; ---- standing
    DefaultConditionState
      Model               = UIRGrdTOX_SKN
      IdleAnimation       = UIRGrd_SKL.UIRGrd_STN 0 35
      IdleAnimation       = UIRGrd_SKL.UIRGrd_IDA 
      IdleAnimation       = UIRGrd_SKL.UIRGrd_IDB 
      AnimationMode       = ONCE
      WeaponFireFXBone    = PRIMARY Muzzle01
      WeaponLaunchBone    = PRIMARY Muzzle01
      HideSubObject       = MuzzleFX01
      TransitionKey       = TRANS_Standing
;;;   ParticleSysBone     = MUZZLE01 WaterSpray
    End

    ConditionState        = REALLYDAMAGED
      IdleAnimation       = UIRGrd_SKL.UIRGrd_STB 0 35
      IdleAnimation       = UIRGrd_SKL.UIRGrd_IDC
      IdleAnimation       = UIRGrd_SKL.UIRGrd_IDD 
      AnimationMode       = ONCE
      TransitionKey       = TRANS_StandingHurt
    End

    ; ---- moving
    ConditionState        = MOVING
      Animation           = UIRGrd_SKL.UIRGrd_RNA 15
      AnimationMode       = LOOP
      TransitionKey       = TRANS_Walking
      ParticleSysBone     = None InfantryDustTrails
    End
    AliasConditionState   = MOVING ATTACKING

    ConditionState        = MOVING REALLYDAMAGED
      Animation           = UIRGrd_SKL.UIRGrd_RNB 25
      AnimationMode       = LOOP
      TransitionKey       = TRANS_WalkingHurt
      ParticleSysBone     = None InfantryDustTrails
    End
    AliasConditionState   = MOVING ATTACKING REALLYDAMAGED
    
    ; ---- dying 
    ConditionState        = DYING
      Animation           = UIRGrd_SKL.UIRGrd_DTA 
      Animation           = UIRGrd_SKL.UIRGrd_DTB 
      AnimationMode       = ONCE
      TransitionKey       = TRANS_Dying
    End

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = UIRGrd_SKL.UIRGrd_ADTE1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = UIRGrd_SKL.UIRGrd_ADTE2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = UIRGrd_SKL.UIRGrd_ADTE3
      AnimationMode = ONCE
      TransitionKey = None
    End
    
    ConditionState = SPECIAL_CHEERING
      Animation = UIRGrd_SKL.UIRGrd_IDB
    End

    ; ---- firing
    ConditionState = USING_WEAPON_A
      Animation = UIRGrd_SKL.UIRGrd_ATA3
      AnimationMode = LOOP
      TransitionKey = TRANS_Firing
    End

    ConditionState = USING_WEAPON_A REALLYDAMAGED
      Animation = UIRGrd_SKL.UIRGrd_ATA2
      AnimationMode = LOOP
      TransitionKey = TRANS_FiringHurt
    End

    TransitionState = TRANS_Standing TRANS_Firing
      Animation = UIRGrd_SKL.UIRGrd_ATAST
      AnimationMode = ONCE
    End

    TransitionState = TRANS_Firing TRANS_Standing
      Animation = UIRGrd_SKL.UIRGrd_ATAED
      AnimationMode = ONCE
    End

    TransitionState = TRANS_StandingHurt TRANS_FiringHurt
      Animation = UIRGrd_SKL.UIRGrd_ATA2ED
      AnimationMode = ONCE_BACKWARDS
    End

    TransitionState = TRANS_FiringHurt TRANS_StandingHurt
      Animation = UIRGrd_SKL.UIRGrd_ATA2ED
      AnimationMode = ONCE
    End

    TransitionState = TRANS_Standing TRANS_StandingHurt
      Animation = UIRGrd_SKL.UIRGrd_ATA2ED
      AnimationMode = ONCE
    End

    

    ; ------- Bldg-capture

    ConditionState = UNPACKING
      Model             = UIRGrdTOXF_SKN
      Animation         = UIRGrd_F_SKL.UIRGrd_F_FDP1
      AnimationMode     = ONCE
    End
    AliasConditionState = UNPACKING REALLYDAMAGED

    ConditionState = RAISING_FLAG
      Model             = UIRGrdTOXF_SKN
      Animation         = UIRGrd_F_SKL.UIRGrd_F_FDP2
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Raising
    End
    AliasConditionState = RAISING_FLAG REALLYDAMAGED

    ConditionState = PACKING
      Model             = UIRGrdTOXF_SKN
      Animation         = UIRGrd_F_SKL.UIRGrd_F_FDP1
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_Packing
    End
    AliasConditionState = PACKING REALLYDAMAGED

    TransitionState = TRANS_Raising TRANS_Packing
      Model             = UIRGrdTOXF_SKN
      Animation         = UIRGrd_F_SKL.UIRGrd_F_FDP2
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
    End

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Chem_Rebel
  Side                = Boss
  EditorSorting       = INFANTRY
  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)
 
 WeaponSet
    Conditions        = None
    Weapon            = PRIMARY     GC_Chem_GLARebelGunBeta
  End
  WeaponSet
    Conditions        = PLAYER_UPGRADE 
    Weapon            = PRIMARY     GC_Chem_GLARebelGunGamma
  End

  ArmorSet
    Conditions      = None
    Armor           = ChemReb_HumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange         = 150
  ShroudClearingRange = 300
  Prerequisites
    Object = Boss_Barracks
  End
  BuildCost = 75
  BuildTime = 1.0          ;in seconds  

  ExperienceValue     = 25 30 35 45     ;Experience point value at each level
  ExperienceRequired  = 0 40 60 120     ;Experience points needed to gain each level
  IsTrainable         = Yes             ;Can gain experience
  CrushableLevel      = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet          = Chem_GLAInfantryRebelCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = ToxinRebelVoiceSelect
  VoiceMove = RebelVoiceMove
  VoiceGuard = RebelVoiceMove
  VoiceAttack = ToxinRebelVoiceAttack
  SoundStealthOn = StealthOn
  SoundStealthOff = StealthOff
  VoiceFear = RebelVoiceFear
  VoiceTaskComplete = RebelVoiceCaptureComplete
  UnitSpecificSounds
    VoiceCreate = ToxinRebelVoiceCreate
    VoiceSubdue = RebelVoiceSubdue
    VoiceGarrison = RebelVoiceGarrison
    VoiceEnter = RebelVoiceMove
    VoiceEnterHostile = RebelVoiceMove
    VoiceGetHealed      = RebelVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE 

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 120.0
    InitialHealth   = 120.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = CommandButtonHuntUpdate  ModuleTag_04 ; allows use of command button hunt script with this unit. 
  End

  Locomotor = SET_NORMAL BasicHumanLocomotor

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 5.0
  End
  Behavior = StealthUpdate ModuleTag_06
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY
    MoveThresholdSpeed          = 3
    InnateStealth               = No ;Requires upgrade first
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = WeaponSetUpgrade ModuleTag_07
    TriggeredBy   = Chem_Upgrade_GLAAnthraxGamma
  End

  Behavior = WeaponBonusUpgrade ModuleTag_08
    TriggeredBy = Upgrade_GLAAPBullets
  End
  Behavior = StealthUpgrade ModuleTag_09
    TriggeredBy = Upgrade_GLACamouflage
  End

 
  Behavior = SquishCollide ModuleTag_10
    ;nothing
  End

    ClientUpdate        = AnimatedParticleSysBoneClientUpdate ModuleTag_11 
  End
  

; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RebelDie
    FX                  = INITIAL FX_BloodyPuddle3
    FX                  = INITIAL FX_ToxicShellExplosion
    OCL                 = INITIAL OCL_Chem_PoisonFieldGammaLarge
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
    FX                  = INITIAL FX_ToxicShellExplosion
    OCL                 = INITIAL OCL_Chem_PoisonFieldGammaLarge
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RebelDie
    FX                  = INITIAL FX_BloodyPuddle3
    FX                  = INITIAL FX_ToxicShellExplosion
    OCL                 = INITIAL OCL_Chem_PoisonFieldGammaLarge
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireGLA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End

  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End

; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_12
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End

  Behavior = SpecialAbility ModuleTag_13
    SpecialPowerTemplate      = SpecialAbilityRebelCaptureBuilding
    UpdateModuleStartsAttack  = Yes
    StartsPaused              = Yes
    InitiateSound         = RebelVoiceCapture
  End
  Behavior = SpecialAbilityUpdate ModuleTag_14
    SpecialPowerTemplate  = SpecialAbilityRebelCaptureBuilding
    StartAbilityRange  = 5.0
    UnpackTime            = 3000  ; (changing this will scale anim speed)
    PreparationTime       = 20000 ; time to complete hack once prepared (changing this will scale anim speed)
    PackTime              = 2000  ; (changing this will scale anim speed)
    DoCaptureFX           = Yes
    AwardXPForTriggering  = 12
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_15    ;These two make the right damage field at death
    DeathWeapon   = ToxinShellWeapon
    StartsActive  = Yes   
    ConflictsWith = Chem_Upgrade_GLAAnthraxGamma
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_16
    DeathWeapon   = Chem_ToxinShellWeaponGamma
    StartsActive  = No   
    TriggeredBy = Chem_Upgrade_GLAAnthraxGamma
  End

  Behavior = UnpauseSpecialPowerUpgrade ModuleTag_17
    SpecialPowerTemplate = SpecialAbilityRebelCaptureBuilding
    TriggeredBy = Upgrade_InfantryCaptureBuilding
  End

 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End













;------------------------------------------------------------------------------
Object Boss_InfantryMiniGunner

  ; *** ART Parameters ***
  SelectPortrait         = SNMiniGunner_L  
  ButtonImage            = SNMiniGunner
  
  UpgradeCameo1 = Upgrade_Nationalism
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes

    ; this says "we don't use these condition states at all, so completely
    ; ignore them for purposes of matchmaking"... this is useful to help
    ; reduce the number of AliasConditionState clauses you must add in
    ; order to avoid ambiguity in some cases.
    IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A

    ; ------- Standing-Around Animations
 
    DefaultConditionState
      Model               = NICNSCI_SKN
      IdleAnimation       = NICNSC_SKL.NICNSC_STA 0 35
      IdleAnimation       = NICNSC_SKL.NICNSC_IDA
      IdleAnimation       = NICNSC_SKL.NICNSC_IDB
      AnimationMode       = ONCE
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      TransitionKey       = TRANS_Stand
    End

    ConditionState        = REALLYDAMAGED
      IdleAnimation       = NICNSC_SKL.NICNSC_STB
      AnimationMode       = ONCE
      TransitionKey       = TRANS_StandDamaged
    End

    ; ------- Machine Gun Animations

    ConditionState      = USING_WEAPON_A
      Animation         = NICNSC_SKL.NICNSC_ATA
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Firing
    End

    ConditionState      = USING_WEAPON_A REALLYDAMAGED
      Animation         = NICNSC_SKL.NICNSC_ATC
      AnimationMode     = LOOP
      TransitionKey     = TRANS_FiringDamaged
    End

    ConditionState      = USING_WEAPON_B
      Animation         = NICNSC_SKL.NICNSC_ATA2
      AnimationMode     = LOOP
 ;    TransitionKey     = TRANS_Firing
    End

    ConditionState      = USING_WEAPON_B REALLYDAMAGED
      Animation         = NICNSC_SKL.NICNSC_ATC2
      AnimationMode     = LOOP
 ;    TransitionKey     = TRANS_FiringDamaged
    End

    ; ------- Firing-related Transitions

    TransitionState   = TRANS_Firing TRANS_FiringDamaged
      Animation       = NICNSC_SKL.NICNSC_AA2AC
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_Stand TRANS_Firing
      Animation       = NICNSC_SKL.NICNSC_SA2AA
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_Firing TRANS_Stand
      Animation       = NICNSC_SKL.NICNSC_AA2SA
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_StandDamaged TRANS_FiringDamaged
      Animation       = NICNSC_SKL.NICNSC_ATCST
      AnimationMode   = ONCE
    End

    TransitionState   = TRANS_FiringDamaged TRANS_StandDamaged
      Animation       = NICNSC_SKL.NICNSC_ATCED
      AnimationMode   = ONCE
    End


    ; ------------- Damage Transitions --------------------
    TransitionState = TRANS_StandDamaged TRANS_RunDamaged
      Animation       = NICNSC_SKL.NICNSC_AA2AC
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 2 2
    End
    TransitionState = TRANS_RunDamaged TRANS_StandDamaged 
      Animation       = NICNSC_SKL.NICNSC_AA2AC
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 2 2
      Flags           = START_FRAME_LAST
    End
    TransitionState = TRANS_Stand TRANS_StandDamaged 
      Animation       = NICNSC_SKL.NICNSC_AA2SA
      AnimationMode   = ONCE_BACKWARDS
      AnimationSpeedFactorRange = 4 5
      Flags           = START_FRAME_LAST
    End




    ; ------- Bayonet Animations

    ConditionState    = PREATTACK_C 
      Animation       = NICNSC_SKL.NICNSC_ATB1
      AnimationMode   = ONCE
      TransitionKey   = TRANS_Stab
    End
    AliasConditionState = PREATTACK_C MOVING
    AliasConditionState = PREATTACK_C FIRING_C
    AliasConditionState = PREATTACK_C BETWEEN_FIRING_SHOTS_C

    ConditionState      = FIRING_C
      Animation         = NICNSC_SKL.NICNSC_ATB2
      AnimationMode     = ONCE
      ; this is basically a trick: this guy has a nontrivial animation for firing,
      ; and a long recycle time between shots. we want him to finish his fire animation
      ; (unless he's ordered to do something else), so this is just a handy trick that
      ; says, "if the previous state had this transition key, allow it to finish before
      ; switching to us, if possible".
      WaitForStateToFinishIfPossible = TRANS_Stab
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_C
    AliasConditionState = RELOADING_C

    ; ------- Parachuting Animations

    ConditionState    = FREEFALL
      Animation       = NICNSC_SKL.NICNSC_POP
      AnimationMode   = MANUAL
      Flags           = START_FRAME_FIRST
      TransitionKey   = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState    = PARACHUTING
      Animation       = NICNSC_SKL.NICNSC_PHG
      AnimationMode   = LOOP
      Flags           = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
      TransitionKey   = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING

    TransitionState   = TRANS_Falling TRANS_Chute
      Animation       = NICNSC_SKL.NICNSC_POP
      AnimationMode   = ONCE
      Flags           = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
    End

    TransitionState   = TRANS_Chute TRANS_Stand
      Animation       = NICNSC_SKL.NICNSC_PTD
      AnimationMode   = ONCE
    End

    ; ------- Movement Animations

    ConditionState      = MOVING
      Animation         = NICNSC_SKL.NICNSC_RNA 26
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING ATTACKING

    ConditionState = MOVING REALLYDAMAGED
      Animation         = NICNSC_SKL.NICNSC_RNB 28
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = TRANS_RunDamaged
      TransitionKey     = None
    End
    AliasConditionState = MOVING ATTACKING REALLYDAMAGED

    ; ------- Bldg-capture

    ConditionState      = UNPACKING
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP1
      AnimationMode     = ONCE
    End
    AliasConditionState = UNPACKING REALLYDAMAGED

    ConditionState      = RAISING_FLAG
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP2
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Raising
    End
    AliasConditionState = RAISING_FLAG REALLYDAMAGED

    ConditionState      = PACKING
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP1
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
      TransitionKey     = TRANS_Packing
    End
    AliasConditionState = PACKING REALLYDAMAGED

    TransitionState     = TRANS_Raising TRANS_Packing
      Model             = NICNSC_F_SKN
      Animation         = NICNSC_F_SKL.NICNSC_F_FDP2
      AnimationMode     = ONCE_BACKWARDS
      Flags             = START_FRAME_LAST
    End

    ; ------- Dying Animations

    ConditionState      = DYING
      Animation         = NICNSC_SKL.NICNSC_DTA
      Animation         = NICNSC_SKL.NICNSC_DTB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = NICNSC_SKL.NICNSC_ATDE1
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = NICNSC_SKL.NICNSC_ATDE2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = NICNSC_SKL.NICNSC_ATDE3
      AnimationMode     = ONCE
      TransitionKey     = None
    End

    ; ------- Misc Animations

    ConditionState      = SPECIAL_CHEERING
      Animation         = NICNSC_SKL.NICNSC_CHA
      AnimationMode     = LOOP
    End

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Mini-Gunner
  Side                = Boss
  EditorSorting       = INFANTRY
  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY Infa_MiniGunnerGun
    Weapon = SECONDARY Infa_MiniGunnerGunAir
    PreferredAgainst = SECONDARY AIRCRAFT
  End
  ArmorSet
    Conditions      = None
    Armor           = InfGen_HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = HazMatHumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange = 100
  ShroudClearingRange = 200
  Prerequisites
    Object = Boss_Barracks
  End
  BuildCost     = 150
  BuildTime     = 2.0          ;in seconds      

  ExperienceValue = 5 5 10 20   ;Experience point value at each level
  ExperienceRequired = 0 20 40 80  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet    = Infa_ChinaInfantryMiniGunnerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = RedMinigunnerVoiceSelect
  VoiceMove = RedGuardVoiceMove
  VoiceGuard = RedGuardVoiceMove
  VoiceAttack = RedMinigunnerVoiceAttack
  VoiceGroupSelect = BattleCrySound
  VoiceFear = RedGuardVoiceFear
  VoiceTaskComplete = RedGuardVoiceCaptureComplete
  UnitSpecificSounds
    VoiceMelee      = RedGuardVoiceAttackBayonet
    VoiceGarrison   = RedGuardVoiceGarrison
    VoiceCreate     = RedMinigunnerVoiceCreate
    VoiceSubdue     = RedGuardVoiceSubdue
    VoiceEnter      = RedGuardVoiceMove
    VoiceEnterHostile = RedGuardVoiceMove
    VoiceGetHealed      = RedGuardVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SCORE PARACHUTABLE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 150.0
    InitialHealth   = 150.0
  End

  Behavior = VeterancyGainCreate ModuleTag_03
    StartingLevel = VETERAN
  End

  Behavior = VeterancyGainCreate ModuleTag_04
    StartingLevel = ELITE
    ScienceRequired = Infa_SCIENCE_RedGuardTraining
  End

  Behavior = AIUpdateInterface ModuleTag_05
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = CommandButtonHuntUpdate  ModuleTag_06 ; allows use of command button hunt script with this unit. 
  End

  Locomotor = SET_NORMAL RedguardLocomotor

  Behavior = HordeUpdate ModuleTag_07
    RubOffRadius = 100    ; if I am this close to a real hordesman, I will get to be an honorary hordesman
    UpdateRate = 1000    ; how often to recheck horde status (msec)
    Radius = 30          ; how close other units must be to us to count towards our horde-ness (~30 feet or so)
    KindOf = INFANTRY    ; what KindOf's must match to count towards horde-ness
    AlliesOnly = Yes     ; do we only count allies towards horde status? 
    ExactMatch = No      ; do we only count units of our exact same type towards horde status? (overrides kindof)
    Count = 5            ; how many units must be within Radius to grant us horde-ness
    Action = HORDE       ; when horde-ing, grant us the HORDE bonus
  End
  Behavior = PhysicsBehavior ModuleTag_08
    Mass = 5.0
  End

; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireChina
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End
  
  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_09
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End

  Behavior = SpecialAbility ModuleTag_10
    SpecialPowerTemplate      = SpecialAbilityRedGuardCaptureBuilding
    UpdateModuleStartsAttack  = Yes
    StartsPaused              = Yes
    InitiateSound         = RedGuardVoiceCapture
  End
  Behavior = SpecialAbilityUpdate ModuleTag_11
    SpecialPowerTemplate  = SpecialAbilityRedGuardCaptureBuilding
    StartAbilityRange  = 5.0
    UnpackTime            = 3000  ; (changing this will scale anim speed)
    PreparationTime       = 20000 ; time to complete hack once prepared (changing this will scale anim speed)
    PackTime              = 2000  ; (changing this will scale anim speed)
    DoCaptureFX           = Yes
    AwardXPForTriggering  = 4
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
  Behavior = UnpauseSpecialPowerUpgrade ModuleTag_12
    SpecialPowerTemplate = SpecialAbilityRedGuardCaptureBuilding
    TriggeredBy = Upgrade_InfantryCaptureBuilding
  End



  Geometry = CYLINDER
  GeometryMajorRadius = 7.0
  GeometryMinorRadius = 7.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
Object Boss_InfantryPathfinder

    ; *** ART Parameters ***
  SelectPortrait         = SAPathfinder1_L
  ButtonImage            = SAPathfinder1
  
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaChemicalSuits
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = AIPFDR_SKN
      IdleAnimation = AIPFDR_SKL.AIPFDR_STA 
      IdleAnimation = AIPFDR_SKL.AIPFDR_IDA
      AnimationMode = ONCE
      WeaponFireFXBone = PRIMARY Muzzle
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      TransitionKey = TRANS_Standing
    End
    AliasConditionState = REALLYDAMAGED

    ConditionState = MOVING
      Animation = AIPFDR_SKL.AIPFDR_RNA 25
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey = TRANS_Standing
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING REALLYDAMAGED

    ConditionState  = FIRING_A 
      Animation     = AIPFDR_SKL.AIPFDR_ATB                 ; recoil in standing position
      AnimationMode = ONCE
      TransitionKey = TRANS_FiringA
    End
    AliasConditionState = FIRING_A MOVING
    AliasConditionState = FIRING_A MOVING REALLYDAMAGED
    AliasConditionState = FIRING_A REALLYDAMAGED

    ConditionState  = BETWEEN_FIRING_SHOTS_A
      Animation     = AIPFDR_SKL.AIPFDR_ATBST               ; motionless in standing position
      AnimationMode = ONCE
      WaitForStateToFinishIfPossible = TRANS_FiringA
    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
    AliasConditionState = RELOADING_A
    AliasConditionState = RELOADING_A REALLYDAMAGED

    ConditionState = DYING
      Animation = AIPFDR_SKL.AIPFDR_DTA
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End
    
    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = AIPFDR_SKL.AIPFDR_ADTA1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = AIPFDR_SKL.AIPFDR_ADTA2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = AIPFDR_SKL.AIPFDR_ADTA3
      AnimationMode = ONCE
      TransitionKey = None
    End

    ConditionState = FREEFALL
      Animation = AIPFDR_SKL.AIPFDR_PFL
      AnimationMode = LOOP
      TransitionKey = TRANS_Falling
    End
    AliasConditionState = FREEFALL DYING

    ConditionState = PARACHUTING
      Animation = AIPFDR_SKL.AIPFDR_PHG
      AnimationMode = LOOP
      Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME  
      ;our bone positions should come from the last frame, rather than the first
      TransitionKey = TRANS_Chute
    End
    AliasConditionState = PARACHUTING DYING


    TransitionState = TRANS_Falling TRANS_Chute
      Animation = AIPFDR_SKL.AIPFDR_POP
      AnimationMode = ONCE
      Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME  
      ;our bone positions should come from the last frame, rather than the first
    End

    TransitionState = TRANS_Chute TRANS_Standing
      Animation = AIPFDR_SKL.AIPFDR_PTD
      AnimationMode = ONCE
    End
  End

  
  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Pathfinder
  Side = Boss
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY USAPathfinderSniperRifle
    Weapon = SECONDARY LaserTargeter
    AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources = SECONDARY NONE
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = ChemSuitHumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 200
  ShroudClearingRange = 400
  Prerequisites
    Object = Boss_Barracks
    Object = Boss_InternetCenter
  End
  BuildCost = 200
  BuildTime = 3.0          ;in seconds  
  
  ExperienceValue = 40 40 60 80    ;Experience point value at each level
  ExperienceRequired = 0 50 100 200  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrushableLevel      = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = AmericaInfantryPathfinderCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = PathfinderVoiceSelect
  VoiceMove = PathfinderVoiceMove
  VoiceGuard = PathfinderVoiceMove
  VoiceAttack = PathfinderVoiceAttack
  VoiceFear = PathfinderVoiceFear
  SoundStealthOn = StealthOn
  SoundStealthOff = StealthOff
  VoiceFear = PathfinderVoiceFear
  
  UnitSpecificSounds
    VoiceCreate          = PathfinderVoiceCreate
    VoiceGarrison = PathfinderVoiceGarrison
    VoiceEnter = PathfinderVoiceMove
    VoiceEnterHostile =  PathfinderVoiceMove
    VoiceGetHealed      = PathfinderVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY STEALTH_GARRISON SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 120.0
    InitialHealth   = 120.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes Stealthed
    MoodAttackCheckRate        = 250
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_04 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 300 ;
    NeverHeal = 0.85 ;  don't heal if we are > 85% healthy.
    AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
  End

  Locomotor = SET_NORMAL ColonelBurtonGroundLocomotor

  Behavior = ExperienceScalarUpgrade ModuleTag_05
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 5.0
  End
  Behavior = StealthDetectorUpdate ModuleTag_07
    DetectionRate   = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End
  Behavior = StealthUpdate ModuleTag_08
    StealthDelay                = 0           ; msec
    StealthForbiddenConditions  = MOVING ; stays stealthy while attacking
    FriendlyOpacityMin          = 30.0%
    FriendlyOpacityMax          = 80.0%
    PulseFrequency              = 500   ; msec
    MoveThresholdSpeed          = 3
    InnateStealth               = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
 
  Behavior = SquishCollide ModuleTag_09
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_PathfinderDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_PathfinderDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireUSA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinUSA
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinUSA
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End

  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinUSA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_10
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End

  Behavior = SpecialAbility ModuleTag_14
    SpecialPowerTemplate = SpecialAbilityLaserTargeter
    UpdateModuleStartsAttack = Yes
  End

  Behavior = SpecialAbilityUpdate ModuleTag_15
    SpecialPowerTemplate = SpecialAbilityLaserTargeter
    StartAbilityRange = 400.0
    AbilityAbortRange = 450.0 ;If the target moves outside this range, abort.
    PreparationTime = 100
    PersistentPrepTime = 50
    SpecialObject = LaserBeam
    SpecialObjectAttachToBone = Muzzle01
  End

  Behavior = CommandButtonHuntUpdate  ModuleTag_CBHunt ; allows use of command button hunt script with this unit. 
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
Object Boss_InfantryBlackLotus

  ; *** ART Parameters ***
  SelectPortrait         = SNBlkLotus_L2
  ButtonImage            = SNBlkLotus2
  
  ;UpgradeCameo1 = NONE
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes
    
    ; --- idle
    DefaultConditionState
      Model             = NIHERO_SKN
      IdleAnimation     = NIHERO_SKL.NIHERO_STA 0 17
      IdleAnimation     = NIHERO_SKL.NIHero_IDA
      IdleAnimation     = NIHERO_SKL.NIHero_IDB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Stand
    End

    ConditionState      = REALLYDAMAGED
      IdleAnimation     = NIHERO_SKL.NIHERO_ISTA 0 30
      IdleAnimation     = NIHERO_SKL.NIHero_IIDA
      AnimationMode     = ONCE
      TransitionKey     = TRANS_StandInjured
    End

    TransitionState     = TRANS_Stand TRANS_StandInjured
      Animation         = NIHero_SKL.NIHero_ISTAHIT
      AnimationMode     = ONCE
    End

    ; --- moving
    ConditionState      = MOVING
      Animation         = NIHero_SKL.NIHero_RNA
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING UNPACKING

    ConditionState      = MOVING REALLYDAMAGED
      Animation         = NIHero_SKL.NIHero_IRNA
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING UNPACKING REALLYDAMAGED

    ; --- packing states
    ConditionState      = UNPACKING
      ;Preparing to attack (unpacking gear)
      Animation         = NIHero_SKL.NIHero_ATA1
      AnimationMode     = ONCE
    End
    AliasConditionState = UNPACKING FIRING_A

    ConditionState      = FIRING_A
      ;Processing attack (hacking)
      Animation         = NIHero_SKL.NIHero_ATA2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_FiringA
    End

    ConditionState      = PACKING
      ;Completing attack (packing gear)
      Animation         = NIHero_SKL.NIHero_ATA3
      AnimationMode     = ONCE
    End
    AliasConditionState = FIRING_A PACKING 

    TransitionState     = TRANS_FiringA TRANS_FiringAInjured
      Animation         = NIHero_SKL.NIHero_IATAHIT
      AnimationMode     = ONCE
    End

    ; --- injured-packing states
    ConditionState      = UNPACKING REALLYDAMAGED
      ;Preparing to attack (unpacking gear)
      Animation         = NIHero_SKL.NIHero_IATA1
      AnimationMode     = ONCE
    End
    AliasConditionState = UNPACKING FIRING_A REALLYDAMAGED

    ConditionState      = FIRING_A REALLYDAMAGED
      ;Processing attack (hacking)
      Animation         = NIHero_SKL.NIHero_IATA2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_FiringAInjured
    End

    ConditionState      = PACKING REALLYDAMAGED
      ;Completing attack (packing gear)
      Animation         = NIHero_SKL.NIHero_IATA3
      AnimationMode     = ONCE
    End
    AliasConditionState = FIRING_A PACKING REALLYDAMAGED

    ; --- packing-dying states
; code doesn't really support this. Oh well.
;    ConditionState      = DYING RAISING_FLAG
;      Animation         = NIHero_SKL.NIHero_IDTA
;      Animation         = NIHero_SKL.NIHero_IDTB
;      AnimationMode     = ONCE
;    End
;    AliasConditionState = DYING RAISING_FLAG EXPLODED_FLAILING EXPLODED_BOUNCING

    ; --- normal-dying states
    ConditionState      = DYING
      Animation         = NIHero_SKL.NIHero_DTA
      Animation         = NIHero_SKL.NIHero_DTB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = NIHero_SKL.NIHero_ADTF1
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = NIHero_SKL.NIHero_ADTF2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = NIHero_SKL.NIHero_ADTF3
      AnimationMode     = ONCE
      TransitionKey     = None
    End

    ; --- cheering states
    ConditionState      = SPECIAL_CHEERING
      Animation         = NIHERO_SKL.NIHERO_CHA
      AnimationMode     = ONCE
    End

    ConditionState      = SPECIAL_CHEERING REALLYDAMAGED
      Animation         = NIHERO_SKL.NIHERO_ICHA
      AnimationMode     = ONCE
    End

    ; --- falling states
    ConditionState      = FREEFALL
      Animation         = NIHero_SKL.NIHero_PFL
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState      = PARACHUTING
      Animation         = NIHero_SKL.NIHero_PHG
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING

    TransitionState     = TRANS_Falling TRANS_Chute
      Animation         = NIHero_SKL.NIHero_POP
      AnimationMode     = ONCE
      Flags             = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
    End

    TransitionState     = TRANS_Chute TRANS_Stand
      Animation         = NIHero_SKL.NIHero_PTD
      AnimationMode     = ONCE
    End

    TransitionState     = TRANS_Chute TRANS_StandInjured
      Animation         = NIHero_SKL.NIHero_PTD
      AnimationMode     = ONCE
    End

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:SuperLotus
  Side                = Boss
  EditorSorting       = INFANTRY
  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions        = None 
    Weapon            = PRIMARY None
  End
  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = ChemSuitHumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange         = 300
  ShroudClearingRange = 400
  Prerequisites
    Object = Boss_Barracks
  End
  BuildCost             = 1200
  BuildTime             = 20.0          ;in seconds    
  MaxSimultaneousOfType = 1
  CommandSet            = ChinaInfantryBlackLotusCommandSet

  ExperienceValue       = 50 100 150 400    ;Experience point value at each level
  ExperienceRequired    = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable           = Yes             ;Can gain experience
  CrushableLevel        = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet            = ChinaInfantryBlackLotusCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = BlackLotusVoiceSelect
  VoiceMove = BlackLotusVoiceMove
  VoiceAttack = NoSound
  VoiceGuard = BlackLotusVoiceMove
  VoiceFear = BlackLotusVoiceFear
  VoiceTaskComplete = BlackLotusVoiceCaptureComplete
  SoundStealthOn = StealthOn
  SoundStealthOff = StealthOff
  
  UnitSpecificSounds
    VoiceCreate          = BlackLotusVoiceCreate
    VoiceGarrison = BlackLotusVoiceMove
    VoiceEnter = BlackLotusVoiceMove
    VoiceEnterHostile = BlackLotusVoiceMove
    VoiceStealCashComplete = BlackLotusVoiceCashComplete
    VoiceDisableVehicleComplete = BlackLotusVoiceDisableComplete
    VoiceCaptureBuildingComplete = BlackLotusVoiceCaptureComplete
    VoiceGetHealed      = BlackLotusVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY SCORE HERO CANNOT_RETALIATE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 150.0
    InitialHealth   = 150.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = CommandButtonHuntUpdate  ModuleTag_03 ; allows use of command button hunt script with this unit. 
  End

  Behavior = AIUpdateInterface ModuleTag_04
    AutoAcquireEnemiesWhenIdle = No
  End
  Locomotor = SET_NORMAL BlackLotusLocomotor
  Locomotor = SET_FREEFALL FreeFallLocomotor
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 5.0
  End
  Behavior = StealthUpdate ModuleTag_06
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = USING_ABILITY
    HintDetectableConditions    = USING_ABILITY
    InnateStealth               = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
    EnemyDetectionEvaEvent      = EnemyBlackLotusDetected
    OwnDetectionEvaEvent        = OwnBlackLotusDetected
  End

  Behavior = StealthDetectorUpdate ModuleTag_07
    DetectionRate   = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End

  Behavior = SpecialAbility ModuleTag_08
    SpecialPowerTemplate = SpecialAbilityBlackLotusCaptureBuilding
    UpdateModuleStartsAttack = Yes
    InitiateSound         = BlackLotusVoiceHackBuilding
  End
  Behavior = SpecialAbilityUpdate ModuleTag_09
    SpecialPowerTemplate  = SpecialAbilityBlackLotusCaptureBuilding
    StartAbilityRange     = 150.0
    UnpackTime            = 6730 ;animation time is 6730 (changing this will scale anim speed)
    PackTime              = 2800 ;animation time is 5800 (changing this will scale anim speed)
    PreparationTime       = 6000 ;time to complete hack once prepared (unpacked)
    SpecialObject         = BinaryDataStream
    DoCaptureFX           = Yes
    PackSound             = BlackLotusPack
    UnpackSound           = BlackLotusUnpack
    TriggerSound          = BlackLotusTrigger
    PrepSoundLoop         = BlackLotusPrepLoop
    AwardXPForTriggering  = 20
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
  Behavior = SpecialAbility ModuleTag_10
    SpecialPowerTemplate      = SpecialAbilityBlackLotusDisableVehicleHack
    UpdateModuleStartsAttack  = Yes
    InitiateSound           = BlackLotusVoiceHackVehicle
  End
  Behavior = SpecialAbilityUpdate ModuleTag_11
    SpecialPowerTemplate    = SpecialAbilityBlackLotusDisableVehicleHack
    StartAbilityRange       = 150.0
    UnpackTime              = 2000 ;6730 ;animation time is 6730 (changing this will scale anim speed)
    PackTime                = 1000 ;2800 ;animation time is 5800 (changing this will scale anim speed)
    PreparationTime         = 2000 ;time to complete hack once prepared (unpacked)
    EffectDuration          = 15000 ;duration vehicle is disabled  (30 seconds)
    DisableFXParticleSystem = DisabledEffectBinaryShower0
    SpecialObject           = BinaryDataStream
    PackSound               = BlackLotusPack
    UnpackSound             = BlackLotusUnpack
    TriggerSound            = BlackLotusTrigger
    PrepSoundLoop           = BlackLotusPrepLoop
    AwardXPForTriggering    = 0
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
  Behavior = SpecialAbility ModuleTag_12
    SpecialPowerTemplate      = SpecialAbilityBlackLotusStealCashHack
    UpdateModuleStartsAttack  = Yes
    InitiateSound         = BlackLotusVoiceHackCash
  End
  Behavior = SpecialAbilityUpdate ModuleTag_13
    SpecialPowerTemplate  = SpecialAbilityBlackLotusStealCashHack
    StartAbilityRange     = 150.0
    UnpackTime            = 6730 ;animation time is 6730 (changing this will scale anim speed)
    PackTime              = 5800 ;animation time is 5800 (changing this will scale anim speed)
    PreparationTime       = 6000 ;time to complete hack once prepared (unpacked)
    EffectValue           = 1000 ;amount of cash stolen
    SpecialObject         = BinaryDataStream
    PackSound             = BlackLotusPack
    UnpackSound           = BlackLotusUnpack
    TriggerSound          = BlackLotusTrigger
    PrepSoundLoop         = BlackLotusPrepLoop
    AwardXPForTriggering  = 20
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
 
  ;Hero units can't be squished!
  ;Behavior = SquishCollide ModuleTag_14
  ;  ;nothing
  ;End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_BlackLotusDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_BlackLotusDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireFemale
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinFemale
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinFemale
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End

  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinFemale
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_15
    PoisonDamageInterval  = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration        = 3000       ; ... for this long after last hit by poison damage
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
Object Boss_InfantryTankHunter

  ; *** ART Parameters ***
  SelectPortrait         = SNTankHunter_L
  ButtonImage            = SNTankHunter
  
  UpgradeCameo1 = Upgrade_Nationalism
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
  
  
    DefaultConditionState
      Model             = NIMSST_SKN
      IdleAnimation     = NIMSST_SKL.NIMSST_STA 0 30
      IdleAnimation     = NIMSST_SKL.NIMSST_IDA
      IdleAnimation     = NIMSST_SKL.NIMSST_IDB
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 0.8 1.2
      TransitionKey     = TRANS_Stand
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      WeaponFireFXBone  = PRIMARY Muzzle
      WeaponLaunchBone  = PRIMARY Muzzle
      WeaponLaunchBone  = SECONDARY Muzzle
    End
    AliasConditionState = REALLYDAMAGED

    ConditionState      = FIRING_A 
      Animation         = NIMSST_SKL.NIMSST_ATA 
      AnimationMode     = ONCE
      TransitionKey     = TRANS_START_FIRING
    End
    AliasConditionState = REALLYDAMAGED FIRING_A
    
    ConditionState      = BETWEEN_FIRING_SHOTS_A
      Animation         = NIMSST_SKL.NIMSST_STA
      AnimationMode     = ONCE
      ; this is basically a trick: this guy has a nontrivial animation for firing,
      ; and a long recycle time between shots. we want him to finish his fire animation
      ; (unless he's ordered to do something else), so this is just a handy trick that
      ; says, "if the previous state had this transition key, allow it to finish before
      ; switching to us, if possible".
      WaitForStateToFinishIfPossible = TRANS_START_FIRING
    End
    AliasConditionState = REALLYDAMAGED BETWEEN_FIRING_SHOTS_A

    ConditionState      = MOVING
      Animation         = NIMSST_SKL.NIMSST_RNA 20
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = REALLYDAMAGED MOVING
    AliasConditionState = MOVING ATTACKING
    AliasConditionState = MOVING ATTACKING REALLYDAMAGED

    ConditionState      = RELOADING_A
      Animation         = NIMSST_SKL.NIMSST_ATA 10
      AnimationMode     = ONCE
      ;WeaponLaunchBone = PRIMARY WeaponA
    End
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = REALLYDAMAGED MOVING RELOADING_A

    ConditionState      = DYING
      Animation         = NIMSST_SKL.NIMSST_DTA
      Animation         = NIMSST_SKL.NIMSST_DTB
      AnimationSpeedFactorRange = 0.9 1.25
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End
    AliasConditionState = DYING RUBBLE

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = NIMSST_SKL.NIMSST_ADTD1
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = NIMSST_SKL.NIMSST_ADTD2
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = NIMSST_SKL.NIMSST_ADTD3
      AnimationMode     = ONCE
      TransitionKey     = None
    End

    ;PARACHUTING ANIMATIONS
    ConditionState      = FREEFALL
      Animation         = NIMSST_SKL.NIMSST_POP
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING
    
    ConditionState      = PARACHUTING
      Animation         = NIMSST_SKL.NIMSST_PHG
      AnimationMode     = LOOP
      Flags             = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
      TransitionKey     = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING
    
   ; TransitionState     = TRANS_Falling TRANS_Chute
   ;   Animation         = NIMSST_SKL.NIMSST_POP
   ;   AnimationMode     = ONCE
   ;   Flags             = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
   ; End
    
    TransitionState     = TRANS_Chute TRANS_Stand
      Animation         = NIMSST_SKL.NIMSST_PDN
      AnimationMode     = ONCE
    End

  End


  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:TankHunter
  Side = Boss
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY ChinaInfantryTankHunterMissileLauncher
  End
  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = ChemSuitHumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 400
  Prerequisites
    Object = Boss_Barracks
  End
  BuildCost = 250
  BuildTime = 4.0          ;in seconds    

  ExperienceValue = 20 20 40 60    ;Experience point value at each level
  ExperienceRequired = 0 100 200 400  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = ChinaInfantryTankHunterCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = BossGenTankHunterVoiceSelect
  VoiceMove = TankHunterVoiceMove
  VoiceAttack = TankHunterVoiceAttack
  VoiceAttackAir = TankHunterVoiceAttack
  VoiceGuard = TankHunterVoiceMove
  VoiceFear = TankHunterVoiceFear
  UnitSpecificSounds
    VoiceCreate          = TankHunterVoiceCreate
    VoiceGarrison = TankHunterVoiceGarrison
    VoiceEnter = TankHunterVoiceMove
    VoiceEnterHostile = TankHunterVoiceMove
    VoiceGetHealed      = TankHunterVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL MissileDefenderLocomotor
  Behavior = HordeUpdate ModuleTag_04
    UpdateRate = 1000    ; how often to recheck horde status (msec)
    RubOffRadius = 60    ; if I am this close to a real hordesman, I will get to be an honorary hordesman
    Radius = 30          ; how close other units must be to us to count towards our horde-ness (~30 feet or so)
    KindOf = INFANTRY    ; what KindOf's must match to count towards horde-ness
    AlliesOnly = Yes     ; do we only count allies towards horde status? 
    ExactMatch = No      ; do we only count units of our exact same type towards horde status? (overrides kindof)
    Count = 5            ; how many units must be within Radius to grant us horde-ness
    Action = HORDE       ; when horde-ing, grant us the HORDE bonus
  End
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 5.0
  End

  Behavior = SpecialAbility ModuleTag_06
    SpecialPowerTemplate = SpecialAbilityTankHunterTNTAttack
    UpdateModuleStartsAttack = Yes
    InitiateSound = TankHunterVoiceTNT
  End
  Behavior = SpecialAbilityUpdate ModuleTag_07
    SpecialPowerTemplate = SpecialAbilityTankHunterTNTAttack
    StartAbilityRange = 5.0
    PreparationTime = 0
    SpecialObject = TNTStickyBomb
    MaxSpecialObjects = 8
    SpecialObjectsPersistWhenOwnerDies = No ;Charges are removed instantly when owner dies (nobody can detonate).
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = Yes        ;This prevents multiple charges placed on the same object.
    FleeRangeAfterCompletion = 100.0         ;Runs away after finishing ability
  End

 
  Behavior = SquishCollide ModuleTag_08
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_TankHunterDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_TankHunterDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireChina
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End

  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_09
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
Object Boss_InfantryHacker

  ; *** ART Parameters ***
  SelectPortrait         = SNHacker2_L
  ButtonImage            = SNHacker2
  
  ;UpgradeCameo1 = NONE
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    ;NORMAL STANDING
    DefaultConditionState
      Model = NIHCKR_SKN
      IdleAnimation = NIHCKR_SKL.NIHCKR_STA 0 25
      ;Regular spice animations
      IdleAnimation = NIHCKR_SKL.NIHCKR_IDA
      IdleAnimation = NIHCKR_SKL.NIHCKR_IDB
      AnimationMode = ONCE
      WeaponFireFXBone = PRIMARY Bone_SatCom
      TransitionKey = TRANS_Stand
    End
    AliasConditionState = REALLYDAMAGED

    ConditionState = MOVING
      Animation = NIHCKR_SKL.NIHCKR_RNA 14
      AnimationMode = LOOP
      Flags = RANDOMSTART
      TransitionKey = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING UNPACKING
    AliasConditionState = MOVING UNPACKING REALLYDAMAGED

    ConditionState = UNPACKING
      Animation = NIHCKR_SKL.NIHCKR_ATB1
      AnimationMode = ONCE
    End
    AliasConditionState = UNPACKING FIRING_A
    AliasConditionState = UNPACKING REALLYDAMAGED
    AliasConditionState = UNPACKING FIRING_A REALLYDAMAGED

    ;HACKING ATTACK
    ConditionState = FIRING_A
      Animation = NIHCKR_SKL.NIHCKR_ATB2
      AnimationMode = LOOP
      TransitionKey = TRANS_FiringA
    End
    AliasConditionState = FIRING_A REALLYDAMAGED

    ConditionState = PACKING
      Animation = NIHCKR_SKL.NIHCKR_ATB3
      AnimationMode = ONCE
    End
    AliasConditionState = PACKING FIRING_A
    AliasConditionState = PACKING REALLYDAMAGED
    AliasConditionState = PACKING FIRING_A REALLYDAMAGED



    TransitionState = TRANS_FiringA TRANS_Stand ; I was stopped by a stop command, so I get no proper PACKING state
      Animation = NIHCKR_SKL.NIHCKR_ATB3
      AnimationMode = ONCE
    End


    ConditionState = FREEFALL
      Animation = NIHCKR_SKL.NIHCKR_PFL
      AnimationMode = LOOP
      TransitionKey = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState = PARACHUTING
      Animation = NIHCKR_SKL.NIHCKR_PHG
      AnimationMode = LOOP
      Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
      TransitionKey = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING


    ConditionState = DYING
      Animation = NIHCKR_SKL.NIHCKR_DTA
      Animation = NIHCKR_SKL.NIHCKR_DTB
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = NIHCKR_SKL.NIHCKR_ADTG1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = NIHCKR_SKL.NIHCKR_ADTG2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = NIHCKR_SKL.NIHCKR_ADTG3
      AnimationMode = ONCE
      TransitionKey = None
    End

    ConditionState = SPECIAL_CHEERING
      Animation = NIHCKR_SKL.NIHCKR_CHA
      AnimationMode = LOOP
    End

    TransitionState = TRANS_Falling TRANS_Chute
      Animation = NIHCKR_SKL.NIHCKR_POP
      AnimationMode = ONCE
      Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
    End

    TransitionState = TRANS_Chute TRANS_Stand
      Animation = NIHCKR_SKL.NIHCKR_PTD
      AnimationMode = ONCE
    End

  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:SuperHacker
  Side = Boss
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = ChemSuitHumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 300
  Prerequisites
    Object = Boss_Barracks
    Object = Boss_InternetCenter
  End
  BuildCost = 500
  BuildTime = 10.0          ;in seconds    
  ExperienceValue = 50 100 150 400    ;Experience point value at each level
  ExperienceRequired = 0 100 300 500  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience

  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = Boss_InfantryHackerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = SuperHackerVoiceSelect
  VoiceMove = HackerVoiceMove
  VoiceAttack = NoSound
  VoiceGuard = HackerVoiceMove
  VoiceFear = HackerVoiceFear
  VoiceTaskComplete = HackerVoiceHackComplete
  UnitSpecificSounds
    VoiceGarrison = HackerVoiceGarrison
    VoiceCreate     = SuperHackerVoiceCreate
    UnitPack        = HackerPack
    UnitUnpack      = HackerUnpack
    UnitCashPing    = HackerCashPing
    VoiceEnter = HackerVoiceMove
    VoiceEnterHostile = HackerVoiceMove
    VoiceGetHealed      = HackerVoiceMove
    VoiceHackInternet   = HackerVoiceModeInternet
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY SCORE IGNORES_SELECT_ALL MONEY_HACKER

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = HackInternetAIUpdate ModuleTag_03
    UnpackTime          = 7300 ;animation time is 7300 (changing this will scale anim speed)
    PackTime            = 5133 ;animation time is 5133 (changing this will scale anim speed)
    CashUpdateDelay     = 2000
    CashUpdateDelayFast = 1500  ; Fast speed used inside a container (can only hack inside an Internet Center)
    RegularCashAmount   = 5
    VeteranCashAmount   = 6
    EliteCashAmount     = 8
    HeroicCashAmount    = 10
    XpPerCashUpdate     = 1
    PackUnpackVariationFactor = 0.5 ;Adds + or - 20% to pack and unpack time randomly.
  End
  Locomotor = SET_NORMAL BasicHumanLocomotor
 
  Behavior = SpecialAbility ModuleTag_04
    SpecialPowerTemplate = SpecialAbilityHackerDisableBuilding
    UpdateModuleStartsAttack = Yes
    InitiateSound         = HackerVoiceHack
  End

  Behavior = SpecialAbilityUpdate ModuleTag_05
    SpecialPowerTemplate = SpecialAbilityHackerDisableBuilding
    StartAbilityRange = 150.0
    UnpackTime      = 7300 ;animation time is 7300 (changing this will scale anim speed)
    PackTime        = 5133 ;animation time is 5133 (changing this will scale anim speed)
    PreparationTime = 3000

    ;PersistentPrepTime = 500 ; old setting
    PersistentPrepTime = 333 ; NOTE! This drives how often the disable effect gets triggered
                             ; This is also how often a new particle system effect is spawned
    EffectDuration = 2000
    SpecialObject = BinaryDataStream
    DisableFXParticleSystem = DisabledEffectBinaryShower0
    PackSound       = HackerPack
    UnpackSound     = HackerUnpack
    PrepSoundLoop   = HackerPrepLoop
    AwardXPForTriggering  = 0    ;Careful, this is persistant so it's a DoT xp gain!
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End


  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_07
    ;nothing
  End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_HackerDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_HackerDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireChina
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End

  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinChina
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End
; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_08
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End
 
  Behavior = StealthUpdate ModuleTag_09
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = USING_ABILITY
    HintDetectableConditions    = USING_ABILITY
    InnateStealth               = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior = VeterancyGainCreate ModuleTag_10
    StartingLevel = VETERAN
  End

  Behavior = SpecialAbility ModuleTag_11
    SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
    UpdateModuleStartsAttack = Yes
  End
  Behavior = SpecialAbilityUpdate ModuleTag_12
    SpecialPowerTemplate = SpecialAbilityColonelBurtonRemoteCharges
    StartAbilityRange = 0.0
    PreparationTime = 0
    SpecialObject = BriefcaseNuke
    MaxSpecialObjects = 6
    SpecialObjectsPersistWhenOwnerDies = No ;Charges are removed instantly when owner dies (nobody can detonate).
    AlwaysValidateSpecialObjects = Yes      ;Coupled with the above setting, this one is necessary for code optimization.
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = Yes        ;This prevents multiple charges placed on the same object.
    UnpackTime              = 1000          ;NOTE: Modifying this value will require modifying the delay for ColonelBurtonPlantCharge
    PackTime                = 0
    SkipPackingWithNoTarget = Yes           ;When yes, the packing/unpacking will be ignored when detonating charges.
    FlipOwnerAfterUnpacking = Yes
    FleeRangeAfterCompletion = 100.0         ;Runs away after finishing ability
    UnpackSound               = ColonelBurtonPlantCharge
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;----------------------------------------------------------------------------
Object Boss_InfantryJarmenKell

  ; *** ART Parameters ***
  SelectPortrait         = SUJermanKell1_L  ;NOTE: Asset spelling mistake
  ButtonImage            = SUJermanKell1
  
  UpgradeCameo1 = Upgrade_GLAAPBullets
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    ; --- idle
    DefaultConditionState
      Model             = UIHERO_SKN
      IdleAnimation     = UIHERO_SKL.UIHERO_STA 0 21
      IdleAnimation     = UIHERO_SKL.UIHERO_IDA
      IdleAnimation     = UIHERO_SKL.UIHERO_IDB
      AnimationMode     = ONCE
      WeaponFireFXBone  = PRIMARY Muzzle
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      TransitionKey     = TRANS_Stand
    End

    ConditionState      = REALLYDAMAGED
      IdleAnimation     = UIHERO_SKL.UIHERO_ISTA 0 30
      IdleAnimation     = UIHERO_SKL.UIHERO_IIDA
      IdleAnimation     = UIHERO_SKL.UIHERO_IIDB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_StandInjured
    End

    TransitionState     = TRANS_Stand TRANS_StandInjured
      Animation         = UIHERO_SKL.UIHERO_ISTAHIT
      AnimationMode     = ONCE
    End

    ; --- attack

    ConditionState      = FIRING_A 
      Animation         = UIHERO_SKL.UIHERO_ATA 
      AnimationMode     = ONCE
      TransitionKey     = TRANS_FiringA
      AnimationSpeedFactorRange = 1.5 1.5
    End

    ConditionState      = BETWEEN_FIRING_SHOTS_A
      Animation         = UIHERO_SKL.UIHERO_STA
      AnimationMode     = ONCE
      WaitForStateToFinishIfPossible = TRANS_FiringA
    End
    AliasConditionState = RELOADING_A
  
    ConditionState      = FIRING_A REALLYDAMAGED
      Animation         = UIHERO_SKL.UIHERO_IATA2
      AnimationMode     = ONCE
      TransitionKey     = TRANS_FiringAInjured
      AnimationSpeedFactorRange = 1.5 1.5
    End

    ConditionState      = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
      Animation         = UIHERO_SKL.UIHERO_IATA2
      AnimationMode     = MANUAL
      Flags             = START_FRAME_LAST
      WaitForStateToFinishIfPossible = TRANS_FiringAInjured
    End
    AliasConditionState = RELOADING_A REALLYDAMAGED

    TransitionState     = TRANS_FiringA TRANS_FiringAInjured
      Animation         = UIHERO_SKL.UIHERO_IATAHIT
      AnimationMode     = ONCE
    End

    ; --- moving
    ConditionState      = MOVING
      Animation         = UIHERO_SKL.UIHERO_RNA2 30
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = MOVING RELOADING_A
    AliasConditionState = MOVING DOCKING
    AliasConditionState = MOVING DOCKING_BEGINNING
    AliasConditionState = MOVING DOCKING_ACTIVE

    ConditionState      = MOVING REALLYDAMAGED
      Animation         = UIHERO_SKL.UIHERO_IRNA 30
      AnimationMode     = LOOP
      Flags             = RANDOMSTART
      TransitionKey     = None
      ParticleSysBone   = None InfantryDustTrails
    End
    AliasConditionState = MOVING FIRING_A REALLYDAMAGED
    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
    AliasConditionState = MOVING RELOADING_A REALLYDAMAGED
    
    ; --- cheering
    ConditionState      = SPECIAL_CHEERING
      Animation         = UIHERO_SKL.UIHERO_CHA
      AnimationMode     = LOOP
    End

    ConditionState      = SPECIAL_CHEERING REALLYDAMAGED
      Animation         = UIHERO_SKL.UIHERO_ICHA
      AnimationMode     = LOOP
    End
    
    ; --- dying
    ConditionState      = DYING
      Animation         = UIHERO_SKL.UIHERO_DTA
      Animation         = UIHERO_SKL.UIHERO_DTB
      Animation         = UIHERO_SKL.UIHERO_IDTA
      Animation         = UIHERO_SKL.UIHERO_IDTB
      AnimationMode     = ONCE
      TransitionKey     = TRANS_Dying
    End

    TransitionState     = TRANS_Dying TRANS_Flailing
      Animation         = UIHERO_SKL.UIHERO_ADTG21
      AnimationMode     = ONCE
    End

    ConditionState      = DYING EXPLODED_FLAILING
      Animation         = UIHERO_SKL.UIHERO_ADTG22
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Flailing
    End

    ConditionState      = DYING EXPLODED_BOUNCING
      Animation         = UIHERO_SKL.UIHERO_ADTG23
      AnimationMode     = ONCE
      TransitionKey     = None
    End
    
    ; --- falling
    ConditionState      = FREEFALL
      Animation         = UIHERO_SKL.UIHERO_PFL
      AnimationMode     = LOOP
      TransitionKey     = TRANS_Falling
    End
    AliasConditionState = FREEFALL REALLYDAMAGED
    AliasConditionState = FREEFALL DYING

    ConditionState      = PARACHUTING
      Animation         = UIHERO_SKL.UIHERO_PHG
      AnimationMode     = LOOP
      Flags             = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
      TransitionKey     = TRANS_Chute
    End
    AliasConditionState = PARACHUTING REALLYDAMAGED
    AliasConditionState = PARACHUTING DYING

    TransitionState     = TRANS_Falling TRANS_Chute
      Animation         = UIHERO_SKL.UIHERO_POP
      AnimationMode     = ONCE
      Flags             = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
    End

    TransitionState     = TRANS_Chute TRANS_Stand
      Animation         = UIHERO_SKL.UIHERO_PTD
      AnimationMode     = ONCE
    End

    TransitionState     = TRANS_Chute TRANS_StandInjured
      Animation         = UIHERO_SKL.UIHERO_PTD
      AnimationMode     = ONCE
    End
    
  End

  ; ***DESIGN parameters ***
  DisplayName           = OBJECT:JarmenKell
  Side                  = Boss
  EditorSorting         = INFANTRY
  TransportSlotCount    = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  MaxSimultaneousOfType = 1
 
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAJarmenKellRifle
    Weapon = SECONDARY GLAJarmenKellVehiclePilotSniperRifle
    AutoChooseSources = SECONDARY NONE
  End

  ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = ChemSuitHumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange         = 200
  ShroudClearingRange = 300
  Prerequisites
    Object = Boss_Barracks
  End
  BuildCost = 1500
  BuildTime = 20.0          ;in seconds  

  ExperienceValue     = 50 50 100 150    ;Experience point value at each level
  ExperienceRequired  = 0 100 200 400  ;Experience points needed to gain each level
  IsTrainable         = Yes             ;Can gain experience
  CrushableLevel      = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet          = GLAInfantryJarmenKellCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = JarmenKellVoiceSelect
  VoiceMove = JarmenKellVoiceMove
  VoiceGuard = JarmenKellVoiceMove
  VoiceAttack = JarmenKellVoiceAttack
  VoiceFear = JarmenKellVoiceFear
  SoundStealthOn = StealthOn
  SoundStealthOff = StealthOff
  
  UnitSpecificSounds
    VoiceCreate          = JarmenKellVoiceCreate
    VoiceSnipePilot      = JarmenKellVoiceSnipe
    VoiceGarrison = JarmenKellVoiceGarrison
    VoiceEnter = JarmenKellVoiceMove
    VoiceEnterHostile = JarmenKellVoiceMove
    VoiceGetHealed      = JarmenKellVoiceMove
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER STEALTH_GARRISON SCORE HERO CANNOT_RETALIATE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 200.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL JarmenKellLocomotor

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 5.0
  End
  Behavior = StealthUpdate ModuleTag_05
    StealthDelay                = 2000 ; msec
    StealthForbiddenConditions  = ATTACKING
    InnateStealth               = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
    EnemyDetectionEvaEvent      = EnemyJarmenKellDetected
    OwnDetectionEvaEvent        = OwnJarmenKellDetected
  End

  Behavior = CommandButtonHuntUpdate  ModuleTag_06 ; allows use of command button hunt script with this unit. 
  End

  Behavior = WeaponBonusUpgrade ModuleTag_07
    TriggeredBy = Upgrade_GLAAPBullets
  End
 
  ;Hero units can't be squished!
  ;Behavior = SquishCollide ModuleTag_08
  ;  ;nothing
  ;End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_JarmenKellDie
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
    FX                  = INITIAL FX_BloodyPuddle3
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_JarmenKellDie
    FX                  = INITIAL FX_BloodyPuddle3
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireGLA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End
  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End

; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_09
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14;
  ShadowSizeY = 14;
  Scale = 0.88
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End

;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
Object Boss_InfantryAngryMobNexus 

;**** ART Parameters **************************
  SelectPortrait         = SUAngryMob_L
  ButtonImage            = SUAngryMob
  
  UpgradeCameo1 = Upgrade_GLAArmTheMob
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = None
;      Model = AVBomber_B
    End
  End


;****DESIGN parameters **************************

  DisplayName      = OBJECT:AngryMobNexus
  Side = Boss

  RadarPriority       = NOT_ON_RADAR

  EditorSorting   = INFANTRY
  TransportSlotCount = 0                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLAAngryMobNexusHarmlessWeapon
    Weapon = SECONDARY GLAAngryMobNexusHarmlessWeapon
    Weapon = TERTIARY GLAAngryMobNexusHarmlessWeapon
  End


  ArmorSet
    Conditions      = None
    Armor           = InvulnerableAllArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions      = PLAYER_UPGRADE
    Armor           = ChemSuitHumanArmor
    DamageFX        = InfantryDamageFX
  End

  BuildCost       = 400
  BuildTime       = 7.5          ;in seconds    
  VisionRange     = 150  ; it can scout for the spawn
  ShroudClearingRange = 0

  Prerequisites
    Object = Boss_Barracks
    Object = Boss_InternetCenter
  End

  ExperienceValue    = 5 5 5 5 ;Experience point value at each level

  IsTrainable     = No



  CommandSet    = GLAInfantryAngryMobCommandSet;

;**** AUDIO Parameters *****************************
  VoiceSelect = AngryMobVoiceSelect
  VoiceMove = AngryMobVoiceMove
  VoiceGuard = AngryMobVoiceMove
  VoiceAttack = AngryMobVoiceAttack
  SoundMoveStart = NoSound
  SoundAmbient = AngryMobAmbientLoop
  SoundAmbientRubble = NoSound
  UnitSpecificSounds
    VoiceCreate          = AngryMobVoiceCreate
  End


;**** ENGINEERING Parameters ******************************

  RadarPriority = UNIT
  KindOf = PRELOAD CAN_ATTACK INFANTRY MOB_NEXUS ATTACK_NEEDS_LINE_OF_SIGHT NO_COLLIDE SELECTABLE SCORE
  Body = ImmortalBody ModuleTag_02
    MaxHealth       = 99999.0
    InitialHealth   = 99999.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaChemicalSuits
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Locomotor = SET_NORMAL AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_WANDER AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!
  Locomotor = SET_PANIC AngryMobNexusLocomotor ;Important! don't make the Nexus any faster!

;  Locomotor = SET_NORMAL WanderHumanLocomotor ;Important! don't make the Nexus any faster!
;  Locomotor = SET_WANDER WanderHumanLocomotor ;Important! don't make the Nexus any faster!
;  Locomotor = SET_PANIC WanderHumanLocomotor ;Important! don't make the Nexus any faster!

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End

  Behavior            = SpawnBehavior ModuleTag_05
    SpawnNumber       = 10
    SpawnReplaceDelay = 30000 ; 30 seconds

        SpawnTemplateName = GLAInfantryAngryMobPistol01 ; Aladdin
        SpawnTemplateName = GLAInfantryAngryMobRock02 ; Woman in the Gypsy Costume
        SpawnTemplateName = GLAInfantryAngryMobMolotov02 ; The Lady with the hot sauce
        SpawnTemplateName = GLAInfantryAngryMobPistol03 ; Skinny Guy with the Green Beret
        SpawnTemplateName = GLAInfantryAngryMobRock04 ; Fat guy with the tank top
        SpawnTemplateName = GLAInfantryAngryMobMolotov02 ; The Lady with the hot sauce
        SpawnTemplateName = GLAInfantryAngryMobPistol05 ; The robed dude with the Man-Veil



    ExitByBudding = Yes;!

    InitialBurst = 6 ; the first set of 5 will not delay
    OneShot     = No
    AggregateHealth = Yes
    SlavesHaveFreeWill = No
  End

  Behavior = QueueProductionExitUpdate ModuleTag_06
    UnitCreatePoint   = X:  0.0  Y:  0.0   Z:0.0
    NaturalRallyPoint = X: 0.0  Y:  0.0   Z:0.0
    ExitDelay     = 5000 ; 5 sec
    InitialBurst = 5 ; the first set of 5 will not delay
  End

  Behavior = DestroyDie ModuleTag_07
    DeathTypes = ALL
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 1.0
  GeometryMinorRadius = 1.0
  GeometryHeight = 1.0     
  GeometryIsSmall = Yes 
  Scale = 0.88
  Shadow = SHADOW_VOLUME

End

;----------------------------------------------------------
Object Boss_VehicleTroopCrawler

  ; *** ART Parameters ***
  SelectPortrait         = SNAsltTroop_L
  ButtonImage            = SNAsltTroop
  
  ;UpgradeCameo1 = NONE
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ConditionState = NONE
      Model = NVTClrI
      ;note, the IRSonar particle system is added in StealthDetectorUpdate.cpp, not here
    End
    ConditionState       = REALLYDAMAGED RUBBLE ; THIS IS VERY IMPORTANT... DO NOT REMOVE 'RUBBLE' 
                                                ; @todo find out why a non-animating model like this has such trouble matching
                                                ; reallydamaged against moving against rubble, etc.
      Model              = NVTClrI_D
    End

   ConditionState = OVER_WATER
    Model = NVTClrI
    ParticleSysBone = TreadFX01 AmphibWaveRest
    End
    
   ConditionState = MOVING OVER_WATER
        Model = NVTClrI
        ParticleSysBone = Mist01 AmphibMist
        ParticleSysBone = Mist02 AmphibMist
        ParticleSysBone = Mist03 AmphibMistSide
        ParticleSysBone = Mist04 AmphibMistSide
        ParticleSysBone = TreadFX01 AmphibWave
        ParticleSysBone = TreadFX02 AmphibWave
    End
    
    ConditionState = MOVING
        Model = NVTClrI
    End
    
     ConditionState = MOVING REALLYDAMAGED RUBBLE
        Model = NVTClrI_D
      End
    
    ConditionState       = MOVING OVER_WATER REALLYDAMAGED RUBBLE
        Model            = NVTClrI_D
        ParticleSysBone = Mist01 AmphibMist
        ParticleSysBone = Mist02 AmphibMist
        ParticleSysBone = Mist03 AmphibMistSide
        ParticleSysBone = Mist04 AmphibMistSide
        ParticleSysBone = TreadFX01 AmphibWave
        ParticleSysBone = TreadFX02 AmphibWave
    End
    
   
    
    ConditionState       = OVER_WATER REALLYDAMAGED RUBBLE
        Model            = NVTClrI_D
        ParticleSysBone = TreadFX01 AmphibWaveRest
    End

    TrackMarks = EXTireTrack.tga

    Dust = RocketBuggyDust
    DirtSpray = RocketBuggyDirtSpray
    ; PowerslideSpray = RocketBuggyDirtPowerSlide doesn't powerslide

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.
    LeftFrontTireBone     = Wheel01
    RightFrontTireBone    = Wheel08
    LeftRearTireBone      = Wheel03
    RightRearTireBone     = Wheel05
    MidLeftFrontTireBone  = Wheel02
    MidRightFrontTireBone = Wheel07
    MidLeftRearTireBone   = Wheel04
    MidRightRearTireBone  = Wheel06

    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 0   ; This vehicle doesn't powerslide.

  End


  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:AssaultTroopTransport
  Side = Boss
  EditorSorting   = VEHICLE
  TransportSlotCount = 3                 ;Just enough to fit into a Chinook.
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     NONE
  End
  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    Weapon              = PRIMARY     Infa_ChinaVehicleTroopCrawlerDummyWeapon
  End 
  ArmorSet
    Conditions      = None
    Armor           = AssaultCrawlerArmor
    DamageFX        = TankDamageFX
  End
  BuildCost       = 1500
  BuildTime       = 20.0          ;in seconds    
  VisionRange     = 175           ;Needs to see farther and match it's weapon range -- else troop crawlers will get slaughtered against tanks!
  ShroudClearingRange = 400
  Prerequisites
    Object = Boss_WarFactory
  End
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = Infa_ChinaTroopCrawlerCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = AssaultTroopCrawlerVoiceSelect
  VoiceMove = TroopCrawlerVoiceMove
  VoiceGuard = TroopCrawlerVoiceMove
  VoiceAttack = AssaultTroopCrawlerVoiceAttack
  SoundMoveStart = TroopCrawlerMoveStart
  SoundMoveStartDamaged = TroopCrawlerMoveStart
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate     = AssaultTroopCrawlerVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = TurretMoveLoop
    TruckLandingSound = NoSound ;RocketBuggyLand
    TruckPowerslideSound = NoSound ;RocketBuggyPowerslide
    VoiceCrush = TroopCrawlerVoiceCrush
    VoiceUnload   = TroopCrawlerVoiceUnload
    VoiceEnter = TroopCrawlerVoiceMove
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS TRANSPORT VEHICLE SCORE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 500.0
    InitialHealth   = 500.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 = 480
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = StealthDetectorUpdate ModuleTag_03
    DetectionRate             = 900   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange           = ??? ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
    PingSound                 = IRPing
    LoudPingSound             = IRPingLoud
    IRParticleSysName         = IRDetectSonar
    IRBrightParticleSysName   = IRDetectSonarBright
    IRGridParticleSysName     = IRDetectGrid
    IRBeaconParticleSysName   = IRLenzflare
    IRParticleSysBone         = IRFX
  End

;OBSOLETE
;  Behavior = AIUpdateInterface ModuleTag_04
;    Turret
;      ControlledWeaponSlots = PRIMARY
;    End
;  End
; Dude, quit changing this.  He is NOT an AssaultTransport.  The guys don't hop out and attack.  He is a transport.
;  Behavior = AssaultTransportAIUpdate ModuleTag_NewAI
;    MembersGetHealedAtLifeRatio = 0.5
;  End
  Behavior = TransportAIUpdate ModuleTag_CorrectAI
  End

  Locomotor = SET_NORMAL TroopCrawlerLocomotor LTVPAmphibiousLocomotor
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 50.0
  End
  Behavior = TransportContain ModuleTag_06
    PassengersAllowedToFire = Yes
    Slots                 = 12
    InitialPayload        = Infa_ChinaInfantryMiniGunner 12
    ScatterNearbyOnExit   = Yes
    HealthRegen%PerSec    = 10
    DamagePercentToUnits  = 50% ;10%
    AllowInsideKindOf     = INFANTRY
    ExitDelay         = 250
    NumberOfExitPaths = 3 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
    GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
    ArmedRidersUpgradeMyWeaponSet = Yes
  End

  Behavior = SlowDeathBehavior ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED
    DestructionDelay = 1
    FX  = FINAL    FX_SupplyTruckExplosionOneFinal
    OCL = FINAL    OCL_FinalAssaultTroopCrawlerDebris
  End

  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_NukeCannonDamageTransition
  End

  Behavior = DestroyDie ModuleTag_09
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  Behavior = FXListDie ModuleTag_10
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  Behavior = CreateCrateDie ModuleTag_12
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = CreateObjectDie ModuleTag_25
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_ChinaRedGuardEjection01
    ExemptStatus = HIJACKED
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End
  Behavior        = PropagandaTowerBehavior ModuleTag_22
    Radius                = 100
    DelayBetweenUpdates   = 4000 ; in milliseconds
    HealPercentEachSecond = 2%   ; get this % of max health every second 
    PulseFX               = FX_PropagandaTowerPropagandaPulse ;plays as often as DelayBetweenUpdates
    UpgradeRequired       = Upgrade_ChinaSubliminalMessaging
    UpgradedHealPercentEachSecond = 4%   ; get this % of max health every second 
    UpgradedPulseFX       = FX_PropagandaTowerSubliminalPulse ;plays as often as DelayBetweenUpdates
  End

  Geometry = BOX
  GeometryMajorRadius = 22.0
  GeometryMinorRadius = 9.0
  GeometryHeight = 13.0
  Scale = 0.97     
  GeometryIsSmall = No
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length    

End

;------------------------------------------------------------------------------
Object Boss_TankPaladin

  ; *** ART Parameters ***
  SelectPortrait         = SAPaladin_L
  ButtonImage            = SAPaladin
  
  UpgradeCameo1 = Upgrade_AmericaBattleDrone
  UpgradeCameo2 = Upgrade_AmericaScoutDrone
  UpgradeCameo3 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo4 = Upgrade_AmericaCompositeArmor
  UpgradeCameo5 = Upgrade_AmericaHallfireDrone

  Draw = W3DTankDraw ModuleTag_01
    
    ExtraPublicBone = Laser 

    ConditionState        = NONE
      Model               = AVPaladin
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY TurretMS
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY TurretFX
      WeaponLaunchBone = PRIMARY TurretMS
    End
    
    ConditionState        = REALLYDAMAGED
      Model               = AVPaladin_D
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY TurretMS
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY TurretFX
      WeaponLaunchBone = PRIMARY TurretMS
    End
    
    ConditionState        = RUBBLE
      Model               = AVPaladin_D
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY TurretMS
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY TurretFX
      WeaponLaunchBone = PRIMARY TurretMS
    End
    
    TrackMarks           = EXTnkTrack.tga
    TreadAnimationRate      = 2.0  ; amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:NukePaladin
  Side = Boss
  EditorSorting   = VEHICLE
  TransportSlotCount = 3                 ;how many "slots" we take in a transport (0 == not transportable)
   WeaponSet
    Conditions = None 
    Weapon = PRIMARY NukeCannonGun
    Weapon = SECONDARY NukeCannonNeutronWeapon
    AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI
    ShareWeaponReloadTime = Yes
  End
  ArmorSet
    Conditions      = None
    Armor           = TankArmor
    DamageFX        = TankDamageFX
  End
  ;ArmorSet
  ;  Conditions      = PLAYER_UPGRADE
  ;  Armor           = UpgradedTankArmor
  ;  DamageFX        = TankDamageFX
  ;End
  BuildCost       = 1500
  BuildTime       = 7.0          ;in seconds    
  VisionRange     = 150
  ShroudClearingRange = 300
  Prerequisites
    Object = Boss_WarFactory
  End

  ExperienceValue        = 100 100 200 400 ;Experience point value at each level
  ExperienceRequired     = 0 200 300 600 ;Experience points needed to gain each level

  IsTrainable     = Yes  ;Can gain experience
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet    = ChinaVehicleNukeCannonCommandSet
    
  ; *** AUDIO Parameters ***
  VoiceSelect = PaladinTankVoiceSelect
  VoiceMove = PaladinTankVoiceMove
  VoiceGuard = PaladinTankVoiceMove
  VoiceAttack = PaladinTankVoiceAttack
  SoundMoveStart = PaladinTankMoveStart
  SoundMoveStartDamaged = PaladinTankMoveStart
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate     = PaladinTankVoiceCreate
    TurretMoveLoop = OverlordTankTurretMoveLoop
    SoundEject = PilotSoundEject
    VoiceEject = PilotVoiceEject
    VoiceCrush = PaladinTankVoiceCrush
    VoiceEnter = PaladinTankVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 800.0
    InitialHealth   = 800.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 = 1000
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 180 ;60   // turn rate, in degrees per sec
      ControlledWeaponSlots = PRIMARY
    End
    ;AltTurret
    ;  TurretTurnRate = 9000;
    ;  ControlledWeaponSlots = SECONDARY
    ;End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL CrusaderLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End
  
  ; Turret fly off death
  Behavior = SlowDeathBehavior ModuleTag_05
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 50
;    ModifierBonusPerOverkillPercent = 30%  ; negative means less likely to pick this in the face of much damage, positive means more likely
    DestructionDelay = 500
    DestructionDelayVariance = 100
    FX  = INITIAL  FX_GenericTankDeathEffect
    FX  = FINAL    FX_GenericTankDeathExplosion
    OCL = FINAL    OCL_PaladinTankDeathEffect
  End
  
  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 50
    DestructionDelay = 2000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    OCL = FINAL    OCL_PaladinTankDeathEffect
    FX  = FINAL    FX_GenericTankDeathExplosion 
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_07
    WeaponTemplate        = PaladinPointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    SecondaryTargetTypes  = INFANTRY
    ScanRate              = 500
    ScanRange             = 120.0
    PredictTargetVelocityFactor = 3.0
  End

  Behavior = ObjectCreationUpgrade ModuleTag_08
    UpgradeObject = OCL_AmericanBattleDrone
    TriggeredBy   = Upgrade_AmericaBattleDrone
    ConflictsWith = Upgrade_AmericaScoutDrone Upgrade_AmericaHellfireDrone
  End
  Behavior = ObjectCreationUpgrade ModuleTag_09
    UpgradeObject = OCL_AmericanScoutDrone
    TriggeredBy   = Upgrade_AmericaScoutDrone
    ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaHellfireDrone
  End 
  Behavior = ObjectCreationUpgrade ModuleTag_19
    UpgradeObject = OCL_AmericanHellfireDrone
    TriggeredBy   = Upgrade_AmericaHellfireDrone
    ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaScoutDrone
  End Upgrade_AmericaHallfireDrone

  Behavior = ProductionUpdate ModuleTag_10
    MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_11
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior = TransitionDamageFX ModuleTag_12
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior = FXListDie ModuleTag_13
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_14
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_CrusaderTank_CrushEffect
  End
  Behavior = DestroyDie ModuleTag_15
    DeathTypes = NONE +CRUSHED +SPLATTED
  End
  Behavior = CreateCrateDie ModuleTag_16
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End
  Behavior = EjectPilotDie ModuleTag_17
    DeathTypes = ALL -CRUSHED -SPLATTED
    ExemptStatus = HIJACKED
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End

  Behavior = CreateObjectDie ModuleTag_25
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_AmericaTankCrewEjection
    ExemptStatus = HIJACKED
  End

  Behavior = MaxHealthUpgrade ModuleTag_18
    TriggeredBy   = Upgrade_AmericaCompositeArmor
    AddMaxHealth  = 100.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry = BOX
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 10.0     
  GeometryIsSmall = Yes    
  Shadow = SHADOW_VOLUME
  Scale = 1.05
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object Boss_VehicleListeningOutpost

  ; *** ART Parameters ***
  SelectPortrait         = NVLOutpost_L
  ButtonImage            = NVLOutpost
  
  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes

    ExtraPublicBone = IRFX
    
    ConditionState = NONE
      Model = NVLOUTPOST
    End

    ConditionState       = REALLYDAMAGED  
      Model              = NVLOUTPOST_D
    End

    ConditionState       = RUBBLE   
      Model              = NVLOUTPOST_D1
      HideSubObject      = TURRET01      ;Hide the dish, since an ocl makes an airborne one is slow death behavior
    End

    TrackMarks = EXTireTrack.tga

    Dust = RocketBuggyDust
    DirtSpray = RocketBuggyDirtSpray
    LeftFrontTireBone     = TIRE01
    RightFrontTireBone    = TIRE02
    LeftRearTireBone      = TIRE03
    RightRearTireBone     = TIRE04
    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 0   ; This vehicle doesn't powerslide.
  End

  Draw = W3DModelDraw ModuleTag_33
    OkToChangeModelColor = Yes
    
    ConditionState = NONE
      Model = NVLOUTPOST_B
      Animation = NVLOUTPOST_B.NVLOUTPOST_B
      AnimationMode     = LOOP
      TransitionKey = Trans_Deployed
    End
    ConditionState = REALLYDAMAGED
      Model = NVLOUTPOST_BD
      Animation = NVLOUTPOST_BD.NVLOUTPOST_BD
      AnimationMode     = LOOP
      TransitionKey = Trans_Deployed_ReallyDamaged
    End
    
    ConditionState = MOVING
      Model = NVLOUTPOST_A
      Animation = NVLOUTPOST_A.NVLOUTPOST_A
      AnimationMode     = LOOP
      TransitionKey = Trans_Moving
    End
    ConditionState = REALLYDAMAGED MOVING
      Model = NVLOUTPOST_AD
      Animation = NVLOUTPOST_AD.NVLOUTPOST_AD
      AnimationMode     = LOOP
      TransitionKey = Trans_Moving_ReallyDamaged
    End

    ConditionState = RUBBLE
      Model = NONE
    End
    AliasConditionState = RUBBLE MOVING

    ;**** PACKING AND UNPACKING MODES ***
    TransitionState     = Trans_Moving Trans_Deployed
      Model = NVLOUTPOST_C
      Animation = NVLOUTPOST_C.NVLOUTPOST_C
      AnimationMode     = ONCE
    End
    TransitionState     = Trans_Moving_ReallyDamaged Trans_Deployed_ReallyDamaged
      Model = NVLOUTPOST_CD
      Animation = NVLOUTPOST_CD.NVLOUTPOST_CD
      AnimationMode     = ONCE
    End

    TransitionState     = Trans_Deployed Trans_Moving 
      Model = NVLOUTPOST_C
      Animation = NVLOUTPOST_C.NVLOUTPOST_C
      AnimationMode     = ONCE_BACKWARDS
    End
    TransitionState     = Trans_Deployed_ReallyDamaged Trans_Moving_ReallyDamaged 
      Model = NVLOUTPOST_CD
      Animation = NVLOUTPOST_CD.NVLOUTPOST_CD
      AnimationMode     = ONCE_BACKWARDS
    End
  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:AssaultListeningOutpost
  Side = Boss
  EditorSorting   = VEHICLE
  TransportSlotCount = 4    ;This means, 'how many seats do I occupy in another transport.'
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     NONE
  End
  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    Weapon              = PRIMARY     ListeningOutpostUpgradedDummyWeapon
  End 

  ArmorSet
    Conditions      = None
    Armor           = TankArmor
    DamageFX        = TankDamageFX
  End
  BuildCost       = 350
  BuildTime       = 7.0          ;in seconds    
  VisionRange     = 250
  ShroudClearingRange = 500
  Prerequisites
    Object = Boss_WarFactory
  End
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = Infa_ChinaListeningOutpostCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = ListeningOutpostVoiceSelect
  VoiceMove = ListeningOutpostVoiceMove
  VoiceGuard = ListeningOutpostVoiceMove
  VoiceAttack = ListeningOutpostVoiceAttack
  SoundMoveStart = RadarVanMoveStart
  SoundMoveStartDamaged = RadarVanMoveStart
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate     = ListeningOutpostVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = TurretMoveLoop
    TruckLandingSound = NoSound ;RocketBuggyLand
    TruckPowerslideSound = NoSound ;RocketBuggyPowerslide
    VoiceCrush = NoSound
    VoiceUnload   = NoSound ; nothing recorded
    VoiceEnter = ListeningOutpostVoiceMove
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS TRANSPORT VEHICLE SCORE REVEALS_ENEMY_PATHS CANNOT_RETALIATE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 450.0
    InitialHealth   = 450.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 = 590
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = StealthDetectorUpdate ModuleTag_03
    DetectionRate             = 900   ; how often to rescan for stealthed things in my sight (msec)
    DetectionRange            = 300 ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
;    PingSound                 = IRPing
;    LoudPingSound             = IRPingLoud
;    IRParticleSysName         = IRDetectSonar
;    IRBrightParticleSysName   = IRDetectSonarBright
    IRGridParticleSysName     = IRDetectGrid
    IRBeaconParticleSysName   = IRLenzflare
    IRParticleSysBone         = IRFX
  End

  Behavior = TransportAIUpdate ModuleTag_99
    AutoAcquireEnemiesWhenIdle = No ; let the contained do it for themselves
  End
  Behavior = StealthUpdate ModuleTag_04
    StealthDelay                = 2000 ; msec
    StealthForbiddenConditions  = MOVING RIDERS_ATTACKING
    FriendlyOpacityMin          = 50.0%
    FriendlyOpacityMax          = 100.0%
    InnateStealth               = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Locomotor = SET_NORMAL ListeningOutpostLocomotor
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 90.0
  End
  Behavior = TransportContain ModuleTag_06
    PassengersAllowedToFire = Yes
    Slots                 = 10
    InitialPayload        = Infa_ChinaInfantryTankHunter 6
    ScatterNearbyOnExit   = Yes
    HealthRegen%PerSec    = 10
    DamagePercentToUnits  = 50%
    AllowInsideKindOf     = INFANTRY
    ExitDelay         = 250
    NumberOfExitPaths = 3 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
    GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
    ArmedRidersUpgradeMyWeaponSet = Yes
  End

  Behavior = SlowDeathBehavior ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED
    DestructionDelay = 1789
    FX  = INITIAL    FX_SupplyTruckExplosionOneFinal
    OCL = INITIAL    OCL_InitialListeningOutpostDebris
    FX  = FINAL    FX_SupplyTruckExplosionOneFinal
    OCL = FINAL    OCL_FinalListeningOutpostDebris
  End

  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_NukeCannonDamageTransition
  End

  Behavior = DestroyDie ModuleTag_09
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  Behavior = FXListDie ModuleTag_10
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  Behavior = CreateCrateDie ModuleTag_12
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = CreateObjectDie ModuleTag_25
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_ChinaRedGuardEjection02
    ExemptStatus = HIJACKED
  End

  Behavior        = PropagandaTowerBehavior ModuleTag_13
    Radius                = 75
    DelayBetweenUpdates   = 4000 ; in milliseconds
    HealPercentEachSecond = 4%   ; get this % of max health every second 
    PulseFX               = FX_PropagandaTowerPropagandaPulse ;plays as often as DelayBetweenUpdates
    UpgradeRequired       = Upgrade_ChinaSubliminalMessaging
    UpgradedHealPercentEachSecond = 4%   ; get this % of max health every second 
    UpgradedPulseFX       = FX_PropagandaTowerSubliminalPulse ;plays as often as DelayBetweenUpdates
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry = BOX
  GeometryMajorRadius = 22.0
  GeometryMinorRadius = 9.0
  GeometryHeight = 13.0     
  GeometryIsSmall = No
  Scale = 1.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length    

End



;------------------------------------------------------------------------------
;The Marauder Tank, for the Warlord General.  
Object Boss_TankMarauder

  ; *** ART Parameters ***
  SelectPortrait         = SUMarauder_L
  ButtonImage            = SUMarauder
  
  UpgradeCameo1 = Upgrade_GLAToxinShells
  UpgradeCameo2 = Upgrade_GLAJunkRepair
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTankDraw ModuleTag_01
    OkToChangeModelColor = Yes

; no crate upgrade
    ConditionState = NONE
      Model = UVMarauder
      Turret = Turret
      ShowSubObject = Turret
      HideSubObject = TurretUp01 TurretUp02 BarrelFX01 ; Since we are showing one of three turrets, we need to then hide the subobject muzzleflash
      WeaponFireFXBone = PRIMARY BarrelMS
      WeaponRecoilBone = PRIMARY Barrel
      WeaponMuzzleFlash = PRIMARY BarrelFX
      WeaponLaunchBone = PRIMARY BarrelMS
    End

    ConditionState = REALLYDAMAGED
      Model = UVMarauder_d
      Turret = Turret
      ShowSubObject = Turret
      HideSubObject = TurretUp01 TurretUp02 BarrelFX01
      WeaponFireFXBone = PRIMARY BarrelMS
      WeaponRecoilBone = PRIMARY Barrel
      WeaponMuzzleFlash = PRIMARY BarrelFX
      WeaponLaunchBone = PRIMARY BarrelMS
    End

    ConditionState = RUBBLE
      Model = UVMarauder_d
      Turret = Turret
      ShowSubObject = Turret
      HideSubObject = TurretUp01 TurretUp02 BarrelFX01
      WeaponFireFXBone = PRIMARY BarrelMS
      WeaponRecoilBone = PRIMARY Barrel
      WeaponMuzzleFlash = PRIMARY BarrelFX
      WeaponLaunchBone = PRIMARY BarrelMS
    End

; crate upgrade 1
    ConditionState = WEAPONSET_CRATEUPGRADE_ONE
      Model = UVMarauder
      Turret = TurretUp01
      ShowSubObject = TurretUp01
      HideSubObject = Turret TurretUp02 BarrelUp01FX01
      WeaponFireFXBone = PRIMARY BarrelUp01MS
      WeaponRecoilBone = PRIMARY BarrelUp01
      WeaponMuzzleFlash = PRIMARY BarrelUp01FX
      WeaponLaunchBone = PRIMARY BarrelUp01MS
    End

    ConditionState = REALLYDAMAGED WEAPONSET_CRATEUPGRADE_ONE
      Model = UVMarauder_d
      Turret = TurretUp01
      ShowSubObject = TurretUp01
      HideSubObject = Turret TurretUp02 BarrelUp01FX01
      WeaponFireFXBone = PRIMARY BarrelUp01MS
      WeaponRecoilBone = PRIMARY BarrelUp01
      WeaponMuzzleFlash = PRIMARY BarrelUp01FX
      WeaponLaunchBone = PRIMARY BarrelUp01MS
    End

    ConditionState = RUBBLE WEAPONSET_CRATEUPGRADE_ONE
      Model = UVMarauder_d
      Turret = TurretUp01
      ShowSubObject = TurretUp01
      HideSubObject = Turret TurretUp02 BarrelUp01FX01
      WeaponFireFXBone = PRIMARY BarrelUp01MS
      WeaponRecoilBone = PRIMARY BarrelUp01
      WeaponMuzzleFlash = PRIMARY BarrelUp01FX
      WeaponLaunchBone = PRIMARY BarrelUp01MS
    End

; crate upgrade 2
    ConditionState = WEAPONSET_CRATEUPGRADE_TWO
      Model = UVMarauder
      Turret = TurretUp02
      ShowSubObject = TurretUp02
      HideSubObject = Turret TurretUp01 BarrelUp02FX01 BarrelUp02FX02
      WeaponFireFXBone = PRIMARY BarrelUp02MS
      WeaponRecoilBone = PRIMARY BarrelUp02
      WeaponMuzzleFlash = PRIMARY BarrelUp02FX
      WeaponLaunchBone = PRIMARY BarrelUp02MS
    End

    ConditionState = REALLYDAMAGED WEAPONSET_CRATEUPGRADE_TWO
      Model = UVMarauder_d
      Turret = TurretUp02
      ShowSubObject = TurretUp02
      HideSubObject = Turret TurretUp01 BarrelUp02FX01 BarrelUp02FX02
      WeaponFireFXBone = PRIMARY BarrelUp02MS
      WeaponRecoilBone = PRIMARY BarrelUp02
      WeaponMuzzleFlash = PRIMARY BarrelUp02FX
      WeaponLaunchBone = PRIMARY BarrelUp02MS
    End

    ConditionState = RUBBLE WEAPONSET_CRATEUPGRADE_TWO
      Model = UVMarauder_d
      Turret = TurretUp02
      ShowSubObject = TurretUp02
      HideSubObject = Turret TurretUp01 BarrelUp02FX01 BarrelUp02FX02
      WeaponFireFXBone = PRIMARY BarrelUp02MS
      WeaponRecoilBone = PRIMARY BarrelUp02
      WeaponMuzzleFlash = PRIMARY BarrelUp02FX
      WeaponLaunchBone = PRIMARY BarrelUp02MS
    End

    TrackMarks = EXTnkTrack.tga
    TreadAnimationRate = 2.0;  amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.

  End

  ; ***DESIGN parameters ***
  DisplayName           = OBJECT:Marauder
  Side                  = Boss
  EditorSorting         = VEHICLE
  TransportSlotCount    = 3                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY MarauderTankGun
    ;Weapon           = SECONDARY LightGenericTankMachineGun
  ;PreferredAgainst   = SECONDARY     INFANTRY
  End
  WeaponSet
    Conditions = CRATEUPGRADE_ONE
    Weapon = PRIMARY MarauderTankGunUpgradeOne
    Weapon           = SECONDARY LightGenericTankMachineGun
  PreferredAgainst   = SECONDARY     INFANTRY

  End
  WeaponSet
    Conditions = CRATEUPGRADE_TWO 
    Weapon = PRIMARY MarauderTankGunUpgradeTwo
    Weapon           = SECONDARY MediumGenericTankMachineGun
  PreferredAgainst   = SECONDARY     INFANTRY
  End
  ArmorSet
    Conditions      = None
    Armor           = TankArmor
    DamageFX        = TankDamageFX
  End
  BuildCost       = 1250
  BuildTime       = 3.0          ;in seconds    
  VisionRange     = 125
  ShroudClearingRange = 300
  Prerequisites
    Object = Boss_WarFactory
  End

  ExperienceValue = 100 100 200 300    ;Experience point value at each level
  ExperienceRequired = 0 200 300 600  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet           = GLATankMarauderCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = MarauderTankVoiceSelect
  VoiceMove = MarauderTankVoiceMove
  VoiceGuard = MarauderTankVoiceMove
  VoiceAttack = MarauderTankVoiceAttack
  SoundMoveStart = MarauderTankMoveStart
  SoundMoveStartDamaged = MarauderTankMoveStart
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate     = MarauderTankVoiceCreate
    ;TurretMoveStart = NoSound
    TurretMoveLoop = NukeCannonTurretMoveLoop
    VoiceSalvage = MarauderTankVoiceSalvage      
    VoiceCrush = MarauderTankVoiceCrush
    VoiceEnter = MarauderTankVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS SALVAGER WEAPON_SALVAGER VEHICLE SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 860.0
    InitialHealth   = 860.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 = 860
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 130 ;60   // turn rate, in degrees per sec
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL MarauderLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End
  Behavior = AutoHealBehavior ModuleTag_05
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 50
    DestructionDelay = 1000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    OCL = FINAL    OCL_MarauderTankDeathEffect  
    FX  = FINAL    FX_BattleMasterExplosionOneFinal
  End

  Behavior = CreateObjectDie ModuleTag_250
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_GLATankCrewEjection
    ExemptStatus = HIJACKED
  End

  Behavior = CreateCrateDie ModuleTag_07
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End
  
  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End
  
  ; A crushing defeat
  Behavior = FXListDie ModuleTag_09
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry = BOX
  GeometryMajorRadius = 17.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 9.5     
  GeometryIsSmall = Yes 
  Shadow = SHADOW_VOLUME
  Scale = 1.0   
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End


;------------------------------------------------------------------------------
Object Boss_VehicleInfernoCannon

  ; *** ART Parameters ***
  SelectPortrait         = SNInferno_L
  ButtonImage            = SNInferno
  
  UpgradeCameo1 = Upgrade_ChinaBlackNapalm
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw                    = W3DTankDraw ModuleTag_01
    OkToChangeModelColor  = Yes
    ConditionState        = NONE
      Model               = NVInferno
      Turret              = Turret
      TurretPitch         = TurretEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Muzzle
    End
    
    ConditionState        = RUBBLE REALLYDAMAGED
      Model               = NVInferno_D
      Turret              = Turret
      TurretPitch         = TurretEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Muzzle
    End
    
    TrackMarks           = EXTnkTrack.tga
    TreadAnimationRate      = 2.0  ; amount of tread texture to move per second
  End

  ; ***DESIGN parameters ***
  DisplayName        = OBJECT:InfernoCannon
  Side               = Boss
  EditorSorting      = VEHICLE
  TransportSlotCount = 3                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions       = None 
    Weapon           = PRIMARY InfernoCannonGun
  End
  WeaponSet
    Conditions       = PLAYER_UPGRADE 
    Weapon           = PRIMARY InfernoCannonGunUpgraded
  End
  ArmorSet
    Conditions      = None
    Armor           = TankArmor
    DamageFX        = TankDamageFX
  End
  BuildCost          = 1000
  BuildTime          = 7.0          ;in seconds    
  VisionRange        = 360
  ShroudClearingRange = 600
  Prerequisites
    Object = Boss_WarFactory
    Object = Boss_InternetCenter
  End

  ExperienceValue = 50 50 100 150    ;Experience point value at each level
  ExperienceRequired = 0 100 200 400  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = ChinaVehicleInfernoCannonCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect       = InfernoCannonVoiceSelect
  VoiceMove         = InfernoCannonVoiceMove
  VoiceGuard        = InfernoCannonVoiceMove
  VoiceAttack       = InfernoCannonVoiceAttack
  SoundMoveStart    = InfernoCannonMoveStart
  SoundMoveStartDamaged = InfernoCannonMoveStart
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop
  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate     = InfernoCannonVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop  = OverlordTankTurretMoveLoop
    VoiceCrush          = InfernoCannonVoiceCrush
    VoiceEnter         = InfernoCannonVoiceMove
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority     = UNIT
  KindOf            = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS VEHICLE SCORE
  
  Body              = ActiveBody ModuleTag_02
    MaxHealth       = 240.0
    InitialHealth   = 240.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 = 240
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior = VeterancyGainCreate ModuleTag_03
    StartingLevel = VETERAN
    ScienceRequired = SCIENCE_ArtilleryTraining
  End

  Behavior = AIUpdateInterface ModuleTag_04
    Turret
      TurretTurnRate = 100
      TurretPitchRate = 100
      AllowsPitch = Yes
      FirePitch = 45
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
  End
  Locomotor = SET_NORMAL InfernoLocomotor
  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 50.0
  End

  ; A crushing defeat
  Behavior               = FXListDie ModuleTag_06
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX         = FX_CarCrush
  End
  Behavior               = CreateObjectDie ModuleTag_07
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList    = OCL_CrusaderTank_CrushEffect
  End
  Behavior = SlowDeathBehavior ModuleTag_08
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 50
    DestructionDelay = 2000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_CrusaderCatchFire  
    FX  = FINAL    FX_GenericTankDeathExplosion 
    OCL = FINAL    OCL_InfernoCannonDeathEffect
  End

  Behavior                 = TransitionDamageFX ModuleTag_09
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:-7 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior         = CreateCrateDie ModuleTag_10
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = CreateObjectDie ModuleTag_250
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_ChinaRedGuardEjection02
    ExemptStatus = HIJACKED
  End

  Behavior      = WeaponSetUpgrade ModuleTag_11
    TriggeredBy = Upgrade_ChinaBlackNapalm
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = DestroyDie ModuleTag_22
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  Geometry            = BOX
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 10.0
  GeometryHeight      = 15.0     
  GeometryIsSmall     = Yes
  Scale = 1.0
  Shadow              = SHADOW_VOLUME 
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length   

End


;------------------------------------------------------------------------------
;China Dragon Tank
Object Boss_TankDragon

  ; *** ART Parameters ***
  SelectPortrait         = SNDragonTank_L
  ButtonImage            = SNDragonTank
  
  UpgradeCameo1 = Upgrade_ChinaBlackNapalm
  UpgradeCameo2 = Upgrade_AmericaCompositeArmor
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTankDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = NVDragon
      Turret = Turret
      TurretPitch = TURRETEL
      WeaponFireFXBone = PRIMARY WeaponA
      WeaponLaunchBone = PRIMARY WeaponA
      WeaponFireFXBone = SECONDARY WeaponA
      WeaponLaunchBone = SECONDARY WeaponA
    End
    ConditionState = REALLYDAMAGED
      Model = NVDragon_D
      Turret = Turret
      TurretPitch = TURRETEL
      WeaponFireFXBone = PRIMARY WeaponA
      WeaponLaunchBone = PRIMARY WeaponA
      WeaponFireFXBone = SECONDARY WeaponA
      WeaponLaunchBone = SECONDARY WeaponA
    End
    ConditionState = RUBBLE
      Model = NVDragon_D
      Turret = Turret
      TurretPitch = TURRETEL
      WeaponFireFXBone = PRIMARY WeaponA
      WeaponLaunchBone = PRIMARY WeaponA
      WeaponFireFXBone = SECONDARY WeaponA
      WeaponLaunchBone = SECONDARY WeaponA
    End
    
    TrackMarks              = EXTnkTrack.tga
    TreadAnimationRate      = 2.0  ; amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Dragon
  Side = Boss
  EditorSorting   = VEHICLE
  TransportSlotCount = 2                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY DragonTankFlameWeapon
    Weapon = SECONDARY DragonTankFireWallWeapon
    AutoChooseSources = SECONDARY NONE
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon = PRIMARY DragonTankFlameWeaponUpgraded
    Weapon = SECONDARY DragonTankFireWallWeaponUpgraded
    AutoChooseSources = SECONDARY NONE
    WeaponLockSharedAcrossSets = Yes ; This set is so similar to the default set that it can hold the weapon lock
  End

  ArmorSet
    Conditions      = None
    Armor           = DragonTankArmor
    DamageFX        = TankDamageFX
  End
  BuildCost       = 500
  BuildTime       = 3.0          ;in seconds    
  VisionRange     = 100
  ShroudClearingRange = 200
  Prerequisites
    Object = Boss_WarFactory
  End

  ExperienceValue = 50 50 100 150    ;Experience point value at each level
  ExperienceRequired = 0 100 150 300  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet    = ChinaTankDragonCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = DragonTankVoiceSelect
  VoiceMove = DragonTankVoiceMove
  VoiceGuard = DragonTankVoiceMove
  VoiceAttack = DragonTankVoiceAttack
  SoundMoveStart = DragonTankMoveStart
  SoundMoveStartDamaged = DragonTankMoveStart
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate     = DragonTankVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = TurretMoveLoop
    VoiceEnter = DragonTankVoiceMove
    VoiceFlameLocation = DragonTankVoiceFireStorm
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 560.0
    InitialHealth   = 560.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 = 560
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 120
      TurretPitchRate = 120
      AllowsPitch = Yes
      MinPhysicalPitch = -15

      TurretFireAngleSweep = PRIMARY 10
      TurretFireAngleSweep = SECONDARY 60
      TurretSweepSpeedModifier = PRIMARY 0.5    ; Sweep slower than you turn (aim for 30 for art)
      TurretSweepSpeedModifier = SECONDARY 2.0  ; Sweep faster than you turn
      ControlledWeaponSlots = PRIMARY SECONDARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL DragonLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End


  Behavior = WeaponSetUpgrade ModuleTag_05
    TriggeredBy = Upgrade_ChinaBlackNapalm
  End

  ; A crushing defeat
  Behavior = DestroyDie ModuleTag_06
    DeathTypes = NONE +CRUSHED +SPLATTED
  End
  Behavior = FXListDie ModuleTag_07
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_08
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_CrusaderTank_CrushEffect
  End
  Behavior = CreateCrateDie ModuleTag_09
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End


  ; just explode death
  Behavior = SlowDeathBehavior ModuleTag_10
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 15
    DestructionDelay = 500
    DestructionDelayVariance = 500
    FX  = INITIAL  FX_BattleMasterExplosionOneFinal
    OCL = FINAL    OCL_DragonDebris
    FX  = FINAL    FX_DragonTankDeathExplosionFinal
  End
  
  ; Catch fire, and explode death  
  Behavior = SlowDeathBehavior ModuleTag_11
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 28
    DestructionDelay = 2000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    OCL = MIDPOINT OCL_RadiationFieldSmall
    FX  = MIDPOINT WeaponFX_NapalmMissileDetonation
    OCL = FINAL    OCL_DragonDebris  
    FX  = FINAL    FX_GenericTankDeathExplosion 
  End

  ; Napalm spills out, and explode death
  Behavior = SlowDeathBehavior ModuleTag_120
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 40
    DestructionDelay = 2000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_DragonNapalmSpill
    OCL = MIDPOINT OCL_RadiationFieldSmall
    FX  = MIDPOINT WeaponFX_NapalmMissileDetonation
    OCL = FINAL    OCL_DragonDebris  
    FX  = FINAL    FX_DragonTankDeathExplosionFinal
  End

  ; Turret fly off death
  Behavior = SlowDeathBehavior ModuleTag_121
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 24
    DestructionDelay = 500
    DestructionDelayVariance = 100
    FX  = INITIAL  FX_GenericTankDeathEffect
    FX  = INITIAL  WeaponFX_NapalmMissileDetonation
    OCL = MIDPOINT OCL_RadiationFieldSmall
    OCL = MIDPOINT OCL_DragonDebris
    FX  = FINAL    FX_GenericTankDeathExplosionFinal
  End


  Behavior = FlammableUpdate ModuleTag_12
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = TransitionDamageFX ModuleTag_13
;   ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedParticleSystem2 = Bone:Smoke RandomBone:Yes Psys:DragonTransitionFire
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_DragonDamageTransition
  End

  Behavior = MaxHealthUpgrade ModuleTag_14
    TriggeredBy   = Upgrade_AmericaCompositeArmor
    AddMaxHealth  = 100.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Geometry = BOX
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 11.0   ; Height set to allow clear clipping of projectile stream  
  GeometryIsSmall = Yes
  Scale = 1.0
  Shadow = SHADOW_VOLUME    
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End


;------------------------------------------------------------------------------
Object Boss_TankGattling

  ; *** ART Parameters ***
  SelectPortrait         = SNGatlingTank_L
  ButtonImage            = SNGatlingTank
  
  ;UpgradeCameo1 = Upgrade_Nationalism
  UpgradeCameo1 = Upgrade_ChinaChainGuns
  UpgradeCameo2 = Upgrade_AmericaCompositeArmor
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw                      = W3DTankDraw ModuleTag_01
    OkToChangeModelColor    = Yes
    
    DefaultConditionState        
      Model               = NVGattTank
      Animation           = NVGattTank.NVGattTank
      AnimationMode       = MANUAL
      Turret              = TURRET01
      TurretPitch         = TURRETEL01
      WeaponMuzzleFlash   = PRIMARY   MuzzleFX
      WeaponFireFXBone    = PRIMARY   Muzzle
      WeaponMuzzleFlash   = SECONDARY MuzzleFX
      WeaponFireFXBone    = SECONDARY Muzzle
    End

    ConditionState        = REALLYDAMAGED RUBBLE         
      Model               = NVGattTank_D
    End


    ;-----pristine attacking----------------------
    ConditionState        = ATTACKING
      Model               = NVGattTank
      Animation           = NVGattTank.NVGattTank
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  s l o w l y
    End

    ConditionState        = CONTINUOUS_FIRE_SLOW ATTACKING
      Model               = NVGattTank
      Animation           = NVGattTank.NVGattTank
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End

    ConditionState        = CONTINUOUS_FIRE_MEAN ATTACKING
      Model               = NVGattTank
      Animation           = NVGattTank.NVGattTank
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End

    ConditionState        = CONTINUOUS_FIRE_FAST ATTACKING
      Model               = NVGattTank
      Animation           = NVGattTank.NVGattTank
      AnimationMode       = LOOP
      ParticleSysBone     = Muzzle01 GattlingMuzzleSmoke
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
    End

    ;-----damaged attacking----------------------
    ConditionState  REALLYDAMAGED ATTACKING         
      Model               = NVGattTank_D
      Animation           = NVGattTank_D.NVGattTank_D
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.5 0.5 ;set this state to animate  extemely sloowly
    End
    ConditionState        = CONTINUOUS_FIRE_SLOW REALLYDAMAGED ATTACKING
      Model               = NVGattTank_D
      Animation           = NVGattTank_D.NVGattTank_D
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.8 0.8 ;set this state to animate  s l o w l y
    End

    ConditionState        = CONTINUOUS_FIRE_MEAN REALLYDAMAGED ATTACKING
      Model               = NVGattTank_D
      Animation           = NVGattTank_D.NVGattTank_D
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 1.5 1.5 ;set this state to animate  medium-fast
    End

    ConditionState        = CONTINUOUS_FIRE_FAST REALLYDAMAGED ATTACKING
      Model               = NVGattTank_D
      Animation           = NVGattTank_D.NVGattTank_D
      AnimationMode       = LOOP
      ParticleSysBone     = Muzzle01 GattlingMuzzleSmoke
      AnimationSpeedFactorRange = 3.0 3.0 ;set this state to animate  vryfst
    End




    TrackMarks              = EXTnkTrack.tga
    TreadAnimationRate      = 2.0  ; amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
  End

  ; ***DESIGN parameters ***
  DisplayName               = OBJECT:GattlingTank
  Side                      = Boss
  EditorSorting             = VEHICLE
  TransportSlotCount        = 2            ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions              = None 
    Weapon                  = PRIMARY   SpectreGattlingGun
    PreferredAgainst        = PRIMARY   AIRCRAFT
    Weapon                  = SECONDARY SpectreGattlingGun
  End

  ArmorSet
    Conditions    = None
    Armor         = AntiAirVehicle
    DamageFX      = TankDamageFX
  End
  BuildCost       = 250
  BuildTime       = 5.0          ;in seconds    
  VisionRange     = 150
  ShroudClearingRange = 360
  Prerequisites
    Object        = Boss_WarFactory
  End

  ExperienceValue = 50 50 100 150  ;Experience point value at each level
  ExperienceRequired = 0 100 150 300  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet      = ChinaVehicleGattlingTankCommandSet


  ; *** AUDIO Parameters ***
  VoiceSelect     = GattlingTankVoiceSelect
  VoiceMove       = GattlingTankVoiceMove
  VoiceGuard      = GattlingTankVoiceMove
  VoiceAttack     = GattlingTankVoiceAttack
  SoundMoveStart  = GattlingTankMoveStart
  SoundMoveStartDamaged = GattlingTankMoveStart
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate     = GattlingTankVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop  = NukeCannonTurretMoveLoop
    VoiceCrush      = GattlingTankVoiceCrush
    VoiceEnter      = GattlingTankVoiceMove
    VoiceRapidFire  = GattlingTankVoiceRapid
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority     = UNIT
  KindOf            = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE
  
  Body              = ActiveBody ModuleTag_02
    MaxHealth       = 600.0
    InitialHealth   = 600.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 = 600
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY SECONDARY
      TurretTurnRate      = 180   // turn rate, in degrees per sec
      TurretPitchRate     = 180
      AllowsPitch         = Yes
      FiresWhileTurning   = Yes
      NaturalTurretPitch  = 45 ; this keeps it aimed half way between land and sky
                               ; since you never know from whence cometh danger
    End
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 250
  End
  Locomotor       = SET_NORMAL GattlingTankLocomotor
  Behavior          = PhysicsBehavior ModuleTag_04
    Mass            = 40.0
  End

;  Behavior               = DestroyDie 
;    ;nothing
;  End
    
  ; Just explode death
  Behavior = SlowDeathBehavior ModuleTag_05
    ProbabilityModifier = 19
    DestructionDelay = 200
    DestructionDelayVariance = 100

    SinkRate = 0.5     ; in Dist/Sec

    OCL = FINAL    OCL_ChinaTankGattlingDebris
    FX  = FINAL    FX_GattlingExplosionOneFinal
  End

  Behavior = CreateCrateDie ModuleTag_06
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = CreateObjectDie ModuleTag_250
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_ChinaTankCrewEjection
    ExemptStatus = HIJACKED
  End

  Behavior = TransitionDamageFX ModuleTag_07
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = WeaponBonusUpgrade ModuleTag_22
    TriggeredBy = Upgrade_ChinaChainGuns
  End

  Behavior = MaxHealthUpgrade ModuleTag_23
    TriggeredBy   = Upgrade_AmericaCompositeArmor
    AddMaxHealth  = 100.0
    ChangeType    = ADD_CURRENT_HEALTH_TOO   ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Geometry            = BOX
  GeometryMajorRadius = 15.0
  GeometryMinorRadius = 10.0
  Scale = 1.0
  GeometryHeight      = 15.0     
  GeometryIsSmall     = Yes
  Shadow              = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length    

End

;------------------------------------------------------------------------------
;GLA Rocket Buggy
Object Boss_VehicleRocketBuggy

  ; *** ART Parameters ***
  SelectPortrait         = SURocketBuggy_L
  ButtonImage            = SURocketBuggy
  
  UpgradeCameo1 = Upgrade_GLABuggyAmmo
  UpgradeCameo2 = Upgrade_GLAAPRockets
  UpgradeCameo3 = Upgrade_GLAJunkRepair
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = UVRockBug
      Turret = Turret
      ShowSubObject = Turret
      HideSubObject = TurretUp01 
      WeaponFireFXBone = PRIMARY WeaponA
      WeaponLaunchBone = PRIMARY WeaponA
    End
    
    ConditionState = REALLYDAMAGED
      Model = UVRockBug_D
      Turret = Turret
      ShowSubObject = Turret
      HideSubObject = TurretUp01 
      WeaponFireFXBone = PRIMARY WeaponA
      WeaponLaunchBone = PRIMARY WeaponA
    End
    
    ConditionState = RUBBLE
      Model = UVRockBug_D
      Turret = Turret
      ShowSubObject = Turret
      HideSubObject = TurretUp01 
      WeaponFireFXBone = PRIMARY WeaponA
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState =   WEAPONSET_PLAYER_UPGRADE
      Model = UVRockBug
      Turret = TurretUp01
      ShowSubObject = TurretUp01 
      HideSubObject = Turret
      WeaponFireFXBone = PRIMARY WeaponB
      WeaponLaunchBone = PRIMARY WeaponB
      WeaponFireFXBone = SECONDARY WeaponB
      WeaponLaunchBone = SECONDARY WeaponB
    End
    
    ConditionState =   WEAPONSET_PLAYER_UPGRADE REALLYDAMAGED
      Model = UVRockBug_D
      Turret = TurretUp01
      ShowSubObject = TurretUp01 
      HideSubObject = Turret
      WeaponFireFXBone = PRIMARY WeaponB
      WeaponLaunchBone = PRIMARY WeaponB
      WeaponFireFXBone = SECONDARY WeaponB
      WeaponLaunchBone = SECONDARY WeaponB
    End
    
    ConditionState =   WEAPONSET_PLAYER_UPGRADE RUBBLE
      Model = UVRockBug_D
      Turret = TurretUp01
      ShowSubObject = TurretUp01 
      HideSubObject = Turret
      WeaponFireFXBone = PRIMARY WeaponB
      WeaponLaunchBone = PRIMARY WeaponB
      WeaponFireFXBone = SECONDARY WeaponB
      WeaponLaunchBone = SECONDARY WeaponB
    End

    TrackMarks = EXTireTrack.tga

    Dust                        = RocketBuggyDust
    DirtSpray                   = RocketBuggyDirtSpray
    PowerslideSpray             = RocketBuggyDirtPowerSlide

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.
    LeftFrontTireBone           = Tire01
    RightFrontTireBone          = Tire02
    LeftRearTireBone            = Tire03
    RightRearTireBone           = Tire04
    TireRotationMultiplier      = 0.2   ; this * speed = rotation.
    PowerslideRotationAddition  = 2.5   ; This speed is added to the rotation speed when powersliding.

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:RocketBuggy
  Side                = Boss
  EditorSorting       = VEHICLE
  TransportSlotCount  = 2                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY BuggyRocketWeapon
  End
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon = PRIMARY BuggyRocketWeaponUpgraded
    Weapon = SECONDARY BuggyRocketSAMWeapon
    AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI
  End
  ArmorSet
    Conditions      = None
    Armor           = TruckArmor
    DamageFX        = TankDamageFX
  End
  BuildCost       = 800
  BuildTime       = 10.0          ;in seconds    
  VisionRange     = 180
  ShroudClearingRange = 300
  Prerequisites
    Object = Boss_WarFactory
  End

  ExperienceValue       = 50 50 100 150    ;Experience point value at each level
  ExperienceRequired    = 0 200 400 800  ;Experience points needed to gain each level
  IsTrainable           = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet            = GLAVehicleRocketBuggyCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = RocketBuggyVoiceSelect
  VoiceMove = RocketBuggyVoiceMove
  VoiceAttack = RocketBuggyVoiceAttack
  SoundMoveStart = RocketBuggyMoveStart
  SoundMoveStartDamaged = RocketBuggyMoveStart
  VoiceGuard = RocketBuggyVoiceMove

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = RocketBuggyVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = TurretMoveLoopLoud  
  ; Required for the W3DTruckDraw module
    TruckLandingSound = RocketBuggyLand
    TruckPowerslideSound = RocketBuggyPowerslide
    VoiceCrush      = RocketBuggyVoiceCrush
    VoiceEnter = RocketBuggyVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK DONT_AUTO_CRUSH_INFANTRY ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SALVAGER SCORE

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 120
    InitialHealth   = 120

    ; 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 = 240
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      TurretTurnRate = 90
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL RocketBuggyLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End

; The pop up AirDeath 
  Behavior = SlowDeathBehavior ModuleTag_05
    DeathTypes = ALL -CRUSHED -SPLATTED
    ProbabilityModifier = 5
    ModifierBonusPerOverkillPercent = 20%  ; negative means less likely to pick this in the face of much damage, positive means more likely
    DestructionDelay = 0
    FX = INITIAL FX_BuggyNewDeathExplosion
    OCL = FINAL OCL_RocketBuggyAirDeathStart
  End

  Behavior = AutoHealBehavior ModuleTag_08
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

  Behavior = WeaponSetUpgrade ModuleTag_09
    TriggeredBy = Upgrade_GLABuggyAmmo
  End

  Behavior = DestroyDie ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_12
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_13
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_RocketBuggy_CrushEffect
  End
  Behavior = CreateCrateDie ModuleTag_14
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End
  
  Behavior                 = TransitionDamageFX ModuleTag_15
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End
  

  
Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = LockWeaponCreate ModuleTag_23
    SlotToLock = PRIMARY ; Prevents indeterminate state plus two unpickable weapons equaling no attack.
  End

  Geometry = BOX
  GeometryMajorRadius = 13.0
  GeometryMinorRadius = 9.0
  GeometryHeight = 7.5  
  GeometryIsSmall = Yes    
  Scale = 0.90
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object Boss_TankEmperor

  ; *** ART Parameters ***
  SelectPortrait         = SNEmpTank_L
  ButtonImage            = SNEmpTank
  
  UpgradeCameo1 = Upgrade_ChinaUraniumShells
  UpgradeCameo2 = Upgrade_ChinaNuclearTanks
  UpgradeCameo3 = Upgrade_ChinaOverlordGattlingCannon
  UpgradeCameo4 = Upgrade_ChinaOverlordPropagandaTower
; UpgradeCameo5 = Tank_Upgrade_ChinaTankAutoLoader
  
  Draw = W3DOverlordTankDraw ModuleTag_01
    ConditionState        = NONE
      Model               = NVOvrlrdT
      Animation           = NVOvrlrdT.NVOvrlrdT
      AnimationMode       = LOOP
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Muzzle
    End
    ConditionState        = REALLYDAMAGED
      Model               = NVOvrlrdT_D
      Animation           = NVOvrlrdT_D.NVOvrlrdT_D
      AnimationMode       = LOOP
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Muzzle
    End

    ConditionState        = RUBBLE
      Model               = NVOvrlrdT_D1
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Muzzle
    End

    TrackMarks           = EXTnkTrack.tga
    OkToChangeModelColor = Yes
    TreadAnimationRate = 2.0;  amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Emperor
  Side                = Boss
  EditorSorting       = VEHICLE
  TransportSlotCount  = 4                 ;how many "slots" we take in a transport (0 == not transportable)
  MaxSimultaneousOfType = 1
  WeaponSet
    Conditions        = None
    Weapon            = PRIMARY BattleShipGunReal
    Weapon            = SECONDARY BuggyRocketWeapon
  End
  ArmorSet
    Conditions        = None
    Armor             = TankArmor
    DamageFX          = TankDamageFX
  End
  BuildCost       = 5000
  BuildTime       = 10.0          ;in seconds    
  VisionRange     = 250
  ShroudClearingRange = 270
  Prerequisites
    Object = Boss_WarFactory
    Object = Boss_NuclearMissileLauncher
  End

  ExperienceValue = 200 200 400 600   ;Experience point value at each level
  ExperienceRequired = 0 400 600 1200  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 3  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = Boss_TankEmperorDefaultCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = EmperorTankVoiceSelect
  SoundMoveStart = OverlordTankMoveStart
  SoundMoveStartDamaged = OverlordTankMoveStart
  VoiceMove = EmperorTankVoiceMove
  VoiceGuard = EmperorTankVoiceMove
  VoiceAttack = OverlordTankVoiceAttack
  SoundAmbient           = IdleTankLoop
  SoundAmbientRubble     = NoSound
   ;SoundMoveLoop          = MovingTankLoop  ; only when not idle
   ;SoundAmbient           = IdleTankLoop

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = OverlordTankVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = OverlordTankTurretMoveLoop
    VoiceCrush = OverlordTankVoiceCrush
    VoiceEnter = EmperorTankVoiceMove
    VoiceUnload     = OverlordTankVoiceUnload
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE HUGE_VEHICLE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 2800.0
    InitialHealth   = 2800.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 = 2800
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

  Behavior = VeterancyGainCreate ModuleTag_23
    StartingLevel = VETERAN
  End


  Behavior = TransportAIUpdate ModuleTag_03
    Turret
      TurretTurnRate = 60 ;30 ;15   // turn rate, in degrees per sec
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Locomotor = SET_NORMAL OverlordLocomotor
  Locomotor = SET_NORMAL_UPGRADED NuclearOverlordLocomotor

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_04
    DeathWeapon   = NuclearTankDeathWeapon
    StartsActive  = No                        ; turned on by upgrade
    TriggeredBy   = Upgrade_ChinaNuclearTanks
  End
  Behavior = LocomotorSetUpgrade ModuleTag_05
    TriggeredBy = Upgrade_ChinaNuclearTanks
  End

  Behavior = OverlordContain ModuleTag_06 ; Like Transport, but when full, passes transport queries along to first passenger (redirects like tunnel) 
    Slots                 = 1
    DamagePercentToUnits        = 100%
    AllowInsideKindOf     = PORTABLE_STRUCTURE
    PassengersAllowedToFire = Yes
    PassengersInTurret = Yes ; My passengers ride in my turret, that's where the Firepoint bones are
    ExperienceSinkForRider = Yes ; I get the Exp for things my turret friend kills
  End

; Prop Tower is intrinsic.  Plus, GrantUpgradeCreates on units crash savegames if the unit is Elite.
;  Behavior = GrantUpgradeCreate ModuleTag_22
;    UpgradeToGrant           = Upgrade_ChinaOverlordPropagandaTower
;    ExemptStatus      = UNDER_CONSTRUCTION
;  End

  Behavior = ObjectCreationUpgrade ModuleTag_07
    UpgradeObject = OCL_OverlordGattlingCannon
    TriggeredBy   = Upgrade_ChinaOverlordGattlingCannon
    ;ConflictsWith = Upgrade_ChinaOverlordBattleBunker
  End
  Behavior = WeaponSetUpgrade ModuleTag_WeaponSetUpgrade01
    TriggeredBy = Upgrade_ChinaOverlordGattlingCannon
    ;ConflictsWith = Upgrade_ChinaOverlordBattleBunker
  End

  ;Propaganda tower is an innate ability without using art or subobjects.
  ;Behavior = ObjectCreationUpgrade ModuleTag_08
  ;  UpgradeObject = OCL_EmperorPropagandaTower
  ;  TriggeredBy   = Upgrade_ChinaOverlordPropagandaTower
  ;  ConflictsWith = Upgrade_ChinaOverlordBattleBunker
  ;End

  ; Doesn't get this upgrade!
  ; Behavior = ObjectCreationUpgrade ModuleTag_09
    ; UpgradeObject = OCL_OverlordBattleBunker
    ; TriggeredBy   = Upgrade_ChinaOverlordBattleBunker
    ; ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower
  ; End

  Behavior = ProductionUpdate ModuleTag_10
    ; MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
     MaxQueueEntries = 2; Propaganda model is hacked to not show up.
  End
  Behavior = CommandSetUpgrade ModuleTag_11
    CommandSet = Tank_ChinaTankOverlordGattlingCannonCommandSet
    TriggeredBy   = Upgrade_ChinaOverlordGattlingCannon
    ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
  End
  ;Behavior = CommandSetUpgrade ModuleTag_12
   ; CommandSet = Tank_ChinaTankOverlordPropagandaTowerCommandSet
    ;TriggeredBy   = Upgrade_ChinaOverlordPropagandaTower
    ;ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker
  ;End
  ; Behavior = CommandSetUpgrade ModuleTag_13
   ;  CommandSet = Tank_ChinaTankOverlordBattleBunkerCommandSet
   ;  TriggeredBy   = Upgrade_ChinaOverlordBattleBunker
    ; ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower
  ; End

  Behavior = PhysicsBehavior ModuleTag_14
    Mass = 50.0
  End

  Behavior        = PropagandaTowerBehavior ModulePropaganda_04
    Radius                = 150.0
    DelayBetweenUpdates   = 2000 ; in milliseconds
    HealPercentEachSecond = 1%   ; get this % of max health every second 
    PulseFX               = FX_OverlordPropagandaTowerPropagandaPulse ;plays as often as DelayBetweenUpdates
    UpgradeRequired       = Upgrade_ChinaOverlordPropagandaTower
    UpgradedHealPercentEachSecond = 2%   ; get this % of max health every second 
    UpgradedPulseFX       = FX_OverlordPropagandaTowerSubliminalPulse ;plays as often as DelayBetweenUpdates
    AffectsSelf           = Yes ; Needs this since Tower is not seperate object for Emperor
  End


  ; Smoke for a bit then explode
  Behavior = SlowDeathBehavior ModuleTag_15
    ProbabilityModifier = 35
    DestructionDelay = 1500
    DestructionDelayVariance = 500
    FX  = INITIAL   FX_OverlordSmoke
    OCL = FINAL     OCL_ChinaTankOverlordDebris
    FX  = FINAL     FX_GenericTankDeathExplosion
  End
  
  ; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_16
    ProbabilityModifier = 30
    DestructionDelay = 2000
    DestructionDelayVariance = 300
    FX  = INITIAL  FX_CrusaderCatchFire
    OCL = FINAL    OCL_ChinaTankOverlordDebris
    FX  = FINAL    FX_GenericTankDeathExplosion 
  End

  ; Just explode death
  Behavior = SlowDeathBehavior ModuleTag_17
    ProbabilityModifier = 20
    DestructionDelay = 200
    DestructionDelayVariance = 100
    OCL = FINAL    OCL_ChinaTankOverlordDebris
    FX  = FINAL    FX_OverlordExplosionOneFinal
  End
  Behavior = CreateCrateDie ModuleTag_18
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = CreateObjectDie ModuleTag_250
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_ChinaTankCrewEjection
    ExemptStatus = HIJACKED
  End

  Behavior = TransitionDamageFX ModuleTag_19
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_OverlordDamageTransition
  End

  Behavior = FlammableUpdate ModuleTag_20
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior = StealthUpdate ModuleTag_21
    StealthDelay                          = 1500 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = AirF_PointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 0
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 1.0
  End

  Geometry = BOX
  GeometryMajorRadius = 26.0
  GeometryMinorRadius = 13.0
  GeometryHeight = 15.0     
  GeometryIsSmall = No
  Shadow = SHADOW_VOLUME
  Scale = 1.0     
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End
;----------------------------------------------------------------------------------------------------------
Object Boss_VehicleHelix

  ; *** ART Parameters ***
  SelectPortrait         = SNHelix_L
  ButtonImage            = SNHelix
  
  
  UpgradeCameo3 = Upgrade_ChinaHelixGattlingCannon
  UpgradeCameo4 = Upgrade_ChinaHelixPropagandaTower
  UpgradeCameo5 = Upgrade_ChinaHelixBattleBunker

    Draw = W3DOverlordAircraftDraw  ModuleTag_01; Works with the dependencyModelDraw of the upgrade portable structures 

      ParticlesAttachedToAnimatedBones = Yes

    DefaultConditionState
      Model = NVHELIX
      Animation = NVHELIX.NVHELIX
      AnimationMode = LOOP
      WeaponFireFXBone    = PRIMARY Muzzle03
      WeaponMuzzleFlash   = PRIMARY TurretFX03
      HideSubObject       = BombWing
    End

    ConditionState = MOVING
      ParticleSysBone = SMOKE01 HelixExhaust
      ParticleSysBone = SMOKE02 HelixExhaust
    End

    ConditionState = REALLYDAMAGED
      Model = NVHELIX_d
      Animation = NVHELIX_d.NVHELIX_d
      AnimationMode = LOOP
    End
    ConditionState = REALLYDAMAGED MOVING
      Model = NVHELIX_d
      Animation = NVHELIX_d.NVHELIX_d
      AnimationMode = LOOP
      ParticleSysBone = SMOKE01 HelixExhaust
      ParticleSysBone = SMOKE02 HelixExhaust
    End

    ConditionState = RUBBLE
      Model = NVHELIX_d
      Animation = NVHELIX_d.NVHELIX_d
      AnimationMode = LOOP
    End
    ConditionState = RUBBLE MOVING
      Model = NVHELIX_d
      Animation = NVHELIX_d.NVHELIX_d
      AnimationMode = LOOP
      ParticleSysBone = SMOKE01 HelixExhaust
      ParticleSysBone = SMOKE02 HelixExhaust
    End

    ConditionState = RUBBLE SPECIAL_DAMAGED
      Model = NVHELIX_d 
    End

    OkToChangeModelColor = Yes
  End


  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Helix
  EditorSorting       = VEHICLE
  Side                = Boss
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 200.0 
  ShroudClearingRange = 600
  BuildCost           = 1500
  BuildTime           = 20.0          ;in seconds  
  Prerequisites
    Object = Boss_Airfield
    Object = Boss_WarFactory
  End
  ExperienceValue     = 50 100 150 200 ;Experience point value at each level
  ExperienceRequired  = 0 100 200 400  ;Experience points needed to gain each level
  IsTrainable         = Yes  
  CommandSet          = Nuke_ChinaVehicleHelixCommandSet


  ArmorSet
    Conditions      = None
    Armor           = ChinookArmor
    DamageFX        = None
  End


  WeaponSet
    Conditions          = None 
    ;----------------------------
    Weapon              = PRIMARY     HelixMinigunWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ;----------------------------
  End

  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    ;----------------------------
    Weapon              = PRIMARY     HelixMinigunWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ;----------------------------
  End



  ; *** AUDIO Parameters ***
  VoiceSelect     = HelixVoiceSelect
  VoiceMove       = HelixVoiceMove
  VoiceAttack     = HelixVoiceAttack
  SoundAmbient    = HelixAmbientLoop
  SoundEnter      = HumveeEnter
  SoundExit       = HumveeExit
  UnitSpecificSounds
    VoiceCreate         = HelixVoiceCreate
    VoiceUnload         = HelixVoiceUnload
    VoiceGarrison       = HelixVoiceMove
  End




  ; *** ENGINEERING Parameters ***
  RadarPriority   = UNIT
  ; note that, although Helixes aren't produced at helipads, we want to set this KINDOF so that they can land at
  ; (well, "near" actually) an Airfield to get healed...
  KindOf          = PRELOAD CAN_CAST_REFLECTIONS SELECTABLE VEHICLE HUGE_VEHICLE TRANSPORT AIRCRAFT SCORE PRODUCED_AT_HELIPAD CAN_ATTACK 

  Body = ActiveBody ModuleTag_03
    MaxHealth       = 1000.0
    InitialHealth   = 1000.0
  End

  Behavior = FXListDie ModuleTag_05
    DeathFX = FX_HelicopterStartDeath
  End

  Behavior                       = TransitionDamageFX ModuleTag_06
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuousDown
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_ComancheDamageTransition
  End

  Behavior = ChinookAIUpdate ModuleTag_07
     AutoAcquireEnemiesWhenIdle = Yes 
     RotorWashParticleSystem = HelixRotorWashRing
  End
  Locomotor = SET_NORMAL    HelixLocomotor
  Locomotor = SET_TAXIING   BasicHelicopterTaxiLocomotor


  Behavior = PhysicsBehavior ModuleTag_09
    Mass = 50.0
  End

  Behavior = HelicopterSlowDeathBehavior ModuleTag_10
    DestructionDelay                = 99999999        ; the destruction delay
    SpiralOrbitTurnRate             = 80.0           ; in degrees per second, bigger # = tighter spiral
    SpiralOrbitForwardSpeed         = 110.0           ; bigger # = larger spiral
    SpiralOrbitForwardSpeedDamping  = .9999           ; smaller #'s = slow down faster
    MaxBraking                      = 210   ; max braking we can use during death spiral (lower num = wilder spiral)    
    SoundDeathLoop                  = HelixDamagedLoop
    MinSelfSpin                     = 40                     ; in degrees per second
    MaxSelfSpin                     = 120                     ; in degrees per second
    SelfSpinUpdateDelay             = 300                     ; in milliseconds
    SelfSpinUpdateAmount            = 5                      ; in degrees   
    FallHowFast                     = 8.0%                   ; fraction of gravity, lower = take longer to fall
    MinBladeFlyOffDelay             = 1000                    ; in milliseconds
    MaxBladeFlyOffDelay             = 1000                    ; in milliseconds
    AttachParticle                  = SootySmokeTrail
    AttachParticleBone              = Propeller02
    BladeObjectName                 = HelixBlades
    BladeBoneName                   = Propeller01    
    FXBlade                         = FX_HelicopterBladeExplosion
    OCLBlade                        = OCL_HelicopterBladeExplosion
    FXHitGround                     = FX_HelicopterHitGround
    OCLHitGround                    = OCL_HelicopterHitGround
    FXFinalBlowUp                   = FX_HelixHelicopterBlowUpBig
    OCLFinalBlowUp                  = OCL_HelixBlades
    DelayFromGroundToFinalDeath     = 30
    FinalRubbleObject               = HelixRubbleHull
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3        ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End



  Behavior = ProductionUpdate ModuleTag_25
    MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
  End





  ;--------------------------
  Behavior = ObjectCreationUpgrade ModuleTag_22
    UpgradeObject = OCL_HelixGattlingCannon
    TriggeredBy   = Upgrade_ChinaHelixGattlingCannon
    ConflictsWith = Upgrade_ChinaHelixPropagandaTower Upgrade_ChinaHelixBattleBunker
  End
  Behavior = CommandSetUpgrade ModuleTag_26
    CommandSet = Nuke_ChinaHelixGattlingCannonCommandSet
    TriggeredBy   = Upgrade_ChinaHelixGattlingCannon
    ConflictsWith = Upgrade_ChinaHelixPropagandaTower Upgrade_ChinaHelixBattleBunker
  End
  Behavior = WeaponSetUpgrade ModuleTag_35
    TriggeredBy = Upgrade_ChinaHelixGattlingCannon
  End
; lorenzen commented out 8/4... the helix now keeps its minigun, even when upgraded to gattling
;  Behavior = SubObjectsUpgrade ModuleTag_36
;    TriggeredBy    = Upgrade_ChinaHelixGattlingCannon 
;    ConflictsWith  = Upgrade_ChinaHelixPropagandaTower Upgrade_ChinaHelixBattleBunker
;    HideSubObjects = MINIGUN 
;  End
  ;--------------------------
  Behavior = ObjectCreationUpgrade ModuleTag_23
    UpgradeObject = OCL_HelixPropagandaTower
    TriggeredBy   = Upgrade_ChinaHelixPropagandaTower
    ConflictsWith = Upgrade_ChinaHelixGattlingCannon Upgrade_ChinaHelixBattleBunker
  End
  Behavior = CommandSetUpgrade ModuleTag_27
    CommandSet = Nuke_ChinaHelixPropagandaTowerCommandSet
    TriggeredBy   = Upgrade_ChinaHelixPropagandaTower
    ConflictsWith = Upgrade_ChinaHelixGattlingCannon Upgrade_ChinaHelixBattleBunker
  End
  ;--------------------------
  Behavior = ObjectCreationUpgrade ModuleTag_24
    UpgradeObject = OCL_HelixBattleBunker
    TriggeredBy   = Upgrade_ChinaHelixBattleBunker
    ConflictsWith = Upgrade_ChinaHelixGattlingCannon Upgrade_ChinaHelixPropagandaTower
  End
  Behavior = CommandSetUpgrade ModuleTag_28
    CommandSet = Nuke_ChinaHelixBattleBunkerCommandSet
    TriggeredBy   = Upgrade_ChinaHelixBattleBunker
    ConflictsWith = Upgrade_ChinaHelixGattlingCannon Upgrade_ChinaHelixPropagandaTower
  End
  Behavior = PassengersFireUpgrade ModuleTag_34
    TriggeredBy   = Upgrade_ChinaHelixBattleBunker
  End
  ;--------------------------

  Behavior = HelixContain ModuleTag_29
    Slots                   = 8
    DamagePercentToUnits    = 100%
    AllowInsideKindOf       = INFANTRY VEHICLE PORTABLE_STRUCTURE
    ForbidInsideKindOf      = AIRCRAFT 
    ExitDelay               = 100
    NumberOfExitPaths       = 1
    PassengersAllowedToFire = No ; the 
  End


  Behavior = WeaponSetUpgrade ModuleTag_30
    TriggeredBy = Upgrade_ChinaBlackNapalm
  End


  Behavior = SpecialAbility ModuleTag_32
    SpecialPowerTemplate = Nuke_SpecialAbilityHelixNukeBomb
    UpdateModuleStartsAttack = Yes
    StartsPaused              = Yes; so the UnpauseSpecialPowerUpgrade, below can turn it on
    InitiateSound             = HelixVoiceAttack
  End
  Behavior = SpecialAbilityUpdate ModuleTag_33
    SpecialPowerTemplate = Nuke_SpecialAbilityHelixNukeBomb
    StartAbilityRange = 3.0
    PreparationTime = 0
    SpecialObject = NukeBomb
    MaxSpecialObjects = 1
    SpecialObjectsPersistWhenOwnerDies = Yes 
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = No        ;This would prevent multiple charges placed on the same object.
    UnpackTime              = 500     ;slight delay to drop bomb
    FlipOwnerAfterUnpacking = No
    FleeRangeAfterCompletion = 0.0         ;DOes not run away after finishing ability
    UnpackSound               = NoSound 
    LoseStealthOnTrigger      = No
    ApproachRequiresLOS       = No ; we are a helicopter, we can see everything
    NeedToFaceTarget          = No ; can drop the bomb at any angle to target

    PersistentPrepTime        = 100
    PersistenceRequiresRecharge = Yes

  End
  Behavior = UnpauseSpecialPowerUpgrade ModuleTag_38
    SpecialPowerTemplate = Nuke_SpecialAbilityHelixNukeBomb
    TriggeredBy = Nuke_Upgrade_HelixNukeBomb
  End
  Behavior = SubObjectsUpgrade ModuleTag_39
    TriggeredBy    = Nuke_Upgrade_HelixNukeBomb 
    ShowSubObjects = BombWing 
  End

  Behavior = StealthUpdate ModuleTag_40
    StealthDelay                          = 2400 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End


  Geometry              = CYLINDER
  GeometryMajorRadius   = 35.0
  GeometryHeight        = 30.0     
  GeometryIsSmall       = No
  Shadow                = SHADOW_VOLUME    
  ShadowSizeX           = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End







;------------------------------------------------------------------------------
Object Boss_HelixGattlingCannon

  ; *** ART Parameters ***
  SelectPortrait         = SNGatTower_L
  ButtonImage            = SNGatTower
  
  ;UpgradeCameo1 = Upgrade_Nationalism
  UpgradeCameo1 = Upgrade_ChinaUraniumShells
  UpgradeCameo2 = Upgrade_ChinaNuclearTanks
  ;UpgradeCameo4 = NONE
  UpgradeCameo5 = Upgrade_ChinaOverlordGattlingCannon
  
  
  Draw                    = W3DDependencyModelDraw ModuleTag_01
    OkToChangeModelColor  = Yes
    AttachToBoneInContainer = CHASSISBONE

    DefaultConditionState
      Model               = NVHelix_G
      Turret              = TURRET01
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
    End
    ConditionState        = CONTINUOUS_FIRE_SLOW
      Model               = NVHelix_G
      Animation           = NVHelix_G.NVHelix_G
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.1 0.1 ;set this state to animate  s l o w l y
    End
     ConditionState       = CONTINUOUS_FIRE_MEAN
      Model               = NVHelix_G
      Animation           = NVHelix_G.NVHelix_G
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.2 0.2 ;set this state to animate  medium-fast
    End
    ConditionState        = CONTINUOUS_FIRE_FAST
      Model               = NVHelix_G
      Animation           = NVHelix_G.NVHelix_G
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.3 0.3 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End

    ConditionState        = REALLYDAMAGED 
      Model               = NVHelix_GD
      Turret              = TURRET01
      TurretPitch         = TURRETEL
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      ParticleSysBone     = Smoke01 SmokeFactionMedium
      ParticleSysBone     = Smoke02 SmokeFactionMedium
      ParticleSysBone     = Smoke03 SmokeFactionMedium
      ParticleSysBone     = SparkM01 SparksMedium
      ParticleSysBone     = SparkM02 SparksMedium
    End
    ConditionState        = CONTINUOUS_FIRE_SLOW REALLYDAMAGED 
      Model               = NVHelix_GD
      Animation           = NVHelix_GD.NVHelix_GD
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.1 0.1 ;set this state to animate  s l o w l y
    End
     ConditionState       = CONTINUOUS_FIRE_MEAN REALLYDAMAGED 
      Model               = NVHelix_GD
      Animation           = NVHelix_GD.NVHelix_GD
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.2 0.2 ;set this state to animate  medium-fast
    End
    ConditionState        = CONTINUOUS_FIRE_FAST REALLYDAMAGED 
      Model               = NVHelix_GD
      Animation           = NVHelix_GD.NVHelix_GD
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 0.3 0.3 ;set this state to animate  vryfst
      ParticleSysBone    = Muzzle01 GattlingMuzzleSmoke
      ParticleSysBone    = Muzzle02 GattlingMuzzleSmoke
    End

  End

  ; ***DESIGN parameters ***
  Side             = Boss
  EditorSorting    = SYSTEM
  TransportSlotCount = 1
  WeaponSet
    Conditions          = None
    Weapon              = PRIMARY   GattlingBuildingGun
    PreferredAgainst    = PRIMARY INFANTRY
    Weapon              = SECONDARY GattlingBuildingGunAir
    PreferredAgainst    = SECONDARY BALLISTIC_MISSILE AIRCRAFT
  End
  
  ArmorSet
    Conditions     = None
    Armor          = InvulnerableAllArmor ; We can't be hurt on the field.  We share damage from the Overlord with his damage module
  End
  VisionRange     = 200

  ; *** AUDIO Parameters ***
  UnitSpecificSounds
    TurretMoveStart = NoSound
    TurretMoveLoop  = NoSound ;TurretMoveLoop
    VoiceRapidFire  = NoSound
  End

  ; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI
  
  Body            = StructureBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End


  Behavior = StealthDetectorUpdate ModuleTag_SDU
    DetectionRate     = 1500   ; how often to rescan for stealthed things in my sight (msec)
    DetectionRange   = 200    
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = Yes ;Contained means being in a transport or tunnel network.
  End


  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY 
      TurretTurnRate      = 60   // turn rate, in degrees per sec
      TurretPitchRate     = 60
      AllowsPitch         = Yes
    End
    AutoAcquireEnemiesWhenIdle = Yes 
  End

  Behavior             = DestroyDie ModuleTag_04
    ;nothing
  End

  Behavior = WeaponBonusUpgrade ModuleTag_05
    TriggeredBy = Upgrade_ChinaChainGuns
  End


  Geometry            = BOX
  GeometryMajorRadius = 8.0
  GeometryMinorRadius = 8.0
  GeometryHeight      = 9.0
  GeometryIsSmall     = No      
  Shadow              = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object Boss_HelixPropagandaTower

  ; *** ART Parameters ***
  SelectPortrait         = SNPropSpeaker_L
  ButtonImage            = SNPropSpeaker
  
  UpgradeCameo1 = Upgrade_Nationalism
  UpgradeCameo2 = Upgrade_ChinaUraniumShells
  UpgradeCameo3 = Upgrade_ChinaNuclearTanks
  ;UpgradeCameo4 = NONE
  UpgradeCameo5 = Upgrade_ChinaOverlordPropagandaTower
  
  Draw                    = W3DDependencyModelDraw ModuleTag_01
    OkToChangeModelColor  = Yes
    AttachToBoneInContainer = CHASSISBONE

    ConditionState = NONE
      Model         = NVHELIX_S
      Animation     = NVHELIX_S.NVHELIX_S
      AnimationMode = LOOP
    End
    ConditionState = REALLYDAMAGED
      Model         = NVHELIX_SD
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Flame01 SmolderingFire
      ParticleSysBone = Flame01 SmolderingFlameCore
      ParticleSysBone = Spark01 LiveWireSparks
    End
    ; night
    ConditionState = NIGHT
      Model         = NVHELIX_S
      Animation     = NVHELIX_S.NVHELIX_S
      AnimationMode = LOOP
    End 
  End

  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  Side             = Boss
  EditorSorting    = SYSTEM
  TransportSlotCount = 1
  
  ArmorSet
    Conditions     = None
    Armor          = InvulnerableAllArmor ; We can't be hurt on the field.  We share damage from the Overlord with his damage module
  End
  VisionRange     = 200

  ; *** AUDIO Parameters ***
  UnitSpecificSounds
   TurretMoveStart = NoSound
    TurretMoveLoop  = NoSound ;TurretMoveLoop
  End

  ; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI
    Body            = StructureBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    ;<No Data>
  End
  
  Behavior        = PropagandaTowerBehavior ModuleTag_04
    Radius                = 150.0
    DelayBetweenUpdates   = 2000 ; in milliseconds
    HealPercentEachSecond = 1%   ; get this % of max health every second 
    PulseFX               = FX_HelixPropagandaTowerPropagandaPulse ;plays as often as DelayBetweenUpdates
    UpgradeRequired       = Upgrade_ChinaSubliminalMessaging
    UpgradedHealPercentEachSecond = 2%   ; get this % of max health every second 
    UpgradedPulseFX       = FX_HelixPropagandaTowerSubliminalPulse ;plays as often as DelayBetweenUpdates

  End

  Behavior             = DestroyDie ModuleTag_05
    ;<No Data>
  End

  Geometry            = BOX
  GeometryMajorRadius = 6.0
  GeometryMinorRadius = 6.0
  GeometryHeight      = 10.0
  GeometryIsSmall     = No      
  Shadow              = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End

;------------------------------------------------------------------------------
Object Boss_HelixBattleBunker

  ; *** ART Parameters ***
  SelectPortrait         = SNBunker_L
  ButtonImage            = SNBunker
  
  ;UpgradeCameo1 = Upgrade_Nationalism
  UpgradeCameo1 = Upgrade_ChinaUraniumShells
  UpgradeCameo2 = Upgrade_ChinaNuclearTanks
  ;UpgradeCameo4 = NONE
  UpgradeCameo5 = Upgrade_ChinaOverlordBattleBunker
  
  Draw                    = W3DDependencyModelDraw ModuleTag_01
    OkToChangeModelColor  = Yes
    AttachToBoneInContainer = CHASSISBONE

    ConditionState = NONE
      Model         = NVHELIX_B
    End
    ConditionState = REALLYDAMAGED
      Model         = NVHELIX_BD
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Flame01 SmolderingFire
      ParticleSysBone = Flame01 SmolderingFlameCore
      ParticleSysBone = Spark01 LiveWireSparks
    End
    ; night
    ConditionState = NIGHT
      Model         = NVHELIX_B
    End 
    ConditionState = NIGHT REALLYDAMAGED
      Model         = NVHELIX_BD
      ParticleSysBone = Smoke01 SmolderingSmoke
      ParticleSysBone = Smoke02 SmolderingSmoke
      ParticleSysBone = Flame01 SmolderingFire
      ParticleSysBone = Flame01 SmolderingFlameCore
      ParticleSysBone = Spark01 LiveWireSparks
    End
  End

  PlacementViewAngle = -45

  ; ***DESIGN parameters ***
  Side             = Boss
  EditorSorting    = SYSTEM
  TransportSlotCount = 1
  
  ArmorSet
    Conditions     = None
    Armor          = InvulnerableAllArmor ; We can't be hurt on the field.  We share damage from the Overlord with his damage module
  End
  VisionRange     = 200

  ; *** AUDIO Parameters ***
  UnitSpecificSounds
    TurretMoveStart = NoSound
    TurretMoveLoop  = NoSound ;TurretMoveLoop
    VoiceUnload     = OverlordTankVoiceUnload
  End

  ; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD PORTABLE_STRUCTURE CLICK_THROUGH IGNORED_IN_GUI
    Body            = StructureBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End


  Behavior             = DestroyDie ModuleTag_04
    ;nothing
  End

  Geometry            = BOX
  GeometryMajorRadius = 6.0
  GeometryMinorRadius = 6.0
  GeometryHeight      = 10.0
  GeometryIsSmall     = No      
  Shadow              = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End