Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
So I'm trying to give good ol' General Fai an option in his Barracks that lets him build a "Red Guard Squad", which basically creates seven almost-vanilla Red Guards at once. Mr. Zemlinsky said to copy this into his (Fai's) Barrack's code:


  Behavior = ProductionUpdate ModuleTag_10
    QuantityModifier = Infa_ChinaInfantryRedguard   2
  End
  Behavior = QueueProductionExitUpdate ModuleTag_11
    UnitCreatePoint   = X:  0.0  Y:  -25.0   Z:0.0
    NaturalRallyPoint = X: 36.0  Y:  -25.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
    ExitDelay = 300 ; Mainly for the multiple produced Red Guard.  Make them come out one at a time.
  End

Well, me, not wanting to mod the default files in-game and potentially permanently screw-up my copy of Zero Hour, created a new .ini inside the INI folder, named "InfantryGeneral.ini", figuring it would go by the same logic as the weapon.ini stuff. (To add new weapons, copy everything from the game files into a new weapon.ini file, and the game looks at that for all the weapons from that point on. Thank you Mr. Zemlinsky.) Well, did that, but I'm obviously doing something here wrong, 'cause the Barracks is still producing my Fai Red Guard one at a time.

Here is the code for my slightly different Fai Red Guard:



Object Infa_ChinaInfantryRedguard

  ; *** ART Parameters ***
  SelectPortrait         = SNRedGuard_L  
  ButtonImage            = SNRedGuard_L
  
  UpgradeCameo1 = Upgrade_Fanaticism
  UpgradeCameo2 = Upgrade_InfantryCaptureBuilding
  ;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               = NICNSC_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


    ; ------- 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:Redguard
  Side                = ChinaInfantryGeneral
  EditorSorting       = INFANTRY
  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY RedguardMachineGun
  End
  ArmorSet
    Conditions      = None
    Armor           = InfGen_HumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange = 100
  ShroudClearingRange = 200
  Prerequisites
    Object = Infa_ChinaBarracks
  End
  BuildCost     = 100
  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    = ChinaInfantryRedguardCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = RedGuardVoiceSelect
  VoiceMove = RedGuardVoiceMove
  VoiceGuard = RedGuardVoiceMove
  VoiceAttack = RedGuardVoiceAttack
  VoiceGroupSelect = BattleCrySound
  VoiceFear = RedGuardVoiceFear
  VoiceTaskComplete = RedGuardVoiceCaptureComplete
  UnitSpecificSounds
    VoiceMelee      = RedGuardVoiceAttackBayonet
    VoiceGarrison   = RedGuardVoiceGarrison
    VoiceCreate     = RedGuardVoiceCreate
    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       = 120.0
    InitialHealth   = 120.0
  End

  Behavior = VeterancyGainCreate ModuleTag_03
    StartingLevel = ELITE
    ScienceRequired = Infa_SCIENCE_RedGuardTraining
  End

  Behavior = AIUpdateInterface ModuleTag_04
    AutoAcquireEnemiesWhenIdle = Yes
  End

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

  Locomotor = SET_NORMAL RedguardLocomotor

  Behavior = HordeUpdate ModuleTag_06
    RubOffRadius = 60    ; 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_07
    Mass = 5.0
  End

  Behavior = SquishCollide ModuleTag_10
    ;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_RedGuardDie
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_RedGuardDie
    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_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

  Behavior = SpecialAbility ModuleTag_16
    SpecialPowerTemplate      = SpecialAbilityRedGuardCaptureBuilding
    UpdateModuleStartsAttack  = Yes
    StartsPaused              = Yes
    InitiateSound         = RedGuardVoiceCapture
  End
  Behavior = SpecialAbilityUpdate ModuleTag_17
    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_18
    SpecialPowerTemplate = SpecialAbilityRedGuardCaptureBuilding
    TriggeredBy = Upgrade_InfantryCaptureBuilding
  End

  Behavior = VeterancyGainCreate ModuleTag_13
    StartingLevel = VETERAN
  End

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

End







And the Barracks code for General Fai in my InfantryGeneral.ini (Next post due to text limit.)


Now if creating a new .ini and naming it the same as the general you're modding simply doesn't work, then it'd be great to know. 😄

Also, I have the Fai Red Guard's super-fast production time and low cost as a placeholder until I can get the barracks to produce more then one of him.

Any help here would be greatly appreciated. 😁
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Sponsor
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
Barracks Code:



Object Infa_ChinaBarracks

  ; *** ART Parameters ***
  SelectPortrait         = SNBarracks_L
  ButtonImage            = SNBarracks
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
 
 
; day
    ConditionState = NONE
      Model = NBBarracks
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks.NBBarracks
      AnimationMode = LOOP
    End
  
    ConditionState = DAMAGED
      Model = NBBarracks_D
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_D.NBBarracks_D
      AnimationMode = LOOP
    End
    
    ConditionState = REALLYDAMAGED RUBBLE
      Model = NBBarracks_E
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_E.NBBarracks_E
      AnimationMode = LOOP
    End
    
; day SNOW

    ConditionState = SNOW
      Model = NBBarracks_S
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_S.NBBarracks_S
      AnimationMode = LOOP
    End
  
    ConditionState = DAMAGED SNOW
      Model = NBBarracks_DS
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_DS.NBBarracks_DS
      AnimationMode = LOOP
    End
    
    ConditionState = REALLYDAMAGED RUBBLE SNOW
      Model = NBBarracks_ES
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_ES.NBBarracks_ES
      AnimationMode = LOOP
    End

  
; night
    ConditionState = NIGHT
      Model         = NBBarracks_N
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_N.NBBarracks_N
      AnimationMode = LOOP
    End  
    
    ConditionState = DAMAGED NIGHT
      Model = NBBarracks_DN
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_DN.NBBarracks_DN
      AnimationMode = LOOP
    End
    
    ConditionState = REALLYDAMAGED RUBBLE NIGHT
      Model = NBBarracks_EN
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_EN.NBBarracks_EN
      AnimationMode = LOOP
    End
    
; night snow   
    ConditionState = NIGHT SNOW
      Model         = NBBarracks_NS
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_NS.NBBarracks_NS
      AnimationMode = LOOP
    End  
    
    ConditionState = DAMAGED NIGHT SNOW
      Model = NBBarracks_DNS
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_DNS.NBBarracks_DNS
      AnimationMode = LOOP
    End
    
    ConditionState = REALLYDAMAGED RUBBLE NIGHT SNOW
      Model = NBBarracks_ENS
      ParticleSysBone= Fire01 SmolderingFire
      Animation     = NBBarracks_ENS.NBBarracks_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              = NBBarracks
      Animation          = NBBarracks.NBBarracks
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED DAMAGED
      Model              = NBBarracks_D
      Animation          = NBBarracks_D.NBBarracks_D
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED REALLYDAMAGED
      Model              = NBBarracks_E
      Animation          = NBBarracks_E.NBBarracks_E
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT
      Model              = NBBarracks_N
      Animation          = NBBarracks_N.NBBarracks_N
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT DAMAGED
      Model              = NBBarracks_DN
      Animation          = NBBarracks_DN.NBBarracks_DN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT REALLYDAMAGED
      Model              = NBBarracks_EN
      Animation          = NBBarracks_EN.NBBarracks_EN
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW
      Model              = NBBarracks_S
      Animation          = NBBarracks_S.NBBarracks_S
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW DAMAGED
      Model              = NBBarracks_DS
      Animation          = NBBarracks_DS.NBBarracks_DS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED SNOW REALLYDAMAGED
      Model              = NBBarracks_ES
      Animation          = NBBarracks_ES.NBBarracks_ES
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW
      Model              = NBBarracks_NS
      Animation          = NBBarracks_NS.NBBarracks_NS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW DAMAGED
      Model              = NBBarracks_DNS
      Animation          = NBBarracks_DNS.NBBarracks_DNS
      AnimationMode      = LOOP
      Flags              = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
    End
    ConditionState       = AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED NIGHT SNOW REALLYDAMAGED
      Model              = NBBarracks_ENS
      Animation          = NBBarracks_ENS.NBBarracks_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           = NBBarracks_A4
      Animation       = NBBarracks_A4.NBBarracks_A4
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_DAY
    End
    ConditionState    = NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBBarracks_A4N
      Animation       = NBBarracks_A4N.NBBarracks_A4N
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_NIGHT
    End
    ConditionState    = SNOW AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBBarracks_A4S
      Animation       = NBBarracks_A4S.NBBarracks_A4S
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOW
    End
    ConditionState    = SNOW NIGHT AWAITING_CONSTRUCTION PARTIALLY_CONSTRUCTED ACTIVELY_BEING_CONSTRUCTED
      Model           = NBBarracks_A4SN
      Animation       = NBBarracks_A4SN.NBBarracks_A4SN
      AnimationMode   = MANUAL
      Flags           = START_FRAME_LAST
      TransitionKey   = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model           = NBBarracks_A4
      Animation       = NBBarracks_A4.NBBarracks_A4
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model           = NBBarracks_A4N
      Animation       = NBBarracks_A4N.NBBarracks_A4N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model           = NBBarracks_A4S
      Animation       = NBBarracks_A4S.NBBarracks_A4S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model           = NBBarracks_A4SN
      Animation       = NBBarracks_A4SN.NBBarracks_A4SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBBarracks_A4
      Animation       = NBBarracks_A4.NBBarracks_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           = NBBarracks_A4N
      Animation       = NBBarracks_A4N.NBBarracks_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           = NBBarracks_A4S
      Animation       = NBBarracks_A4S.NBBarracks_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           = NBBarracks_A4SN
      Animation       = NBBarracks_A4SN.NBBarracks_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           = NBBarracks_A6
      Animation       = NBBarracks_A6.NBBarracks_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           = NBBarracks_A6N
      Animation       = NBBarracks_A6N.NBBarracks_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           = NBBarracks_A6S
      Animation       = NBBarracks_A6S.NBBarracks_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           = NBBarracks_A6SN
      Animation       = NBBarracks_A6SN.NBBarracks_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            = NBBarracks_A6
      Animation       = NBBarracks_A6.NBBarracks_A6
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_NIGHT
     Model            = NBBarracks_A6N
      Animation       = NBBarracks_A6N.NBBarracks_A6N
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
     Model            = NBBarracks_A6S
      Animation       = NBBarracks_A6S.NBBarracks_A6S
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
     Model            = NBBarracks_A6SN
      Animation       = NBBarracks_A6SN.NBBarracks_A6SN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model           = NBBarracks_A6
      Animation       = NBBarracks_A6.NBBarracks_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           = NBBarracks_A6N
      Animation       = NBBarracks_A6N.NBBarracks_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           = NBBarracks_A6S
      Animation       = NBBarracks_A6S.NBBarracks_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           = NBBarracks_A6SN
      Animation       = NBBarracks_A6SN.NBBarracks_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           = NBBarracks_A5
      Animation       = NBBarracks_A5.NBBarracks_A5
      AnimationMode   = LOOP
      TransitionKey  = UP_DAY
    End

    ConditionState  = NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBBarracks_A5N
      Animation       = NBBarracks_A5N.NBBarracks_A5N
      AnimationMode   = LOOP
      TransitionKey  = UP_NIGHT
    End
    ConditionState  = SNOW ACTIVELY_BEING_CONSTRUCTED
      Model           = NBBarracks_A5S
      Animation       = NBBarracks_A5S.NBBarracks_A5S
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOW
    End
    ConditionState  = SNOW NIGHT ACTIVELY_BEING_CONSTRUCTED
      Model           = NBBarracks_A5SN
      Animation       = NBBarracks_A5SN.NBBarracks_A5SN
      AnimationMode   = LOOP
      TransitionKey  = UP_SNOWNIGHT
    End
    TransitionState   = DOWN_DEFAULT UP_DAY
      Model            = NBBarracks_AB
      Animation       = NBBarracks_AB.NBBarracks_AB
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End

    TransitionState   = DOWN_DEFAULT UP_NIGHT
      Model            = NBBarracks_ABN
      Animation       = NBBarracks_ABN.NBBarracks_ABN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOW
      Model            = NBBarracks_ABS
      Animation       = NBBarracks_ABS.NBBarracks_ABS
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = DOWN_DEFAULT UP_SNOWNIGHT
      Model            = NBBarracks_ABSN
      Animation       = NBBarracks_ABSN.NBBarracks_ABSN
      AnimationMode   = ONCE
      AnimationSpeedFactorRange = 1.0 1.0
      Flags           = START_FRAME_FIRST
    End
    TransitionState   = UP_DAY DOWN_DEFAULT
      Model            = NBBarracks_AB
      Animation       = NBBarracks_AB.NBBarracks_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            = NBBarracks_ABN
      Animation       = NBBarracks_ABN.NBBarracks_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            = NBBarracks_ABS
      Animation       = NBBarracks_ABS.NBBarracks_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            = NBBarracks_ABSN
      Animation       = NBBarracks_ABSN.NBBarracks_ABSN
      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:Barracks
  Side             = ChinaInfantryGeneral
  EditorSorting    = STRUCTURE
  BuildCost        = 500
  BuildTime        = 10.0           ; in seconds
  EnergyProduction = 0
  CommandSet       = Infa_ChinaBarracksCommandSet
  VisionRange      = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200
  ArmorSet
    Conditions      = None
    Armor           = StructureArmor
    DamageFX        = StructureDamageFXNoShake
  End
  ExperienceValue     = 100 100 100 100  ; Experience point value at each level

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

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf          = PRELOAD STRUCTURE SELECTABLE IMMOBILE HEAL_PAD SCORE CAPTURABLE FS_FACTORY AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY FS_BARRACKS
  Body            = StructureBody ModuleTag_05
    MaxHealth     = 1200.0
    InitialHealth = 1200.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 = 1400
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 100
  End

  Behavior = HealContain ModuleTag_06
    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 = 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
    QuantityModifier = Infa_ChinaInfantryMiniGunner   1
  End
  Behavior = QueueProductionExitUpdate ModuleTag_11
    UnitCreatePoint   = X:  0.0  Y:  -25.0   Z:0.0
    NaturalRallyPoint = X: 36.0  Y:  -25.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
    ExitDelay = 300 ; Mainly for the multiple produced Red Guard.  Make them come out one at a time.
  End

  Behavior = ProductionUpdate ModuleTag_10
    QuantityModifier = Infa_ChinaInfantryRedguard   2
  End
  Behavior = QueueProductionExitUpdate ModuleTag_11
    UnitCreatePoint   = X:  0.0  Y:  -25.0   Z:0.0
    NaturalRallyPoint = X: 36.0  Y:  -25.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
    ExitDelay = 300 ; Mainly for the multiple produced Red Guard.  Make them come out one at a time.
  End

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

    Upgradable            = Yes
    UpgradedTriggeredBy   = Upgrade_ChinaEMPMines
    UpgradedMineName      = ChinaEMPMine
  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 = CommandSetUpgrade ModuleTag_25
    CommandSet = Infa_ChinaBarracksCommandSetUpgrade
    TriggeredBy = Upgrade_ChinaMines
  End
  Behavior = ArmorUpgrade ModuleTag_26
    TriggeredBy = Upgrade_ChinaEMPMines
  End

  Behavior = GrantUpgradeCreate ModuleTag_27
    UpgradeToGrant           = Upgrade_Nationalism
    ExemptStatus      = UNDER_CONSTRUCTION
  End

  Geometry            = BOX
  GeometryMajorRadius = 36.0
  GeometryMinorRadius = 44.0
  GeometryHeight      = 30.0
  GeometryIsSmall     = No
  FactoryExitWidth    = 25 
  Shadow          = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End



Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
JoshZemlinsky
11 years ago
Copying the Infantry general .ini is the right thing to do.
Just remember to keep the name the same, otherwise it wont 'overwrite' the old one when loading the game. (It loads Root files first, then goes through the .big files in order, i.e. why most mods call patch .big files !!Patch.big)

Now from what you said, it sounds like you put the .ini in the wrong folder. It goes into Data/ini/object 😁

Uhm, also.

Here's another thing.

Behavior = ProductionUpdate ModuleTag_10
QuantityModifier = Infa_ChinaInfantryMiniGunner 1
End
Behavior = QueueProductionExitUpdate ModuleTag_11
UnitCreatePoint = X: 0.0 Y: -25.0 Z:0.0
NaturalRallyPoint = X: 36.0 Y: -25.0 Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
ExitDelay = 300 ; Mainly for the multiple produced Red Guard. Make them come out one at a time.
End

Behavior = ProductionUpdate ModuleTag_10
QuantityModifier = Infa_ChinaInfantryRedguard 2
End
Behavior = QueueProductionExitUpdate ModuleTag_11
UnitCreatePoint = X: 0.0 Y: -25.0 Z:0.0
NaturalRallyPoint = X: 36.0 Y: -25.0 Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
ExitDelay = 300 ; Mainly for the multiple produced Red Guard. Make them come out one at a time.
End

Remove the lower bit, and put the Infa_ChinaInfantryRedguard 2 underneath the one in the existing entry. This here might actually confuse the game, and could also pose a problem (maybe even a crash)

Here's how it should look:


Behavior = ProductionUpdate ModuleTag_10
QuantityModifier = Infa_ChinaInfantryMiniGunner 1
QuantityModifier = Infa_ChinaInfantryRedguard 2
End
Behavior = QueueProductionExitUpdate ModuleTag_11
UnitCreatePoint = X: 0.0 Y: -25.0 Z:0.0
NaturalRallyPoint = X: 36.0 Y: -25.0 Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
ExitDelay = 300 ; Mainly for the multiple produced Red Guard. Make them come out one at a time.
End



Hopefully this will work, otherwise, just replace the existing line, as it's pretty much unneeded o,O

Not sure why the developers decided to add that lol.
Annihilationzh
11 years ago

So I'm trying to give good ol' General Fai an option in his Barracks that lets him build a "Red Guard Squad", which basically creates seven almost-vanilla Red Guards at once. Mr. Zemlinsky said to copy this into his (Fai's) Barrack's code:

Originally Posted by: Gameanater 


Infantry general's barracks already contains the code for multiple minigunners, but it's set to 1 at a time. To create this mod, all you need to do is modify the existing ProductionUpdate.

If you want multiple tank hunters/hackers/other at once, you can simple modify the module:

  Behavior = ProductionUpdate ModuleTag_10
    QuantityModifier = Infa_ChinaInfantryMiniGunner 2
    QuantityModifier = Infa_ChinaInfantryTankHunter 2
    QuantityModifier = Infa_ChinaInfantryHacker 2
  End

For a redguard, you'd have to modify the commandsets as well.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
Mr. AZH might want to read the post again. I WANT the Mini Gunners to still be produced one at a time. :P

Just kidding, both these posts were helpful. XD

Thank you Mr. Zemlinsky, and Mr. AZH.
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Annihilationzh
11 years ago

Mr. AZH might want to read the post again. I WANT the Mini Gunners to still be produced one at a time.

Originally Posted by: Gameanater 


Sorry about that. I'm afraid I have no attention to detail whatsoever.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago

Mr. AZH might want to read the post again. I WANT the Mini Gunners to still be produced one at a time.

Originally Posted by: Annihilationzh 


Sorry about that. I'm afraid I have no attention to detail whatsoever.

Originally Posted by: Gameanater 



No problem. 😄 Sometimes I do the same thing. lol
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.