home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 April / Gamestar_83_2006-04_dvd.iso / Dema / lotrbfme2_demo.exe / INI.big / data_ini_object_goodfaction_structures_men_campsandcastles.ini < prev    next >
Text File  |  2006-01-31  |  227KB  |  7,442 lines

  1. ;---------------------------------- secondary GondorCitadel ------------------------------------------------------
  2. Object GondorCampKeep
  3.  
  4.     SelectPortrait = BPCMinasTirithKeep
  5.  
  6.   ; *** ART Parameters ***
  7.  
  8.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  9.     OkToChangeModelColor  = Yes
  10.     UseStandardModelNames = Yes
  11.  
  12.     DefaultModelConditionState  
  13.       Model = GBCCenter
  14. ;      ParticleSysBone      = glowbone01 TorchGlow
  15. ;      ParticleSysBone     = glowbone02 furnaceSmoke
  16.     End
  17.     
  18.     IdleAnimationState
  19.         ;BeginScript
  20.         ;    Prev = CurDrawablePrevAnimationState()
  21.         ;    if Prev == "BeingConstructed" then 
  22.                 ; Don't play completed sound when canceling build-in-progress or when
  23.                 ; destroyed halfway
  24.         ;        if not CurDrawableModelcondition( "DYING" ) then 
  25.         ;            CurDrawablePlaySound("CampSoldierCompleteGeneric")
  26.         ;        end
  27.         ;    end
  28.         ;EndScript
  29.     End
  30.  
  31. ;------------Build Up States
  32.     ;ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  33.    ;   Model               = GBCCenter_A
  34.   ;    ParticleSysBone      = NONE BuildingDoughnutCloud
  35.  ;     ParticleSysBone     = NONE BuildingContructDust
  36. ;    End  
  37.  
  38.     ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED
  39.       Model               = GBCCenter_A
  40. ;      ParticleSysBone      = NONE BuildingDoughnutCloud
  41.       ParticleSysBone     = NONE BuildingContructDust
  42.     End  
  43.  
  44.     AnimationState          = ACTIVELY_BEING_CONSTRUCTED
  45.         Animation
  46.             AnimationName    = GBCCenter_A.GBCCenter_A
  47.             AnimationMode   = MANUAL
  48.         End
  49.         BeginScript
  50.             CurDrawablePlaySound("GondorBarracksBeginConstruction")
  51.             CurDrawablePlaySound("BuildingTopple")
  52.             ;CurDrawableHideSubObject("FIRE02")
  53.         EndScript
  54.     End
  55.  
  56. ;------------Build Up States
  57.     ModelConditionState   = BASE_BUILD
  58.       Model               = GBCCenter_A
  59. ;      ParticleSysBone      = NONE BuildingDoughnutCloud
  60.       ParticleSysBone     = NONE BuildingContructDust
  61.     End  
  62.  
  63.     AnimationState          = BASE_BUILD
  64.         Animation
  65.             AnimationName = GBCCenter_A.GBCCenter_A
  66.             AnimationMode = ONCE
  67.             AnimationBlendTime = 0            
  68.             AnimationSpeedFactorRange = 2.0 2.0 ; 300 frame anim, but need to shrink down to 5 seconds
  69.         End
  70.         BeginScript
  71.             CurDrawablePlaySound("GondorBarracksBeginConstruction")
  72.             CurDrawablePlaySound("BuildingTopple")
  73.         EndScript
  74.     End
  75.  
  76.     ModelConditionState   = JUST_BUILT
  77.       Model               = GBCCenter_A
  78.     End
  79.     
  80.     AnimationState          = JUST_BUILT
  81.         Animation
  82.             AnimationName = GBCCenter_A.GBCCenter_A
  83.             AnimationMode = MANUAL            
  84.             AnimationBlendTime = 0
  85.         End
  86.         Flags = START_FRAME_FIRST
  87. ;        BeginScript
  88. ;            CurDrawableHideSubObject("FIRE02")
  89. ;        EndScript
  90.     End
  91.  
  92.     ModelConditionState  = DAMAGED
  93.       Model         = GBCCenter_D1  
  94.       ParticleSysBone dustbone01 TrebuchetImpactDebris
  95. ;      ParticleSysBone      = glowbone01 TorchGlow
  96. ;      ParticleSysBone     = glowbone02 furnaceSmoke
  97.     
  98.     End
  99.     AnimationState = DAMAGED
  100.     EnteringStateFX    = FX_BuildingDamaged
  101.     End
  102.  
  103.     ModelConditionState  = REALLYDAMAGED
  104.       Model         = GBCCenter_D2  
  105.       ParticleSysBone     = glowbone02 TrebuchetImpactDebris
  106.       ParticleSysBone      = glowbone01 Explosion5
  107.     
  108.     End
  109.     AnimationState = REALLYDAMAGED
  110.     EnteringStateFX    = FX_BuildingReallyDamaged
  111.     End
  112.     
  113.     ModelConditionState  = RUBBLE
  114.       Model         = GBCCenter_D2
  115.       ParticleSysBone dustbone01 TrebuchetImpactDebris
  116.       ParticleSysBone      = glowbone01 Explosion5
  117.       ParticleSysBone     = glowbone02 BuildingChunkDebris
  118.     End
  119.     AnimationState = RUBBLE
  120.     End
  121.  
  122.       ModelConditionState  = POST_RUBBLE
  123.         Model         = GBGenRubble
  124.         ParticleSysBone NONE SmokeBuildingMediumRubble
  125.     End
  126.     AnimationState = POST_RUBBLE
  127.     End
  128.     
  129.     ModelConditionState  = POST_COLLAPSE
  130.         Model         = GBGenRubble
  131.         ParticleSysBone NONE SmokeBuildingMediumRubble
  132.     End
  133.     AnimationState = POST_COLLAPSE
  134.     End
  135.  
  136.   End
  137.  
  138.  
  139.     ; *** AUDIO Parameters ***
  140.  
  141.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  142.  
  143.     VoiceSelect                = GondorCitadelSelect
  144.  
  145.     SoundAmbient            = CitadelSignalFireLoop
  146.     SoundOnDamaged            = BuildingLightDamageStone
  147.     SoundOnReallyDamaged        = BuildingHeavyDamageStone
  148.  
  149.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  150.  
  151.     UnitSpecificSounds
  152.         UnderConstruction        = BuildingBigConstructionLoop        ; Built first time
  153.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  154.         UnderRepairFromRubble    = BuildingBigConstructionLoop        ; Repaired from completely destroyed (not used???)
  155.     End
  156.     EvaEventDieOwner = CitadelDie
  157.  
  158.     CampnessValue = CAMPNESS_FORTRESS
  159.  
  160.     ; ***DESIGN parameters ***
  161.  
  162.     DisplayName      = OBJECT:GondorCampKeep
  163.     Side = Men
  164.     EditorSorting   = STRUCTURE
  165.     ThreatLevel = 1.0
  166.     BuildCost           = 1000
  167.     BuildTime           = 30.0           ; in seconds
  168.     CommandSet            = GenericKeepCommandSet
  169.  
  170.     ArmorSet
  171.         Conditions        = None
  172.         Armor             = CitadelArmor
  173.         DamageFX          = None
  174.     End
  175.  
  176.     ; *** ENGINEERING Parameters ***  
  177.           //-----------------------------------------------
  178.  
  179.     //Commandset upgrades based on faction.  This is so the building will produce the proper units when necessary
  180.     Behavior = CommandSetUpgrade ModuleTag_CommandSetDwarven
  181.         TriggeredBy    = Upgrade_DwarfFaction
  182.         CommandSet    = DwarvenMonumentFortressCommandSet
  183.     End
  184.     Behavior = CommandSetUpgrade ModuleTag_CommandSetMen
  185.         TriggeredBy    = Upgrade_MenFaction
  186.         CommandSet    = MenMonumentFortressCommandSet
  187.     End
  188.     Behavior = CommandSetUpgrade ModuleTag_CommandSetElven
  189.         TriggeredBy    = Upgrade_ElfFaction
  190.         CommandSet    = ElvenMonumentFortressCommandSet
  191.     End
  192.     Behavior = CommandSetUpgrade ModuleTag_CommandSetIsengard
  193.         TriggeredBy    = Upgrade_IsengardFaction
  194.         CommandSet    = IsengardMonumentFortressCommandSet
  195.     End
  196.     Behavior = CommandSetUpgrade ModuleTag_CommandSetMordor
  197.         TriggeredBy    = Upgrade_MordorFaction
  198.         CommandSet    = MordorMonumentFortressCommandSet
  199.     End
  200.     Behavior = CommandSetUpgrade ModuleTag_CommandSetWild
  201.         TriggeredBy    = Upgrade_WildFaction
  202.         CommandSet    = WildMonumentFortressCommandSet
  203.     End
  204.     //End Commandset upgrades
  205.  
  206.     KindOf                    = VITAL_FOR_BASE_SURVIVAL STRUCTURE SELECTABLE IMMOBILE COMMANDCENTER MP_COUNT_FOR_VICTORY FS_FACTORY AUTO_RALLYPOINT MADE_OF_STONE SCORE DOZER_FACTORY //CAMP_KEEP
  207.     RadarPriority            = STRUCTURE
  208.     KeepSelectableWhenDead    = Yes
  209.  
  210.     Body              = ActiveBody ModuleTag_02
  211.         MaxHealth       = GONDOR_CENTRAL_CAMP_KEEP_HEALTH
  212.     End
  213.  
  214.     Behavior = GettingBuiltBehavior ModuleTag_04
  215. ;        WorkerName    = GondorWorkerNoSelect
  216. ;        SpawnTimer  = 120
  217. ;        RebuildWhenDead = Yes
  218.         SelfBuildingLoop = BuildingBigConstructionLoop            ; Only played if we DON'T spawn a worker
  219.         SelfRepairFromDamageLoop  = NoSound                    ; This doesn't cause an animation, so don't bother playing a sound
  220.         SelfRepairFromRubbleLoop  = BuildingBigConstructionLoop
  221.         
  222.     End
  223.  
  224.     Behavior = CastleMemberBehavior ModuleTag_CMB
  225.         BeingBuiltSound = BuildingBigConstructionLoop
  226.     End 
  227.  
  228.     ;-----------------------------------------------
  229.     ;Used for hero revival and initial construction     
  230.     Behavior = ProductionUpdate ProductionUpdateModuleTag
  231.         ; nothing, but is required if we have any Object-level Upgrades!
  232.     End
  233.     Behavior = QueueProductionExitUpdate ModuleTag_QueuePEU
  234.         UnitCreatePoint   = X:0.0 Y:-20.0 Z:0.0
  235.         NaturalRallyPoint = X:28.8 Y:-80.0 Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius!
  236.         ExitDelay = 300 ; Mainly for the multiple produced Red Guard.  Make them come out one at a time.
  237.     End  
  238.     ;-----------------------------------------------
  239.  
  240.     Behavior = CitadelSlaughterHordeContain ModuleTag_SlaughterMe
  241.         PassengerFilter                    = GENERIC_FACTION_SLAUGHTERABLE
  242.         ObjectStatusOfContained            = UNSELECTABLE ENCLOSED
  243.         CashBackPercent                    = 200%        
  244.         ContainMax                        = 99    // give it a huge capacity, just in case player sends his whole army in at once
  245.         AllowEnemiesInside                = No
  246.         AllowAlliesInside                = No
  247.          AllowNeutralInside                = No
  248.          AllowOwnPlayerInsideOverride    = Yes
  249.         EnterSound                        = MordorSlaughterhouseEnterSound
  250.         EntryOffset                        = X:40.0 Y:0.0 Z:0.0
  251.         EntryPosition                    = X:0.0 Y:0.0 Z:0.0
  252.         
  253.         ExitOffset                        = X:40.0 Y:0.0 Z:0.0
  254.         StatusForRingEntry                = HOLDING_THE_RING
  255.         UpgradeForRingEntry                = Upgrade_RingHero Upgrade_FortressRingHero
  256.         ObjectToDestroyForRingEntry        = NONE +TheDroppedRing
  257.         FXForRingEntry                    = FX_OneRingFlare
  258.     End
  259.  
  260.     ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  261.     ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  262.     ; buildings automatically stick around because GarrisonContain has it's own DieModule
  263.     Behavior = KeepObjectDie ModuleTag_IWantRubble
  264.     End
  265.  
  266.     Behavior = AutoDepositUpdate AutoDepositModuleTag
  267.         DepositTiming            = GENERIC_KEEP_MONEY_TIME        ; in milliseconds
  268.         DepositAmount            = GENERIC_KEEP_MONEY_AMOUNT        ; cash amount to deposit every DepositTiming
  269.         InitialCaptureBonus        = 0  ; no initial bonus
  270.     End
  271.   
  272.      Behavior                  = StructureCollapseUpdate ModuleTag_06
  273.        MinCollapseDelay        = 000
  274.        MaxCollapseDelay        = 000
  275.        CollapseDamping         = .5
  276.        MaxShudder              = 0.6
  277.        MinBurstDelay           = 250
  278.        MaxBurstDelay           = 800
  279.        BigBurstFrequency       = 4
  280.        FXList                  = INITIAL FX_StructureMediumCollapse
  281.      End
  282.  
  283.     Behavior                  = RubbleRiseUpdate ModuleTag_07
  284.         MinRubbleRiseDelay      = 000
  285.         MaxRubbleRiseDelay      = 000
  286.         ;RubbleRiseDamping       = .5
  287.         RubbleHeight            = 4.0
  288.         MaxShudder              = 0.6
  289.         MinBurstDelay           = 250
  290.         MaxBurstDelay           = 800
  291.         BigBurstFrequency       = 4
  292.         FXList                  = INITIAL FX_StructureMediumPostCollapse
  293.     End  
  294.   
  295.      #include "..\..\..\FortressRingFunc.inc"
  296.  
  297.   Geometry              = BOX
  298.   GeometryMajorRadius   = 7.0
  299.   GeometryMinorRadius   = 7.0
  300.   GeometryHeight        = 113.0
  301.   
  302.   AdditionalGeometry    = BOX
  303.   GeometryMajorRadius   = 14.0
  304.   GeometryMinorRadius   = 14.0
  305.   GeometryHeight        = 38.0
  306.  
  307.   AdditionalGeometry    = CYLINDER ; this is needed so melee units can reach athe citidel to attack it
  308.   GeometryMajorRadius   = 30.0
  309.   GeometryMinorRadius   = 30.0
  310.   GeometryHeight        = 10.0
  311.   
  312.   GeometryIsSmall       = No
  313.   Shadow                = SHADOW_VOLUME
  314.   
  315.   GeometryContactPoint    = X:0.407    Y:-0.489    Z:122.392        Swoop
  316.   AttackContactPoint    = X:0        Y:0            Z:0
  317.   
  318. End
  319.  
  320. ;----------------------------- primary GondorCitadel -----------------------------------------
  321. Object GondorCastleBaseKeep
  322.  
  323.     SelectPortrait = BPGondorCastle
  324.  
  325.   ; *** ART Parameters ***
  326.  
  327.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  328.     OkToChangeModelColor  = Yes
  329.     UseStandardModelNames = Yes
  330.     
  331.     ExtraPublicBone = Arrow_01
  332.     ExtraPublicBone = Arrow_02
  333.     ExtraPublicBone = Arrow_03
  334.     ExtraPublicBone = Arrow_04
  335.     ExtraPublicBone = Arrow_05
  336.     ExtraPublicBone = Arrow_06
  337.     ExtraPublicBone = Arrow_07
  338.     ExtraPublicBone = Arrow_08
  339.     ExtraPublicBone = Arrow_09
  340.     ExtraPublicBone = Arrow_10
  341.     ExtraPublicBone = Arrow_11
  342.     ExtraPublicBone = Arrow_12
  343.  
  344.     DefaultModelConditionState  
  345.       Model = GBCastKeep
  346.       WeaponLaunchBone    = PRIMARY ARROW_
  347.     End
  348.     
  349.     ;------------Build Up States
  350.     ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  351.       Model               = GBCastKeep_A
  352.       ParticleSysBone     = NONE BuildingContructDust
  353.     End  
  354.  
  355.     AnimationState          = ACTIVELY_BEING_CONSTRUCTED
  356.         Animation
  357.             AnimationName    = GBCastKeep_A.GBCastKeep_A
  358.             AnimationMode   = MANUAL
  359.         End
  360.     End
  361.     
  362.     ;---------Damaged---------------------
  363.     ModelConditionState  = DAMAGED
  364.       Model         = GBCastKeep_D1 
  365.     End
  366.     
  367.     AnimationState = DAMAGED
  368.         StateName = STATE_None
  369.         EnteringStateFX    = FX_BuildingDamaged
  370.     End
  371.  
  372.     ModelConditionState  = REALLYDAMAGED
  373.       Model         = GBCastKeep_D2
  374.     End
  375.     AnimationState = REALLYDAMAGED
  376.            Animation                =    ReallyDamagedanimation
  377.             AnimationName        =     GBCastKeep_D2.GBCastKeep_D2
  378.             AnimationMode        =    ONCE
  379.            End
  380.            StateName = STATE_None
  381.         EnteringStateFX    = FX_BuildingReallyDamaged
  382.     End
  383.  
  384.     ModelConditionState   = DESTROYED_WHILST_BEING_CONSTRUCTED
  385.         Model = GBCastKeep_A
  386.         ParticleSysBone NONE Explosion3
  387.         ParticleSysBone NONE ExplosiveMineSmoke02
  388.     End  
  389.     AnimationState    = DESTROYED_WHILST_BEING_CONSTRUCTED
  390.         StateName = STATE_DetroyedConstructing
  391.         Animation
  392.             AnimationName        = GBCastKeep_A.GBCastKeep_A
  393.             AnimationMode        = ONCE_BACKWARDS
  394.             AnimationBlendTime    = 90    ; 3 seconds * 30 frames
  395.         End
  396.         ; Specifically no start last frame flag here.
  397.         Flags = START_FRAME_FIRST
  398.     End
  399.  
  400.     ; RUBBLE--------------------------------------------------------------------------------------------------------
  401.     TransitionState = TRANS_U_IntoRubble
  402.         Animation = D3
  403.             AnimationName        = GBCastKeep_D3.GBCastKeep_D3
  404.             AnimationMode        = ONCE
  405.             AnimationBlendTime    = 0
  406.         End
  407.         ParticleSysBone NONE Explosion3
  408.         ParticleSysBone NONE ExplosiveMineSmoke02
  409.     End
  410.  
  411.     ModelConditionState  = RUBBLE
  412.         Model         = GBCastKeep_D3
  413.     End   
  414.     AnimationState = RUBBLE
  415.         StateName = STATE_Rubble
  416.         Flags = START_FRAME_LAST
  417.         Animation                =    Death
  418.             AnimationName        =    GBCastKeep_D3.GBCastKeep_D3
  419.             AnimationMode        =    ONCE
  420.         End
  421.         BeginScript
  422.             Prev = CurDrawablePrevAnimationState()
  423.             if Prev == "STATE_None"
  424.             then
  425.                 ; Only play the rubble anim if we havn't come from another rubble.
  426.                 CurDrawableSetTransitionAnimState("TRANS_U_IntoRubble")
  427.             end
  428.         EndScript
  429.     End      
  430.  
  431. ;------------Build Up States
  432.     ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED
  433.       Model               = GBCastKeep_A
  434.       ParticleSysBone     = NONE BuildingContructDust
  435.     End  
  436.  
  437.     AnimationState          = ACTIVELY_BEING_CONSTRUCTED
  438.         StateName = STATE_Rubble
  439.         Animation
  440.             AnimationName    = GBCastKeep_A.GBCastKeep_A
  441.             AnimationMode   = MANUAL
  442.         End
  443.         BeginScript
  444.             ;CurDrawableHideSubObject("FIRE02")
  445.             CurDrawablePlaySound("GondorBarracksBeginConstruction")
  446.             CurDrawablePlaySound("BuildingTopple")
  447.         EndScript
  448.     End
  449.  
  450. ;------------Build Up States
  451.     ModelConditionState   = BASE_BUILD
  452.       Model               = GBCastKeep_A
  453.       ParticleSysBone     = NONE BuildingContructDust
  454.     End  
  455.  
  456.     AnimationState          = BASE_BUILD
  457.         StateName = STATE_Rubble
  458.         Animation
  459.             AnimationName = GBCastKeep_A.GBCastKeep_A
  460.             AnimationMode = ONCE
  461.             AnimationBlendTime = 0            
  462.             AnimationSpeedFactorRange = 2.0 2.0 ; 300 frame anim, but need to shrink down to 5 seconds
  463.         End
  464.         BeginScript
  465.             CurDrawablePlaySound("GondorBarracksBeginConstruction")
  466.             CurDrawablePlaySound("BuildingTopple")
  467.         EndScript
  468.     End
  469.  
  470.     ModelConditionState   = JUST_BUILT
  471.       Model               = GBCastKeep_A
  472.     End  
  473.     AnimationState          = JUST_BUILT
  474.         StateName = STATE_Rubble
  475.         Animation
  476.             AnimationName = GBCastKeep_A.GBCastKeep_A
  477.             AnimationMode = MANUAL            
  478.             AnimationBlendTime = 0
  479.         End
  480.         Flags = START_FRAME_FIRST
  481.     End
  482.  
  483.   End
  484.  
  485.  
  486.     ; *** AUDIO Parameters ***
  487.  
  488.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  489.  
  490.     VoiceSelect                = GondorCitadelSelect
  491.  
  492.     SoundAmbient            = CitadelSignalFireLoop
  493.     SoundOnDamaged            = BuildingLightDamageStone
  494.     SoundOnReallyDamaged        = BuildingHeavyDamageStone
  495.  
  496.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  497.  
  498.     UnitSpecificSounds
  499.         UnderConstruction        = BuildingBigConstructionLoop        ; Built first time
  500.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  501.         UnderRepairFromRubble    = BuildingBigConstructionLoop        ; Repaired from completely destroyed (not used???)
  502.     End
  503.  
  504.     EvaEventDieOwner = CitadelDie
  505.  
  506.     ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
  507.         MaxUpdateRangeCap = 800
  508.          AnimationSound = Sound:BuildingSink                Animation:GBCastKeep_D3.GBCastKeep_D3    Frames:0
  509.         AnimationSound = Sound:BuildingHeavyDamageStone        Animation:GBCastKeep_D3.GBCastKeep_D3    Frames:40
  510.     End
  511.     CampnessValue = CAMPNESS_FORTRESS
  512.  
  513.  
  514.     ; ***DESIGN parameters ***
  515.  
  516.     DisplayName      = OBJECT:GondorCastleBaseKeep
  517.     Side = Men
  518.     EditorSorting   = STRUCTURE
  519.     ThreatLevel = 1.0
  520.     BuildCost           = 1000
  521.     BuildTime           = 30.0           ; in seconds
  522.     CommandSet            = GondorCastleBaseKeepCommandSet
  523.  
  524.   ArmorSet
  525.     Conditions        = None
  526.     Armor             = StructureArmor
  527.     DamageFX          = MinasWallADamageFX
  528.   End
  529.   
  530.     WeaponSet
  531.         Conditions            = None
  532.         Weapon                = PRIMARY KeepBow
  533.         AutoChooseSources    = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
  534.     End 
  535.  
  536.   ; *** ENGINEERING Parameters ***  
  537.   KindOf                    = VITAL_FOR_BASE_SURVIVAL STRUCTURE SELECTABLE SCORE IMMOBILE CASTLE_KEEP MP_COUNT_FOR_VICTORY CAN_ATTACK FS_FACTORY MADE_OF_STONE ATTACK_NEEDS_LINE_OF_SIGHT AUTO_RALLYPOINT    ;  GARRISON GARRISONABLE_UNTIL_DESTROYED
  538.   RadarPriority                = STRUCTURE
  539.   VisionRange                = GONDOR_ARCHER_VISION_RANGE
  540.   KeepSelectableWhenDead    = Yes
  541.   
  542.   Body              = ActiveBody ModuleTag_02
  543.     MaxHealth       = GONDOR_CENTRAL_CAMP_KEEP_HEALTH
  544.   End
  545.  
  546.   Behavior = GettingBuiltBehavior ModuleTag_04
  547.     SelfBuildingLoop = BuildingBigConstructionLoop            ; Only played if we DON'T spawn a worker
  548.     SelfRepairFromDamageLoop  = NoSound                    ; This doesn't cause an animation, so don't bother playing a sound
  549.     SelfRepairFromRubbleLoop  = BuildingBigConstructionLoop
  550.   End
  551.  
  552.   Behavior = CastleMemberBehavior ModuleTag_CMB
  553.     BeingBuiltSound = BuildingBigConstructionLoop
  554.   End 
  555.  
  556.       ;-----------------------------------------------
  557.     ;Used for hero revival and initial construction     
  558.     Behavior = ProductionUpdate ProductionUpdateModuleTag
  559.         ; nothing, but is required if we have any Object-level Upgrades!
  560.     End
  561.     Behavior = QueueProductionExitUpdate ModuleTag_QueuePEU
  562.         UnitCreatePoint   = X:0.0 Y:-20.0 Z:0.0
  563.         NaturalRallyPoint = X:28.8 Y:-80.0 Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius!
  564.         ExitDelay = 300 ;Handles delays between units if multiple produced at a time. 
  565.     End  
  566.     ;-----------------------------------------------
  567.  
  568.     Behavior = WeaponSetUpgrade ModuleTag_FireArrows
  569.         TriggeredBy            = Upgrade_BattleTowersToUseFireArrows
  570.     End
  571.     Behavior = AIUpdateInterface ModuleTag_SoWeCanUseWeapon
  572.          AutoAcquireEnemiesWhenIdle    = Yes
  573.          MoodAttackCheckRate            = 250
  574.      End
  575.    
  576.  
  577.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  578.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  579.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  580.   Behavior = KeepObjectDie ModuleTag_IWantRubble
  581.   End
  582.  
  583.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  584.         TriggeredBy                = Upgrade_NumenorStonework
  585.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  586.     End
  587.   
  588.     Behavior       = EvacuateDamage ModuleTag_evacuateDamage
  589.         WeaponThatCausesEvacuation  = MordorCatapultHumanHeads
  590.     End
  591.  
  592. ;-------------Can no longer garrison castle keeps
  593. ;
  594. ;    Behavior = HordeGarrisonContain ModuleTag_hordeGarrison
  595. ;        ObjectStatusOfContained    = UNSELECTABLE CAN_ATTACK
  596. ;        ContainMax              = 4
  597. ;        DamagePercentToUnits    = 0%
  598. ;        PassengerFilter            = ANY +INFANTRY +HORDE -CAVALRY -SUMMONED -WildSpiderling -WildSpiderlingHorde
  599. ;        AllowEnemiesInside      = Yes
  600. ;        AllowNeutralInside      = Yes
  601. ;        NumberOfExitPaths       = 1 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
  602. ;        PassengerBonePrefix     = PassengerBone:ARROWBONE KindOf:INFANTRY
  603. ;        EntryOffset                = X:0.0 Y:-45.0 Z:0.0
  604. ;        ExitOffset                = X:0.0 Y:-45.0 Z:0.0
  605. ;        
  606. ;        ;PassengersTestCollisionHeight = 80
  607. ;        ;Slots                         = 1
  608. ;        ;EnterSound                     = GarrisonEnter
  609. ;        ;ExitSound                      = GarrisonExit
  610. ;        ;ExitDelay               = 250
  611. ;        ;GoAggressiveOnExit      = Yes ; AI Will tell people to set their mood to Aggressive on exiting
  612. ;        ;ForceOrientationContainer = No  ; otherwise contained units can't orient themselves towards their targets...
  613. ;    End 
  614.  
  615.     Behavior = AutoDepositUpdate AutoDepositModuleTag
  616.         DepositTiming            = GENERIC_KEEP_MONEY_TIME   ; in milliseconds
  617.         DepositAmount            = GENERIC_KEEP_MONEY_AMOUNT   ; cash amount to deposit every DepositTiming
  618.         InitialCaptureBonus        = 0  ; no initial bonus
  619.     End
  620.   
  621.   Geometry              = BOX
  622.   GeometryMajorRadius   = 19.0
  623.   GeometryMinorRadius   = 19.0
  624.   GeometryHeight        = 44.0
  625.   
  626.   AdditionalGeometry    = CYLINDER
  627.   GeometryMajorRadius   = 19.0
  628.   GeometryMinorRadius   = 0
  629.   GeometryHeight        = 79
  630.   
  631.   AdditionalGeometry    = CYLINDER
  632.   GeometryMajorRadius   = 9.0
  633.   GeometryMinorRadius   = 0
  634.   GeometryHeight        = 149
  635.   
  636.   GeometryIsSmall       = No
  637.   Shadow                = SHADOW_VOLUME
  638.   
  639.   AttackContactPoint    = X:00.327        Y:-0.28            Z:167.013        Swoop
  640.   AttackContactPoint    = X:0            Y:0                Z:0
  641. End
  642.  
  643. ;----------------------------- primary GondorCitadel -----------------------------------------
  644. Object WOR_GondorCastleBaseKeep
  645.  
  646.     SelectPortrait = BPCMinasTirithKeep
  647.  
  648. ; *** ART Parameters ***
  649. Draw = W3DScriptedModelDraw ModuleTag_Draw
  650.     OkToChangeModelColor  = Yes
  651.     UseStandardModelNames = Yes
  652.     
  653.     ExtraPublicBone = Arrow_01
  654.     ExtraPublicBone = Arrow_02
  655.     ExtraPublicBone = Arrow_03
  656.     ExtraPublicBone = Arrow_04
  657.     ExtraPublicBone = Arrow_05
  658.     ExtraPublicBone = Arrow_06
  659.     ExtraPublicBone = Arrow_07
  660.     ExtraPublicBone = Arrow_08
  661.     ExtraPublicBone = Arrow_09
  662.     ExtraPublicBone = Arrow_10
  663.     ExtraPublicBone = Arrow_11
  664.     ExtraPublicBone = Arrow_12
  665.  
  666.     DefaultModelConditionState  
  667.         Model = GBCastKeep
  668.         WeaponLaunchBone = PRIMARY ARROW_
  669.     End
  670.    
  671.     ;------------Build Up States
  672.     ModelConditionState = ACTIVELY_BEING_CONSTRUCTED
  673.         Model        = GBCastKeep_A
  674.         ParticleSysBone    = NONE BuildingContructDust
  675.     End  
  676.  
  677.     AnimationState = ACTIVELY_BEING_CONSTRUCTED
  678.         StateName = STATE_Rubble
  679.         Animation
  680.             AnimationName    = GBCastKeep_A.GBCastKeep_A
  681.             AnimationMode   = MANUAL
  682.         End
  683.         BeginScript
  684.             ;CurDrawableHideSubObject("FIRE02")
  685.             CurDrawablePlaySound("GondorBarracksBeginConstruction")
  686.             CurDrawablePlaySound("BuildingTopple")
  687.         EndScript
  688.     End
  689.  
  690.     ;---------Damaged---------------------
  691.     ModelConditionState = DAMAGED
  692.         Model = GBCastKeep_D1 
  693.     End
  694.     
  695.     AnimationState = DAMAGED
  696.         StateName = STATE_None
  697.         EnteringStateFX    = FX_BuildingDamaged
  698.     End
  699.  
  700.     ModelConditionState = REALLYDAMAGED
  701.         Model = GBCastKeep_D2
  702.     End
  703.  
  704.     AnimationState = REALLYDAMAGED
  705.                Animation            = ReallyDamagedanimation
  706.             AnimationName        = GBCastKeep_D2.GBCastKeep_D2
  707.             AnimationMode        = ONCE
  708.            End
  709.            StateName = STATE_None 
  710.         EnteringStateFX    = FX_BuildingReallyDamaged
  711.     End
  712.  
  713.     ModelConditionState = RUBBLE
  714.         Model = GBCastKeep_D3
  715.         ParticleSysBone NONE Explosion5
  716.     End 
  717.  
  718.     AnimationState = RUBBLE
  719.         Animation            = Death
  720.             AnimationName        = GBCastKeep_D3.GBCastKeep_D3
  721.             AnimationMode        = ONCE
  722.         End
  723.         EnteringStateFX    = FX_StructureMediumCollapse
  724.     End
  725.   End    
  726.  
  727.  
  728. ; *** AUDIO Parameters ***
  729.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  730.  
  731.     VoiceSelect            = GondorCitadelSelect
  732.  
  733.     SoundAmbient            = CitadelSignalFireLoop
  734.     SoundOnDamaged            = BuildingLightDamageStone
  735.     SoundOnReallyDamaged        = BuildingHeavyDamageStone
  736.  
  737.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  738.  
  739.     UnitSpecificSounds
  740.         UnderConstruction    = BuildingBigConstructionLoop        ; Built first time
  741.         ; UnderRepairFromDamage    = NoSound                ; Repaired No animation on the building, so don't bother playing sound
  742.         UnderRepairFromRubble    = BuildingBigConstructionLoop        ; Repaired from completely destroyed (not used???)
  743.     End
  744.  
  745.     EvaEventDieOwner = CitadelDie
  746.  
  747.     ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
  748.         MaxUpdateRangeCap = 800
  749.          AnimationSound = Sound:BuildingSink                Animation:GBCastKeep_D3.GBCastKeep_D3    Frames:0
  750.         AnimationSound = Sound:BuildingHeavyDamageStone        Animation:GBCastKeep_D3.GBCastKeep_D3    Frames:40
  751.     End
  752.     CampnessValue = CAMPNESS_FORTRESS
  753.  
  754.  
  755. ; ***DESIGN parameters ***
  756.     DisplayName        = OBJECT:GondorCastleBaseKeep
  757.     Side            = WOR
  758.     EditorSorting        = STRUCTURE
  759.     ThreatLevel        = 1.0
  760.     BuildCost        = 5000
  761.     BuildTime        = 120.0        ; in seconds
  762.     VisionRange             = 400
  763.     ShroudClearingRange     = 800
  764.     
  765.     ArmorSet
  766.         Conditions    = None
  767.         Armor        = StructureArmor
  768.         DamageFX    = MinasWallADamageFX
  769.     End
  770.  
  771.     CommandSet        = GondorCastleBaseKeepRebuildCommandSet
  772.   
  773.     WeaponSet
  774.         Conditions        = None
  775.         Weapon            = PRIMARY KeepBow
  776.         AutoChooseSources    = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
  777.     End 
  778.  
  779.  
  780. ; *** ENGINEERING Parameters ***  
  781.     KindOf            = VITAL_FOR_BASE_SURVIVAL PRELOAD SELECTABLE STRUCTURE IMMOBILE SCORE CASTLE_KEEP MP_COUNT_FOR_VICTORY CAN_ATTACK FS_FACTORY AUTO_RALLYPOINT DOZER_FACTORY NEVER_CULL_FOR_MP COMMANDCENTER DONT_HIDE_IF_FOGGED        ; MADE_OF_STONE
  782.     RadarPriority        = STRUCTURE
  783.     KeepSelectableWhenDead    = Yes
  784.  
  785.     //Commandset upgrades based on faction.  This is so the building will produce the proper units when necessary
  786.     Behavior = CommandSetUpgrade ModuleTag_CommandSetMen
  787.         TriggeredBy    = Upgrade_MenFaction
  788.         CommandSet    = MenMonumentFortressRebuildCommandSet
  789.     End
  790.     Behavior = CommandSetUpgrade ModuleTag_CommandSetElven
  791.         TriggeredBy    = Upgrade_ElfFaction
  792.         CommandSet    = ElvenMonumentFortressRebuildCommandSet
  793.     End
  794.     Behavior = CommandSetUpgrade ModuleTag_CommandSetDwarven
  795.         TriggeredBy    = Upgrade_DwarfFaction
  796.         CommandSet    = DwarvenMonumentFortressRebuildCommandSet
  797.     End
  798.     Behavior = CommandSetUpgrade ModuleTag_CommandSetMordor
  799.         TriggeredBy    = Upgrade_MordorFaction
  800.         CommandSet    = MordorMonumentFortressRebuildCommandSet
  801.     End
  802.     Behavior = CommandSetUpgrade ModuleTag_CommandSetIsengard
  803.         TriggeredBy    = Upgrade_IsengardFaction
  804.         CommandSet    = IsengardMonumentFortressRebuildCommandSet
  805.     End
  806.     Behavior = CommandSetUpgrade ModuleTag_CommandSetWild
  807.         TriggeredBy    = Upgrade_WildFaction
  808.         CommandSet    = WildMonumentFortressRebuildCommandSet
  809.     End
  810.     //End Commandset upgrades
  811.  
  812.       //-----------------------------------------------
  813.     //Used for hero revival and initial construction     
  814.     Behavior = ProductionUpdate ProductionUpdateModuleTag
  815.         // nothing, but is required if we have any Object-level Upgrades!
  816.     End
  817.     Behavior = QueueProductionExitUpdate ModuleTag_QueuePEU
  818.         UnitCreatePoint            = X:0.0 Y:-20.0 Z:0.0
  819.         NaturalRallyPoint        = X:28.8 Y:-80.0 Z:0.0            ; NaturalRallyPointX must always match GeometryMajorRadius!
  820.         ExitDelay             = 300                    ; Handles delays between units if multiple produced at a time.
  821.         AllowAirborneCreation        = Yes
  822.     End  
  823.     //-----------------------------------------------
  824.  
  825.     Behavior = GettingBuiltBehavior GetBuiltBehaviorTag
  826.         SelfBuildingLoop        = BuildingConstructionLoop        ; Only played if we DON'T spawn a worker
  827.         SelfRepairFromDamageLoop    = NoSound                ; This doesn't cause an animation, so don't bother playing a sound
  828.         SelfRepairFromRubbleLoop    = BuildingConstructionLoop
  829.         SpawnTimer            = -1.0                    ; Negative means no 'autoheal'
  830.         RebuildTimeSeconds        = 120
  831.     End
  832.  
  833.     Behavior = CastleMemberBehavior ModuleTag_CMB
  834.         BeingBuiltSound = BuildingBigConstructionLoop
  835.     End 
  836.  
  837.     Body = ActiveBody ModuleTag_02
  838.         MaxHealth            = MONUMENT_FORTRESS_HEALTH
  839.         MaxHealthDamaged        = MONUMENT_FORTRESS_HEALTH_DAMAGED
  840.         MaxHealthReallyDamaged        = MONUMENT_FORTRESS_HEALT_REALLY_DAMAGED
  841.     End
  842.  
  843.     // Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  844.     // never truly destroyed, even when reduced to zero health. Also note that garrisonable
  845.     // buildings automatically stick around because GarrisonContain has it's own DieModule
  846.     Behavior = KeepObjectDie ModuleTag_IWantRubble
  847.     End
  848.  
  849.     Behavior = AutoDepositUpdate AutoDepositModuleTag
  850.         DepositTiming               = GENERIC_KEEP_MONEY_TIME
  851.         DepositAmount               = GENERIC_KEEP_MONEY_AMOUNT 
  852.         InitialCaptureBonus         = 0    // no initial bonus
  853.     End
  854.  
  855.     Behavior = TerrainResourceBehavior ModuleTag_NewMoneyDeadSpot
  856.         Radius                = GENERIC_KEEP_MONEY_RANGE        ; How far we try to claim ground
  857.         MaxIncome            = 0                    ; If we were to get all we wanted, how much we would earn.  Linear slope to 0 at 0% claim
  858.         IncomeInterval            = 999999                ; How often (in msec) we give that much money
  859.         HighPriority            = Yes                    ; A high priority claim gets to pretend it was there first.
  860.     End
  861.  
  862. ;    Behavior = WeaponSetUpgrade ModuleTag_FireArrows
  863. ;        TriggeredBy            = Upgrade_BattleTowersToUseFireArrows
  864. ;    End
  865. ;    Behavior = AIUpdateInterface ModuleTag_SoWeCanUseWeapon
  866. ;         AutoAcquireEnemiesWhenIdle    = Yes
  867. ;         MoodAttackCheckRate        = 250
  868. ;     End
  869.  
  870. ;    Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  871. ;        TriggeredBy            = Upgrade_NumenorStonework
  872. ;        AttributeModifier        = NumenorStoneworkKeep_Bonus
  873. ;    End
  874.   
  875. ;    Behavior = EvacuateDamage ModuleTag_evacuateDamage
  876. ;        WeaponThatCausesEvacuation    = MordorCatapultHumanHeads
  877. ;    End
  878.  
  879.     Behavior = CitadelSlaughterHordeContain ModuleTag_SlaughterMe
  880.         PassengerFilter            = GENERIC_FACTION_SLAUGHTERABLE
  881.         ObjectStatusOfContained        = UNSELECTABLE ENCLOSED
  882.         CashBackPercent            = 200%        
  883.         ContainMax            = 99                    ; give it a huge capacity, just in case player sends his whole army in at once
  884.         AllowEnemiesInside        = No
  885.         AllowAlliesInside        = No
  886.          AllowNeutralInside        = No
  887.          AllowOwnPlayerInsideOverride    = Yes
  888.         EnterSound            = MordorSlaughterhouseEnterSound
  889.         EntryOffset            = X:40.0 Y:0.0 Z:0.0
  890.         EntryPosition            = X:0.0 Y:0.0 Z:0.0
  891.         
  892.         ExitOffset            = X:40.0 Y:0.0 Z:0.0
  893.         StatusForRingEntry        = HOLDING_THE_RING
  894.         UpgradeForRingEntry        = Upgrade_RingHero Upgrade_FortressRingHero
  895.         ObjectToDestroyForRingEntry    = NONE +TheDroppedRing
  896.         FXForRingEntry            = FX_OneRingFlare
  897.     End
  898.  
  899.     #include "..\..\..\FortressRingFunc.inc"
  900.   
  901.     Geometry        = BOX
  902.     GeometryMajorRadius    = 23.0
  903.     GeometryMinorRadius    = 23.0
  904.     GeometryHeight        = 44.0
  905.       
  906.     AdditionalGeometry    = CYLINDER
  907.     GeometryMajorRadius    = 19.0
  908.     GeometryMinorRadius    = 0
  909.     GeometryHeight        = 79
  910.       
  911.     AdditionalGeometry    = CYLINDER
  912.     GeometryMajorRadius    = 9.0
  913.     GeometryMinorRadius    = 0
  914.     GeometryHeight        = 149
  915.       
  916.     GeometryIsSmall        = No
  917.     Shadow            = SHADOW_VOLUME
  918.       
  919.     AttackContactPoint    = X:00.327    Y:-0.28        Z:167.013    Swoop
  920.     AttackContactPoint    = X:0        Y:0        Z:0
  921. End
  922.  
  923. ;------------------------------------------------------------------------------
  924. Object GondorCastleWall_temp
  925.   
  926.   ; *** ART Parameters ***
  927.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  928.     OkToChangeModelColor  = Yes
  929.     UseStandardModelNames = Yes
  930.     DefaultModelConditionState
  931.       Model = GBCWall
  932.     End
  933.   End
  934.  
  935.   ; ***DESIGN parameters ***
  936.   DisplayName         = OBJECT:GondorCastleWall_temp
  937.   Side                = Men
  938.   EditorSorting       = STRUCTURE
  939.   ThreatLevel = 1.0
  940.  
  941.   BuildCost           = 1
  942.   BuildTime           = 5.0           ; in seconds
  943.   VisionRange         = 160.0          ; Shroud clearing distance
  944.   ShroudClearingRange = 160
  945.  
  946.  
  947.   ; *** AUDIO Parameters ***
  948.  
  949.     SoundOnDamaged        = BuildingLightDamageStone
  950.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  951.  
  952.  
  953.   ; *** ENGINEERING Parameters ***
  954.  
  955.   RadarPriority       = STRUCTURE
  956.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION CASTLE_KEEP MADE_OF_STONE
  957.  
  958.   Behavior            = GettingBuiltBehavior ModuleTag_04
  959.     SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  960.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  961.     SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  962.   End
  963.  
  964.   Behavior = CastleMemberBehavior ModuleTag_CMB
  965.         CountsForEvaCastleBreached = Yes
  966.   End 
  967.  
  968.   Body                = StructureBody ModuleTag_05
  969.     MaxHealth         = 1500.0
  970.   End
  971.  
  972.   Behavior            = DestroyDie ModuleTag_07
  973.     ;nothing
  974.   End
  975.  
  976.   Geometry              = BOX
  977.   GeometryMajorRadius   = 25.6
  978.   GeometryMinorRadius   = 35.2
  979.   GeometryHeight        = 191.2
  980.   GeometryIsSmall       = No
  981.   Shadow                = SHADOW_VOLUME
  982.   BuildCompletion     = PLACED_BY_PLAYER
  983. End
  984.  
  985. ;------------------------------------------------------------------------------
  986.  
  987. ;------------------------------------------------------------------------------
  988. Object GondorCastleKeep_temp
  989.  
  990.     SelectPortrait = BPGKeep
  991.   
  992.   ; *** ART Parameters ***
  993.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  994.     OkToChangeModelColor  = Yes
  995.     UseStandardModelNames = Yes
  996.     DefaultModelConditionState
  997.       Model = GBCKeep
  998.     End
  999.   End
  1000.  
  1001.   ; ***DESIGN parameters ***
  1002.   DisplayName         = OBJECT:GondorCastleKeep_temp
  1003.   Side                = Men
  1004.   EditorSorting       = STRUCTURE
  1005.   ThreatLevel = 1.0
  1006.   ThreatBreakdown GondorCastleWall_DetailedThreat
  1007.         AIKindOf = WALL
  1008.   End
  1009.  
  1010.   BuildCost           = 1
  1011.   BuildTime           = 5.0           ; in seconds
  1012.   VisionRange         = 160.0          ; Shroud clearing distance
  1013.   ShroudClearingRange = 160
  1014.  
  1015.  
  1016.   ; *** AUDIO Parameters ***
  1017.  
  1018.     VoiceSelect            = GondorCitadelSelect
  1019.  
  1020.     SoundOnDamaged        = BuildingLightDamageStone
  1021.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1022.  
  1023.     EvaEventDieOwner = CitadelDie
  1024.  
  1025.  
  1026.   ; *** ENGINEERING Parameters ***
  1027.  
  1028.   RadarPriority       = STRUCTURE
  1029.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION CASTLE_KEEP AUTO_RALLYPOINT MADE_OF_STONE
  1030.  
  1031.   Behavior            = GettingBuiltBehavior ModuleTag_04
  1032.     SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  1033.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  1034.     SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  1035.   End
  1036.  
  1037.   Behavior = CastleMemberBehavior ModuleTag_CMB
  1038.   End 
  1039.  
  1040.   Body                = StructureBody ModuleTag_05
  1041.     MaxHealth         = 1500.0
  1042.   End
  1043.  
  1044.   Behavior            = DestroyDie ModuleTag_07
  1045.     ;nothing
  1046.   End
  1047.  
  1048.   Geometry              = BOX
  1049.   GeometryMajorRadius   = 25.6
  1050.   GeometryMinorRadius   = 35.2
  1051.   GeometryHeight        = 191.2
  1052.   GeometryIsSmall       = No
  1053.   Shadow                = SHADOW_VOLUME
  1054.   BuildCompletion     = PLACED_BY_PLAYER
  1055. End
  1056.  
  1057. ;------------------------------------------------------------------------------
  1058.  
  1059. ;------------------------------------------------------------------------------
  1060. Object GondorCastleFoundation_temp
  1061.   
  1062.   ; *** ART Parameters ***
  1063.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  1064.     OkToChangeModelColor  = Yes
  1065.     UseStandardModelNames = Yes
  1066.     DefaultModelConditionState
  1067.       Model = GBCfoundation
  1068.     End
  1069.   End
  1070.  
  1071.   ; ***DESIGN parameters ***
  1072.   DisplayName         = OBJECT:GondorCastleFoundation_temp
  1073.   Side                = Men
  1074.   EditorSorting       = STRUCTURE
  1075.   ThreatLevel = 1.0
  1076.  
  1077.   BuildCost           = 1
  1078.   BuildTime           = 5.0           ; in seconds
  1079.   VisionRange         = 160.0          ; Shroud clearing distance
  1080.   ShroudClearingRange = 160
  1081.  
  1082.   ; *** AUDIO Parameters ***
  1083.  
  1084.   ; *** ENGINEERING Parameters ***
  1085.  
  1086.   RadarPriority       = STRUCTURE
  1087.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION CASTLE_KEEP 
  1088.  
  1089.   Behavior            = GettingBuiltBehavior ModuleTag_04
  1090.     SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  1091.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  1092.     SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  1093.   End
  1094.  
  1095.   Behavior = CastleMemberBehavior ModuleTag_CMB
  1096.   End 
  1097.  
  1098.   Body                = StructureBody ModuleTag_05
  1099.     MaxHealth         = 1500.0
  1100.   End
  1101.  
  1102.   Behavior            = DestroyDie ModuleTag_07
  1103.     ;nothing
  1104.   End
  1105.  
  1106.   Geometry              = BOX
  1107.   GeometryMajorRadius   = 25.6
  1108.   GeometryMinorRadius   = 35.2
  1109.   GeometryHeight        = 191.2
  1110.   GeometryIsSmall       = No
  1111.   Shadow                = SHADOW_VOLUME
  1112.   BuildCompletion     = PLACED_BY_PLAYER
  1113. End
  1114.  
  1115. ;------------------------------------------------------------------------------
  1116.  
  1117. ;------------------------------------------------------------------------------
  1118. Object GondorCastleBarracks_temp
  1119.   
  1120.   ; *** ART Parameters ***
  1121.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  1122.     OkToChangeModelColor  = Yes
  1123.     UseStandardModelNames = Yes
  1124.     DefaultModelConditionState
  1125.       Model = GBCBarracks
  1126.     End
  1127.   End
  1128.  
  1129.   ; ***DESIGN parameters ***
  1130.   DisplayName         = OBJECT:GondorCastleBarracks_temp
  1131.   Side                = Men
  1132.   EditorSorting       = STRUCTURE
  1133.   ThreatLevel = 1.0
  1134.  
  1135.   BuildCost           = 1
  1136.   BuildTime           = 5.0           ; in seconds
  1137.   VisionRange         = 160.0          ; Shroud clearing distance
  1138.   ShroudClearingRange = 160
  1139.  
  1140.  
  1141.   ; *** AUDIO Parameters ***
  1142.  
  1143.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  1144.  
  1145.     UnitSpecificSounds
  1146.         UnderConstruction        = BuildingConstructionLoop  ; Built first time
  1147.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  1148.         UnderRepairFromRubble    = BuildingConstructionLoop    ; Repaired from completely destroyed (not used???)
  1149.     End
  1150.  
  1151.  
  1152.   ; *** ENGINEERING Parameters ***
  1153.  
  1154.   RadarPriority       = STRUCTURE
  1155.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION CASTLE_KEEP MADE_OF_STONE
  1156.  
  1157.   Behavior            = GettingBuiltBehavior ModuleTag_04
  1158.     SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  1159.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  1160.     SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  1161.   End
  1162.  
  1163.   Behavior = CastleMemberBehavior ModuleTag_CMB
  1164.   End 
  1165.  
  1166.   Body                = StructureBody ModuleTag_05
  1167.     MaxHealth         = 1500.0
  1168.   End
  1169.  
  1170.   Behavior            = DestroyDie ModuleTag_07
  1171.     ;nothing
  1172.   End
  1173.  
  1174.   Geometry              = BOX
  1175.   GeometryMajorRadius   = 25.6
  1176.   GeometryMinorRadius   = 35.2
  1177.   GeometryHeight        = 191.2
  1178.   GeometryIsSmall       = No
  1179.   Shadow                = SHADOW_VOLUME
  1180.   BuildCompletion     = PLACED_BY_PLAYER
  1181. End
  1182.  
  1183. ;------------------------------------------------------------------------------
  1184.  
  1185. ;Gondor Building Foundation -- the area where faction gondor buildings can be built on
  1186. Object GondorBuildingFoundation
  1187.  
  1188.  
  1189.  SelectPortrait = BPGCamp_Plot
  1190.   ; *** ART Parameters ***
  1191.  
  1192.  
  1193.     Draw = W3DScriptedModelDraw ModuleTag_Draw2
  1194.         DefaultModelConditionState
  1195.             Model = OBBFoundationX
  1196.         End
  1197.         ModelConditionState = WORLD_BUILDER
  1198.               Model = GBSizeTemplate
  1199.           End
  1200.  
  1201.     End
  1202.     
  1203.     Draw = W3DFloorDraw ModuleTag_Draw
  1204.         ModelName = GBFoundationX
  1205.     End
  1206.  
  1207.     ;PlacementViewAngle  = 0
  1208.  
  1209.   ; ***DESIGN parameters ***
  1210.   DisplayName         = OBJECT:GondorBuildingFoundation
  1211.   Side                = Men
  1212.   EditorSorting       = STRUCTURE
  1213.   ThreatLevel = 1.0
  1214.  
  1215.   BuildCost           = 1
  1216.   BuildTime           = 5.0           ; in seconds
  1217.   VisionRange         = 160.0          ; Shroud clearing distance
  1218.   ShroudClearingRange = 160
  1219.  
  1220.   CommandSet = GondorFoundationCommandSet
  1221.  
  1222.  
  1223.   ; *** AUDIO Parameters ***
  1224.  
  1225.   VoiceSelect = Gui_PlotSelect2        ;Gui_PlotSelect
  1226.  
  1227.  
  1228.   ; *** ENGINEERING Parameters ***
  1229.  
  1230.   RadarPriority       = STRUCTURE
  1231.   KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION UNATTACKABLE MP_COUNT_FOR_VICTORY NO_COLLIDE DO_NOT_CLASSIFY
  1232.  
  1233.   Behavior            = FoundationAIUpdate ModuleTag_foundationAI
  1234.   End
  1235.  
  1236.   Behavior = CastleMemberBehavior ModuleTag_CMB
  1237.   End 
  1238.  
  1239.   Body                = ImmortalBody ModuleTag_05
  1240.     MaxHealth         = 15000.0
  1241.   End
  1242.  
  1243.   Geometry              = BOX
  1244.   GeometryMajorRadius   = 24.0
  1245.   GeometryMinorRadius   = 24.0
  1246.   GeometryHeight        = 0.8
  1247.   GeometryIsSmall       = No
  1248.   Shadow                = SHADOW_VOLUME
  1249.   BuildCompletion        = PLACED_BY_PLAYER
  1250. End
  1251.  
  1252.  
  1253. ;------------------------------------------------------------------------------
  1254. ;
  1255. ;    This is the foundation that gets created by the spawn foundation spell
  1256. ;
  1257. ;------------------------------------------------------------------------------
  1258.  
  1259. ChildObject GondorBuildingFoundation_Independant GondorBuildingFoundation
  1260.  
  1261.     CommandSet            = GondorFoundation_IndependantCommandSet
  1262.     
  1263.     ; Quite large to make a big footprint to prevent building structures close tegether.
  1264.     GeometryMajorRadius    = 50.0
  1265.     GeometryMinorRadius    = 50.0
  1266.  
  1267. End
  1268.  
  1269. ;------------------------------------------------------------------------------
  1270.  
  1271.  
  1272. Object GBCastleGate
  1273.  
  1274.   ; *** ART Parameters ***
  1275.   Draw = W3DScriptedModelDraw ModuleTag_01
  1276.     OkToChangeModelColor = Yes
  1277.     DefaultModelConditionState
  1278.       Model = GBCastGate
  1279.     End
  1280. ;    WallBoundsMesh = GBCastleWallT2
  1281.   End
  1282.  
  1283.   Draw = W3DLightDraw ModuleTag_02
  1284.     Ambient = R:0 G:0 B:0
  1285.     Diffuse = R:240 G:240 B:100
  1286.     Radius = 40
  1287.     Intensity = 1.2
  1288.     FlickerAmplitude = 0.5
  1289.     FlickerFrequency = 10
  1290.     AttachToBoneInAnotherModule = E_Fire_SM
  1291.   End  
  1292.  
  1293.  
  1294.   ; *** AUDIO Parameters ***
  1295.  
  1296.     SoundOnDamaged        = BuildingLightDamageStone
  1297.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1298.  
  1299.  
  1300.   ; ***DESIGN parameters ***
  1301.  
  1302.   DisplayName      = OBJECT:GBCastleGate
  1303.   Side = Men
  1304.   EditorSorting = STRUCTURE
  1305. ; Browser = CINEMATICS UNIT
  1306.  
  1307.   ArmorSet
  1308.     Conditions        = None
  1309.     Armor             = StructureArmor
  1310.     DamageFX          = None
  1311.   End
  1312.  
  1313.   ; *** ENGINEERING Parameters ***  
  1314.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_WOOD WALL_GATE
  1315.   RadarPriority = STRUCTURE
  1316.   Body                  = ActiveBody ModuleTag_03
  1317.     MaxHealth       = 4000.0
  1318.     
  1319.     GrabObject = EntThrownBuildingRock
  1320.     GrabFX = FX_WallGrab
  1321.     GrabDamage = 490
  1322.     GrabOffset = X:16 Y:0
  1323.   End
  1324.  
  1325.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  1326.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  1327.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  1328.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  1329.       DestructionDelay  = 5000
  1330.   End
  1331.   
  1332.   
  1333.   
  1334.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  1335.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  1336.         BonusName        = WallBonus
  1337.         RefreshDelay    = 2000
  1338.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  1339.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  1340.     End    
  1341.  
  1342.   
  1343.     Geometry              = BOX
  1344.     GeometryMajorRadius   = 44.0
  1345.     GeometryMinorRadius   = 88.0
  1346.     GeometryHeight        = 40.0
  1347.     GeometryIsSmall       = No
  1348.     ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  1349.     Shadow                = SHADOW_VOLUME
  1350.   
  1351.     GeometryContactPoint = X:-8  Y:0  Z:0 Grab
  1352.     GeometryContactPoint = X:8  Y:0  Z:0 Grab
  1353.     GeometryContactPoint = X:0  Y:0  Z:5
  1354.     GeometryContactPoint = X:0  Y:-50  Z:40
  1355.     GeometryContactPoint = X:0  Y:-30  Z:5
  1356.     GeometryContactPoint = X:0  Y:0  Z:40
  1357.     GeometryContactPoint = X:0  Y:30  Z:5
  1358.     GeometryContactPoint = X:0  Y:50  Z:40
  1359.     GeometryContactPoint = X:0  Y:50  Z:5
  1360.     
  1361.     
  1362. End
  1363.  
  1364. ;------------------------------------------------------------------------------
  1365.  
  1366.  
  1367. Object GBCastleTrebuchet
  1368.  
  1369.   ; *** ART Parameters ***
  1370.   Draw = W3DScriptedModelDraw ModuleTag_01
  1371.     OkToChangeModelColor = Yes
  1372.     DefaultModelConditionState
  1373.       Model = GBCastTreb
  1374.     End
  1375. ;    WallBoundsMesh = GBCastleWallT2
  1376.   End
  1377.  
  1378.   Draw = W3DLightDraw ModuleTag_02
  1379.     Ambient = R:0 G:0 B:0
  1380.     Diffuse = R:240 G:240 B:100
  1381.     Radius = 40
  1382.     Intensity = 1.2
  1383.     FlickerAmplitude = 0.5
  1384.     FlickerFrequency = 10
  1385.     AttachToBoneInAnotherModule = E_Fire_SM
  1386.   End  
  1387.  
  1388.  
  1389.   ; *** AUDIO Parameters ***
  1390.  
  1391.     ;SoundOnDamaged        = BuildingLightDamageStone
  1392.     ;SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1393.  
  1394.  
  1395.   ; ***DESIGN parameters ***
  1396.  
  1397.   DisplayName      = OBJECT:GBCastleTrebuchet
  1398.   Side = Men
  1399.   EditorSorting = STRUCTURE
  1400. ; Browser = CINEMATICS UNIT
  1401.  
  1402.   ArmorSet
  1403.     Conditions        = None
  1404.     Armor             = StructureArmor
  1405.     DamageFX          = None
  1406.   End
  1407.  
  1408.   ; *** ENGINEERING Parameters ***  
  1409.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  1410.   RadarPriority = STRUCTURE
  1411.   Body                  = ActiveBody ModuleTag_03
  1412.     MaxHealth       = 2000.0
  1413.     
  1414.     GrabObject = EntThrownBuildingRock
  1415.     GrabFX = FX_WallGrab
  1416.     GrabDamage = 490
  1417.     GrabOffset = X:16 Y:0
  1418.   End
  1419.  
  1420.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  1421.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  1422.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  1423.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  1424.       DestructionDelay  = 5000
  1425.   End
  1426.   
  1427.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  1428.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  1429.         BonusName        = WallBonus
  1430.         RefreshDelay    = 2000
  1431.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  1432.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  1433.     End    
  1434.  
  1435.     Geometry              = BOX
  1436.     GeometryMajorRadius   = 44.0
  1437.     GeometryMinorRadius   = 88.0
  1438.     GeometryHeight        = 40.0
  1439.     GeometryIsSmall       = No
  1440.     ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  1441.     Shadow                = SHADOW_VOLUME
  1442.     
  1443.     ; Regular geometry is all screwy, leave these commented out
  1444.     ;GeometryContactPoint = X:-10  Y:-40  Z:0 Grab
  1445.     ;GeometryContactPoint = X:30   Y:0    Z:0 Grab
  1446.     ;GeometryContactPoint = X:-10  Y:40   Z:0 Grab
  1447.     ;GeometryContactPoint = X:-10  Y:20   Z:40
  1448.     ;GeometryContactPoint = X:15   Y:10   Z:10
  1449.     ;GeometryContactPoint = X:20   Y:0    Z:40
  1450.     ;GeometryContactPoint = X:15   Y:-10  Z:10
  1451.     ;GeometryContactPoint = X:-10   Y:-30  Z:40
  1452.     ;GeometryContactPoint = X:-10  Y:-30  Z:10
  1453. End
  1454.  
  1455. ;------------------------------------------------------------------------------
  1456.  
  1457.  
  1458. Object GBCastleElevator
  1459.  
  1460.   ; *** ART Parameters ***
  1461.   Draw = W3DScriptedModelDraw ModuleTag_01
  1462.     OkToChangeModelColor = Yes
  1463.     DefaultModelConditionState
  1464.       Model = GBCastElev
  1465.     End
  1466. ;    WallBoundsMesh = GBCastleWallT2
  1467.   End
  1468.  
  1469.   Draw = W3DLightDraw ModuleTag_02
  1470.     Ambient = R:0 G:0 B:0
  1471.     Diffuse = R:240 G:240 B:100
  1472.     Radius = 40
  1473.     Intensity = 1.2
  1474.     FlickerAmplitude = 0.5
  1475.     FlickerFrequency = 10
  1476.     AttachToBoneInAnotherModule = E_Fire_SM
  1477.   End  
  1478.  
  1479.  
  1480.   ; *** AUDIO Parameters ***
  1481.  
  1482.     SoundOnDamaged        = BuildingLightDamageStone
  1483.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1484.  
  1485.  
  1486.   ; ***DESIGN parameters ***
  1487.  
  1488.   DisplayName      = OBJECT:GondorCastleElevator
  1489.   Side = Men
  1490.   EditorSorting = STRUCTURE
  1491. ; Browser = CINEMATICS UNIT
  1492.  
  1493.   ArmorSet
  1494.     Conditions        = None
  1495.     Armor             = StructureArmor
  1496.     DamageFX          = None
  1497.   End
  1498.  
  1499.   ; *** ENGINEERING Parameters ***  
  1500.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  1501.   RadarPriority = STRUCTURE
  1502.   Body                  = ActiveBody ModuleTag_03
  1503.     MaxHealth       = 4000.0
  1504.     
  1505.     GrabObject = EntThrownBuildingRock
  1506.     GrabFX = FX_WallGrab
  1507.     GrabDamage = 490
  1508.     GrabOffset = X:16 Y:0
  1509.   End
  1510.  
  1511.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  1512.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  1513.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  1514.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  1515.       DestructionDelay  = 5000
  1516.   End
  1517.   
  1518.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  1519.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  1520.         BonusName        = WallBonus
  1521.         RefreshDelay    = 2000
  1522.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  1523.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  1524.     End    
  1525.  
  1526.   Geometry              = BOX
  1527.   GeometryMajorRadius   = 44.0
  1528.   GeometryMinorRadius   = 88.0
  1529.   GeometryHeight        = 40.0
  1530.   
  1531.   GeometryIsSmall       = No
  1532.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  1533.   Shadow                = SHADOW_VOLUME
  1534.   
  1535.   ; wow this geometry is screwy
  1536.   GeometryContactPoint = X:-29.397        Y:0.326        Z:108.421        Swoop
  1537.   GeometryContactPoint = X:0            Y:0            Z:0
  1538.   GeometryContactPoint = X:40 Y:-20  Z:0 Grab
  1539. End
  1540. ;------------------------------------------------------------------------------
  1541.  
  1542.  
  1543. Object GBCastleWallF
  1544.  
  1545.   ; *** ART Parameters ***
  1546.   Draw = W3DScriptedModelDraw ModuleTag_01
  1547.     OkToChangeModelColor = Yes
  1548.     DefaultModelConditionState
  1549.       Model = GBCastleWallF
  1550.     End
  1551. ;    WallBoundsMesh = GBCastleWallT2
  1552.   End
  1553.  
  1554.   Draw = W3DLightDraw ModuleTag_02
  1555.     Ambient = R:0 G:0 B:0
  1556.     Diffuse = R:240 G:240 B:100
  1557.     Radius = 40
  1558.     Intensity = 1.2
  1559.     FlickerAmplitude = 0.5
  1560.     FlickerFrequency = 10
  1561.     AttachToBoneInAnotherModule = E_Fire_SM
  1562.   End  
  1563.  
  1564.  
  1565.   ; *** AUDIO Parameters ***
  1566.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  1567.     SoundOnDamaged        = BuildingLightDamageStone
  1568.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1569.     CampnessValue = CAMPNESS_WALL
  1570.  
  1571.  
  1572.   ; ***DESIGN parameters ***
  1573.  
  1574.   DisplayName      = OBJECT:GondorCastleWall
  1575.   Side = Men
  1576.   EditorSorting = STRUCTURE
  1577. ; Browser = CINEMATICS UNIT
  1578.  
  1579.   ArmorSet
  1580.     Conditions        = None
  1581.     Armor             = StructureArmor
  1582.     DamageFX          = None
  1583.   End
  1584.  
  1585.   ; *** ENGINEERING Parameters ***  
  1586.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  1587.   RadarPriority = STRUCTURE
  1588.   Body                  = ActiveBody ModuleTag_03
  1589.     MaxHealth       = 4000.0
  1590.     
  1591.     GrabObject = EntThrownBuildingRock
  1592.     GrabFX = FX_WallGrab
  1593.     GrabDamage = 490
  1594.     GrabOffset = X:16 Y:0
  1595.   End
  1596.   
  1597.   ThreatBreakdown GBCastleWallF_DetailedThreat
  1598.         AIKindOf = WALL
  1599.   End
  1600.  
  1601.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  1602.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  1603.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  1604.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  1605.       DestructionDelay  = 4000
  1606.   End
  1607.   
  1608.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  1609.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  1610.         BonusName        = WallBonus
  1611.         RefreshDelay    = 2000
  1612.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  1613.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  1614.     End    
  1615.  
  1616.   Geometry              = BOX
  1617.   GeometryMajorRadius   = 44.0
  1618.   GeometryMinorRadius   = 88.0
  1619.   GeometryHeight        = 40.0
  1620.   GeometryIsSmall       = No
  1621.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  1622.   Shadow                = SHADOW_VOLUME
  1623. End
  1624.  
  1625.  
  1626.  
  1627. ;------------------------------------------------------------------------------
  1628.  
  1629.  
  1630. Object GBCastleWallG
  1631.  
  1632.   ; *** ART Parameters ***
  1633.   Draw = W3DScriptedModelDraw ModuleTag_01
  1634.     OkToChangeModelColor = Yes
  1635.     DefaultModelConditionState
  1636.       Model = GBCastleWallG
  1637.     End
  1638. ;    WallBoundsMesh = GBCastleWallT2
  1639.   End
  1640.  
  1641.   Draw = W3DLightDraw ModuleTag_02
  1642.     Ambient = R:0 G:0 B:0
  1643.     Diffuse = R:240 G:240 B:100
  1644.     Radius = 40
  1645.     Intensity = 1.2
  1646.     FlickerAmplitude = 0.5
  1647.     FlickerFrequency = 10
  1648.     AttachToBoneInAnotherModule = E_Fire_SM
  1649.   End  
  1650.  
  1651.  
  1652.   ; *** AUDIO Parameters ***
  1653.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  1654.  
  1655.     SoundOnDamaged        = BuildingLightDamageStone
  1656.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1657.     CampnessValue = CAMPNESS_WALL
  1658.  
  1659.  
  1660.   ; ***DESIGN parameters ***
  1661.  
  1662.   DisplayName      = OBJECT:GondorCastleWall
  1663.   Side = Men
  1664.   EditorSorting = STRUCTURE
  1665. ; Browser = CINEMATICS UNIT
  1666.  
  1667.   ArmorSet
  1668.     Conditions        = None
  1669.     Armor             = StructureArmor
  1670.     DamageFX          = None
  1671.   End
  1672.  
  1673.   ; *** ENGINEERING Parameters ***  
  1674.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  1675.   RadarPriority = STRUCTURE
  1676.   Body                  = ActiveBody ModuleTag_03
  1677.     MaxHealth       = 4000.0
  1678.     
  1679.     GrabObject = EntThrownBuildingRock
  1680.     GrabFX = FX_WallGrab
  1681.     GrabDamage = 490
  1682.     GrabOffset = X:16 Y:0
  1683.   End
  1684.   
  1685.   ThreatBreakdown GBCastleWallG_DetailedThreat
  1686.         AIKindOf = WALL
  1687.   End
  1688.  
  1689.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  1690.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  1691.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  1692.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  1693.       DestructionDelay  = 2500
  1694.   End
  1695.   
  1696.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  1697.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  1698.         BonusName        = WallBonus
  1699.         RefreshDelay    = 2000
  1700.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  1701.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  1702.     End    
  1703.  
  1704.   Geometry              = BOX
  1705.   GeometryMajorRadius   = 44.0
  1706.   GeometryMinorRadius   = 88.0
  1707.   GeometryHeight        = 40.0
  1708.   GeometryIsSmall       = No
  1709.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  1710.   Shadow                = SHADOW_VOLUME
  1711. End
  1712.  
  1713.  
  1714.  
  1715. ;------------------------------------------------------------------------------
  1716.  
  1717.  
  1718. Object GBCastleWallR
  1719.  
  1720.   ; *** ART Parameters ***
  1721.   Draw = W3DScriptedModelDraw ModuleTag_01
  1722.     OkToChangeModelColor = Yes
  1723.     DefaultModelConditionState
  1724.       Model = GBCastleWallR
  1725.     End
  1726. ;    WallBoundsMesh = GBCastleWallT2
  1727.   End
  1728.  
  1729.   Draw = W3DLightDraw ModuleTag_02
  1730.     Ambient = R:0 G:0 B:0
  1731.     Diffuse = R:240 G:240 B:100
  1732.     Radius = 40
  1733.     Intensity = 1.2
  1734.     FlickerAmplitude = 0.5
  1735.     FlickerFrequency = 10
  1736.     AttachToBoneInAnotherModule = E_Fire_SM
  1737.   End  
  1738.  
  1739.  
  1740.   ; *** AUDIO Parameters ***
  1741.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  1742.  
  1743.     SoundOnDamaged        = BuildingLightDamageStone
  1744.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1745.     CampnessValue = CAMPNESS_WALL
  1746.  
  1747.  
  1748.   ; ***DESIGN parameters ***
  1749.  
  1750.   DisplayName      = OBJECT:GondorCastleWall
  1751.   Side = Men
  1752.   EditorSorting = STRUCTURE
  1753. ; Browser = CINEMATICS UNIT
  1754.  
  1755.   ArmorSet
  1756.     Conditions        = None
  1757.     Armor             = StructureArmor
  1758.     DamageFX          = None
  1759.   End
  1760.  
  1761.   ; *** ENGINEERING Parameters ***  
  1762.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  1763.   RadarPriority = STRUCTURE
  1764.   Body                  = ActiveBody ModuleTag_03
  1765.     MaxHealth       = 4000.0
  1766.     
  1767.     GrabObject = EntThrownBuildingRock
  1768.     GrabFX = FX_WallGrab
  1769.     GrabDamage = 490
  1770.     GrabOffset = X:16 Y:0
  1771.   End
  1772.   
  1773.   ThreatBreakdown GBCastleWallR_DetailedThreat
  1774.         AIKindOf = WALL
  1775.   End
  1776.  
  1777.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  1778.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  1779.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  1780.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  1781.       DestructionDelay  = 2500
  1782.   End
  1783.   
  1784.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  1785.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  1786.         BonusName        = WallBonus
  1787.         RefreshDelay    = 2000
  1788.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  1789.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  1790.     End    
  1791.  
  1792.   Geometry              = BOX
  1793.   GeometryMajorRadius   = 44.0
  1794.   GeometryMinorRadius   = 88.0
  1795.   GeometryHeight        = 40.0
  1796.   GeometryIsSmall       = No
  1797.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  1798.   Shadow                = SHADOW_VOLUME
  1799. End
  1800.  
  1801.  
  1802. ;------------------------------------------------------------------------------
  1803. ;
  1804.  
  1805. Object GondorCastleGateTower
  1806.  
  1807.   ; *** ART Parameters ***
  1808.   Draw = W3DScriptedModelDraw ModuleTag_01
  1809.     OkToChangeModelColor = Yes
  1810.     WallBoundsMesh = P1
  1811.     RampMesh1 = Ramp1
  1812.     
  1813.     DefaultModelConditionState
  1814.       Model = GBCastPed
  1815.     End
  1816.  
  1817.     ModelConditionState = WORLD_BUILDER
  1818.           Model = GBCASTPEDW
  1819.       End
  1820.  
  1821.     IdleAnimationState
  1822.          StateName             = STATE_None
  1823.         Flags                 = START_FRAME_LAST
  1824.         Animation
  1825.             AnimationName     = GBCastPed.GBCastPed
  1826.             AnimationMode     = MANUAL
  1827.             AnimationBlendTime = 0
  1828.         End
  1829.     End    
  1830.  
  1831.     ModelConditionState  = ACTIVELY_BEING_CONSTRUCTED UPGRADE_NUMENOR_STONEWORK
  1832.         Model = GBCastPed_UA
  1833.     End
  1834.     AnimationState = ACTIVELY_BEING_CONSTRUCTED UPGRADE_NUMENOR_STONEWORK
  1835.         StateName            = STATE_None
  1836.         Flags                = START_FRAME_FIRST
  1837.         Animation
  1838.             AnimationName = GBCastPed_UA.GBCastPed_UA
  1839.             AnimationMode = MANUAL
  1840.         End
  1841.     End    
  1842.  
  1843.     ModelConditionState  = ACTIVELY_BEING_CONSTRUCTED
  1844.         Model = GBCastPed  
  1845.     End
  1846.     AnimationState = ACTIVELY_BEING_CONSTRUCTED
  1847.         StateName            = STATE_None
  1848.         Flags                = START_FRAME_FIRST
  1849.         Animation
  1850.             AnimationName = GBCastPed.GBCastPed
  1851.             AnimationMode = MANUAL
  1852.         End
  1853.     End    
  1854.  
  1855.     ;------------Build Up States
  1856.     ModelConditionState   = BASE_BUILD
  1857.       Model               = GBCastPed
  1858.       ParticleSysBone     = NONE BuildingContructDust
  1859.     End  
  1860.     AnimationState          = BASE_BUILD
  1861.         StateName                = STATE_None
  1862.         Animation
  1863.             AnimationName = GBCastPed.GBCastPed
  1864.             AnimationMode = ONCE
  1865.             AnimationSpeedFactorRange = 2.0 2.5 ; keep range wide to avoid lockstep anims
  1866.         End
  1867.     End
  1868.  
  1869.     AnimationState = JUST_BUILT
  1870.         StateName                = STATE_None
  1871.         Flags                    = START_FRAME_FIRST
  1872.         Animation
  1873.             AnimationName        = GBCastPed.GBCastPed
  1874.             AnimationMode        = MANUAL
  1875.             AnimationBlendTime    = 0
  1876.         End
  1877.     End    
  1878.     
  1879.     ; DAMAGED ----------------------------------------------------------------------------------------------------------------
  1880.     ModelConditionState = DAMAGED UPGRADE_NUMENOR_STONEWORK
  1881.         Model            = GBCastPed_UD1  
  1882.     End
  1883.     AnimationState = DAMAGED UPGRADE_NUMENOR_STONEWORK
  1884.         StateName        = STATE_None
  1885.         EnteringStateFX    = FX_BuildingDamaged
  1886.     End
  1887.     ModelConditionState = DAMAGED
  1888.         Model            = GBCastPed_D1  
  1889.     End
  1890.     AnimationState = DAMAGED
  1891.         StateName        = STATE_None
  1892.         EnteringStateFX    = FX_BuildingDamaged
  1893.     End
  1894.  
  1895.     ; REALLYDAMAGED ----------------------------------------------------------------------------------------------------------------
  1896.     TransitionState = TRANS_U_IntoReallyDamaged
  1897.         EnteringStateFX        = FX_BuildingReallyDamaged
  1898.         Animation = D2
  1899.             AnimationName        = GBCastPed_UD2.GBCastPed_UD2
  1900.             AnimationMode        = ONCE
  1901.             AnimationBlendTime    = 0
  1902.         End
  1903.     End
  1904.  
  1905.     ModelConditionState  = REALLYDAMAGED UPGRADE_NUMENOR_STONEWORK
  1906.       Model         = GBCastPed_UD2
  1907.     End
  1908.     AnimationState = REALLYDAMAGED UPGRADE_NUMENOR_STONEWORK
  1909.         StateName            = STATE_ReallyDamaged
  1910.          Flags                = START_FRAME_LAST
  1911.           Animation            = ReallyDamagedanimation
  1912.             AnimationName    = GBCastPed_UD2.GBCastPed_UD2
  1913.             AnimationMode    = MANUAL
  1914.             AnimationBlendTime = 0
  1915.            End
  1916.         BeginScript
  1917.             Prev = CurDrawablePrevAnimationState()
  1918.             if Prev == "STATE_None" or Prev == "STATE_Rubble"
  1919.             then
  1920.                 ; Only play the really damaged anim if we havn't come from another really damaged.
  1921.                 CurDrawableSetTransitionAnimState("TRANS_U_IntoReallyDamaged")
  1922.             end
  1923.         EndScript
  1924.        End
  1925.  
  1926.     ModelConditionState  = REALLYDAMAGED
  1927.       Model         = GBCastPed_D2
  1928.     End
  1929.     AnimationState = REALLYDAMAGED
  1930.         StateName            = STATE_ReallyDamaged
  1931.            Animation            = ReallyDamagedanimation
  1932.             AnimationName    = GBCastPed_D2.GBCastPed_D2
  1933.             AnimationMode    = ONCE
  1934.             AnimationBlendTime = 0
  1935.            End
  1936.         EnteringStateFX    = FX_BuildingReallyDamaged
  1937.     End
  1938.  
  1939.     ; RUBBLE ----------------------------------------------------------------------------------------------------------------
  1940.     TransitionState = TRANS_U_IntoRubble
  1941.         Animation = D3
  1942.             AnimationName        = GBCastPed_U_D3.GBCastPed_U_D3
  1943.             AnimationMode        = ONCE
  1944.             AnimationBlendTime = 0
  1945.         End
  1946.     End
  1947.  
  1948.     ModelConditionState  = RUBBLE UPGRADE_NUMENOR_STONEWORK
  1949.       Model                        = GBCastPed_U_D3
  1950.     End
  1951.     AnimationState = RUBBLE UPGRADE_NUMENOR_STONEWORK
  1952.         StateName                = STATE_Rubble
  1953.         Flags                    = START_FRAME_LAST
  1954.         ;EnteringStateFX    = FX_WallDie    ;this plays after the stone sink into the ground
  1955.         Animation                = Death
  1956.             AnimationName        = GBCastPed_U_D3.GBCastPed_U_D3
  1957.             AnimationMode        = MANUAL
  1958.             AnimationBlendTime    = 0
  1959.         End
  1960.         BeginScript
  1961.             Prev = CurDrawablePrevAnimationState()
  1962.             if Prev == "STATE_ReallyDamaged" or Prev == "STATE_None" or Prev == "TRANS_U_IntoReallyDamaged"
  1963.             then
  1964.                 ; Only play the rubble anim if we havn't come from another rubble.
  1965.                 CurDrawableSetTransitionAnimState("TRANS_U_IntoRubble")
  1966.             end
  1967.         EndScript
  1968.     End
  1969.  
  1970.     ModelConditionState  = RUBBLE
  1971.       Model         = GBCastPed_D3
  1972.     End
  1973.     AnimationState = RUBBLE
  1974.         StateName                = STATE_Rubble
  1975.         Animation                = Death
  1976.             AnimationName        = GBCastPed_D3.GBCastPed_D3
  1977.             AnimationMode        = ONCE
  1978.             AnimationBlendTime    = 0
  1979.         End
  1980.         EnteringStateFX    = FX_WallDie
  1981.     End      
  1982.  
  1983.      ; ----------------------------------------------------------------------------------------------------------------
  1984.    ModelConditionState  = UPGRADE_NUMENOR_STONEWORK
  1985.       Model         = GBCastPed_U
  1986.     End
  1987.     AnimationState = UPGRADE_NUMENOR_STONEWORK
  1988.         StateName        = STATE_None
  1989.         EnteringStateFX = GenericBuildingUpgrade
  1990.     End    
  1991.  
  1992.   End
  1993.  
  1994.   ; *** AUDIO Parameters ***
  1995.  
  1996.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  1997.     SoundOnDamaged        = BuildingLightDamageStone
  1998.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  1999.  
  2000.     ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
  2001.         MaxUpdateRangeCap = 800
  2002.         AnimationSound = Sound:WallDie    Animation:GBCastPed_U_D3.GBCastPed_U_D3    Frames:0
  2003.     End
  2004.     CampnessValue = CAMPNESS_WALL
  2005.  
  2006.  
  2007.   ; ***DESIGN parameters ***
  2008.  
  2009.     DisplayName     = OBJECT:GondorCastleGateTower
  2010.     Side            = Men
  2011.     EditorSorting    = STRUCTURE
  2012.     BuildTime        = CASTLE_WALL_REBUILD_TIME
  2013.     BuildCost        = CASTLE_WALL_REBUILD_COST
  2014.  
  2015.   VisionRange         = 160.0          ; Shroud clearing distance
  2016.   ShroudClearingRange = 160
  2017.  
  2018.   ArmorSet
  2019.     Conditions        = None
  2020.     Armor             = StructureArmor
  2021.     DamageFX          = MinasWallADamageFX
  2022.   End
  2023.  
  2024.   ; *** ENGINEERING Parameters ***  
  2025.     KindOf                    = STRUCTURE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR SELECTABLE MADE_OF_STONE NOT_AUTOACQUIRABLE
  2026.     RadarPriority            = STRUCTURE
  2027.     KeepSelectableWhenDead    = Yes
  2028.     CommandSet                = GenericSelfRepairCommandSet
  2029.  
  2030.   Body                  = ActiveBody ModuleTag_03
  2031.     MaxHealth       = 5000.0
  2032.   End
  2033.  
  2034.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2035.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2036.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2037.   
  2038.     Behavior = KeepObjectDie ModuleTag_IWantRubble
  2039.     End
  2040.   
  2041.     Behavior = CastleMemberBehavior ModuleTag_CMB
  2042.     End 
  2043.   
  2044.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  2045.         TriggeredBy                = Upgrade_NumenorStonework
  2046.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  2047.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  2048.     End
  2049.  
  2050.      Behavior = GettingBuiltBehavior ModuleTag_GettingBuilt
  2051.         SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  2052.         SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  2053.         SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  2054.         SpawnTimer = -1.0 ; Negative means no 'autoheal'
  2055.         RebuildTimeSeconds = CASTLE_WALL_REBUILD_TIME
  2056.     End 
  2057.   
  2058.     Geometry              = BOX
  2059.     GeometryMajorRadius   = 20.0
  2060.     GeometryMinorRadius   = 50.0
  2061.     GeometryHeight        = 45.0
  2062.     GeometryIsSmall       = No
  2063.     ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  2064.     Shadow                = SHADOW_VOLUME
  2065.     
  2066.     GeometryContactPoint = X:-10  Y:-40  Z:0 Grab
  2067.     GeometryContactPoint = X:40   Y:0    Z:0 Grab
  2068.     GeometryContactPoint = X:-10  Y:40   Z:0 Grab
  2069.     GeometryContactPoint = X:-10  Y:25   Z:45
  2070.     GeometryContactPoint = X:15   Y:15   Z:5
  2071.     GeometryContactPoint = X:20   Y:0    Z:45
  2072.     GeometryContactPoint = X:15   Y:-15  Z:5
  2073.     GeometryContactPoint = X:-10  Y:-25  Z:45
  2074.     GeometryContactPoint = X:-10  Y:-25  Z:5
  2075. End
  2076.  
  2077.  
  2078.  
  2079. ;------------------------------------------------------------------------------
  2080.  
  2081.  
  2082. Object GBCastleWallsA
  2083.  
  2084.   ; *** ART Parameters ***
  2085.   Draw = W3DScriptedModelDraw ModuleTag_01
  2086.     OkToChangeModelColor = Yes
  2087.     DefaultModelConditionState
  2088.       Model = GBCastleWallsA
  2089.     End
  2090. ;    WallBoundsMesh = GBCastleWallT2
  2091.   End
  2092.  
  2093.   Draw = W3DLightDraw ModuleTag_02
  2094.     Ambient = R:0 G:0 B:0
  2095.     Diffuse = R:240 G:240 B:100
  2096.     Radius = 40
  2097.     Intensity = 1.2
  2098.     FlickerAmplitude = 0.5
  2099.     FlickerFrequency = 10
  2100.     AttachToBoneInAnotherModule = E_Fire_SM
  2101.   End  
  2102.  
  2103.  
  2104.   ; *** AUDIO Parameters ***
  2105.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  2106.  
  2107.     SoundOnDamaged        = BuildingLightDamageStone
  2108.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  2109.     CampnessValue = CAMPNESS_WALL
  2110.  
  2111.  
  2112.   ; ***DESIGN parameters ***
  2113.  
  2114.   DisplayName      = OBJECT:GondorCastleWall
  2115.   Side = Men
  2116.   EditorSorting = STRUCTURE
  2117. ; Browser = CINEMATICS UNIT
  2118.  
  2119.   ArmorSet
  2120.     Conditions        = None
  2121.     Armor             = StructureArmor
  2122.     DamageFX          = None
  2123.   End
  2124.  
  2125.   ; *** ENGINEERING Parameters ***  
  2126.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  2127.   RadarPriority = STRUCTURE
  2128.   Body                  = ActiveBody ModuleTag_03
  2129.     MaxHealth       = 4000.0
  2130.     
  2131.     GrabObject = EntThrownBuildingRock
  2132.     GrabFX = FX_WallGrab
  2133.     GrabDamage = 490
  2134.     GrabOffset = X:16 Y:0
  2135.   End
  2136.   
  2137.   ThreatBreakdown GBCastleWallsA_DetailedThreat
  2138.         AIKindOf = WALL
  2139.   End
  2140.  
  2141.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2142.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2143.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2144.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2145.       DestructionDelay  = 2500
  2146.   End
  2147.   
  2148.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  2149.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  2150.         BonusName        = WallBonus
  2151.         RefreshDelay    = 2000
  2152.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  2153.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  2154.     End    
  2155.  
  2156.   Geometry              = BOX
  2157.   GeometryMajorRadius   = 44.0
  2158.   GeometryMinorRadius   = 88.0
  2159.   GeometryHeight        = 40.0
  2160.   GeometryIsSmall       = No
  2161.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  2162.   Shadow                = SHADOW_VOLUME
  2163. End
  2164.  
  2165.  
  2166. ;------------------------------------------------------------------------------
  2167.  
  2168.  
  2169. Object GBCastleWallsBT
  2170.  
  2171.   ; *** ART Parameters ***
  2172.   Draw = W3DScriptedModelDraw ModuleTag_01
  2173.     OkToChangeModelColor = Yes
  2174.     DefaultModelConditionState
  2175.       Model = GBCastleWallsBT
  2176.     End
  2177. ;    WallBoundsMesh = GBCastleWallT2
  2178.   End
  2179.  
  2180.   Draw = W3DLightDraw ModuleTag_02
  2181.     Ambient = R:0 G:0 B:0
  2182.     Diffuse = R:240 G:240 B:100
  2183.     Radius = 40
  2184.     Intensity = 1.2
  2185.     FlickerAmplitude = 0.5
  2186.     FlickerFrequency = 10
  2187.     AttachToBoneInAnotherModule = E_Fire_SM
  2188.   End  
  2189.  
  2190.  
  2191.   ; *** AUDIO Parameters ***
  2192.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  2193.  
  2194.     SoundOnDamaged        = BuildingLightDamageStone
  2195.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  2196.     CampnessValue = CAMPNESS_WALL
  2197.  
  2198.  
  2199.   ; ***DESIGN parameters ***
  2200.  
  2201.   DisplayName      = OBJECT:GBCampWall
  2202.   Side = Men
  2203.   EditorSorting = STRUCTURE
  2204. ; Browser = CINEMATICS UNIT
  2205.  
  2206.   ArmorSet
  2207.     Conditions        = None
  2208.     Armor             = StructureArmor
  2209.     DamageFX          = None
  2210.   End
  2211.  
  2212.   ; *** ENGINEERING Parameters ***  
  2213.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE 
  2214.   RadarPriority = STRUCTURE
  2215.   Body                  = ActiveBody ModuleTag_03
  2216.     MaxHealth       = 4000.0
  2217.     
  2218.     GrabObject = EntThrownBuildingRock
  2219.     GrabFX = FX_WallGrab
  2220.     GrabDamage = 490
  2221.     GrabOffset = X:16 Y:0
  2222.   End
  2223.   
  2224.   ThreatBreakdown GBCastleWallsBT_DetailedThreat
  2225.         AIKindOf = WALL
  2226.   End
  2227.  
  2228.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2229.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2230.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2231.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2232.       DestructionDelay  = 2500
  2233.   End
  2234.   
  2235.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  2236.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  2237.         BonusName        = WallBonus
  2238.         RefreshDelay    = 2000
  2239.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  2240.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  2241.     End    
  2242.  
  2243.   Geometry              = BOX
  2244.   GeometryMajorRadius   = 44.0
  2245.   GeometryMinorRadius   = 88.0
  2246.   GeometryHeight        = 40.0
  2247.   GeometryIsSmall       = No
  2248.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  2249.   Shadow                = SHADOW_VOLUME
  2250. End
  2251.  
  2252.  
  2253. ;------------------------------------------------------------------------------
  2254.  
  2255.  
  2256. Object GBCastleWallT1
  2257.  
  2258.   ; *** ART Parameters ***
  2259.   Draw = W3DScriptedModelDraw ModuleTag_01
  2260.     OkToChangeModelColor = Yes
  2261.     DefaultModelConditionState
  2262.       Model = GBCastleWallT1
  2263.     End
  2264. ;    WallBoundsMesh = GBCastleWallT2
  2265.   End
  2266.  
  2267.   Draw = W3DLightDraw ModuleTag_02
  2268.     Ambient = R:0 G:0 B:0
  2269.     Diffuse = R:240 G:240 B:100
  2270.     Radius = 40
  2271.     Intensity = 1.2
  2272.     FlickerAmplitude = 0.5
  2273.     FlickerFrequency = 10
  2274.     AttachToBoneInAnotherModule = E_Fire_SM
  2275.   End  
  2276.  
  2277.  
  2278.   ; *** AUDIO Parameters ***
  2279.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  2280.  
  2281.     SoundOnDamaged        = BuildingLightDamageStone
  2282.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  2283.  
  2284.     CampnessValue = CAMPNESS_WALL
  2285.  
  2286.   ; ***DESIGN parameters ***
  2287.  
  2288.   DisplayName      = OBJECT:GBCampWall
  2289.   Side = Men
  2290.   EditorSorting = STRUCTURE
  2291. ; Browser = CINEMATICS UNIT
  2292.  
  2293.   ArmorSet
  2294.     Conditions        = None
  2295.     Armor             = StructureArmor
  2296.     DamageFX          = None
  2297.   End
  2298.  
  2299.   ; *** ENGINEERING Parameters ***  
  2300.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  2301.   RadarPriority = STRUCTURE
  2302.   Body                  = ActiveBody ModuleTag_03
  2303.     MaxHealth       = 4000.0
  2304.     
  2305.     GrabObject = EntThrownBuildingRock
  2306.     GrabFX = FX_WallGrab
  2307.     GrabDamage = 490
  2308.     GrabOffset = X:16 Y:0
  2309.   End
  2310.   
  2311.   ThreatBreakdown GBCastleWallT1_DetailedThreat
  2312.         AIKindOf = WALL
  2313.   End
  2314.  
  2315.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2316.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2317.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2318.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2319.       DestructionDelay  = 2500
  2320.   End
  2321.   
  2322.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  2323.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  2324.         BonusName        = WallBonus
  2325.         RefreshDelay    = 2000
  2326.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  2327.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  2328.     End    
  2329.  
  2330.   Geometry              = BOX
  2331.   GeometryMajorRadius   = 44.0
  2332.   GeometryMinorRadius   = 88.0
  2333.   GeometryHeight        = 40.0
  2334.   GeometryIsSmall       = No
  2335.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  2336.   Shadow                = SHADOW_VOLUME
  2337. End
  2338.  
  2339.  
  2340. ;------------------------------------------------------------------------------
  2341.  
  2342.  
  2343. Object GBCastleWallT2
  2344.  
  2345.   ; *** ART Parameters ***
  2346.   Draw = W3DScriptedModelDraw ModuleTag_01
  2347.     OkToChangeModelColor = Yes
  2348.     DefaultModelConditionState
  2349.       Model = GBCastleWallT2
  2350.     End
  2351. ;    WallBoundsMesh = GBCastleWallT2
  2352.   End
  2353.  
  2354.   Draw = W3DLightDraw ModuleTag_02
  2355.     Ambient = R:0 G:0 B:0
  2356.     Diffuse = R:240 G:240 B:100
  2357.     Radius = 40
  2358.     Intensity = 1.2
  2359.     FlickerAmplitude = 0.5
  2360.     FlickerFrequency = 10
  2361.     AttachToBoneInAnotherModule = E_Fire_SM
  2362.   End  
  2363.  
  2364.  
  2365.   ; *** AUDIO Parameters ***
  2366.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  2367.  
  2368.     SoundOnDamaged        = BuildingLightDamageStone
  2369.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  2370.  
  2371.     CampnessValue = CAMPNESS_WALL
  2372.  
  2373.   ; ***DESIGN parameters ***
  2374.  
  2375.   DisplayName      = OBJECT:GBCampWall
  2376.   Side = Men
  2377.   EditorSorting = STRUCTURE
  2378. ; Browser = CINEMATICS UNIT
  2379.  
  2380.   ArmorSet
  2381.     Conditions        = None
  2382.     Armor             = StructureArmor
  2383.     DamageFX          = None
  2384.   End
  2385.  
  2386.   ; *** ENGINEERING Parameters ***  
  2387.   KindOf                = STRUCTURE SELECTABLE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE MADE_OF_STONE
  2388.   RadarPriority = STRUCTURE
  2389.   Body                  = ActiveBody ModuleTag_03
  2390.     MaxHealth       = 4000.0
  2391.     
  2392.     GrabObject = EntThrownBuildingRock
  2393.     GrabFX = FX_WallGrab
  2394.     GrabDamage = 490
  2395.     GrabOffset = X:16 Y:0
  2396.   End
  2397.   
  2398.   ThreatBreakdown GBCastleWallT2_DetailedThreat
  2399.         AIKindOf = WALL
  2400.   End
  2401.  
  2402.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2403.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2404.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2405.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2406.       DestructionDelay  = 2500
  2407.   End
  2408.   
  2409.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  2410.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  2411.         BonusName        = WallBonus
  2412.         RefreshDelay    = 2000
  2413.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  2414.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  2415.     End    
  2416.  
  2417.   Geometry              = BOX
  2418.   GeometryMajorRadius   = 44.0
  2419.   GeometryMinorRadius   = 88.0
  2420.   GeometryHeight        = 40.0
  2421.   GeometryIsSmall       = No
  2422.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  2423.   Shadow                = SHADOW_VOLUME
  2424. End
  2425.  
  2426.  
  2427. ;------------------------------------------------------------------------------
  2428.  
  2429.  
  2430. Object GBCampFloor
  2431.  
  2432.     ; *** ART Parameters ***
  2433.     Draw = W3DFloorDraw ModuleTag_01
  2434.         ModelName = GBCampFloor
  2435.         ForceToBack = Yes
  2436.     End
  2437.  
  2438.   ; *** AUDIO Parameters ***
  2439.  
  2440.     VoiceSelect        = Gui_PlotSelect2        ;Gui_PlotSelect
  2441.  
  2442.  
  2443.   ; ***DESIGN parameters ***
  2444.  
  2445.   DisplayName      = OBJECT:CampFloor
  2446.   Side = Men
  2447.   EditorSorting = STRUCTURE
  2448. ; Browser = CINEMATICS UNIT
  2449.  
  2450.   ArmorSet
  2451.     Conditions        = None
  2452.     Armor             = NoArmor
  2453.     DamageFX          = None
  2454.   End
  2455.  
  2456.   ; *** ENGINEERING Parameters ***  
  2457.   ; The STRUCTURE KindOf is needed so this object will be given to the base
  2458.   ; owner when it's unpacked and show up in the right color on the radar map.
  2459.   
  2460.   KindOf                = STRUCTURE IMMOBILE NO_COLLIDE UNATTACKABLE INERT 
  2461.  
  2462.   RadarPriority = NOT_ON_RADAR
  2463.   Body                  = ImmortalBody ModuleTag_03
  2464.     MaxHealth       = 2000.0
  2465.   End
  2466.  
  2467.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2468.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2469.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2470.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2471.       DestructionDelay  = 1000
  2472.   End
  2473.   
  2474.   Geometry              = BOX
  2475.   GeometryMajorRadius   = 0.8
  2476.   GeometryMinorRadius   = 0.8
  2477.   GeometryHeight        = 0.8
  2478.   GeometryIsSmall       = Yes
  2479. End
  2480.  
  2481. ;------------------------------------------------------------------------------
  2482.  
  2483.  
  2484. Object GBCastleFloor
  2485.  
  2486.     ; *** ART Parameters ***
  2487.     Draw = W3DFloorDraw ModuleTag_01
  2488.         ModelName = GBCastFloor
  2489.         ForceToBack = Yes
  2490.     End
  2491.  
  2492.   ; *** AUDIO Parameters ***
  2493.  
  2494.   ; ***DESIGN parameters ***
  2495.   DisplayName      = OBJECT:CastFloor
  2496.   Side = Men
  2497.   EditorSorting = STRUCTURE
  2498. ; Browser = CINEMATICS UNIT
  2499.  
  2500.   ArmorSet
  2501.     Conditions        = None
  2502.     Armor             = NoArmor
  2503.     DamageFX          = None
  2504.   End
  2505.  
  2506.   ; *** ENGINEERING Parameters ***  
  2507.   ; The STRUCTURE KindOf is needed so this object will be given to the base
  2508.   ; owner when it's unpacked and show up in the right color on the radar map.
  2509.   
  2510.   KindOf                = STRUCTURE IMMOBILE NO_COLLIDE UNATTACKABLE INERT 
  2511.   RadarPriority = NOT_ON_RADAR
  2512.   Body                  = ImmortalBody ModuleTag_03
  2513.     MaxHealth       = 2000.0
  2514.   End
  2515.  
  2516.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2517.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2518.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2519.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2520.       DestructionDelay  = 1000
  2521.   End
  2522.   
  2523.   Geometry              = BOX
  2524.   GeometryMajorRadius   = 0.8
  2525.   GeometryMinorRadius   = 0.8
  2526.   GeometryHeight        = 0.8
  2527.   GeometryIsSmall       = Yes
  2528. End
  2529.  
  2530. ;------------------------------------------------------------------------------
  2531.  
  2532.  
  2533. Object GBCampWall
  2534.  
  2535. SelectPortrait = BPGCampWall
  2536.  
  2537.   ; *** ART Parameters ***
  2538.   Draw = W3DScriptedModelDraw ModuleTag_01
  2539.     OkToChangeModelColor = Yes
  2540.     DefaultModelConditionState
  2541.       Model = GBCampWall_A
  2542.     End
  2543.  
  2544.     IdleAnimationState
  2545.         Animation
  2546.             AnimationName     = GBCampWall_A.GBCampWall_A
  2547.             AnimationMode     = MANUAL
  2548.             AnimationBlendTime = 0
  2549.         End
  2550.         Flags = START_FRAME_LAST
  2551.     End    
  2552.  
  2553.     ;------------Build Up States
  2554.     ModelConditionState   = BASE_BUILD
  2555.       Model               = GBCampWall_A
  2556. ;      ParticleSysBone      = NONE BuildingDoughnutCloud
  2557.       ParticleSysBone     = NONE BuildingContructDust
  2558.     End  
  2559.     AnimationState          = BASE_BUILD
  2560.         Animation
  2561.             AnimationName = GBCampWall_A.GBCampWall_A
  2562.             AnimationMode = ONCE
  2563.             AnimationSpeedFactorRange = 2.0 2.5 ; keep range wide to avoid lockstep anims
  2564.         End
  2565.     End
  2566.  
  2567.     AnimationState          = JUST_BUILT
  2568.         Animation
  2569.             AnimationName = GBCampWall_A.GBCampWall_A
  2570.             AnimationMode = MANUAL
  2571.             AnimationBlendTime = 0
  2572.         End
  2573.         Flags = START_FRAME_FIRST
  2574.     End    
  2575.  
  2576.     
  2577.     ModelConditionState  = DAMAGED UPGRADE_NUMENOR_STONEWORK
  2578.         Model         = GBCampWall_UD1
  2579.         ParticleSysBone emberBone01 SmokeBuildingLarge
  2580.     End
  2581.     ModelConditionState  = DAMAGED
  2582.         Model         = GBCampWall_D1
  2583.         ParticleSysBone emberBone01 SmokeBuildingLarge
  2584.     End
  2585.     AnimationState = DAMAGED
  2586.         EnteringStateFX    = FX_BuildingDamaged
  2587.     End
  2588.  
  2589.     ModelConditionState  = REALLYDAMAGED UPGRADE_NUMENOR_STONEWORK
  2590.       Model         = GBCampWall_UD2
  2591.       ParticleSysBone emberBone01 SmokeBuildingLarge
  2592.     End
  2593.     ModelConditionState  = REALLYDAMAGED
  2594.       Model         = GBCampWall_D2
  2595.       ParticleSysBone emberBone01 SmokeBuildingLarge
  2596.     End
  2597.     AnimationState = REALLYDAMAGED
  2598.         EnteringStateFX    = FX_BuildingReallyDamaged
  2599.     End    
  2600.     
  2601.     ModelConditionState  = RUBBLE UPGRADE_NUMENOR_STONEWORK
  2602.       Model         = GBCampWall_UD3
  2603.       ParticleSysBone emberBone01 GondorWallDebris
  2604.       ParticleSysBone emberBone01 SmokeBuildingLarge
  2605.       ParticleSysBone emberBone01 PCTMediumDust
  2606.     End
  2607.     AnimationState = RUBBLE UPGRADE_NUMENOR_STONEWORK
  2608.     EnteringStateFX = FX_WallStoneDie
  2609.     End
  2610.  
  2611.     ModelConditionState  = RUBBLE
  2612.       Model         = GBCampWall_D3
  2613.       ParticleSysBone emberBone01 GondorWallDebris
  2614.       ParticleSysBone emberBone01 SmokeBuildingLarge
  2615.       ParticleSysBone emberBone01 PCTMediumDust
  2616.     End
  2617.     AnimationState = RUBBLE
  2618.     EnteringStateFX = FX_WallStoneDie
  2619.     End
  2620.  
  2621.       ModelConditionState  = POST_RUBBLE
  2622.         Model         = None
  2623.         ParticleSysBone NONE SmokeBuildingMediumRubble
  2624.     End
  2625.     ModelConditionState  = POST_COLLAPSE
  2626.         Model         = None
  2627.         ParticleSysBone NONE SmokeBuildingMediumRubble
  2628.     End
  2629.       
  2630.       ModelConditionState  = UPGRADE_NUMENOR_STONEWORK
  2631.         Model         = GBCampWall_U
  2632.     End
  2633.     AnimationState = UPGRADE_NUMENOR_STONEWORK
  2634.         EnteringStateFX = GenericBuildingUpgrade
  2635.     End
  2636.  
  2637.   End
  2638.  
  2639.   ; *** AUDIO Parameters ***
  2640.  
  2641.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  2642.  
  2643.     SoundOnDamaged        = BuildingLightDamageStone
  2644.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  2645.  
  2646.     ;ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
  2647.     ;    MaxUpdateRangeCap = 800
  2648.     ;    AnimationSound = Sound:BuildingDebris    Animation:GBCampWall_A.GBCampWall_D3    Frames:0
  2649.     ;    AnimationSound = Sound:BuildingDebris    Animation:GBCampWall_A.GBCampWall_UD3    Frames:0
  2650.     ;End
  2651.     CampnessValue = CAMPNESS_WALL
  2652.  
  2653.  
  2654.   ; ***DESIGN parameters ***
  2655.  
  2656.   DisplayName      = OBJECT:GBCampWall
  2657.   Side = Men
  2658.   EditorSorting = STRUCTURE
  2659. ; Browser = CINEMATICS UNIT
  2660.  
  2661.   ArmorSet
  2662.     Conditions        = None
  2663.     Armor             = CampWallArmor
  2664.     DamageFX          = None
  2665.   End
  2666.   
  2667.   CommandSet = EmptyCommandSet
  2668.  
  2669.   ; *** ENGINEERING Parameters ***  
  2670.   KindOf                = STRUCTURE SELECTABLE IMMOBILE DEFENSIVE_WALL NOT_AUTOACQUIRABLE MADE_OF_STONE
  2671.   RadarPriority = NOT_ON_RADAR
  2672.   Body                  = ActiveBody ModuleTag_03
  2673.     MaxHealth       = 3000.0
  2674.   End
  2675.   
  2676.   ThreatBreakdown GBCampWall_DetailedThreat
  2677.         AIKindOf = WALL
  2678.   End
  2679.  
  2680.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2681.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2682.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2683. ;  Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2684. ;      DestructionDelay  = 5000
  2685. ;  End
  2686.     
  2687.     Behavior                  = StructureCollapseUpdate ModuleTag_06
  2688.         MinCollapseDelay        = 000
  2689.         MaxCollapseDelay        = 000
  2690.         CollapseDamping         = .5
  2691.         MaxShudder              = 0.6
  2692.         MinBurstDelay           = 250
  2693.         MaxBurstDelay           = 800
  2694.         BigBurstFrequency       = 4
  2695. ;        FXList                  = INITIAL   FX_StructureMediumCollapse
  2696. ;        FXList                  = ALMOST_FINAL  FX_StructureAlmostCollapse
  2697.         DestroyObjectWhenDone    = Yes
  2698.         CollapseHeight            = 80
  2699.     End
  2700.       
  2701.   Behavior = CastleMemberBehavior ModuleTag_CMB
  2702.   End
  2703.   
  2704.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  2705.         TriggeredBy                = Upgrade_NumenorStonework
  2706.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  2707.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  2708.     End
  2709.  
  2710.   Geometry              = BOX
  2711.   GeometryMajorRadius   = 4.0
  2712.   GeometryMinorRadius   = 72.0
  2713.   GeometryHeight        = 24.0
  2714.   GeometryIsSmall       = No
  2715.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  2716.   Shadow                = SHADOW_VOLUME
  2717. End
  2718.  
  2719.  
  2720.  
  2721. ;------------------------------------------------------------------------------
  2722.  
  2723.  
  2724. Object GBCampWallC
  2725.  
  2726.   ; *** ART Parameters ***
  2727.   Draw = W3DScriptedModelDraw ModuleTag_01
  2728.     OkToChangeModelColor = Yes
  2729.     DefaultModelConditionState
  2730.       Model = GBCampWallC
  2731.     End
  2732. ;    WallBoundsMesh = GBMTWallAPTop
  2733.   End
  2734.  
  2735.  
  2736.   ; *** AUDIO Parameters ***
  2737.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  2738.  
  2739.     SoundOnDamaged        = BuildingLightDamageStone
  2740.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  2741.     CampnessValue = CAMPNESS_WALL
  2742.  
  2743.  
  2744.   ; ***DESIGN parameters ***
  2745.  
  2746.   DisplayName      = OBJECT:GBCampWall
  2747.   Side = Men
  2748.   EditorSorting = STRUCTURE
  2749. ; Browser = CINEMATICS UNIT
  2750.  
  2751.   ArmorSet
  2752.     Conditions        = None
  2753.     Armor             = StructureArmor
  2754.     DamageFX          = None
  2755.   End
  2756.  
  2757.   ; *** ENGINEERING Parameters ***  
  2758.   KindOf                = STRUCTURE IMMOBILE DEFENSIVE_WALL NOT_AUTOACQUIRABLE MADE_OF_STONE
  2759.   RadarPriority = NOT_ON_RADAR
  2760.   Body                  = ActiveBody ModuleTag_03
  2761.     MaxHealth       = 3000.0
  2762.   End
  2763.   
  2764.   ThreatBreakdown GBCampWallC_DetailedThreat
  2765.         AIKindOf = WALL
  2766.   End
  2767.  
  2768.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  2769.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  2770.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  2771.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2772.       DestructionDelay  = 2100
  2773.   End
  2774.   
  2775.   Geometry              = BOX
  2776.   GeometryMajorRadius   = 32.0
  2777.   GeometryMinorRadius   = 8.0
  2778.   GeometryHeight        = 8.0
  2779.   GeometryIsSmall       = No
  2780.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  2781.   Shadow                = SHADOW_VOLUME
  2782. End
  2783.  
  2784. ;------------------------------------------------------------------------------
  2785.  
  2786. ;Gondor Buildable Wall Foundation -- the area where faction gondor walls can be built on
  2787. Object GondorWallFoundation
  2788.  
  2789.   ; *** ART Parameters ***
  2790.  
  2791.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  2792.     OkToChangeModelColor  = Yes
  2793.     UseStandardModelNames = Yes
  2794.     
  2795.     DefaultModelConditionState
  2796.       Model = GBFoundationL
  2797.     End
  2798.  
  2799.     ModelConditionState = WORLD_BUILDER
  2800.         Model = RBWalls
  2801.     End    
  2802.   End
  2803.   
  2804.   ;PlacementViewAngle  = 0
  2805.  
  2806.   ; ***DESIGN parameters ***
  2807.   DisplayName         = OBJECT:GondorWallFoundation
  2808.   Side                = Men
  2809.   EditorSorting       = STRUCTURE
  2810.   ThreatLevel = 1.0
  2811.  
  2812.   BuildCost           = 1
  2813.   BuildTime           = 5.0           ; in seconds
  2814.   VisionRange         = 160.0          ; Shroud clearing distance
  2815.   ShroudClearingRange = 160
  2816.  
  2817.   CommandSet = GondorWallFoundationCommandSet
  2818.  
  2819.  
  2820.   ; *** AUDIO Parameters ***
  2821.  
  2822.     VoiceSelect    = Gui_PlotSelect2    ;Gui_PlotSelect
  2823.  
  2824.  
  2825.   ; *** ENGINEERING Parameters ***
  2826.  
  2827.   RadarPriority       = STRUCTURE
  2828.   KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION UNATTACKABLE MP_COUNT_FOR_VICTORY NO_COLLIDE DO_NOT_CLASSIFY MADE_OF_STONE
  2829.  
  2830.   Behavior            = FoundationAIUpdate ModuleTag_foundationAI
  2831.   End
  2832.  
  2833.   Behavior = CastleMemberBehavior ModuleTag_CMB
  2834.   End 
  2835.  
  2836.   Body                = StructureBody ModuleTag_05
  2837.     MaxHealth         = 15000.0
  2838.   End
  2839.  
  2840.   Geometry              = BOX
  2841.   GeometryMajorRadius   = 24.0
  2842.   GeometryMinorRadius   = 16.0
  2843.   GeometryHeight        = 0.8
  2844.   GeometryIsSmall       = No
  2845.   Shadow                = SHADOW_VOLUME
  2846.   BuildCompletion        = PLACED_BY_PLAYER
  2847. End
  2848.  
  2849. ;------------------------------------------------------------------------------------------
  2850. ;Gondor Great Keep 
  2851. Object GondorGreatKeep
  2852.  
  2853.     SelectPortrait = BPGKeep
  2854.  
  2855.     ; *** ART Parameters ***
  2856.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  2857.     
  2858.         ExtraPublicBone = ARROW_01
  2859.         ExtraPublicBone = ARROW_02
  2860.         ExtraPublicBone = ARROW_03
  2861.         ExtraPublicBone = ARROW_04
  2862.         ExtraPublicBone = ARROW_05
  2863.         ExtraPublicBone = ARROW_06
  2864.         ExtraPublicBone = ARROW_07
  2865.         ExtraPublicBone = ARROW_08
  2866.         ExtraPublicBone = ARROW_09
  2867.         ExtraPublicBone = ARROW_10
  2868.         ExtraPublicBone = ARROW_11
  2869.         ExtraPublicBone = ARROW_12
  2870.     
  2871.         OkToChangeModelColor  = Yes
  2872.         UseStandardModelNames = Yes
  2873.         DefaultModelConditionState
  2874.         Model = GBWTower
  2875.         End    
  2876.     End
  2877.  
  2878.     ; ***DESIGN parameters ***
  2879.     DisplayName         = OBJECT:GBKeep
  2880.     Side                = Men
  2881.     EditorSorting       = STRUCTURE
  2882.     ThreatLevel = 1.0
  2883.     CommandSet            = BattleTowerCommandSet
  2884. ;     CommandSet            = GondorCastleGreatKeepCommandSet
  2885.      
  2886.     BuildCost           = 1
  2887.     BuildTime           = 5.0           ; in seconds
  2888.     VisionRange         = 160.0          ; Shroud clearing distance
  2889.     ShroudClearingRange = 160
  2890.  
  2891.  
  2892.     ; *** AUDIO Parameters ***
  2893.  
  2894.     SoundOnDamaged        = BuildingLightDamageStone
  2895.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  2896.  
  2897.  
  2898.     ; *** ENGINEERING Parameters ***
  2899.  
  2900.     RadarPriority       = STRUCTURE
  2901.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION CASTLE_KEEP CAN_ATTACK MADE_OF_STONE    ; GARRISON GARRISONABLE_UNTIL_DESTROYED
  2902.  
  2903.     Behavior = ProductionUpdate ProductionUpdateModuleTag
  2904.         ; nothing, but is required if we have any Object-level Upgrades!
  2905.     End
  2906.  
  2907.     Behavior = GettingBuiltBehavior ModuleTag_04
  2908.         WorkerName    = GondorWorkerNoSelect
  2909.     End
  2910.  
  2911.     Behavior = CastleMemberBehavior ModuleTag_CMB
  2912.     End 
  2913.     
  2914.  
  2915.     Behavior = ManTheWallsSpecialPower ModuleTag_ManTheWalls
  2916.         SpecialPowerTemplate = ManTheWallsSpecialPower
  2917.     End
  2918.  
  2919.     Behavior = OCLSpecialPower ModuleTag_RangerAmbush
  2920.         SpecialPowerTemplate = RangerAmbushSpecialPower
  2921.         OCL                  = OCL_RangerAmbush
  2922.         CreateLocation       = CREATE_AT_LOCATION
  2923.     End
  2924.     
  2925.     Behavior = OCLSpecialPower ModuleTag_OsgiliathVeterans
  2926.         SpecialPowerTemplate = OsgiliathVeteransSpecialPower
  2927.         OCL                  = OCL_OsgiliathVeterans
  2928.         CreateLocation       = CREATE_AT_LOCATION
  2929.     End
  2930.     
  2931.     Behavior = OCLSpecialPower ModuleTag_PrinceOfDolArmoth
  2932.         SpecialPowerTemplate = PrinceOfDolArmothSpecialPower
  2933.         OCL                  = OCL_PrinceOfDolArmoth
  2934.         CreateLocation       = CREATE_AT_EDGE_NEAR_TARGET_AND_MOVE_TO_LOCATION
  2935.     End
  2936.     
  2937.  
  2938.     Body = StructureBody ModuleTag_05
  2939.         MaxHealth         = 1500.0
  2940.     End
  2941.    
  2942.     Behavior                  = BuildingBehavior BuildingModuleTag
  2943.         ; NightWindowName         = WINDOW_N01
  2944.         ; FireWindowName         = WINDOW_F01
  2945.         ; GlowWindowName        = WINDOW_G01
  2946.         ; FireName            = FIRE01
  2947.     End
  2948.  
  2949. ;    Behavior            = HordeGarrisonContain ModuleTag_hordeGarrison
  2950. ;        ObjectStatusOfContained    = UNSELECTABLE CAN_ATTACK
  2951. ;        ContainMax              = 4
  2952. ;        DamagePercentToUnits    = 0%
  2953. ;        PassengerFilter            = ANY +INFANTRY +HORDE -SUMMONED -WildSpiderling -WildSpiderlingHorde
  2954. ;        AllowEnemiesInside      = No
  2955. ;        AllowNeutralInside      = Yes
  2956. ;        NumberOfExitPaths       = 1 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
  2957. ;        PassengerBonePrefix     = PassengerBone:ARROW_ KindOf:INFANTRY
  2958. ;        ;PassengersTestCollisionHeight = 80
  2959. ;        ;Slots                         = 1
  2960. ;        ;EnterSound                     = GarrisonEnter
  2961. ;        ;ExitSound                      = GarrisonExit
  2962. ;        ;ExitDelay               = 250
  2963. ;        ;GoAggressiveOnExit      = Yes ; AI Will tell people to set their mood to Aggressive on exiting
  2964. ;        ;ForceOrientationContainer = No  ; otherwise contained units can't orient themselves towards their targets...
  2965. ;    End 
  2966.  
  2967.     Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  2968.         DestructionDelay  = 5000
  2969.     End
  2970.  
  2971.     Behavior = RefundDie ModuleTag_refund
  2972.         UpgradeRequired = Upgrade_MarketplaceUpgradeDefiance
  2973.         BuildingRequired = ANY +GondorMarketPlace
  2974.         RefundPercent = 50%
  2975.     End
  2976.  
  2977.  
  2978.  
  2979.     Behavior                  = StructureCollapseUpdate ModuleTag_06
  2980.         MinCollapseDelay        = 000
  2981.         MaxCollapseDelay        = 000
  2982.         CollapseDamping         = .5
  2983.         MaxShudder              = 0.6
  2984.         MinBurstDelay           = 250
  2985.         MaxBurstDelay           = 800
  2986.         BigBurstFrequency       = 4
  2987.         FXList                  = INITIAL   FX_StructureMediumCollapse
  2988.     End
  2989.  
  2990.  
  2991.     Geometry              = BOX
  2992.     GeometryMajorRadius   = 40.0
  2993.     GeometryMinorRadius   = 40.0
  2994.     GeometryHeight        = 150.0
  2995.     GeometryIsSmall       = No
  2996.     Shadow                = SHADOW_VOLUME
  2997.     BuildCompletion     = PLACED_BY_PLAYER
  2998. End
  2999.  
  3000. ;------------------------------------------------------------------------------
  3001. Object GondorCastleKeep
  3002.   
  3003.     SelectPortrait = BPGKeep
  3004.   
  3005.   ; *** ART Parameters ***
  3006.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  3007.     OkToChangeModelColor  = Yes
  3008.     UseStandardModelNames = Yes
  3009.     DefaultModelConditionState
  3010.       Model = GBWTower
  3011.     End
  3012.   End
  3013.  
  3014.     ; ***DESIGN parameters ***
  3015.     DisplayName         = OBJECT:GondorWhiteTower
  3016.     Side                = Men
  3017.     EditorSorting       = STRUCTURE
  3018.     ThreatLevel = 1.0
  3019.      
  3020.     BuildCost           = 1
  3021.     BuildTime           = 5.0           ; in seconds
  3022.     VisionRange         = 160.0          ; Shroud clearing distance
  3023.     ShroudClearingRange = 160
  3024.     CommandSet            = GenericKeepCommandSet
  3025.  
  3026.  
  3027.     ; *** AUDIO Parameters ***
  3028.  
  3029.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  3030.  
  3031.     VoiceSelect         = GondorCitadelSelect
  3032.  
  3033.     SoundOnDamaged        = BuildingLightDamageStone
  3034.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  3035.  
  3036.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  3037.  
  3038.     UnitSpecificSounds
  3039.         UnderConstruction        = BuildingConstructionLoop  ; Built first time
  3040.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  3041.         UnderRepairFromRubble    = BuildingConstructionLoop    ; Repaired from completely destroyed (not used???)
  3042.     End
  3043.     CampnessValue = CAMPNESS_FORTRESS
  3044.  
  3045.  
  3046.   ; *** ENGINEERING Parameters ***
  3047.  
  3048.   RadarPriority       = STRUCTURE
  3049.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION CASTLE_KEEP  MP_COUNT_FOR_VICTORY AUTO_RALLYPOINT FS_FACTORY
  3050.  
  3051.   Behavior            = GettingBuiltBehavior ModuleTag_04
  3052.      WorkerName          = GondorWorkerNoSelect
  3053.  End
  3054.  
  3055.   Behavior = CastleMemberBehavior ModuleTag_CMB
  3056.   End 
  3057.  
  3058.       ;-----------------------------------------------
  3059.     ;Used for hero revival and initial construction     
  3060.     Behavior = ProductionUpdate ProductionUpdateModuleTag
  3061.         ; nothing, but is required if we have any Object-level Upgrades!
  3062.     End
  3063.     Behavior = QueueProductionExitUpdate ModuleTag_QueuePEU
  3064.         UnitCreatePoint   = X:0.0 Y:-20.0 Z:0.0
  3065.         NaturalRallyPoint = X:28.8 Y:-80.0 Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! 
  3066.         ExitDelay = 300 ;Handles delays between units if multiple produced at a time. 
  3067.     End  
  3068.     ;-----------------------------------------------
  3069.  
  3070.   Behavior = GarrisonContain GarrisonContainModuleTag
  3071.     ObjectStatusOfContained    = UNSELECTABLE CAN_ATTACK
  3072.     ContainMax              = 10
  3073.     PassengerFilter            = ANY +INFANTRY +HORDE
  3074.     AllowAlliesInside       = Yes
  3075.     AllowEnemiesInside      = No
  3076. ;    EnterSound          = GarrisonEnter
  3077. ;    ExitSound           = GarrisonExit
  3078.   End
  3079.   
  3080.   Body                = StructureBody ModuleTag_05
  3081.     MaxHealth         = GONDOR_CENTRAL_CAMP_KEEP_HEALTH
  3082.   End
  3083.  
  3084.   ArmorSet
  3085.     Conditions        = None
  3086.     Armor             = CitadelArmor
  3087.     DamageFX          = None
  3088.   End
  3089.  
  3090.  
  3091.  
  3092. ;  commented-out, since this keep is being used in MinasTirith, apparently... 
  3093. ;  Behavior            = DestroyDie ModuleTag_07
  3094. ;    ;nothing
  3095. ;  End
  3096.  
  3097.     ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  3098.     ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  3099.     ; buildings automatically stick around because GarrisonContain has it's own DieModule
  3100.     Behavior = KeepObjectDie ModuleTag_IWantRubble
  3101.     End
  3102.  
  3103.   Geometry              = BOX
  3104.   GeometryMajorRadius   = 25.6
  3105.   GeometryMinorRadius   = 35.2
  3106.   GeometryHeight        = 31.2
  3107.   GeometryIsSmall       = No
  3108.   Shadow                = SHADOW_VOLUME
  3109.   BuildCompletion     = PLACED_BY_PLAYER
  3110. End
  3111.  
  3112. ;------------------------------------------------------------------------------
  3113. Object GondorBaseTower
  3114.  
  3115.   ; *** ART Parameters ***  
  3116.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  3117.     OkToChangeModelColor  = Yes
  3118.     UseStandardModelNames = Yes
  3119.     ExtraPublicBone = Ramp01
  3120.     ExtraPublicBone = Ramp02
  3121.     ExtraPublicBone = Ramp03
  3122.     WallBoundsMesh  = P1
  3123.     ;;;;EmbedPortal = ramp Ramp  ;;; not yet supported in W3DScriptedModelDraw 
  3124.     DefaultModelConditionState
  3125.       Model = GBFSTower
  3126.     End
  3127.   End
  3128.  
  3129.  
  3130.   ; *** AUDIO Parameters ***
  3131.  
  3132.     SoundOnDamaged        = BuildingLightDamageStone
  3133.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  3134.  
  3135.  
  3136.   ; ***DESIGN parameters ***
  3137.  
  3138.   DisplayName      = OBJECT:GondorBaseTower
  3139.   Side = Men
  3140.   EditorSorting   = STRUCTURE
  3141.   ThreatLevel = 1.0
  3142.  
  3143.   ArmorSet
  3144.     Conditions        = None
  3145.     Armor             = StructureArmor
  3146.     DamageFX          = None
  3147.   End
  3148.  
  3149.   ; *** ENGINEERING Parameters ***  
  3150.   KindOf                = STRUCTURE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE ;SELECTABLE;@1 
  3151.   RadarPriority = STRUCTURE
  3152.   Body                  = ActiveBody ModuleTag_02
  3153.     MaxHealth       = 2000.0
  3154.     
  3155.     GrabObject = EntThrownBuildingRock
  3156.     GrabFX = FX_WallGrab
  3157.     GrabDamage = 490
  3158.     GrabOffset = X:16 Y:0
  3159.   End
  3160.  
  3161.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  3162.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  3163.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  3164.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  3165.       DestructionDelay  = 4000
  3166.   End
  3167.   
  3168.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  3169.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  3170.         BonusName        = WallBonus
  3171.         RefreshDelay    = 2000
  3172.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  3173.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  3174.     End    
  3175.  
  3176.   Geometry              = BOX
  3177.   GeometryMajorRadius   = 36.0
  3178.   GeometryMinorRadius   = 36.0
  3179.   GeometryHeight        = 88.0
  3180.   GeometryIsSmall       = No
  3181.   GeometryRotationAnchorOffset = X:372.9936 Y:0.0
  3182.   Shadow                = SHADOW_VOLUME
  3183. End
  3184.  
  3185. ;------------------------------------------------------------------------------------------
  3186. Object GondorBaseWall
  3187.  
  3188.   ; *** ART Parameters ***
  3189.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  3190.     OkToChangeModelColor  = Yes
  3191.     UseStandardModelNames = Yes
  3192.     WallBoundsMesh = P1
  3193.     DefaultModelConditionState
  3194.       Model = GBFSWall
  3195.     End
  3196. ;    WallBoundsMesh = P1
  3197. ;    RampMesh1 = P2
  3198. ;    RampMesh2 = P2
  3199. ;    RampMesh3 = P3
  3200.   End
  3201.  
  3202.  
  3203.   ; *** AUDIO Parameters ***
  3204.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  3205.  
  3206.     SoundOnDamaged        = BuildingLightDamageStone
  3207.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  3208.      CampnessValue = CAMPNESS_WALL
  3209.  
  3210.  
  3211.   ; ***DESIGN parameters ***
  3212.  
  3213.   DisplayName      = OBJECT:GondorBaseWall
  3214.   Side = Men
  3215.   EditorSorting   = STRUCTURE
  3216.   ThreatLevel = 1.0
  3217.  
  3218.   ArmorSet
  3219.     Conditions        = None
  3220.     Armor             = StructureArmor
  3221.     DamageFX          = None
  3222.   End
  3223.  
  3224.   ; *** ENGINEERING Parameters ***  
  3225.   KindOf                = STRUCTURE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE SELECTABLE 
  3226.   RadarPriority = STRUCTURE
  3227.   Body                  = ActiveBody ModuleTag_02
  3228.     MaxHealth       = 4000.0
  3229.     
  3230.     GrabObject = EntThrownBuildingRock
  3231.     GrabFX = FX_WallGrab
  3232.     GrabDamage = 490
  3233.     GrabOffset = X:16 Y:0
  3234.   End
  3235.   
  3236.   ThreatBreakdown GondorBaseWall_DetailedThreat
  3237.         AIKindOf = WALL
  3238.   End
  3239.  
  3240.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  3241.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  3242.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  3243.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  3244.       DestructionDelay  = 3000
  3245.   End
  3246.   
  3247.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  3248.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  3249.         BonusName        = WallBonus
  3250.         RefreshDelay    = 2000
  3251.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  3252.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  3253.     End    
  3254.  
  3255.   Geometry              = BOX
  3256.   GeometryMajorRadius   = 36.0
  3257.   GeometryMinorRadius   = 72.0
  3258.   GeometryHeight        = 36.0
  3259.   GeometryIsSmall       = No
  3260.   GeometryRotationAnchorOffset = X:372.8264 Y:0.0
  3261.   Shadow                = SHADOW_VOLUME
  3262. End
  3263.  
  3264. ;------------------------------------------------------------------------------------------
  3265. Object GondorBaseWallTreb
  3266.  
  3267.   ; *** ART Parameters ***
  3268.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  3269.     OkToChangeModelColor  = Yes
  3270.     UseStandardModelNames = Yes
  3271.     WallBoundsMesh = P1
  3272.     RampMesh1      = P2
  3273.     DefaultModelConditionState
  3274.       Model = GBFSWallT
  3275.     End
  3276.   End
  3277.  
  3278.   
  3279.   ; *** AUDIO Parameters ***
  3280.  
  3281.     ;SoundOnDamaged        = BuildingLightDamageStone
  3282.     ;SoundOnReallyDamaged    = BuildingHeavyDamageStone
  3283.  
  3284.  
  3285.   ; ***DESIGN parameters ***
  3286.  
  3287.   DisplayName      = OBJECT:GondorBaseWallTreb
  3288.   Side = Men
  3289.   EditorSorting   = STRUCTURE
  3290.   ThreatLevel = 1.0
  3291.  
  3292.   ArmorSet
  3293.     Conditions        = None
  3294.     Armor             = StructureArmor
  3295.     DamageFX          = None
  3296.   End
  3297.  
  3298.   ; *** ENGINEERING Parameters ***  
  3299.   KindOf                = STRUCTURE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE SELECTABLE 
  3300.   RadarPriority = STRUCTURE
  3301.   Body                  = ActiveBody ModuleTag_02
  3302.     MaxHealth       = 2000.0
  3303.     
  3304.     GrabObject = EntThrownBuildingRock
  3305.     GrabFX = FX_WallGrab
  3306.     GrabDamage = 490
  3307.     GrabOffset = X:16 Y:0
  3308.   End
  3309.  
  3310.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  3311.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  3312.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  3313.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  3314.       DestructionDelay  = 3000
  3315.   End
  3316.   
  3317.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  3318.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  3319.         BonusName        = WallBonus
  3320.         RefreshDelay    = 2000
  3321.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  3322.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  3323.     End    
  3324.  
  3325.   Geometry              = BOX
  3326.   GeometryMajorRadius   = 36.0
  3327.   GeometryMinorRadius   = 28.0
  3328.   GeometryHeight        = 44.0
  3329.   GeometryIsSmall       = No
  3330.   GeometryRotationAnchorOffset = X:411.2648 Y:0.0
  3331.   Shadow                = SHADOW_VOLUME
  3332. End
  3333.  
  3334. ;------------------------------------------------------------------------------------------
  3335. Object GondorGate
  3336.  
  3337.   ; *** ART Parameters ***
  3338.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  3339.     OkToChangeModelColor  = Yes
  3340.     UseStandardModelNames = Yes
  3341.     WallBoundsMesh = P1
  3342.  
  3343.     DefaultModelConditionState   
  3344.       Model = GBFSGate
  3345.     End
  3346.     AnimationState        = NONE
  3347.       Animation           = GBFSGate
  3348.         AnimationName     = GBFSGate.GBFSGate
  3349.         AnimationMode     = LOOP
  3350.       End
  3351.     End
  3352.   End
  3353.   
  3354.  
  3355.   ; *** AUDIO Parameters ***
  3356.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  3357.  
  3358.     SoundOnDamaged        = BuildingLightDamageStone
  3359.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  3360.      CampnessValue = CAMPNESS_WALL
  3361.  
  3362.  
  3363.   ; ***DESIGN parameters ***
  3364.  
  3365.   DisplayName      = OBJECT:GondorGate
  3366.   Side = Men
  3367.   EditorSorting   = STRUCTURE
  3368.   ThreatLevel = 1.0
  3369.  
  3370.   BuildTime           = 30.0           ; in seconds
  3371.  
  3372.   ArmorSet
  3373.     Conditions        = None
  3374.     Armor             = StructureArmor
  3375.     DamageFX          = None
  3376.   End
  3377.  
  3378.   ; *** ENGINEERING Parameters ***  
  3379.   KindOf                = STRUCTURE IMMOBILE WALK_ON_TOP_OF_WALL CHUNK_VENDOR  NOT_AUTOACQUIRABLE WALL_GATE ;SELECTABLE;@1
  3380.   RadarPriority = STRUCTURE
  3381.   Body                  = ActiveBody ModuleTag_02
  3382.     MaxHealth       = 2000.0
  3383.     
  3384.     GrabObject = EntThrownBuildingRock
  3385.     GrabFX = FX_WallGrab
  3386.     GrabDamage = 490
  3387.     GrabOffset = X:16 Y:0
  3388.   End
  3389.  
  3390.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  3391.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  3392.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  3393.   Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  3394.       DestructionDelay  = 2500
  3395.   End
  3396.   
  3397.   
  3398.       Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
  3399.         StartsActive    = Yes ;If no, requires upgrade to turn on.
  3400.         BonusName        = WallBonus
  3401.         RefreshDelay    = 2000
  3402.         ;Range            = 120        ; Range is overridden to affect people on us since we are a wall
  3403.         ;TargetEnemy        = Yes    ; Alliances are ignored to affect people on us since we are a wall
  3404.     End    
  3405.  
  3406.   Geometry              = BOX
  3407.   GeometryMajorRadius   = 36.0
  3408.   GeometryMinorRadius   = 104.0
  3409.   GeometryHeight        = 36.0
  3410.   GeometryIsSmall       = No
  3411.   GeometryRotationAnchorOffset = X:341.568 Y:0.0
  3412.   Shadow                = SHADOW_VOLUME
  3413. End
  3414.  
  3415. ;------------------------------------------------------------------------------
  3416. ;Gondor Inner Wall
  3417. Object GondorInnerWall
  3418.  
  3419.   ; *** ART Parameters ***
  3420.  
  3421.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  3422.     OkToChangeModelColor  = Yes
  3423.     UseStandardModelNames = Yes
  3424.     DefaultModelConditionState
  3425.       Model = RBWalls
  3426.     End
  3427.   End
  3428.   
  3429.   PlacementViewAngle  = 0
  3430.  
  3431.   ; ***DESIGN parameters ***
  3432.   DisplayName         = OBJECT:GondorWall
  3433.   Side                = Men
  3434.   EditorSorting       = STRUCTURE
  3435.   ThreatLevel = 1.0
  3436.  
  3437.   BuildCost           = 1
  3438.   BuildTime           = 5.0           ; in seconds
  3439.   VisionRange         = 160.0          ; Shroud clearing distance
  3440.   ShroudClearingRange = 160
  3441. ;  ArmorSet
  3442. ;    Conditions        = None
  3443. ;    Armor             = StructureArmor
  3444. ;    DamageFX          = StructureDamageFXNoShake
  3445. ;  End
  3446.  
  3447.  
  3448.   ; *** AUDIO Parameters ***
  3449.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  3450.  
  3451.     SoundOnDamaged        = BuildingLightDamageStone
  3452.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  3453.  
  3454. ;  VoiceSelect         = NuclearReactorSelect
  3455.  
  3456. ;  UnitSpecificSounds
  3457. ;  UnderConstruction     = UnderConstructionLoop
  3458. ;  End
  3459.     CampnessValue = CAMPNESS_WALL
  3460.  
  3461.  
  3462.   ; *** ENGINEERING Parameters ***
  3463.  
  3464.   RadarPriority       = STRUCTURE
  3465.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION
  3466.   
  3467.   ThreatBreakdown GondorInnerWall_DetailedThreat
  3468.         AIKindOf = WALL
  3469.   End
  3470.  
  3471.   Behavior            = GettingBuiltBehavior GetBuiltBehaviorTag
  3472.     WorkerName          = GondorWorkerNoSelect
  3473.   End
  3474.  
  3475.   Behavior = CastleMemberBehavior ModuleTag_CMB
  3476.   End 
  3477.  
  3478.   Body                = StructureBody ModuleTag_05
  3479.     MaxHealth         = 1500.0
  3480.   End
  3481.  
  3482.   Behavior            = DestroyDie ModuleTag_07
  3483.     ;nothing
  3484.   End
  3485.  
  3486. ;  Behavior           = CreateObjectDie ModuleTag_08
  3487. ;    CreationList     = OCL_SmallStructureDebris
  3488. ;  End
  3489.  
  3490. ;  Behavior = ProductionUpdate ModuleTag_10
  3491. ;    ; nothing, but is required if we have any Object-level Upgrades!
  3492. ;  End
  3493.  
  3494. ;  Behavior = FlammableUpdate ModuleTag_14
  3495. ;    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
  3496. ;    AflameDamageAmount = 5       ; taking this much damage...
  3497. ;    AflameDamageDelay = 500       ; this often.
  3498. ;  End
  3499.  
  3500. ;  Behavior = TransitionDamageFX ModuleTag_15
  3501. ;    ;-------------DESIGNED FOR SMALL SIZED FACTION BUILDING TRANSITIONS-------------------
  3502. ;    DamagedParticleSystem1       = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
  3503. ;    ;---------------------------------------------------------------------------------------
  3504. ;    ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionSmallSmoke
  3505. ;    ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionSmallExplosion
  3506. ;    ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionSmallShockwave
  3507. ;  End
  3508.  
  3509. ;  Behavior             = FXListDie ModuleTag_16
  3510. ;    DeathFX       = FX_BuildingDie
  3511. ;  End
  3512.  
  3513.   Geometry              = BOX
  3514.   GeometryMajorRadius   = 28.0
  3515.   GeometryMinorRadius   = 20.0
  3516.   GeometryHeight        = 24.0
  3517.   GeometryIsSmall       = No
  3518.   Shadow                = SHADOW_VOLUME
  3519.   BuildCompletion     = PLACED_BY_PLAYER
  3520. End
  3521.  
  3522. ;------------------------------------------------------------------------------------------
  3523. Object GBMGateDoor
  3524.  
  3525. SelectPortrait = BPGondorCastleGate
  3526.  
  3527.   ; *** ART Parameters ***
  3528.  
  3529.     BuildTime           = 180.0           ; in seconds
  3530.         BuildCost           = 1000
  3531.  
  3532.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  3533.     OkToChangeModelColor  = Yes
  3534.     UseStandardModelNames = Yes
  3535.  
  3536.     DefaultModelConditionState  
  3537.       Model = GBCASTGATE
  3538.     End
  3539.  
  3540.     ; Reinforced constructed--------------------------------------------------------------
  3541.     ; Need this so that repairing a reinforced one correctly plays the geting built anim.
  3542.     ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED USER_1
  3543.         Model             = GBCASTGATE_UA
  3544.         ParticleSysBone   = DUSTBONE BuildingContructDust
  3545.     End
  3546.     AnimationState        = ACTIVELY_BEING_CONSTRUCTED USER_1
  3547.         StateName                = STATE_None
  3548.             Animation           = GBCASTGATE_UA
  3549.                 AnimationName   = GBCASTGATE_UA.GBCASTGATE_UA
  3550.                 AnimationMode   = MANUAL
  3551.             End
  3552.         Flags                    = START_FRAME_FIRST
  3553.     End
  3554.  
  3555.     ; Constructed---------------------------------------------------------------------------------------
  3556.     ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED
  3557.         Model             = GBCASTGATE_A
  3558.         ParticleSysBone   = DUSTBONE BuildingContructDust
  3559.     End
  3560.     AnimationState        = ACTIVELY_BEING_CONSTRUCTED 
  3561.         StateName                = STATE_None
  3562.             Animation           = GBCASTGATE_A
  3563.                 AnimationName   = GBCASTGATE_A.GBCASTGATE_A
  3564.                 AnimationMode   = MANUAL
  3565.             End
  3566.         Flags                    = START_FRAME_FIRST
  3567.     End
  3568.     
  3569.     ; Reinforced destoyed when being constructed--------------------------------------------------------------
  3570.     ModelConditionState   = DESTROYED_WHILST_BEING_CONSTRUCTED USER_1
  3571.         Model              = GBCASTGATE_UA
  3572.         ParticleSysBone   = DUSTBONE BuildingContructDust
  3573.     End  
  3574.     AnimationState    = DESTROYED_WHILST_BEING_CONSTRUCTED USER_1
  3575.         StateName        = STATE_DetroyedConstructing
  3576.         EnteringStateFX    = FX_GondorCastleGateDestroy
  3577.         Animation
  3578.             AnimationName        = GBCASTGATE_UA.GBCASTGATE_UA
  3579.             AnimationMode        = ONCE_BACKWARDS
  3580.             AnimationBlendTime    = 90    ; 3 seconds * 30 frames
  3581.         End
  3582.         ; Specifically no start last frame flag here.
  3583.         Flags = START_FRAME_FIRST
  3584.     End
  3585.     
  3586.     ; Destoyed when being constructed--------------------------------------------------------------
  3587.     ModelConditionState   = DESTROYED_WHILST_BEING_CONSTRUCTED
  3588.         Model              = GBCASTGATE_A
  3589.         ParticleSysBone   = DUSTBONE BuildingContructDust
  3590.     End  
  3591.     AnimationState    = DESTROYED_WHILST_BEING_CONSTRUCTED
  3592.         StateName        = STATE_DetroyedConstructing
  3593.         EnteringStateFX    = FX_GondorCastleGateDestroy
  3594.         Animation
  3595.             AnimationName        = GBCASTGATE_A.GBCASTGATE_A
  3596.             AnimationMode        = ONCE_BACKWARDS
  3597.             AnimationBlendTime    = 90    ; 3 seconds * 30 frames
  3598.         End
  3599.         ; Specifically no start last frame flag here.
  3600.         Flags = START_FRAME_FIRST
  3601.     End
  3602.  
  3603.     ; Reinforced rubble open-------------------------------------------------------------------------
  3604.     ModelConditionState  = RUBBLE DOOR_1_OPENING USER_1
  3605.         Model         = GBCASTGATE_UD4
  3606.     End
  3607.     TransitionState = TRANS_IntoRubbleU4
  3608.         Animation = D3
  3609.             AnimationName        = GBCASTGATE_UD4.GBCASTGATE_UD4
  3610.             AnimationMode        = ONCE
  3611.             AnimationBlendTime = 0
  3612.         End
  3613.         ParticleSysBone NONE FX_GondorCastleGateDestroy
  3614.     End
  3615.     AnimationState = RUBBLE DOOR_1_OPENING USER_1
  3616.         Flags = START_FRAME_LAST
  3617.         StateName = STATE_Rubble
  3618.         Animation                =    Death
  3619.             AnimationName        =    GBCASTGATE_UD4.GBCASTGATE_UD4
  3620.             AnimationMode        =    ONCE
  3621.         End
  3622.         BeginScript
  3623.             Prev = CurDrawablePrevAnimationState()
  3624.             if Prev == "STATE_None" or Prev == "STATE_Open" or Prev == "STATE_Closed" or Prev == "TRANS_Closed_To_Open" or Prev == "TRANS_Open_To_Closed"
  3625.             then
  3626.                 ; Only play the rubble anim if we havn't come from another rubble.
  3627.                 CurDrawableSetTransitionAnimState("TRANS_IntoRubbleU4")
  3628.             end
  3629.         EndScript
  3630.     End      
  3631.  
  3632.     ; Rubble open-------------------------------------------------------------------------
  3633.     ModelConditionState  = RUBBLE DOOR_1_OPENING
  3634.         Model         = GBCASTGATE_D4  
  3635.     End
  3636.     TransitionState = TRANS_IntoRubble4
  3637.         Animation = D3
  3638.             AnimationName        = GBCASTGATE_D4.GBCASTGATE_D4
  3639.             AnimationMode        = ONCE
  3640.             AnimationBlendTime = 0
  3641.         End
  3642.         ParticleSysBone NONE FX_GondorCastleGateDestroy
  3643.     End
  3644.     AnimationState = RUBBLE DOOR_1_OPENING
  3645.         Flags = START_FRAME_LAST
  3646.         StateName = STATE_Rubble
  3647.         Animation                =    Death
  3648.             AnimationName        =    GBCASTGATE_D4.GBCASTGATE_D4
  3649.             AnimationMode        =    ONCE
  3650.         End
  3651.         BeginScript
  3652.             Prev = CurDrawablePrevAnimationState()
  3653.             if Prev == "STATE_None" or Prev == "STATE_Open" or Prev == "STATE_Closed" or Prev == "TRANS_Closed_To_Open" or Prev == "TRANS_Open_To_Closed"
  3654.             then
  3655.                 ; Only play the rubble anim if we havn't come from another rubble.
  3656.                 CurDrawableSetTransitionAnimState("TRANS_IntoRubble4")
  3657.             end
  3658.         EndScript
  3659.     End      
  3660.  
  3661.     ; Reinforced rubble closed-------------------------------------------------------------------------
  3662.     ModelConditionState  = RUBBLE DOOR_1_CLOSING USER_1
  3663.         Model         = GBCASTGATE_UD3
  3664.     End
  3665.     TransitionState = TRANS_IntoRubbleU3
  3666.         Animation = D4
  3667.             AnimationName        = GBCASTGATE_UD3.GBCASTGATE_UD3
  3668.             AnimationMode        = ONCE
  3669.             AnimationBlendTime    = 0
  3670.         End
  3671.         ParticleSysBone NONE FX_GondorCastleGateDestroy
  3672.     End
  3673.     AnimationState = RUBBLE DOOR_1_CLOSING USER_1
  3674.         Flags = START_FRAME_LAST
  3675.         StateName = STATE_Rubble
  3676.         Animation                =    Death
  3677.             AnimationName        =    GBCASTGATE_UD3.GBCASTGATE_UD3
  3678.             AnimationMode        =    ONCE
  3679.         End
  3680.         BeginScript
  3681.             Prev = CurDrawablePrevAnimationState()
  3682.             if Prev == "STATE_None" or Prev == "STATE_Open" or Prev == "STATE_Closed" or Prev == "TRANS_Closed_To_Open" or Prev == "TRANS_Open_To_Closed"
  3683.             then
  3684.                 ; Only play the rubble anim if we havn't come from another rubble.
  3685.                 CurDrawableSetTransitionAnimState("TRANS_IntoRubbleU3")
  3686.             end
  3687.         EndScript
  3688.     End      
  3689.  
  3690.     ; Rubble open-------------------------------------------------------------------------
  3691.     ModelConditionState  = RUBBLE DOOR_1_CLOSING
  3692.         Model         = GBCASTGATE_D3
  3693.     End
  3694.     TransitionState = TRANS_IntoRubble3
  3695.         Animation = D4
  3696.             AnimationName        = GBCASTGATE_D3.GBCASTGATE_D3
  3697.             AnimationMode        = ONCE
  3698.             AnimationBlendTime = 0
  3699.         End
  3700.         ParticleSysBone NONE FX_GondorCastleGateDestroy
  3701.     End
  3702.     AnimationState = RUBBLE DOOR_1_CLOSING
  3703.         Flags = START_FRAME_LAST
  3704.         StateName = STATE_Rubble
  3705.         Animation                =    Death
  3706.             AnimationName        =    GBCASTGATE_D3.GBCASTGATE_D3
  3707.             AnimationMode        =    ONCE
  3708.         End
  3709.         BeginScript
  3710.             Prev = CurDrawablePrevAnimationState()
  3711.             if Prev == "STATE_None" or Prev == "STATE_Open" or Prev == "STATE_Closed" or Prev == "TRANS_Closed_To_Open" or Prev == "TRANS_Open_To_Closed"
  3712.             then
  3713.                 ; Only play the rubble anim if we havn't come from another rubble.
  3714.                 CurDrawableSetTransitionAnimState("TRANS_IntoRubble3")
  3715.             end
  3716.         EndScript
  3717.     End      
  3718.     
  3719.     AnimationState = DOOR_1_OPENING
  3720.         StateName = STATE_Open   
  3721.         Animation = Open 
  3722.             AnimationName    =    GBCASTGATE.GBCASTGATE
  3723.             AnimationMode    =    ONCE 
  3724.             AnimationBlendTime = 0
  3725.         End
  3726.         Flags = START_FRAME_LAST
  3727.         BeginScript
  3728.             Prev = CurDrawablePrevAnimationState()
  3729.             if Prev == "STATE_Closed" then CurDrawableSetTransitionAnimState("TRANS_Closed_To_Open") end
  3730.         EndScript
  3731.     End
  3732.     TransitionState = TRANS_Closed_To_Open
  3733.         Animation = Open 
  3734.             AnimationName    =    GBCASTGATE.GBCASTGATE
  3735.             AnimationMode    =    ONCE 
  3736.         End
  3737.     End
  3738.         
  3739.     AnimationState = DOOR_1_CLOSING 
  3740.         StateName = STATE_Closed 
  3741.         Animation = Close 
  3742.             AnimationName    =    GBCASTGATE.GBCASTGATE
  3743.             AnimationMode    =    ONCE_BACKWARDS 
  3744.             AnimationBlendTime = 0
  3745.         End
  3746.         Flags = START_FRAME_FIRST
  3747.         BeginScript
  3748.             
  3749.             Prev = CurDrawablePrevAnimationState()
  3750.             if Prev == "STATE_Open" then CurDrawableSetTransitionAnimState("TRANS_Open_To_Closed") end
  3751.         EndScript
  3752.     End
  3753.     TransitionState = TRANS_Open_To_Closed
  3754.         Animation = Open 
  3755.             AnimationName    =    GBCASTGATE.GBCASTGATE
  3756.             AnimationMode    =    ONCE_BACKWARDS 
  3757.         End
  3758.         Flags = START_FRAME_LAST
  3759.     End
  3760.     
  3761.     ModelConditionState = USER_1
  3762.         Model = GBCastGate_U
  3763.     End
  3764.  
  3765.   End
  3766.  
  3767.  
  3768.   ; *** AUDIO Parameters ***
  3769.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  3770.  
  3771.     VoiceSelect        = GateSelect
  3772.  
  3773.     SoundOnDamaged        = BuildingLightDamageStone
  3774.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  3775.  
  3776.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  3777.  
  3778.     UnitSpecificSounds
  3779.         UnderConstruction        = BuildingConstructionLoop  ; Built first time
  3780.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  3781.         UnderRepairFromRubble    = BuildingConstructionLoop    ; Repaired from completely destroyed (not used???)
  3782.     End
  3783.     CampnessValue = CAMPNESS_WALL
  3784.  
  3785.  
  3786.   ; ***DESIGN parameters ***
  3787.  
  3788.     DisplayName                = OBJECT:GBMgatedoor
  3789.     Side                    = Men
  3790.     EditorSorting            = STRUCTURE
  3791.     ThreatLevel                = 1.0
  3792.     KeepSelectableWhenDead    = Yes
  3793.     VisionRange                = 400.0          ; Shroud clearing distance
  3794.  
  3795.     ArmorSet
  3796.         Conditions        = None
  3797.         Armor             = CastleGateArmor
  3798.         DamageFX          = GateDamageFX
  3799.     End
  3800.     ;ArmorSet
  3801.     ;    Conditions        = UNBESIEGEABLE
  3802.     ;    Armor             = CastleGateUnbesiegeableArmor
  3803.     ;    DamageFX          = None
  3804.     ;End
  3805.  
  3806.     CommandSet = CastleGateCommandSet
  3807.  
  3808.  
  3809.     ; *** ENGINEERING Parameters ***  
  3810.     KindOf                = STRUCTURE IMMOBILE SELECTABLE BLOCKING_GATE
  3811.     RadarPriority = STRUCTURE
  3812.     Body                  = ActiveBody ModuleTag_02
  3813.         MaxHealth       = GONDOR_CASTLE_DOOR_HEALTH            
  3814.     End
  3815.  
  3816.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  3817.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  3818.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  3819.   Behavior = KeepObjectDie ModuleTag_IWantRubble
  3820.   End
  3821.  
  3822.     ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
  3823.         MaxUpdateRangeCap = 800
  3824.         AnimationSound = Sound: MinisTirithGateDie Animation:GBMgatedoorSKL.GBMgatedoorA3 Frames: 1 
  3825.     End
  3826.  
  3827.     Behavior = TransitionDamageFX ModleTag_hideBustedDoors
  3828.         PristineShowSubObject        RBCASTDRR RBCASTDRL
  3829.         PristineHideSubObject        RBCASTDRR_D1 RBCASTDRR_D2 RBCASTDRL_D1 RBCASTDRL_D2
  3830.         DamagedShowSubObject        RBCASTDRR_D1 RBCASTDRL_D1
  3831.         DamagedHideSubObject        RBCASTDRR_D2 RBCASTDRL_D2 RBCASTDRR RBCASTDRL
  3832.         ReallyDamagedShowSubObject    RBCASTDRR_D2 RBCASTDRL_D2
  3833.         ReallyDamagedHideSubObject  RBCASTDRR_D1  RBCASTDRL_D1 RBCASTDRR RBCASTDRL
  3834.         DamagedFXList1 = Loc: X:0 Y:0 Z:0            FXList:FX_BasicSevereScreenShake
  3835.          ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0        FXList:FX_BasicSevereScreenShake
  3836.          RubbleFXList1 = Loc: X:0 Y:0 Z:0            FXList:FX_HelmsDeepGateRubble
  3837.     End
  3838.  
  3839.     Behavior = GateOpenAndCloseBehavior ModuleTag_GATE
  3840.         ResetTimeInMilliseconds = 12200 ; important! this must be longer than the gates animation, ir it will twitch
  3841.         OpenByDefault = Yes
  3842.         PercentOpenForPathing = 50
  3843.         SoundOpeningGateLoop = GateOpenStart
  3844.         SoundClosingGateLoop = GateCloseStart
  3845.         SoundFinishedOpeningGate = GateOpenEnd
  3846.         SoundFinishedClosingGate = GateCloseEnd
  3847.         TimeBeforePlayingOpenSound = 9500
  3848.         TimeBeforePlayingClosedSound = 9500
  3849.  
  3850.         ;Proxy = Munkee
  3851.     End
  3852.  
  3853.  
  3854.     Behavior = GettingBuiltBehavior ModuleTag_GettingBuilt
  3855.         SelfBuildingLoop = BuildingConstructionLoop            ; Only played if we DON'T spawn a worker
  3856.         SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  3857.         SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  3858.         SpawnTimer = -1.0                                    ; Negative means no 'autoheal'
  3859.         
  3860.         RebuildTimeSeconds = 120 ;30
  3861.         
  3862.     End
  3863.  
  3864.  
  3865.  
  3866.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  3867.         TriggeredBy                = Upgrade_ReinforcedGate
  3868.         AttributeModifier        = ReinforcedGate_Bonus
  3869.         CustomAnimAndDuration    = AnimState:USER_1 AnimTime:0    ;  - should define special upgrade model condition.
  3870.     End
  3871.  
  3872.     // New way -- ReinforcedGate is an attribute modifier that is included by NumenorStonework    
  3873.     Behavior = AttributeModifierUpgrade ModuleTag_ReinforcedNew
  3874.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  3875.         AttributeModifier        = ReinforcedGate_Bonus
  3876.         CustomAnimAndDuration    = AnimState:USER_1 AnimTime:0    ;  - should define special upgrade model condition.
  3877.     End
  3878.  
  3879.  
  3880.     Behavior = CastleMemberBehavior ModuleTag_CMB
  3881.         CountsForEvaCastleBreached = Yes
  3882.     End 
  3883.  
  3884.     Geometry              = BOX
  3885.     GeometryMajorRadius   = 16.0
  3886.     GeometryMinorRadius   = 72.0
  3887.     GeometryHeight        = 56.0
  3888.     GeometryName          = Closed
  3889.     GeometryIsSmall       = No
  3890.     
  3891.     AdditionalGeometry    = BOX
  3892.     GeometryMajorRadius   = 21.0
  3893.     GeometryMinorRadius   = 2.0
  3894.     GeometryHeight        = 56.0    
  3895.     GeometryOffset          = X:10 Y:56 Z:0
  3896.     GeometryName          = OpenLeft
  3897.     
  3898.     AdditionalGeometry    = BOX
  3899.     GeometryMajorRadius   = 21.0
  3900.     GeometryMinorRadius   = 2.0
  3901.     GeometryHeight        = 56.0    
  3902.     GeometryOffset          = X:10 Y:-56 Z:0
  3903.     GeometryName          = OpenRight
  3904.     
  3905.     GeometryContactPoint = X:25 Y:-56 Z:0 Ram
  3906.     GeometryContactPoint = X:12 Y:-56 Z:56            ; do
  3907.     GeometryContactPoint = X:0  Y:-56 Z:0            ; kindly
  3908.     GeometryContactPoint = X:0  Y:-25 Z:56            ; note the
  3909.     GeometryContactPoint = X:0  Y:  0 Z:0 Ram        ; butterfly
  3910.     GeometryContactPoint = X:0  Y: 25 Z:56            ; symmetry
  3911.     GeometryContactPoint = X:0  Y: 56 Z:0            ; please
  3912.     GeometryContactPoint = X:12 Y: 56 Z:56            ; ta
  3913.     GeometryContactPoint = X:25 Y: 56 Z:0 Ram
  3914.     
  3915.     
  3916.     Shadow                = SHADOW_VOLUME
  3917. End
  3918.  
  3919. ;--------------------------------------------------------------------------------------
  3920.  
  3921. Object gateProxy
  3922.  
  3923.     ;ART---------------------
  3924.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  3925.         OkToChangeModelColor  = Yes
  3926.         UseStandardModelNames = Yes
  3927.         DefaultModelConditionState
  3928.             Model = None
  3929.         End
  3930.     End
  3931.  
  3932.     ;DESIGN------------------
  3933.     DisplayName      = OBJECT:GBMgatedoor
  3934.     Side = Civilian
  3935.     EditorSorting   = SYSTEM
  3936.  
  3937.     VisionRange         = 400.0          ; should match proxy
  3938.     CommandSet = CastleGateCommandSet
  3939.  
  3940.     ;ENGINEERING-------------
  3941.     KindOf                = IMMOBILE UNATTACKABLE SELECTABLE INERT INERT_SHROUD_REVEALER
  3942.     Behavior = GateProxyBehavior ModuleTag_GATE
  3943.     End
  3944.     
  3945.     Geometry              = BOX
  3946.     GeometryMajorRadius   = 0.0
  3947.     GeometryMinorRadius   = 0.0
  3948.     GeometryHeight        = 36.0 ;should be close or same as the gate to which this is proxy
  3949.     GeometryIsSmall       = Yes
  3950.  
  3951.     
  3952. End
  3953.  
  3954. ;Gondor Base Defence Foundation -- the area where faction rohan buildings can be built on
  3955. Object GondorBaseDefenceFoundation
  3956.  
  3957.     SelectPortrait = BPGCamp_Plot
  3958.   ; *** ART Parameters ***
  3959.  
  3960.     Scale = 0.7
  3961.   
  3962.     Draw = W3DScriptedModelDraw ModuleTag_Draw2
  3963.         DefaultModelConditionState
  3964.             Model = OBBFoundationX
  3965.         End
  3966.         ModelConditionState = WORLD_BUILDER
  3967.               Model = GBBtlTwrM
  3968.           End
  3969.         
  3970.     End
  3971.    Draw = W3DFloorDraw ModuleTag_Draw
  3972.       ModelName = GBFoundationM
  3973.   End
  3974.  
  3975.   ;PlacementViewAngle  = 0
  3976.  
  3977.   ; ***DESIGN parameters ***
  3978.   DisplayName         = OBJECT:GondorBaseDefenseFoundation
  3979.   Side                = Men
  3980.   EditorSorting       = STRUCTURE
  3981.   ThreatLevel = 1.0
  3982.  
  3983.   BuildCost           = 1
  3984.   BuildTime           = 5.0           ; in seconds
  3985.   VisionRange         = 160.0          ; Shroud clearing distance
  3986.   ShroudClearingRange = 160
  3987.  
  3988.   CommandSet = GondorBaseDefenceFoundationCommandSet
  3989.  
  3990.   ; *** AUDIO Parameters ***
  3991.   VoiceSelect = Gui_PlotSelect2        ;Gui_PlotSelect
  3992.  
  3993.   ; *** ENGINEERING Parameters ***
  3994.   RadarPriority       = STRUCTURE
  3995.   KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION BASE_DEFENSE_FOUNDATION UNATTACKABLE MP_COUNT_FOR_VICTORY NO_COLLIDE DO_NOT_CLASSIFY
  3996.  
  3997.   Behavior            = FoundationAIUpdate ModuleTag_foundationAI
  3998.   End
  3999.  
  4000.   Behavior = CastleMemberBehavior ModuleTag_CMB
  4001.   End 
  4002.  
  4003.   Body                = ImmortalBody ModuleTag_05
  4004.     MaxHealth         = 15000.0
  4005.   End
  4006.  
  4007.   Geometry              = BOX
  4008.   GeometryMajorRadius   = 24.0
  4009.   GeometryMinorRadius   = 24.0
  4010.   GeometryHeight        = 0.8
  4011.   GeometryIsSmall       = No
  4012.   Shadow                = SHADOW_VOLUME
  4013.   BuildCompletion        = PLACED_BY_PLAYER
  4014. End
  4015.  
  4016. ;------------------------------------------------------------
  4017.  
  4018. Object GondorCampKeepSymbioticBase
  4019.  
  4020.     SelectPortrait = BPGCamp
  4021.  
  4022.   ; *** ART Parameters ***
  4023.  
  4024.   Draw = W3DScriptedModelDraw ModuleTag_Draw
  4025.     OkToChangeModelColor  = Yes
  4026.     UseStandardModelNames = Yes
  4027.  
  4028.     DefaultModelConditionState  
  4029.       Model = GBCCenter_A
  4030. ;      ParticleSysBone      = glowbone01 TorchGlow
  4031. ;      ParticleSysBone     = glowbone02 furnaceSmoke
  4032.     End
  4033.     
  4034.     IdleAnimationState
  4035.         Animation             = Idle
  4036.             AnimationName     = GBCCenter_A.GBCCenter_A
  4037.             AnimationMode     = MANUAL
  4038.             AnimationBlendTime = 0            
  4039.         End
  4040.         Flags = START_FRAME_LAST
  4041.         BeginScript
  4042. ;            CurDrawableShowSubObject("FIRE02")
  4043.         EndScript
  4044.         
  4045.     End  
  4046.  
  4047. ;------------Build Up States
  4048.     ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  4049.       Model               = GBCCenter_A
  4050. ;      ParticleSysBone      = NONE BuildingDoughnutCloud
  4051.       ParticleSysBone     = NONE BuildingContructDust
  4052.     End  
  4053.  
  4054.     AnimationState          = ACTIVELY_BEING_CONSTRUCTED
  4055.         Animation
  4056.             AnimationName    = GBCCenter_A.GBCCenter_A
  4057.             AnimationMode   = MANUAL
  4058.         End
  4059.         BeginScript
  4060. ;            CurDrawableHideSubObject("FIRE02")
  4061.             CurDrawablePlaySound("GondorBarracksBeginConstruction")
  4062.         EndScript
  4063.     End
  4064.  
  4065. ;------------Build Up States
  4066.     ModelConditionState   = BASE_BUILD
  4067.       Model               = GBCCenter_A
  4068. ;      ParticleSysBone      = NONE BuildingDoughnutCloud
  4069.       ParticleSysBone     = NONE BuildingContructDust
  4070.     End  
  4071.  
  4072.     AnimationState          = BASE_BUILD
  4073.         Animation
  4074.             AnimationName = GBCCenter_A.GBCCenter_A
  4075.             AnimationMode = ONCE
  4076.             AnimationBlendTime = 0            
  4077.             AnimationSpeedFactorRange = 2.0 2.0 ; 300 frame anim, but need to shrink down to 5 seconds
  4078.         End
  4079.         BeginScript
  4080. ;            CurDrawableHideSubObject("FIRE02")
  4081.         EndScript
  4082.     End
  4083.  
  4084.     AnimationState          = JUST_BUILT
  4085.         Animation
  4086.             AnimationName = GBCCenter_A.GBCCenter_A
  4087.             AnimationMode = MANUAL            
  4088.             AnimationBlendTime = 0
  4089.         End
  4090.         Flags = START_FRAME_FIRST
  4091.         BeginScript
  4092. ;            CurDrawableHideSubObject("FIRE02")
  4093.         EndScript
  4094.     End
  4095.  
  4096.     ModelConditionState  = DAMAGED
  4097.       Model         = GBCCenter_D1  
  4098.       ParticleSysBone dustbone01 TrebuchetImpactDebris
  4099. ;      ParticleSysBone      = glowbone01 TorchGlow
  4100. ;      ParticleSysBone     = glowbone02 furnaceSmoke
  4101.     
  4102.     End
  4103.     AnimationState = DAMAGED
  4104.     EnteringStateFX    = FX_BuildingDamaged
  4105.     End
  4106.  
  4107.     ModelConditionState  = REALLYDAMAGED
  4108.       Model         = GBCCenter_D2  
  4109.       ParticleSysBone     = glowbone02 TrebuchetImpactDebris
  4110.       ParticleSysBone      = glowbone01 Explosion5
  4111.     
  4112.     End
  4113.     AnimationState = REALLYDAMAGED
  4114.     EnteringStateFX    = FX_BuildingReallyDamaged
  4115.     End
  4116.     
  4117.     ModelConditionState  = RUBBLE
  4118.       Model         = GBCCenter_D2
  4119.       ParticleSysBone dustbone01 TrebuchetImpactDebris
  4120.       ParticleSysBone      = glowbone01 Explosion5
  4121.       ParticleSysBone     = glowbone02 BuildingChunkDebris
  4122.     End
  4123.     AnimationState = RUBBLE
  4124.     End
  4125.  
  4126.       ModelConditionState  = POST_RUBBLE
  4127.         Model         = GBGenRubble
  4128.         ParticleSysBone NONE SmokeBuildingMediumRubble
  4129.     End
  4130.     AnimationState = POST_RUBBLE
  4131.     End
  4132.     
  4133.     ModelConditionState  = POST_COLLAPSE
  4134.         Model         = GBGenRubble
  4135.         ParticleSysBone NONE SmokeBuildingMediumRubble
  4136.     End
  4137.     AnimationState = POST_COLLAPSE
  4138.     End
  4139.  
  4140.   End
  4141.  
  4142.  
  4143.     ; *** AUDIO Parameters ***
  4144.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4145.  
  4146.     VoiceSelect = GondorCitadelSelect
  4147.  
  4148.     SoundOnDamaged            = BuildingLightDamageStone
  4149.     SoundOnReallyDamaged        = BuildingHeavyDamageStone
  4150.  
  4151.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  4152.  
  4153.     UnitSpecificSounds
  4154.         UnderConstruction        = BuildingConstructionLoop  ; Built first time
  4155.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  4156.         UnderRepairFromRubble    = BuildingConstructionLoop    ; Repaired from completely destroyed (not used???)
  4157.     End
  4158.  
  4159.     EvaEventDieOwner = CitadelDie
  4160.     CampnessValue = CAMPNESS_WALL
  4161.  
  4162.  
  4163.     ; ***DESIGN parameters ***
  4164.     DisplayName        = OBJECT:GondorCampKeep
  4165.     Side            = Men
  4166.     EditorSorting    = STRUCTURE
  4167.     ThreatLevel        = 1.0
  4168.     BuildCost       = 1000
  4169.     BuildTime       = 20.0           ; in seconds
  4170.     CommandSet        = GenericKeepCommandSet
  4171.  
  4172.     ArmorSet
  4173.         Conditions        = None
  4174.         Armor             = StructureArmor
  4175.         DamageFX          = None
  4176.     End
  4177.  
  4178.     ; *** ENGINEERING Parameters ***  
  4179.     KindOf            = STRUCTURE SELECTABLE IMMOBILE CASTLE_KEEP MP_COUNT_FOR_VICTORY AUTO_RALLYPOINT
  4180.     RadarPriority        = STRUCTURE
  4181.     Body              = ActiveBody ModuleTag_ActiveBody
  4182.         MaxHealth       = 5000.0
  4183.     End
  4184.  
  4185.     Behavior = GettingBuiltBehavior ModuleTag_04
  4186.         WorkerName    = GondorWorkerNoSelect
  4187.         SpawnTimer  = 15
  4188.         RebuildWhenDead = Yes
  4189.         ; SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  4190.         ;SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  4191.         ;SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  4192.     End
  4193.  
  4194.     Behavior = CastleMemberBehavior ModuleTag_CMB
  4195.         BeingBuiltSound = BuildingConstructionLoop
  4196.     End 
  4197.  
  4198.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  4199.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  4200.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  4201.   Behavior = KeepObjectDie ModuleTag_IWantRubble
  4202.   End
  4203.   
  4204.      Behavior                  = StructureCollapseUpdate ModuleTag_06
  4205.        MinCollapseDelay        = 000
  4206.        MaxCollapseDelay        = 000
  4207.        CollapseDamping         = .5
  4208.        MaxShudder              = 0.6
  4209.        MinBurstDelay           = 250
  4210.        MaxBurstDelay           = 800
  4211.        BigBurstFrequency       = 4
  4212.        FXList                  = INITIAL   FX_StructureMediumCollapse
  4213.      End
  4214.  
  4215.     Behavior                  = RubbleRiseUpdate ModuleTag_07
  4216.         MinRubbleRiseDelay      = 000
  4217.         MaxRubbleRiseDelay      = 000
  4218.         ;RubbleRiseDamping       = .5
  4219.         RubbleHeight            = 4.0
  4220.         MaxShudder              = 0.6
  4221.         MinBurstDelay           = 250
  4222.         MaxBurstDelay           = 800
  4223.         BigBurstFrequency       = 4
  4224.         FXList                  = INITIAL FX_StructureMediumCollapse
  4225.     End  
  4226.   
  4227.   Geometry              = CYLINDER
  4228.   GeometryMajorRadius   = 16.0
  4229.   GeometryMinorRadius   = 16.0
  4230.   GeometryHeight        = 88.0
  4231.   GeometryIsSmall       = No
  4232.   Shadow                = SHADOW_VOLUME
  4233. End
  4234.  
  4235.  
  4236.  
  4237. ChildObject GondorCampKeepSymbioticA GondorCampKeepSymbioticBase
  4238.     Body              = ActiveBody ModuleTag_ActiveBody
  4239.         MaxHealth       = 5000.0
  4240.     End
  4241.  
  4242. End
  4243. ChildObject GondorCampKeepSymbioticB GondorCampKeepSymbioticBase
  4244.     Body              = SymbioticStructuresBody ModuleTag_SymbioticBody
  4245.         Symbiote = KeepLeft
  4246.     End
  4247. End
  4248.  
  4249. ;------------------------------------------------------------------------------
  4250. Object CastleBookEnd
  4251.   
  4252.   SelectPortrait = BRCastleWall
  4253.   ; *** ART Parameters ***
  4254.   Draw = W3DScriptedModelDraw ModuleTag_01
  4255.     OkToChangeModelColor = Yes
  4256.     
  4257.     WallBoundsMesh = P1
  4258.             
  4259.     DefaultModelConditionState
  4260.       Model = GBMinwallBE
  4261.     End
  4262.   End
  4263.  
  4264.   ; ***DESIGN parameters ***
  4265.  
  4266.   DisplayName      = OBJECT:GondorCastleWall
  4267.   Side = Men
  4268.   EditorSorting = STRUCTURE
  4269. ; Browser = CINEMATICS UNIT
  4270.  
  4271.  
  4272.   VisionRange         = 0.0          ; Shroud clearing distance
  4273.   ShroudClearingRange = 0
  4274.  
  4275.     ; *** AUDIO Parameters ***
  4276.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4277.   
  4278.     CampnessValue = CAMPNESS_WALL
  4279.  
  4280.   ; *** ENGINEERING Parameters ***  
  4281.     KindOf                    = STRUCTURE IMMOBILE WALK_ON_TOP_OF_WALL NOT_AUTOACQUIRABLE IGNORE_FOR_VICTORY NEVER_CULL_FOR_MP
  4282.     RadarPriority            = NOT_ON_RADAR
  4283.     KeepSelectableWhenDead    = Yes
  4284.  
  4285.  
  4286.   Body                = StructureBody ModuleTag_03
  4287.     MaxHealth         = ROHAN_CASTLE_WALL_HEALTH
  4288.   End
  4289.  
  4290.  
  4291.   
  4292.   ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  4293.   ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  4294.   ; buildings automatically stick around because GarrisonContain has it's own DieModule
  4295. ;  Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
  4296. ;      DestructionDelay  = 5000
  4297. ;  End
  4298.  
  4299.    
  4300.     
  4301.       
  4302.   Geometry              = BOX
  4303.   GeometryMajorRadius   = 35.0
  4304.   GeometryMinorRadius   = 19.0
  4305.   GeometryHeight        = 7.0
  4306.  
  4307.   
  4308.   GeometryIsSmall       = No
  4309.   ;GeometryRotationAnchorOffset = X:1037.871 Y:0
  4310.   Shadow                = SHADOW_VOLUME
  4311.   
  4312.  
  4313. End
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331. //;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4332. //;;                                                          ;;
  4333. //;;    CASTLE WALL PIECES FOR THE NEW WALL BUILD SYSTEM      ;;
  4334. //;;                                                          ;;
  4335. //;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4336. Object GondorCastleWallSegment
  4337.   
  4338.   ; *** ART Parameters ***
  4339.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  4340.         OkToChangeModelColor  = Yes
  4341.         UseStandardModelNames = Yes
  4342.         
  4343.         DefaultModelConditionState
  4344.             Model = GBWallSeg
  4345.         End
  4346.           
  4347.         WallBoundsMesh = P1 
  4348.         
  4349.     
  4350. ;        IdleAnimationState
  4351. ;            Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT    
  4352. ;            Animation                =    ReallyDamagedanimation
  4353. ;                AnimationName        =     GBWallrampart.GBWallrampart
  4354. ;                AnimationMode        =    LOOP
  4355.  ;              End
  4356.   ;             StateName = STATE_None
  4357. ;        End    
  4358.         
  4359.     End
  4360.    
  4361.   ; ***DESIGN parameters ***
  4362.   DisplayName         = OBJECT:GondorCastleWallSegment
  4363.   Side                = Men
  4364.   EditorSorting       = STRUCTURE
  4365.   ThreatLevel = 1.0
  4366.  
  4367.   BuildCost           = GONDOR_WALL_SEGMENT_COST
  4368.   BuildTime           = 10.0           ; in seconds
  4369.   VisionRange         = 160.0          ; Shroud clearing distance
  4370.   ShroudClearingRange = 160
  4371.     CommandSet = MenWallUpgradeNodeCommandSet
  4372.  
  4373.   ; *** AUDIO Parameters ***
  4374.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4375.     SoundOnDamaged        = BuildingLightDamageStone
  4376.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  4377.        CampnessValue = CAMPNESS_WALL
  4378.  
  4379.   ; *** ENGINEERING Parameters ***
  4380.   RadarPriority       = STRUCTURE
  4381.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_SEGMENT SCALEABLE_WALL MADE_OF_STONE WALK_ON_TOP_OF_WALL 
  4382.   
  4383.   ThreatBreakdown GondorCastleWallSegment_DetailedThreat
  4384.         AIKindOf = WALL
  4385.   End
  4386.  
  4387.   Behavior            = GettingBuiltBehavior ModuleTag_04
  4388.     RebuildTimeSeconds = 30
  4389.     SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  4390.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  4391.     SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  4392.   End
  4393.  
  4394.   Body                = StructureBody ModuleTag_05
  4395.     MaxHealth         = 1500.0
  4396.   End
  4397.  
  4398.     // These should always appear together on wall segments
  4399.     Behavior = KeepObjectDie ModuleTag_IWantRubble 
  4400.         DeathTypes            = ALL -SUICIDED
  4401.     End
  4402.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  4403.         DeathTypes            = NONE +SUICIDED
  4404.         DestructionDelay = 5000
  4405.     End                                                
  4406.     // These should always appear together on wall segments
  4407.  
  4408.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Hub
  4409.         ReplaceWith = GondorCastleWallHub
  4410.         TriggeredBy = Upgrade_MenWallHub
  4411.         ConflictsWith = Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  4412.     End
  4413.         
  4414.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Gate
  4415.         ReplaceWith = MenWallGate
  4416.         TriggeredBy = Upgrade_MenWallRegularGate
  4417.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  4418.     End
  4419.  
  4420.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_PosternGate
  4421.         ReplaceWith = MenWallPosternGate
  4422.         TriggeredBy = Upgrade_MenWallPosternGate
  4423.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  4424.     End
  4425.  
  4426.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Tower
  4427.         ReplaceWith = GondorCastleWallTower
  4428.         TriggeredBy = Upgrade_MenWallTower
  4429.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTrebuchet
  4430.     End
  4431.  
  4432.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Trebuchet
  4433.         ReplaceWith = GondorCastleWallTrebuchet
  4434.         TriggeredBy = Upgrade_MenWallTrebuchet
  4435.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower
  4436.     End
  4437.  
  4438.     Behavior = ProductionUpdate ModuleTag_RequiredForUpgradeProduction
  4439.     End
  4440.  
  4441.  
  4442.   Geometry              = BOX
  4443.   GeometryMajorRadius   = 25.0 
  4444.   GeometryMinorRadius   = 20.0 ; must be a multiple of 20
  4445.   GeometryHeight        = 50
  4446.   GeometryIsSmall       = No
  4447.   Shadow                = SHADOW_VOLUME
  4448.   BuildCompletion     = PLACED_BY_PLAYER
  4449. End
  4450.  
  4451.  
  4452. Object MenWallRamp
  4453.   
  4454.   ; *** ART Parameters ***
  4455.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  4456.         OkToChangeModelColor  = Yes
  4457.         UseStandardModelNames = Yes
  4458.         
  4459.         
  4460.         
  4461.         
  4462.         DefaultModelConditionState
  4463.             Model = GBWallRamp
  4464.         End
  4465.         
  4466.         WallBoundsMesh = P1
  4467.         RampMesh1 = R1
  4468.         RampMesh2 = R2
  4469.     
  4470.         IdleAnimationState
  4471.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  4472.             Animation                =    ReallyDamagedanimation
  4473.                 AnimationName        =     GBWallrampart.GBWallrampart
  4474.                 AnimationMode        =    LOOP
  4475.                End
  4476.                StateName = STATE_None
  4477.         End    
  4478.         
  4479.     End
  4480.    
  4481.   ; ***DESIGN parameters ***
  4482.   DisplayName         = OBJECT:GondorCastleWallSegment
  4483.   Side                = Men
  4484.   EditorSorting       = STRUCTURE
  4485.   ThreatLevel = 1.0
  4486.  
  4487.   BuildCost           = GONDOR_WALL_SEGMENT_COST
  4488.   BuildTime           = 10.0           ; in seconds
  4489.   VisionRange         = 160.0          ; Shroud clearing distance
  4490.   ShroudClearingRange = 160
  4491.  
  4492.   ; *** AUDIO Parameters ***
  4493.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4494.     SoundOnDamaged        = BuildingLightDamageStone
  4495.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  4496.     CampnessValue = CAMPNESS_WALL
  4497.  
  4498.   ; *** ENGINEERING Parameters ***
  4499.   RadarPriority       = STRUCTURE
  4500.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_SEGMENT SCALEABLE_WALL MADE_OF_STONE WALK_ON_TOP_OF_WALL
  4501.   
  4502.   ThreatBreakdown MenWallRamp_DetailedThreat
  4503.         AIKindOf = WALL
  4504.   End
  4505.  
  4506.   Behavior            = GettingBuiltBehavior ModuleTag_04
  4507.     RebuildTimeSeconds = 30
  4508.     SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  4509.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  4510.     SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  4511.   End
  4512.  
  4513.   Body                = StructureBody ModuleTag_05
  4514.     MaxHealth         = 1500.0
  4515.   End
  4516.  
  4517.     // These should always appear together on wall segments
  4518.     Behavior = KeepObjectDie ModuleTag_IWantRubble 
  4519.         DeathTypes            = ALL -SUICIDED
  4520.     End
  4521.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  4522.         DeathTypes            = NONE +SUICIDED
  4523.         DestructionDelay = 5000
  4524.     End                                                
  4525.     // These should always appear together on wall segments
  4526.  
  4527.   Geometry              = BOX
  4528.   GeometryMajorRadius   = 25.0 
  4529.   GeometryMinorRadius   = 60.0 ; must be a multiple of 20
  4530.   GeometryHeight        = 50
  4531.   GeometryIsSmall       = No
  4532.   Shadow                = SHADOW_VOLUME
  4533.   BuildCompletion     = PLACED_BY_PLAYER
  4534. End
  4535.  
  4536.  
  4537.  
  4538. ;---------------------------------------------
  4539. Object MenWallGate
  4540.   ; *** ART Parameters ***
  4541.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  4542.         OkToChangeModelColor  = Yes
  4543.         UseStandardModelNames = Yes
  4544.         DefaultModelConditionState
  4545.             Model = GBWallGate
  4546.         End
  4547.         
  4548.     ;    WallBoundsMesh = P1
  4549.         RampMesh1 = R1
  4550.         RampMesh2 = R2
  4551.         
  4552.         IdleAnimationState
  4553.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  4554.             Animation                =    ReallyDamagedanimation
  4555.                 AnimationName        =     GBWallrampart.GBWallrampart
  4556.                 AnimationMode        =    LOOP
  4557.                End
  4558.                StateName = STATE_None
  4559.         End    
  4560.         
  4561.     End
  4562.  
  4563.     ; ***DESIGN parameters ***
  4564.     DisplayName         = OBJECT:GondorCastleWallSegment
  4565.     Side                = Men
  4566.     EditorSorting       = STRUCTURE
  4567.     ThreatLevel = 1.0
  4568.      
  4569.     BuildCost           = 30
  4570.     BuildTime           = 5.0           ; in seconds
  4571.     VisionRange         = 160.0          ; Shroud clearing distance
  4572.     ShroudClearingRange = 160
  4573.     CommandSet            = CastleGateCommandSet
  4574.  
  4575.  
  4576.         
  4577.  
  4578.     ; *** AUDIO Parameters ***
  4579.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4580.     SoundOnDamaged        = BuildingLightDamageStone
  4581.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  4582.     CampnessValue = CAMPNESS_WALL
  4583.  
  4584.     ; *** ENGINEERING Parameters ***
  4585.     RadarPriority       = STRUCTURE
  4586.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_HUB MADE_OF_STONE BLOCKING_GATE WALL_GATE
  4587.  
  4588.     Behavior            = GettingBuiltBehavior ModuleTag_04
  4589.         UseSpawnTimerWithoutWorker         = Yes
  4590.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  4591.         ;RebuildTimeSeconds = 30
  4592.         SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  4593.         SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  4594.         SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  4595.     End
  4596.  
  4597.     Body                = StructureBody ModuleTag_05
  4598.         MaxHealth         = 1500.0
  4599.     End
  4600.      
  4601.     Behavior            = DestroyDie ModuleTag_07
  4602.         ;nothing
  4603.     End
  4604.     
  4605.     Behavior = GateOpenAndCloseBehavior ModuleTag_GATE
  4606.         ResetTimeInMilliseconds            = 3000                ;important! this must be longer than the gates animation, ir it will twitch
  4607.         OpenByDefault                    = No
  4608.         PercentOpenForPathing            = 50
  4609.         SoundOpeningGateLoop            = GateOpenStart
  4610.         SoundClosingGateLoop            = GateCloseStart
  4611.         SoundFinishedOpeningGate        = GateOpenEnd
  4612.         SoundFinishedClosingGate        = GateCloseEnd
  4613.         TimeBeforePlayingOpenSound        = 9500
  4614.         TimeBeforePlayingClosedSound    = 9500
  4615.     End
  4616.     
  4617.     Behavior = FakePathfindPortalBehaviour ModuleTag_FAKEPATHFIND
  4618.         AllowEnemies            = No
  4619.         AllowNonSkirmishAIUnits    = No
  4620.     End
  4621.  
  4622.     // New way -- ReinforcedGate is an attribute modifier that is included by NumenorStonework    
  4623.     Behavior = AttributeModifierUpgrade ModuleTag_ReinforcedNew
  4624.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  4625.         AttributeModifier        = ReinforcedGate_Bonus
  4626.     End
  4627.     
  4628.     Behavior = AIGateUpdate ModuleTage_AIGateUpdate
  4629.         TriggerWidthX = 200.0
  4630.         TriggerWidthY = 100.0
  4631.     End
  4632.     
  4633.     GeometryIsSmall          = No
  4634.  
  4635.     ; Main
  4636.     AdditionalGeometry    = BOX
  4637.     GeometryName          = "Closed"
  4638.     GeometryMajorRadius   = 25.0  
  4639.     GeometryMinorRadius   = 95.0  
  4640.     GeometryHeight        = 50
  4641.     
  4642.     ; Left open
  4643.     AdditionalGeometry    = BOX
  4644.     GeometryName          = "OpenLeft"
  4645.     GeometryMajorRadius   = 25.0  
  4646.     GeometryMinorRadius   = 24.0  
  4647.     GeometryHeight        = 50
  4648.     GeometryOffset        = X:0 Y:-70 Z:0
  4649.     
  4650.     ; Right open
  4651.     AdditionalGeometry    = BOX
  4652.     GeometryName          = "OpenRight"
  4653.     GeometryMajorRadius   = 25.0  
  4654.     GeometryMinorRadius   = 24.0  
  4655.     GeometryHeight        = 50
  4656.     GeometryOffset        = X:0 Y:70 Z:0
  4657.     
  4658.     Shadow                = SHADOW_VOLUME
  4659.     BuildCompletion     = PLACED_BY_PLAYER
  4660. End
  4661. ;---------------------------------------------
  4662. Object MenWallPosternGate
  4663.   ; *** ART Parameters ***
  4664.   
  4665.       SelectPortrait = BPGWall_Wall
  4666.   
  4667.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  4668.         
  4669.         OkToChangeModelColor  = Yes
  4670.         UseStandardModelNames = Yes
  4671.         
  4672.         ExtraPublicBone = Post01
  4673.         ExtraPublicBone = Post02
  4674.         ExtraPublicBone = Post03
  4675.         ExtraPublicBone = Post04
  4676.         
  4677.         DefaultModelConditionState
  4678.             Model = GBWallPG
  4679.         End
  4680.         
  4681.         WallBoundsMesh = P1
  4682.         
  4683.         IdleAnimationState
  4684.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  4685.             Animation                =    ReallyDamagedanimation
  4686.                 AnimationName        =     GBWallrampart.GBWallrampart
  4687.                 AnimationMode        =    LOOP
  4688.                End
  4689.                StateName = STATE_None
  4690.         End    
  4691.         
  4692.     End
  4693.  
  4694.     ; ***DESIGN parameters ***
  4695.     DisplayName         = OBJECT:GondorCastleWallSegment
  4696.     Side                = Men
  4697.     EditorSorting       = STRUCTURE
  4698.     ThreatLevel = 1.0
  4699.      
  4700.     BuildCost           = 30
  4701.     BuildTime           = 5.0           ; in seconds
  4702.     VisionRange         = 160.0          ; Shroud clearing distance
  4703.     ShroudClearingRange = 160
  4704.  
  4705.  
  4706.  
  4707.         
  4708.  
  4709.     ; *** AUDIO Parameters ***
  4710.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4711.     SoundOnDamaged        = BuildingLightDamageStone
  4712.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  4713.     CampnessValue = CAMPNESS_WALL
  4714.  
  4715.     ; *** ENGINEERING Parameters ***
  4716.     RadarPriority       = STRUCTURE
  4717.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_HUB MADE_OF_STONE WALK_ON_TOP_OF_WALL WALL_GATE
  4718.  
  4719.     Behavior            = GettingBuiltBehavior ModuleTag_04
  4720.         UseSpawnTimerWithoutWorker         = Yes
  4721.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  4722.         ;RebuildTimeSeconds = 30
  4723.         SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  4724.         SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  4725.         SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  4726.     End
  4727.  
  4728.     Body                = StructureBody ModuleTag_05
  4729.         MaxHealth         = 1500.0
  4730.     End
  4731.      
  4732.     Behavior            = DestroyDie ModuleTag_07
  4733.         ;nothing
  4734.     End
  4735.  
  4736.     Behavior = DynamicPortalBehaviour PosternGatePortal
  4737.         ActivationDelaySeconds    = 0.0
  4738.         GenerateNow                = Yes
  4739.         
  4740.         ObjectFilter    = POSTERNGATE_ALLOWABLE_OBJECTFILTER
  4741.         BonePrefix        = Post
  4742.         NumberOfBones    = 4
  4743.         WayPoint        = Index:0    Type:Walk    ; 0
  4744.         WayPoint        = Index:1    Type:Walk    ; 1
  4745.         WayPoint        = Index:2    Type:Walk    ; 2
  4746.         WayPoint        = Index:3    Type:Walk    ; 3
  4747.         WayPoint        = Index:2    Type:Walk    ; 4
  4748.         WayPoint        = Index:1    Type:Walk    ; 5
  4749.         Link            = From:0 Via:4 Via:5 To:3
  4750.         Link            = From:3 Via:1 Via:2 To:0
  4751.     End
  4752.     
  4753.     GeometryIsSmall            = No
  4754.     
  4755.     Geometry              = BOX
  4756.     GeometryMajorRadius   = 25.0  
  4757.     GeometryMinorRadius   = 98.0 ; must be a multiple of 20
  4758.     GeometryHeight        = 50
  4759.  
  4760.     AdditionalGeometry    = CYLINDER
  4761.     GeometryMajorRadius   = 40.0 
  4762.     GeometryMinorRadius   = 40.0 
  4763.     GeometryHeight        = 50.0
  4764.     
  4765.     Shadow                = SHADOW_VOLUME
  4766.     BuildCompletion     = PLACED_BY_PLAYER
  4767. End
  4768. ;---------------------------------------------
  4769. Object GondorCastleWallTower
  4770.   ; *** ART Parameters ***
  4771.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  4772.         OkToChangeModelColor  = Yes
  4773.         UseStandardModelNames = Yes
  4774.         
  4775.         ExtraPublicBone = Arrow_01
  4776.         ExtraPublicBone = Arrow_02
  4777.         ExtraPublicBone = Arrow_03
  4778.         ExtraPublicBone = Arrow_04
  4779.         ExtraPublicBone = Arrow_05
  4780.         ExtraPublicBone = Arrow_06
  4781.         ExtraPublicBone = Arrow_07
  4782.         ExtraPublicBone = Arrow_08
  4783.         ExtraPublicBone = Arrow_09
  4784.         ExtraPublicBone = Arrow_10
  4785.         ExtraPublicBone = Arrow_11
  4786.         ExtraPublicBone = Arrow_12
  4787.         
  4788.         DefaultModelConditionState
  4789.             Model = GBWallTwr
  4790.         End
  4791.         
  4792.         WallBoundsMesh = P1
  4793. ;        RampMesh1 = R1
  4794. ;        RampMesh2 = R2
  4795.         
  4796.         IdleAnimationState
  4797.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  4798.             Animation                =    ReallyDamagedanimation
  4799.                 AnimationName        =     GBWallrampart.GBWallrampart
  4800.                 AnimationMode        =    LOOP
  4801.                End
  4802.                StateName = STATE_None
  4803.         End    
  4804.         
  4805.     End
  4806.  
  4807.     ; ***DESIGN parameters ***
  4808.     DisplayName         = OBJECT:GondorCastleWallSegment
  4809.     Side                = Men
  4810.     EditorSorting       = STRUCTURE
  4811.     ThreatLevel            = 1.0
  4812.      
  4813.     BuildCost           = MEN_WALLTOWER_SMALL_BUILDCOST
  4814.     BuildTime           = MEN_WALLTOWER_SMALL_BUILDTIME           ; in seconds
  4815.     VisionRange         = VISION_BASE_DEFENSE          ; Shroud clearing distance
  4816.     ShroudClearingRange = SHROUD_CLEAR_BASE_DEFENSE
  4817.  
  4818.  
  4819.  
  4820.         
  4821.  
  4822.     ; *** AUDIO Parameters ***
  4823.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4824.     SoundOnDamaged        = BuildingLightDamageStone
  4825.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  4826.     CampnessValue = CAMPNESS_WALL
  4827.  
  4828.     ; *** ENGINEERING Parameters ***
  4829.     RadarPriority       = STRUCTURE
  4830.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_HUB MADE_OF_STONE CAN_ATTACK WALK_ON_TOP_OF_WALL
  4831.  
  4832.     ThreatBreakdown GondorCastleWallTower_DetailedThreat
  4833.         AIKindOf = WALL
  4834.     End
  4835.     
  4836.     WeaponSet
  4837.         Weapon                = PRIMARY CastleWallUpgradeBow
  4838.         Conditions            = None
  4839.         AutoChooseSources    = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
  4840.     End
  4841.     
  4842.     Behavior = AIUpdateInterface ModuleTag_SoWeCanUseWeapon
  4843.          AutoAcquireEnemiesWhenIdle    = Yes
  4844.          MoodAttackCheckRate            = 250
  4845.      End
  4846.  
  4847.     Behavior            = GettingBuiltBehavior ModuleTag_04
  4848.         UseSpawnTimerWithoutWorker         = Yes
  4849.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  4850.         ;RebuildTimeSeconds = 30
  4851.         SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  4852.         SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  4853.         SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  4854.     End
  4855.  
  4856.     Body                = StructureBody ModuleTag_05
  4857.         MaxHealth         = 1500.0
  4858.     End
  4859.      
  4860.     Behavior            = DestroyDie ModuleTag_07
  4861.         ;nothing
  4862.     End
  4863.     
  4864.     GeometryIsSmall       = No
  4865.  
  4866.     Geometry              = BOX
  4867.     GeometryMajorRadius   = 25.0  
  4868.     GeometryMinorRadius   = 98.0 ; must be a multiple of 20
  4869.     GeometryHeight        = 50
  4870.  
  4871.     AdditionalGeometry    = CYLINDER
  4872.     GeometryMajorRadius   = 40.0 
  4873.     GeometryMinorRadius   = 40.0 
  4874.     GeometryHeight        = 50.0
  4875.     
  4876.     Shadow                = SHADOW_VOLUME
  4877.     BuildCompletion     = PLACED_BY_PLAYER
  4878. End
  4879. ;---------------------------------------------
  4880. Object GondorCastleWallTrebuchet
  4881.  
  4882.     // *** ART Parameters ***
  4883.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  4884.         
  4885.         OkToChangeModelColor    = Yes
  4886.         UseStandardModelNames    = Yes
  4887.         WallBoundsMesh            = P1
  4888.         
  4889.         DefaultModelConditionState
  4890.             Model = GBWallTreb
  4891.         End
  4892.     End
  4893.  
  4894.     // ***DESIGN parameters ***
  4895.     DisplayName         = OBJECT:GondorCastleWallSegment
  4896.     Side                = Men
  4897.     EditorSorting       = STRUCTURE
  4898.     ThreatLevel            = 1.0
  4899.      
  4900.     BuildCost           = 30
  4901.     BuildTime           = 5.0    // in seconds
  4902.     VisionRange         = 160.0    // Shroud clearing distance
  4903.     ShroudClearingRange = 160
  4904.  
  4905.     CommandSet = SellableCommandSet
  4906.  
  4907.     // *** AUDIO Parameters ***
  4908.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  4909.     SoundOnDamaged                = BuildingLightDamageStone
  4910.     SoundOnReallyDamaged        = BuildingHeavyDamageStone
  4911.     CampnessValue = CAMPNESS_WALL
  4912.  
  4913.     // *** ENGINEERING Parameters ***
  4914.     RadarPriority       = STRUCTURE
  4915.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_HUB MADE_OF_STONE WALK_ON_TOP_OF_WALL
  4916.  
  4917.     Behavior            = GettingBuiltBehavior ModuleTag_04
  4918.         UseSpawnTimerWithoutWorker         = Yes
  4919.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  4920.         ;RebuildTimeSeconds = 30
  4921.         SelfBuildingLoop            = BuildingConstructionLoop    // Only played if we DON'T spawn a worker
  4922.         SelfRepairFromDamageLoop    = NoSound                    // This doesn't cause an animation, so don't bother playing a sound
  4923.         SelfRepairFromRubbleLoop    = BuildingConstructionLoop
  4924.     End
  4925.     
  4926.     Behavior = OCLUpdate MakeTheTreb
  4927.         OCL            = OCL_TrebuchetUpgrade
  4928.         MinDelay    = 1500
  4929.         MaxDelay    = 1500
  4930.         Amount        = 1
  4931.     End
  4932.  
  4933.     Body                = StructureBody ModuleTag_05
  4934.         MaxHealth         = 1500.0
  4935.     End
  4936.      
  4937.     Behavior            = DestroyDie ModuleTag_07
  4938.         ;nothing
  4939.     End
  4940.  
  4941.     GeometryIsSmall            = No
  4942.  
  4943.     Geometry              = BOX
  4944.     GeometryMajorRadius   = 25.0  
  4945.     GeometryMinorRadius   = 98.0 ; must be a multiple of 20
  4946.     GeometryHeight        = 50
  4947.  
  4948.     AdditionalGeometry    = CYLINDER
  4949.     GeometryMajorRadius   = 40.0 
  4950.     GeometryMinorRadius   = 40.0 
  4951.     GeometryHeight        = 50.0
  4952.     
  4953.     Shadow                = SHADOW_VOLUME
  4954.     BuildCompletion     = PLACED_BY_PLAYER
  4955. End
  4956.  
  4957.  
  4958. ;---------------------------------------------
  4959. Object GondorCastleWallHub
  4960.   
  4961.   Scale = 1.2
  4962.   
  4963.   ; *** ART Parameters ***
  4964.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  4965.         OkToChangeModelColor  = Yes
  4966.         UseStandardModelNames = Yes
  4967.         DefaultModelConditionState
  4968.             Model = GBWallrampart
  4969.         End
  4970.         
  4971.         WallBoundsMesh = P1
  4972.     ;    RampMesh1 = R1
  4973.     ;    RampMesh2 = R2
  4974.                 
  4975.         IdleAnimationState
  4976.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  4977.             Animation                =    ReallyDamagedanimation
  4978.                 AnimationName        =     GBWallrampart.GBWallrampart
  4979.                 AnimationMode        =    LOOP
  4980.                End
  4981.                StateName = STATE_None
  4982.         End    
  4983.         
  4984.     End
  4985.  
  4986.   ; ***DESIGN parameters ***
  4987.   DisplayName         = OBJECT:GondorCastleWallHub
  4988.   Side                = Men
  4989.   EditorSorting       = STRUCTURE
  4990.   ThreatLevel = 1.0
  4991.  
  4992.   BuildCost           = GONDOR_WALL_HUB_COST
  4993.   BuildTime           = MEN_WALLHUB_SMALL_BUILDTIME          ; in seconds
  4994.   VisionRange         = 160.0          ; Shroud clearing distance
  4995.   ShroudClearingRange = 160
  4996.  
  4997.  
  4998.  
  4999.     CommandSet = GondorCastleWallHubCommandSet
  5000.     
  5001.  
  5002.   ; *** AUDIO Parameters ***
  5003.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  5004.     SoundOnDamaged        = BuildingLightDamageStone
  5005.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  5006.     CampnessValue = CAMPNESS_WALL
  5007.  
  5008.   ; *** ENGINEERING Parameters ***
  5009.   RadarPriority       = STRUCTURE
  5010.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_HUB MADE_OF_STONE WALK_ON_TOP_OF_WALL
  5011.   
  5012.   ThreatBreakdown GondorCastleWallHub_DetailedThreat
  5013.         AIKindOf = WALL
  5014.   End
  5015.  
  5016.   Behavior            = GettingBuiltBehavior ModuleTag_04
  5017.     RebuildTimeSeconds = 30
  5018.     SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  5019.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  5020.     SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  5021.   End
  5022.  
  5023.   Body                = StructureBody ModuleTag_05
  5024.     MaxHealth         = 1500.0
  5025.   End
  5026.  
  5027.   Behavior            = DestroyDie ModuleTag_07
  5028.     ;nothing
  5029.   End
  5030.  
  5031.     Behavior = WallHubBehavior ModuleTag_WALL_HUB
  5032.  
  5033.         Options = OPTION_ONE
  5034.         MaxBuildoutDistance = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  5035.  
  5036.         ;;This defines the pattern built on flat terrain
  5037.         SegmentTemplateName = GondorCastleWallSegment
  5038.         SegmentTemplateName = GondorCastleWallSegment
  5039.         SegmentTemplateName = GondorCastleWallSegment
  5040.         SegmentTemplateName = GondorCastleWallSegment
  5041.         SegmentTemplateName = GondorCastleWallSegment
  5042.         SegmentTemplateName = GondorCastleWallSegment
  5043.         SegmentTemplateName = GondorCastleWallSegment
  5044.         SegmentTemplateName = GondorCastleWallSegment
  5045.         SegmentTemplateName = GondorCastleWallHub
  5046.         
  5047.         HubCapTemplateName = GondorCastleWallHub
  5048.         DefaultSegmentTemplateName = GondorCastleWallSegment
  5049.  
  5050.         ;CliffCapTemplateName = [NAME]        
  5051.         ;ShoreCapTemplateName = [NAME]        
  5052.         ;BorderCapTemplateName = [NAME]        
  5053.         ;ElevatedSegmentTemplateName = [NAME]
  5054.  
  5055.     End
  5056.  
  5057.  
  5058.     Behavior = WallHubBehavior ModuleTag_Build_A_Ramp
  5059.     
  5060.         Options = OPTION_TWO
  5061.     
  5062.         ;;This defines the pattern built on flat terrain
  5063.         SegmentTemplateName = GondorCastleWallSegment
  5064.         MaxBuildoutDistance = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  5065.         
  5066.         HubCapTemplateName = MenWallRamp
  5067.         DefaultSegmentTemplateName = GondorCastleWallSegment
  5068.         
  5069.     End
  5070.  
  5071.  
  5072.     Behavior = WallHubBehavior ModuleTag_Build_A_NARROW_WALL
  5073.     
  5074.         Options = OPTION_THREE
  5075.         MaxBuildoutDistance = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  5076.     
  5077.         SegmentTemplateName = MenWallSegmentSmall
  5078.         
  5079.         HubCapTemplateName = MenWallHubSmall
  5080.         DefaultSegmentTemplateName = MenWallSegmentSmall
  5081.         
  5082.         ;CliffCapTemplateName = [NAME]        
  5083.         ;ShoreCapTemplateName = [NAME]        
  5084.         ;BorderCapTemplateName = [NAME]        
  5085.         ;ElevatedSegmentTemplateName = [NAME]
  5086.          
  5087.     End
  5088.  
  5089.   Geometry              = CYLINDER
  5090.   GeometryMajorRadius   = 50.0 
  5091.   GeometryMinorRadius   = 50.0 
  5092.   GeometryHeight        = 50.0
  5093.   GeometryIsSmall       = No
  5094.   Shadow                = SHADOW_VOLUME
  5095.   BuildCompletion     = PLACED_BY_PLAYER
  5096. End
  5097.  
  5098.  
  5099. ;---------------------------------------------------------
  5100. Object GondorCastleWallUpgradeNode
  5101.    
  5102.    ; *** ART Parameters ***
  5103.      Draw = W3DScriptedModelDraw ModuleTag_Draw
  5104.          OkToChangeModelColor  = Yes
  5105.          UseStandardModelNames = Yes
  5106.          DefaultModelConditionState
  5107.              Model = GBWallUpgrd
  5108.          End
  5109.          
  5110.          WallBoundsMesh = P1
  5111.         RampMesh1 = R1
  5112.         RampMesh2 = R2
  5113.         
  5114.         IdleAnimationState
  5115.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  5116.             Animation                =    ReallyDamagedanimation
  5117.                 AnimationName        =     GBWallrampart.GBWallrampart
  5118.                 AnimationMode        =    LOOP
  5119.                End
  5120.                StateName = STATE_None
  5121.         End    
  5122.      End 
  5123.         
  5124.     ; ***DESIGN parameters ***
  5125.     DisplayName         = OBJECT:GondorCastleWallUpgradeNode
  5126.     Side                = Gondor
  5127.     EditorSorting       = STRUCTURE
  5128.     ThreatLevel = 1.0
  5129.       
  5130.     BuildCost           = 50
  5131.     BuildTime           = 20.0           ; in seconds
  5132.     VisionRange         = 160.0          ; Shroud clearing distance
  5133.     ShroudClearingRange = 160
  5134.  
  5135.   
  5136.     CommandSet = MenWallUpgradeNodeCommandSet
  5137.      
  5138.     ; *** AUDIO Parameters ***
  5139.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  5140.     SoundOnDamaged        = BuildingLightDamageStone
  5141.     SoundOnReallyDamaged    = BuildingHeavyDamageStone
  5142.     CampnessValue = CAMPNESS_WALL
  5143.  
  5144.     ; *** ENGINEERING Parameters ***
  5145.     RadarPriority       = STRUCTURE
  5146.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_SEGMENT SCALEABLE_WALL MADE_OF_STONE WALK_ON_TOP_OF_WALL
  5147.   
  5148.     Behavior            = GettingBuiltBehavior ModuleTag_04
  5149.         RebuildTimeSeconds = 30
  5150.         SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  5151.          SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  5152.          SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  5153.         UseSpawnTimerWithoutWorker         = Yes
  5154.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  5155.     End
  5156.      
  5157.     Body                = StructureBody ModuleTag_05
  5158.         MaxHealth         = 1500.0
  5159.     End
  5160.       
  5161.     // These should always appear together on wall segments
  5162.     Behavior = KeepObjectDie ModuleTag_IWantRubble 
  5163.         DeathTypes            = ALL -SUICIDED
  5164.     End
  5165.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  5166.         DeathTypes            = NONE +SUICIDED
  5167.         DestructionDelay = 5000
  5168.     End                                                
  5169.     // These should always appear together on wall segments
  5170.  
  5171.  
  5172.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Hub
  5173.         ReplaceWith = GondorCastleWallHub
  5174.         TriggeredBy = Upgrade_MenWallHub
  5175.         ConflictsWith = Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  5176.     End
  5177.         
  5178.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Gate
  5179.         ReplaceWith = MenWallGate
  5180.         TriggeredBy = Upgrade_MenWallRegularGate
  5181.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  5182.     End
  5183.  
  5184.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_PosternGate
  5185.         ReplaceWith = MenWallPosternGate
  5186.         TriggeredBy = Upgrade_MenWallPosternGate
  5187.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  5188.     End
  5189.  
  5190.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Tower
  5191.         ReplaceWith = GondorCastleWallTower
  5192.         TriggeredBy = Upgrade_MenWallTower
  5193.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTrebuchet
  5194.     End
  5195.  
  5196.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Trebuchet
  5197.         ReplaceWith = GondorCastleWallTrebuchet
  5198.         TriggeredBy = Upgrade_MenWallTrebuchet
  5199.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower
  5200.     End
  5201.  
  5202.     Behavior = ProductionUpdate ModuleTag_RequiredForUpgradeProduction
  5203.     End
  5204.  
  5205.     Geometry              = BOX
  5206.     GeometryMajorRadius   = 25.0  
  5207.     GeometryMinorRadius   = 98.0 ; must be a multiple of 20
  5208.     GeometryHeight        = 50
  5209.  
  5210.     AdditionalGeometry    = CYLINDER
  5211.     GeometryMajorRadius   = 40.0 
  5212.     GeometryMinorRadius   = 40.0 
  5213.     GeometryHeight        = 50.0
  5214.  
  5215.    
  5216.     GeometryIsSmall       = No
  5217.     Shadow                = SHADOW_VOLUME
  5218.     BuildCompletion     = PLACED_BY_PLAYER
  5219. End
  5220.    
  5221.  
  5222.  
  5223.  
  5224. //-------------------AND   NOW   THE   SMALL   WALL   PIECES ------------------------
  5225. Object MenWallSegmentSmall
  5226.  
  5227.     SelectPortrait  =   BPGWall_Wall
  5228.     //ButtonImage  =    BGWall_Wall
  5229.   
  5230.     // *** ART Parameters ***
  5231.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  5232.         OkToChangeModelColor  = Yes
  5233.         UseStandardModelNames = Yes
  5234.         DefaultModelConditionState
  5235.             Model = GBWallN
  5236.         End
  5237.  
  5238.         ModelConditionState = SNOW BUILD_PLACEMENT_CURSOR
  5239.             Model = GBWallN_CUR
  5240.             Texture    = GBWall.tga GBWall_snow.tga
  5241.         End
  5242.                 
  5243.         ModelConditionState = BUILD_PLACEMENT_CURSOR
  5244.             Model = GBWallN_CUR
  5245.         End
  5246.  
  5247.            
  5248.         IdleAnimationState
  5249. ;            Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  5250. ;            Animation                =    ReallyDamagedanimation
  5251. ;                AnimationName        =     GBWallrampart.GBWallrampart
  5252. ;                AnimationMode        =    LOOP
  5253. ;              End
  5254. ;               StateName = STATE_None
  5255.             BeginScript
  5256.                 CurDrawableShowSubObject("ModuleTag_DrawFloor")
  5257.             EndScript
  5258.         End    
  5259.         
  5260.  
  5261.         //------------ New Build Up States coming soon. 
  5262.  
  5263.         ModelConditionState = SNOW AWAITING_CONSTRUCTION
  5264.             Model   = GBWallN_A
  5265.             Texture    = GBWall.tga GBWall_snow.tga
  5266.         End    
  5267.         
  5268.         ModelConditionState   = AWAITING_CONSTRUCTION 
  5269.             Model               = GBWallN_A
  5270.         End
  5271.         
  5272.         AnimationState        = AWAITING_CONSTRUCTION
  5273.             Animation           =  GBWallN_A
  5274.                 AnimationName     =  GBWallN_A.GBWallN_A
  5275.                 AnimationMode     = MANUAL
  5276.                 AnimationBlendTime = 0
  5277.             End
  5278.             Flags                  = START_FRAME_FIRST
  5279.             BeginScript
  5280.                 CurDrawableHideSubObject("ModuleTag_DrawFloor")
  5281.             EndScript
  5282.         End
  5283.  
  5284.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5285.             Model   = GBWallN_A
  5286.             Texture    = GBWall.tga GBFortress1_U.tga
  5287.         End    
  5288.         
  5289.         ModelConditionState = SNOW ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5290.             Model   = GBWallN_A
  5291.             Texture    = GBWall.tga GBWall_snow.tga
  5292.         End    
  5293.         
  5294.         ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5295.             Model               = GBWallN_A
  5296.             ParticleSysBone   = NONE WallConstructDust FollowBone:Yes
  5297.         End
  5298.         
  5299.         AnimationState        = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5300.             Animation           = GBWallN_A
  5301.                 AnimationName     = GBWallN_A.GBWallN_A
  5302.                 AnimationMode     = MANUAL
  5303.                 AnimationBlendTime = 0
  5304.             End
  5305.             Flags                  = START_FRAME_FIRST
  5306.             StateName              = BeingConstructed
  5307.             BeginScript
  5308.                 CurDrawableHideSubObject("ModuleTag_DrawFloor")
  5309.             EndScript
  5310.         End
  5311.  
  5312.             
  5313.         ModelConditionState  = DAMAGED
  5314.             Model         = GBWallN_D1
  5315.         End
  5316.         
  5317.         
  5318.         AnimationState = DAMAGED
  5319.             Animation            =    DamagedAnimation
  5320.                 AnimationName        =    GBWallN_D1.GBWallN_D1
  5321.                 AnimationMode        =    ONCE
  5322.                End
  5323.             EnteringStateFX    = FX_WallDamaged
  5324.         End     
  5325.  
  5326.  
  5327.         ModelConditionState  = REALLYDAMAGED
  5328.             Model         = GBWallN_D2
  5329.         End
  5330.         
  5331.         AnimationState = REALLYDAMAGED
  5332.             Animation            =    DamagedAnimation
  5333.                 AnimationName        =    GBWallN_D2.GBWallN_D2
  5334.                 AnimationMode        =    ONCE
  5335.                End
  5336.             EnteringStateFX    = FX_WallDamaged
  5337.         End     
  5338.  
  5339.         ModelConditionState  = COLLAPSING
  5340.             Model         = GBWallN_D3
  5341.         End
  5342.         
  5343.         AnimationState = COLLAPSING
  5344.               Animation                =    RubbleAnimation
  5345.                 AnimationName        =     GBWallN_D3.GBWallN_D3
  5346.                 AnimationMode        =    ONCE
  5347.               End
  5348.               ParticleSysBone NONE WallDestructionDust
  5349.             EnteringStateFX            = FX_StructureMediumCollapse
  5350.         End
  5351.  
  5352.         ModelConditionState  = RUBBLE
  5353.             Model         = None ;GBWall_Rubble
  5354.         End
  5355.         
  5356.         AnimationState = RUBBLE
  5357.             BeginScript
  5358.                 CurDrawableHideSubObject("ModuleTag_DrawFloor")
  5359.             EndScript
  5360.         End
  5361.  
  5362.         ModelConditionState  = POST_RUBBLE
  5363.             Model         = None ;GBWall_Rubble
  5364.         End
  5365.  
  5366.         ModelConditionState  = POST_COLLAPSE
  5367.             Model         = None
  5368.         End
  5369.  
  5370.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  5371.             Model        = GBWallN
  5372.             Texture        = GBWall.tga GBFortress1_U.tga
  5373.         End
  5374.  
  5375.         ModelConditionState = SNOW
  5376.             Model   = GBWallN
  5377.             Texture    = GBWall.tga GBWall_snow.tga
  5378.         End    
  5379.     End
  5380.  
  5381.     Draw = W3DScriptedModelDraw ModuleTag_Draw_Rubble
  5382.         OkToChangeModelColor  = Yes
  5383.         UseStandardModelNames = Yes
  5384.         DefaultModelConditionState
  5385.             Model = None
  5386.         End
  5387.     
  5388.         ModelConditionState  = COLLAPSING
  5389.             Model         = GBWall_Rubble
  5390.         End
  5391.         
  5392.         ModelConditionState  = RUBBLE
  5393.             Model         = GBWall_Rubble
  5394.         End
  5395.         
  5396.         ModelConditionState  = POST_RUBBLE
  5397.             Model         = GBWall_Rubble
  5398.         End
  5399.  
  5400.         ModelConditionState  = POST_COLLAPSE
  5401.             Model         = None
  5402.         End
  5403.     End
  5404.  
  5405.    
  5406.     Draw = W3DFloorDraw ModuleTag_DrawFloor    
  5407.         //StaticModelLODMode    = yes        // Will append M or L to the skin name depending on GameLOD
  5408.           ModelName                = GBWallN_Bib
  5409.           WeatherTexture            = SNOWY GBWall_Bib_Snow.tga
  5410.     End
  5411.   
  5412.     // ***DESIGN parameters ***
  5413.     DisplayName         = OBJECT:GondorCastleWallSegment
  5414.     Side                = Men
  5415.     EditorSorting       = STRUCTURE
  5416.     ThreatLevel            = 1.0
  5417.  
  5418.     CommandSet            = MenWallSegmentCommandSet
  5419.     
  5420.     ArmorSet
  5421.         Conditions        = None
  5422.         Armor             = MenWallArmor
  5423.         DamageFX          = None
  5424.     End
  5425.  
  5426.  
  5427.     BuildCost           = MEN_WALLSEGMENT_SMALL_BUILDCOST
  5428.     BuildTime           = MEN_WALLSEGMENT_SMALL_BUILDTIME
  5429.     VisionRange         = MEN_WALLSEGMENT_SMALL_VISION_RANGE
  5430.     ShroudClearingRange = MEN_WALLSEGMENT_SMALL_SHROUD_CLEAR
  5431.  
  5432.     // *** AUDIO Parameters ***
  5433.  
  5434.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  5435.  
  5436.     VoiceSelect                        = Gui_PlotSelect2
  5437.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  5438.  
  5439.     SoundOnDamaged                    = BuildingLightDamageStone
  5440.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  5441.  
  5442.     UnitSpecificSounds
  5443.         UnderConstruction        = WallConstructionLoop      ;Built first time
  5444.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  5445.         UnderRepairFromRubble    = WallConstructionLoop        ;Repaired from completely destroyed (not used???)
  5446.     End
  5447.  
  5448.     CampnessValue = CAMPNESS_WALL
  5449.  
  5450.     // *** ENGINEERING Parameters ***
  5451.     RadarPriority       = STRUCTURE
  5452.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE WALL_SEGMENT DEFENSIVE_WALL SCALEABLE_WALL MADE_OF_STONE CAN_CAST_REFLECTIONS HAS_HEALTH_BAR
  5453.       
  5454.     ThreatBreakdown MenWallSegmentSmall_DetailedThreat
  5455.         AIKindOf = WALL
  5456.     End
  5457.  
  5458.     //This is important to let the user select the rubble to begin self repair
  5459.     KeepSelectableWhenDead    = Yes
  5460.  
  5461.     Behavior            = GettingBuiltBehavior ModuleTag_04
  5462.         SelfBuildingLoop            = WallConstructionLoop            // Only played if we DON'T spawn a worker
  5463.         SelfRepairFromDamageLoop    = NoSound                        // This doesn't cause an animation, so don't bother playing a sound
  5464.         SelfRepairFromRubbleLoop    = WallConstructionLoop
  5465.         RebuildTimeSeconds            = MEN_WALLSEGMENT_SMALL_BUILDTIME
  5466.         UseSpawnTimerWithoutWorker         = Yes
  5467.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  5468.     End
  5469.  
  5470.     Body    = StructureBody ModuleTag_05
  5471.         MaxHealth         = MEN_WALLSEGMENT_SMALL_HEALTH
  5472.     End
  5473.  
  5474.     // These should always appear together on wall segments
  5475.     Behavior = KeepObjectDie ModuleTag_IWantRubble 
  5476.         DeathTypes            = ALL -SUICIDED
  5477.     End
  5478.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  5479.         DeathTypes            = NONE +SUICIDED
  5480.         DestructionDelay    = 5000
  5481.     End                                                
  5482.     // These should always appear together on wall segments
  5483.     
  5484.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Hub
  5485.         ReplaceWith        = MenWallHubSmall
  5486.         TriggeredBy        = Upgrade_MenWallHub
  5487.         ConflictsWith    = Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  5488.     End
  5489.         
  5490.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Gate
  5491.         ReplaceWith        = MenWallGateSmall
  5492.         TriggeredBy        = Upgrade_MenWallRegularGate
  5493.         ConflictsWith    = Upgrade_MenWallHub Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  5494.     End
  5495.  
  5496.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_PosternGate
  5497.         ReplaceWith        = MenWallPosternGateSmall
  5498.         TriggeredBy        = Upgrade_MenWallPosternGate
  5499.         ConflictsWith    = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  5500.     End
  5501.  
  5502.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Tower
  5503.         ReplaceWith        = MenWallTowerSmall
  5504.         TriggeredBy        = Upgrade_MenWallTower
  5505.         ConflictsWith    = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTrebuchet
  5506.     End
  5507.  
  5508.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Trebuchet
  5509.         ReplaceWith        = MenWallTrebuchetSmall
  5510.         TriggeredBy        = Upgrade_MenWallTrebuchet
  5511.         ConflictsWith    = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower
  5512.     End
  5513.  
  5514.     Behavior = ProductionUpdate ModuleTag_RequiredForUpgradeProduction
  5515.     End
  5516.   
  5517.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  5518.         Radius            = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  5519.         Upgrade            = Upgrade_MenFortressNumenorStonework
  5520.         ObjectFilter    = ANY +MenFortressCitadel
  5521.     End 
  5522.   
  5523.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  5524.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  5525.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  5526.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  5527.     End
  5528.     Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones
  5529.         TriggeredBy            = Upgrade_MenFortressNumenorStonework        
  5530.         AddConditionFlags    = UPGRADE_NUMENOR_STONEWORK
  5531.         Permanent            = Yes
  5532.     End
  5533.  
  5534.     Geometry                  = BOX
  5535.     GeometryMajorRadius       = 5.0        ;10.0
  5536.     GeometryMinorRadius       = 20.0  
  5537.     GeometryHeight            = 40.0        ; 50.0
  5538.     
  5539.     GeometryIsSmall           = No
  5540.           
  5541.     Shadow                    = SHADOW_VOLUME
  5542.     BuildCompletion            = PLACED_BY_PLAYER
  5543. End
  5544.  
  5545. //---------------------------------------------
  5546. Object MenWallGateSmall
  5547.     
  5548.     // *** ART Parameters ***  
  5549.       SelectPortrait  =  BPGWall_MainGate
  5550.     
  5551.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  5552.         OkToChangeModelColor  = Yes
  5553.         UseStandardModelNames = Yes
  5554.         DefaultModelConditionState
  5555.             Model = GBWallGateN
  5556.         End
  5557.  
  5558.         //-------- Damage States
  5559.         ModelConditionState  = DAMAGED
  5560.             Model         = GBWallGateN_D1
  5561.         End
  5562.  
  5563.         ModelConditionState  = REALLYDAMAGED
  5564.             Model         = GBWallGateN_D2
  5565.         End
  5566.          AnimationState = REALLYDAMAGED
  5567.               EnteringStateFX    = FX_BuildingReallyDamaged
  5568.         End
  5569.  
  5570.         ModelConditionState  = COLLAPSING
  5571.             Model         = GBWallGateN_D3
  5572.         End
  5573.         AnimationState = COLLAPSING
  5574.               Animation                =    RubbleAnimation
  5575.                 AnimationName        =     GBWallGateN_D3.GBWallGateN_D3
  5576.                 AnimationMode        =    ONCE
  5577.               End
  5578.               EnteringStateFX    = FX_StructureMediumCollapse
  5579.         End
  5580.  
  5581.  
  5582.         ModelConditionState  = DYING
  5583.             Model         = GBWallGateN_D3
  5584.         End
  5585.         AnimationState = DYING
  5586.               Animation                =    RubbleAnimation
  5587.                 AnimationName        =     GBWallGateN_D3.GBWallGateN_D3
  5588.                 AnimationMode        =    ONCE
  5589.               End
  5590.               EnteringStateFX    = FX_StructureMediumCollapse
  5591.         End
  5592.  
  5593.  
  5594.         AnimationState = DOOR_1_OPENING 
  5595.             Flags = START_FRAME_LAST
  5596.             StateName = Door_Open
  5597.             Animation                =    Death
  5598.                 AnimationName        =    GBWallGateN_SKL.GBWallGateN_OP
  5599.                 AnimationMode        =    ONCE
  5600.                 AnimationBlendTime = 160
  5601.             End
  5602.             BeginScript
  5603.                 Prev = CurDrawablePrevAnimationState()
  5604.                 if Prev == "Door_Close" then CurDrawableSetTransitionAnimState("TRANS_Closed_To_Open") end
  5605.             EndScript
  5606.         End
  5607.         TransitionState = TRANS_Closed_To_Open
  5608.             Animation = Open 
  5609.                 AnimationName    =    GBWallGateN_SKL.GBWallGateN_OPN
  5610.                 AnimationMode    =    ONCE 
  5611.                 AnimationBlendTime = 160
  5612.             End
  5613.         End
  5614.     
  5615.         AnimationState = DOOR_1_CLOSING 
  5616.             Flags = START_FRAME_LAST
  5617.             StateName = Door_Close
  5618.             Animation                =    Death
  5619.                 AnimationName        =    GBWallGateN_SKL.GBWallGateN_CL
  5620.                 AnimationMode        =    ONCE
  5621.                 AnimationBlendTime = 160
  5622.             End
  5623.             BeginScript
  5624.                 Prev = CurDrawablePrevAnimationState()
  5625.                 if Prev == "Door_Open" then CurDrawableSetTransitionAnimState("TRANS_Open_To_Closed") end
  5626.             EndScript
  5627.         End
  5628.         TransitionState = TRANS_Open_To_Closed
  5629.             Animation = Open 
  5630.                 AnimationName    =    GBWallGateN_SKL.GBWallGateN_CLS
  5631.                 AnimationMode    =    ONCE 
  5632.                 AnimationBlendTime = 160
  5633.             End
  5634.         End
  5635.  
  5636.         ModelConditionState  = RUBBLE
  5637.             Model         = None
  5638.             ParticleSysBone SmokeLarge01 SmokeBuildingLarge
  5639.         End
  5640.         AnimationState = RUBBLE
  5641.         End
  5642.  
  5643.         ModelConditionState  = POST_RUBBLE
  5644.             Model         = None
  5645.             ParticleSysBone NONE SmokeBuildingMediumRubble
  5646.         End
  5647.         ModelConditionState  = POST_COLLAPSE
  5648.             Model         = None
  5649.             ParticleSysBone NONE SmokeBuildingMediumRubble
  5650.         End
  5651.         
  5652.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  5653.             Model    = GBWallGateN
  5654.             Texture    = GBFortress1.tga GBFortress1_U.tga
  5655.         End
  5656.  
  5657.         ModelConditionState = SNOW 
  5658.             Model   = GBWallGateN
  5659.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  5660.         End    
  5661.                             
  5662.     End
  5663.  
  5664.     //***DESIGN parameters ***
  5665.     DisplayName         = OBJECT:GondorWallGate
  5666.     Side                = Men
  5667.     EditorSorting       = STRUCTURE
  5668.     ThreatLevel = 1.0
  5669.      
  5670.     BuildCost           = MEN_WALLGATE_SMALL_BUILDCOST
  5671.     BuildTime           = MEN_WALLGATE_SMALL_BUILDTIME
  5672.     VisionRange         = MEN_WALLGATE_SMALL_VISION_RANGE
  5673.     ShroudClearingRange = MEN_WALLGATE_SMALL_SHROUD_CLEAR
  5674.     
  5675.     ArmorSet
  5676.         Conditions        = None
  5677.         Armor             = MenWallArmor
  5678.         DamageFX          = None
  5679.     End
  5680.  
  5681.     // *** AUDIO Parameters ***
  5682.  
  5683.     VoiceSelect                        = GateSelect
  5684.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  5685.  
  5686.     SoundOnDamaged                    = BuildingLightDamageStone
  5687.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  5688.  
  5689.     UnitSpecificSounds
  5690.         UnderConstruction        = WallConstructionLoop      ;Built first time
  5691.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  5692.         UnderRepairFromRubble    = WallConstructionLoop        ;Repaired from completely destroyed (not used???)
  5693.     End
  5694.  
  5695.     CampnessValue = CAMPNESS_WALL
  5696.  
  5697.     // *** ENGINEERING Parameters ***
  5698.     RadarPriority       = STRUCTURE
  5699.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_UPGRADE MADE_OF_STONE BLOCKING_GATE CAN_CAST_REFLECTIONS WALL_GATE IGNORE_FOR_VICTORY
  5700.     CommandSet            = CastleGateCommandSet
  5701.  
  5702.     Behavior            = GettingBuiltBehavior ModuleTag_04
  5703.         SelfBuildingLoop            = WallConstructionLoop            // Only played if we DON'T spawn a worker
  5704.         SelfRepairFromDamageLoop    = NoSound                        // This doesn't cause an animation, so don't bother playing a sound
  5705.         SelfRepairFromRubbleLoop    = WallConstructionLoop
  5706.         SpawnTimer                    = -1.0                            // Negative means no 'autoheal'
  5707.         RebuildTimeSeconds            = MEN_WALLGATE_SMALL_BUILDTIME
  5708.     End
  5709.  
  5710.     Body                = StructureBody ModuleTag_05
  5711.         MaxHealth         = MEN_WALLGATE_SMALL_HEALTH
  5712.     End
  5713.      
  5714.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  5715.         DeathTypes            = ALL
  5716.         DestructionDelay    = 5000
  5717.     End                                                
  5718.     
  5719.     Behavior = GateOpenAndCloseBehavior ModuleTag_GATE
  5720.         ResetTimeInMilliseconds            = 3000                //important! this must be longer than the gates animation, ir it will twitch
  5721.         OpenByDefault                    = No
  5722.         PercentOpenForPathing            = 50
  5723.         SoundOpeningGateLoop            = GateOpenStart
  5724.         SoundClosingGateLoop            = GateCloseStart
  5725.         SoundFinishedOpeningGate        = GateOpenEnd
  5726.         SoundFinishedClosingGate        = GateCloseEnd
  5727.         TimeBeforePlayingOpenSound        = 9500
  5728.         TimeBeforePlayingClosedSound    = 9500
  5729.     End
  5730.   
  5731.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  5732.         Radius = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  5733.         Upgrade = Upgrade_MenFortressNumenorStonework
  5734.         ObjectFilter = ANY +MenFortressCitadel
  5735.     End
  5736.   
  5737.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  5738.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  5739.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  5740.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  5741.     End
  5742.  
  5743.     Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones
  5744.         TriggeredBy            = Upgrade_MenFortressNumenorStonework        
  5745.         AddConditionFlags    = UPGRADE_NUMENOR_STONEWORK
  5746.         Permanent            = Yes
  5747.     End
  5748.     
  5749.     Behavior = FakePathfindPortalBehaviour ModuleTag_FAKEPATHFIND
  5750.         AllowEnemies            = No
  5751.         AllowNonSkirmishAIUnits    = No
  5752.     End
  5753.     
  5754.     Behavior = AIGateUpdate ModuleTage_AIGateUpdate
  5755.         TriggerWidthX = 200.0
  5756.         TriggerWidthY = 100.0
  5757.     End
  5758.  
  5759.     GeometryIsSmall          = No
  5760.  
  5761.     ; right pillar
  5762.     Geometry              = BOX
  5763.     GeometryMajorRadius   = 10.0  
  5764.     GeometryMinorRadius   = 10.0  
  5765.     GeometryHeight        = 75
  5766.     GeometryOffset        = X:0 Y:50 Z:0
  5767.     
  5768.     ; left pillar
  5769.     AdditionalGeometry    = BOX
  5770.     GeometryMajorRadius   = 10.0  
  5771.     GeometryMinorRadius   = 10.0  
  5772.     GeometryHeight        = 75
  5773.     GeometryOffset        = X:0 Y:-50 Z:0
  5774.  
  5775.     ; Main
  5776.     AdditionalGeometry    = BOX
  5777.     GeometryName          = "Closed"
  5778.     GeometryMajorRadius   = 9.0  
  5779.     GeometryMinorRadius   = 50.0  
  5780.     GeometryHeight        = 50
  5781.     
  5782.     ; Left open
  5783.     AdditionalGeometry    = BOX
  5784.     GeometryName          = "OpenLeft"
  5785.     GeometryMajorRadius   = 9.0  
  5786.     GeometryMinorRadius   = 10.0  
  5787.     GeometryHeight        = 40
  5788.     GeometryOffset        = X:0 Y:-30 Z:0
  5789.     
  5790.     ; Right open
  5791.     AdditionalGeometry    = BOX
  5792.     GeometryName          = "OpenRight"
  5793.     GeometryMajorRadius   = 9.0  
  5794.     GeometryMinorRadius   = 10.0  
  5795.     GeometryHeight        = 40
  5796.     GeometryOffset        = X:0 Y:30 Z:0
  5797.     
  5798.     // need some geometry points to tell enemy weapons where to hit.
  5799.     GeometryContactPoint = X:0    Y:50 Z:75
  5800.     GeometryContactPoint = X:0    Y:50 Z:10
  5801.     GeometryContactPoint = X:0    Y:-50 Z:10
  5802.     GeometryContactPoint = X:0    Y:-50 Z:75
  5803.  
  5804.     
  5805.     Shadow                = SHADOW_VOLUME
  5806.     BuildCompletion     = PLACED_BY_PLAYER
  5807. End
  5808.  
  5809. //---------------------------------------------
  5810. Object MenWallPosternGateSmall
  5811.     
  5812.     // *** ART Parameters ***  
  5813.       SelectPortrait  =  BPGWall_PosternGate
  5814.     
  5815.     Draw = W3DScriptedModelDraw ModuleTag_WallDraw
  5816.  
  5817.         // Don't want to change the hidden state of this when the postern gate is stealthed.
  5818.         AffectedByStealth        = No
  5819.         OkToChangeModelColor  = Yes
  5820.         UseStandardModelNames = Yes
  5821.         DefaultModelConditionState
  5822.             Model = GBWallN
  5823.         End
  5824.  
  5825.         ModelConditionState = SNOW BUILD_PLACEMENT_CURSOR
  5826.             Model = GBWallN_CUR
  5827.             Texture    = GBWall.tga GBWall_snow.tga
  5828.         End
  5829.                 
  5830.         ModelConditionState = BUILD_PLACEMENT_CURSOR
  5831.             Model = GBWallN_CUR
  5832.         End
  5833.  
  5834.            
  5835.         IdleAnimationState
  5836.         End    
  5837.         
  5838.  
  5839.         //------------ New Build Up States coming soon. 
  5840.  
  5841.         ModelConditionState = SNOW AWAITING_CONSTRUCTION
  5842.             Model   = GBWallN_A
  5843.             Texture    = GBWall.tga GBWall_snow.tga
  5844.         End    
  5845.         
  5846.         ModelConditionState   = AWAITING_CONSTRUCTION 
  5847.             Model               = GBWallN_A
  5848.         End
  5849.         
  5850.         AnimationState        = AWAITING_CONSTRUCTION
  5851.             Animation           =  GBWallN_A
  5852.                 AnimationName     =  GBWallN_A.GBWallN_A
  5853.                 AnimationMode     = MANUAL
  5854.                 AnimationBlendTime = 0
  5855.             End
  5856.             Flags                  = START_FRAME_FIRST
  5857.         End
  5858.  
  5859.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5860.             Model   = GBWallN_A
  5861.             Texture    = GBWall.tga GBFortress1_U.tga
  5862.         End    
  5863.         
  5864.         ModelConditionState = SNOW ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5865.             Model   = GBWallN_A
  5866.             Texture    = GBWall.tga GBWall_snow.tga
  5867.         End    
  5868.         
  5869.         ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5870.             Model               = GBWallN_A
  5871.             ParticleSysBone   = NONE WallConstructDust FollowBone:Yes
  5872.         End
  5873.         
  5874.         AnimationState        = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  5875.             Animation           = GBWallN_A
  5876.                 AnimationName     = GBWallN_A.GBWallN_A
  5877.                 AnimationMode     = MANUAL
  5878.                 AnimationBlendTime = 0
  5879.             End
  5880.             Flags                  = START_FRAME_FIRST
  5881.             StateName              = BeingConstructed
  5882.         End
  5883.  
  5884.             
  5885.         ModelConditionState  = DAMAGED
  5886.             Model         = GBWallN_D1
  5887.         End
  5888.         
  5889.         
  5890.         AnimationState = DAMAGED
  5891.             Animation            =    DamagedAnimation
  5892.                 AnimationName        =    GBWallN_D1.GBWallN_D1
  5893.                 AnimationMode        =    ONCE
  5894.                End
  5895.             EnteringStateFX    = FX_WallDamaged
  5896.         End     
  5897.  
  5898.  
  5899.         ModelConditionState  = REALLYDAMAGED
  5900.             Model         = GBWallN_D2
  5901.         End
  5902.         
  5903.         AnimationState = REALLYDAMAGED
  5904.             Animation            =    DamagedAnimation
  5905.                 AnimationName        =    GBWallN_D2.GBWallN_D2
  5906.                 AnimationMode        =    ONCE
  5907.                End
  5908.             EnteringStateFX    = FX_WallDamaged
  5909.         End     
  5910.  
  5911.         ModelConditionState  = COLLAPSING
  5912.             Model         = GBWallN_D3
  5913.         End
  5914.         
  5915.         AnimationState = COLLAPSING
  5916.               Animation                =    RubbleAnimation
  5917.                 AnimationName        =     GBWallN_D3.GBWallN_D3
  5918.                 AnimationMode        =    ONCE
  5919.               End
  5920.               ParticleSysBone NONE WallDestructionDust
  5921.             EnteringStateFX            = FX_StructureMediumCollapse
  5922.         End
  5923.  
  5924.         ModelConditionState  = DYING
  5925.             Model         = GBWallN_D3
  5926.         End
  5927.         
  5928.         AnimationState = DYING
  5929.               Animation                =    RubbleAnimation
  5930.                 AnimationName        =     GBWallN_D3.GBWallN_D3
  5931.                 AnimationMode        =    ONCE
  5932.               End
  5933.               ParticleSysBone NONE WallDestructionDust
  5934.             EnteringStateFX            = FX_StructureMediumCollapse
  5935.         End
  5936.  
  5937.  
  5938.         ModelConditionState  = RUBBLE
  5939.             Model         = None    ;GBWall_Rubble
  5940.         End
  5941.         
  5942.         AnimationState = RUBBLE
  5943.         End
  5944.  
  5945.         ModelConditionState  = POST_RUBBLE
  5946.             Model         = None    ;GBWall_Rubble
  5947.         End
  5948.  
  5949.         ModelConditionState  = POST_COLLAPSE
  5950.             Model         = None
  5951.         End
  5952.  
  5953.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  5954.             Model        = GBWallN
  5955.             Texture        = GBWall.tga GBFortress1_U.tga
  5956.         End
  5957.  
  5958.         ModelConditionState = SNOW
  5959.             Model   = GBWallN
  5960.             Texture    = GBWall.tga GBWall_snow.tga
  5961.         End    
  5962.                 
  5963.     End
  5964.  
  5965.  
  5966.     Draw = W3DScriptedModelDraw ModuleTag_Draw_Rubble
  5967.         OkToChangeModelColor  = Yes
  5968.         UseStandardModelNames = Yes
  5969.         DefaultModelConditionState
  5970.             Model = None
  5971.         End
  5972.     
  5973.         ModelConditionState  = COLLAPSING
  5974.             Model         = GBWall_Rubble
  5975.         End
  5976.         
  5977.         ModelConditionState  = RUBBLE
  5978.             Model         = GBWall_Rubble
  5979.         End
  5980.         
  5981.         ModelConditionState  = POST_RUBBLE
  5982.             Model         = GBWall_Rubble
  5983.         End
  5984.  
  5985.         ModelConditionState  = POST_COLLAPSE
  5986.             Model         = None
  5987.         End
  5988.     End
  5989.     
  5990.     Draw = W3DScriptedModelDraw ModuleTag_DoorDraw
  5991.     
  5992.         OkToChangeModelColor    = Yes
  5993.         UseStandardModelNames    = Yes
  5994.         
  5995.         ExtraPublicBone = Post01
  5996.         ExtraPublicBone = Post02
  5997.         ExtraPublicBone = Post03
  5998.         ExtraPublicBone = Post04
  5999.     
  6000.         DefaultModelConditionState
  6001.             Model = GBWallPGN
  6002.         End
  6003.         IdleAnimationState
  6004.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  6005.             Animation                =    ReallyDamagedanimation
  6006.                 AnimationName        =     GBWallrampart.GBWallrampart
  6007.                 AnimationMode        =    LOOP
  6008.                End
  6009.                StateName = STATE_None
  6010.         End    
  6011.  
  6012. ;--------- Damage States
  6013.  
  6014.         ModelConditionState  = DAMAGED
  6015.             Model         = GBWallPGN_D1
  6016.         End
  6017.         AnimationState = DAMAGED
  6018.         End     
  6019.  
  6020.         ModelConditionState  = REALLYDAMAGED
  6021.             Model         = GBWallPGN_D2
  6022.         End
  6023.         AnimationState = REALLYDAMAGED
  6024.             EnteringStateFX    = FX_BuildingReallyDamaged
  6025.         End     
  6026.  
  6027.         ModelConditionState  = COLLAPSING
  6028.             Model         = GBWallPGN_D3
  6029.         End
  6030.         AnimationState = COLLAPSING
  6031.               Animation                =    RubbleAnimation
  6032.                 AnimationName        =     GBWallPGN_D3.GBWallPGN_D3
  6033.                 AnimationMode        =    ONCE
  6034.               End
  6035.               EnteringStateFX    = FX_StructureMediumCollapse
  6036.         End
  6037.  
  6038.         ModelConditionState  = DYING
  6039.             Model         = GBWallPGN_D3
  6040.         End
  6041.         AnimationState = DYING
  6042.               Animation                =    RubbleAnimation
  6043.                 AnimationName        =     GBWallPGN_D3.GBWallPGN_D3
  6044.                 AnimationMode        =    ONCE
  6045.               End
  6046.               EnteringStateFX    = FX_StructureMediumCollapse
  6047.         End
  6048.  
  6049.  
  6050.         ModelConditionState  = RUBBLE
  6051.             Model         = None
  6052.             ParticleSysBone SmokeLarge01 SmokeBuildingLarge
  6053.         End
  6054.         AnimationState = RUBBLE
  6055.         End
  6056.  
  6057.         ModelConditionState  = POST_RUBBLE
  6058.             Model         = None
  6059.             ParticleSysBone NONE SmokeBuildingMediumRubble
  6060.         End
  6061.         ModelConditionState  = POST_COLLAPSE
  6062.             Model         = None
  6063.             ParticleSysBone NONE SmokeBuildingMediumRubble
  6064.         End
  6065.         
  6066.         ModelConditionState = SNOW 
  6067.             Model   = GBWallPGN
  6068.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  6069.         End    
  6070.         
  6071.     End
  6072.  
  6073.     // ***DESIGN parameters ***
  6074.     DisplayName         = OBJECT:GondorCastleWallPosternGate
  6075.     DisplayNameInvisibleForEnemy = OBJECT:GondorCastleWallSegment
  6076.     Side                = Men
  6077.     EditorSorting       = STRUCTURE
  6078.     ThreatLevel = 1.0
  6079.      
  6080.     BuildCost           = 30
  6081.     BuildTime           = 5.0          // in seconds
  6082.     VisionRange         = 160.0        // Shroud clearing distance
  6083.     ShroudClearingRange = 160
  6084.  
  6085.     CommandSet            = SellableCommandSet
  6086.  
  6087.     // *** AUDIO Parameters ***
  6088.  
  6089.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  6090.  
  6091.     VoiceSelect                        = GondorPosternGateSelect
  6092.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  6093.  
  6094.     SoundOnDamaged                    = BuildingLightDamageStone
  6095.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  6096.  
  6097.     UnitSpecificSounds
  6098.         UnderConstruction        = WallConstructionLoop      ;Built first time
  6099.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  6100.         UnderRepairFromRubble    = WallConstructionLoop        ;Repaired from completely destroyed (not used???)
  6101.     End
  6102.  
  6103.     CampnessValue = CAMPNESS_WALL
  6104.  
  6105.     // *** ENGINEERING Parameters ***
  6106.     RadarPriority       = STRUCTURE
  6107.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE MADE_OF_STONE CAN_CAST_REFLECTIONS WALL_UPGRADE WALL_GATE IGNORE_FOR_VICTORY
  6108.  
  6109.     Behavior            = GettingBuiltBehavior ModuleTag_04
  6110.         UseSpawnTimerWithoutWorker         = Yes
  6111.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  6112.         ;RebuildTimeSeconds = 30
  6113.         SelfBuildingLoop            = BuildingConstructionLoop    // Only played if we DON'T spawn a worker
  6114.         SelfRepairFromDamageLoop    = WallConstructionLoop
  6115.         SelfRepairFromRubbleLoop    = BuildingConstructionLoop
  6116.     End
  6117.  
  6118.     Body                = StructureBody ModuleTag_05
  6119.         MaxHealth         = 1500.0
  6120.     End
  6121.      
  6122.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  6123.         DeathTypes            = ALL
  6124.         DestructionDelay    = 5000
  6125.     End                                                
  6126.  
  6127.     
  6128.     Behavior = DynamicPortalBehaviour PosternGatePortal
  6129.         ActivationDelaySeconds    = 0.0
  6130.         GenerateNow                = Yes
  6131.         
  6132.         ObjectFilter    = POSTERNGATE_ALLOWABLE_OBJECTFILTER
  6133.         BonePrefix        = Post
  6134.         NumberOfBones    = 4
  6135.         WayPoint        = Index:0    Type:Walk    ; 0
  6136.         WayPoint        = Index:1    Type:Walk    ; 1
  6137.         WayPoint        = Index:2    Type:Walk    ; 2
  6138.         WayPoint        = Index:3    Type:Walk    ; 3
  6139.         WayPoint        = Index:2    Type:Walk    ; 4
  6140.         WayPoint        = Index:1    Type:Walk    ; 5
  6141.         Link            = From:0 Via:4 Via:5 To:3
  6142.         Link            = From:3 Via:1 Via:2 To:0
  6143.     End
  6144.  
  6145.     #include "..\..\..\includes\DefaultPosternGateInvisibilityUpdate.inc"
  6146.   
  6147.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  6148.         Radius = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  6149.         Upgrade = Upgrade_MenFortressNumenorStonework
  6150.         ObjectFilter = ANY +MenFortressCitadel
  6151.     End
  6152.   
  6153.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  6154.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  6155.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  6156.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  6157.     End
  6158.  
  6159.     Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones
  6160.         TriggeredBy            = Upgrade_MenFortressNumenorStonework        
  6161.         AddConditionFlags    = UPGRADE_NUMENOR_STONEWORK
  6162.         Permanent            = Yes
  6163.     End
  6164.     
  6165.     Geometry                  = BOX
  6166.     GeometryMajorRadius       = 5.0        ;10.0
  6167.     GeometryMinorRadius       = 20.0  
  6168.     GeometryHeight            = 40.0        ;50.0
  6169.     
  6170.     GeometryIsSmall           = No
  6171.     
  6172.     Shadow                = SHADOW_VOLUME
  6173.     BuildCompletion     = PLACED_BY_PLAYER
  6174. End
  6175.  
  6176. //---------------------------------------------
  6177. Object MenWallTowerSmall
  6178.   
  6179.     // *** ART Parameters ***  
  6180.       SelectPortrait  =  BPGWall_ArrowTower
  6181.   
  6182.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  6183.         OkToChangeModelColor  = Yes
  6184.         UseStandardModelNames = Yes
  6185.     
  6186.         ExtraPublicBone = Arrow_01
  6187.         ExtraPublicBone = Arrow_02
  6188.         ExtraPublicBone = Arrow_03
  6189.         ExtraPublicBone = Arrow_04
  6190.         ExtraPublicBone = Arrow_05
  6191.         ExtraPublicBone = Arrow_06
  6192.         ExtraPublicBone = Arrow_07
  6193.         ExtraPublicBone = Arrow_08
  6194.         ExtraPublicBone = Arrow_09
  6195.         ExtraPublicBone = Arrow_10
  6196.         ExtraPublicBone = Arrow_11
  6197.         ExtraPublicBone = Arrow_12
  6198.     
  6199.         DefaultModelConditionState
  6200.             Model                = GBWallTwrN
  6201.             WeaponLaunchBone    = PRIMARY ARROW_
  6202.         End
  6203.  
  6204.         //--------- Damage States
  6205.         ModelConditionState  = DAMAGED
  6206.             Model         = GBWallTwrN_D1
  6207.         End
  6208.         AnimationState = DAMAGED
  6209.             Animation            =    DamagedAnimation
  6210.                 AnimationName        =    GBWallTwrN_D1.GBWallTwrN_D1
  6211.                 AnimationMode        =    ONCE
  6212.                End
  6213.         End     
  6214.  
  6215.         ModelConditionState  = REALLYDAMAGED
  6216.             Model         = GBWallTwrN_D2
  6217.         End
  6218.         AnimationState = REALLYDAMAGED
  6219.             Animation            =    DamagedAnimation
  6220.                 AnimationName        =    GBWallTwrN_D2.GBWallTwrN_D2
  6221.                 AnimationMode        =    ONCE
  6222.                End
  6223.         End     
  6224.  
  6225.         ModelConditionState  = COLLAPSING
  6226.             Model         = GBWallTwrN_D3
  6227.         End
  6228.         AnimationState = COLLAPSING
  6229.               Animation                =    RubbleAnimation
  6230.                 AnimationName        =     GBWallTwrN_D3.GBWallTwrN_D3
  6231.                 AnimationMode        =    ONCE
  6232.               End
  6233.             EnteringStateFX            = FX_StructureMediumCollapse
  6234.         End
  6235.  
  6236.         ModelConditionState  = DYING
  6237.             Model         = GBWallTwrN_D3
  6238.         End
  6239.         AnimationState = DYING
  6240.               Animation                =    RubbleAnimation
  6241.                 AnimationName        =     GBWallTwrN_D3.GBWallTwrN_D3
  6242.                 AnimationMode        =    ONCE
  6243.               End
  6244.             EnteringStateFX            = FX_StructureMediumCollapse
  6245.         End
  6246.  
  6247.  
  6248.  
  6249.         ModelConditionState  = RUBBLE
  6250.             Model         = None
  6251.             ParticleSysBone SmokeLarge01 SmokeBuildingLarge
  6252.         End
  6253.         AnimationState = RUBBLE
  6254.         End
  6255.  
  6256.         ModelConditionState  = POST_RUBBLE
  6257.             Model         = None
  6258.             ParticleSysBone NONE SmokeBuildingMediumRubble
  6259.         End
  6260.         ModelConditionState  = POST_COLLAPSE
  6261.             Model         = None
  6262.             ParticleSysBone NONE SmokeBuildingMediumRubble
  6263.         End
  6264.  
  6265.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  6266.             Model   = GBWallTwrN
  6267.             Texture    = GBFortress1.tga GBFortress1_U.tga
  6268.         End    
  6269.         
  6270.         ModelConditionState = SNOW 
  6271.             Model   = GBWallTwrN
  6272.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  6273.         End    
  6274.                 
  6275.     End
  6276.  
  6277.     // ***DESIGN parameters ***
  6278.     DisplayName         = OBJECT:GondorCastleWallArrowTower
  6279.     Side                = Men
  6280.     EditorSorting       = STRUCTURE
  6281.     ThreatLevel            = 1.0
  6282.      
  6283.     BuildCost           = MEN_WALLTOWER_SMALL_BUILDCOST
  6284.     BuildTime           = MEN_WALLTOWER_SMALL_BUILDTIME           ; in seconds
  6285.     VisionRange         = VISION_BASE_DEFENSE          ; Shroud clearing distance
  6286.     ShroudClearingRange = SHROUD_CLEAR_BASE_DEFENSE
  6287.     
  6288.     CommandSet   =   SellableCommandSet
  6289.  
  6290.     // *** AUDIO Parameters ***
  6291.  
  6292.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  6293.  
  6294.     VoiceSelect                        = MenWallTowerSelect
  6295.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  6296.  
  6297.     SoundOnDamaged                    = BuildingLightDamageStone
  6298.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  6299.  
  6300.     UnitSpecificSounds
  6301.         UnderConstruction        = WallConstructionLoop      ;Built first time
  6302.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  6303.         UnderRepairFromRubble    = WallConstructionLoop        ;Repaired from completely destroyed (not used???)
  6304.     End
  6305.  
  6306.     CampnessValue = CAMPNESS_WALL
  6307.  
  6308.     // *** ENGINEERING Parameters ***
  6309.     RadarPriority       = STRUCTURE
  6310.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_UPGRADE MADE_OF_STONE CAN_ATTACK CAN_CAST_REFLECTIONS
  6311.     
  6312.     ThreatBreakdown MenWallTowerSmall_DetailedThreat
  6313.         AIKindOf = WALL
  6314.     End
  6315.  
  6316.     WeaponSet
  6317.         Weapon                = PRIMARY CastleWallUpgradeBow
  6318.         Conditions            = None
  6319.         AutoChooseSources    = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
  6320.     End
  6321.  
  6322.     Behavior = AIUpdateInterface ModuleTag_SoWeCanUseWeapon
  6323.          AutoAcquireEnemiesWhenIdle    = Yes
  6324.          MoodAttackCheckRate            = 250
  6325.      End
  6326.  
  6327.     Behavior = GettingBuiltBehavior ModuleTag_04
  6328.         UseSpawnTimerWithoutWorker         = Yes
  6329.         SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  6330.         ;RebuildTimeSeconds = 30
  6331.         SelfBuildingLoop            = BuildingConstructionLoop    ; Only played if we DON'T spawn a worker
  6332.         SelfRepairFromDamageLoop    = WallConstructionLoop
  6333.         SelfRepairFromRubbleLoop    = BuildingConstructionLoop
  6334.     End
  6335.  
  6336.     Body = StructureBody ModuleTag_05
  6337.         MaxHealth                = MEN_WALLTOWER_SMALL_HEALTH
  6338.         MaxHealthDamaged        = MEN_WALLTOWER_SMALL_HEALTH_DAMAGED
  6339.         MaxHealthReallyDamaged    = MEN_WALLTOWER_SMALL_HEALTH_REALLY_DAMAGED
  6340.     End
  6341.     
  6342.     
  6343.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  6344.         DeathTypes            = ALL
  6345.         DestructionDelay    = 5000
  6346.     End                                                
  6347.         
  6348.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  6349.         Radius = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  6350.         Upgrade = Upgrade_MenFortressNumenorStonework
  6351.         ObjectFilter = ANY +MenFortressCitadel
  6352.     End
  6353.   
  6354.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  6355.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  6356.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  6357.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  6358.     End
  6359.  
  6360.     Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones
  6361.         TriggeredBy            = Upgrade_MenFortressNumenorStonework        
  6362.         AddConditionFlags    = UPGRADE_NUMENOR_STONEWORK
  6363.         Permanent            = Yes
  6364.     End
  6365.  
  6366.     GeometryIsSmall       = No
  6367.     
  6368.     Geometry              = BOX
  6369.     GeometryMajorRadius   = 15.0 
  6370.     GeometryMinorRadius   = 15.0 
  6371.     GeometryHeight        = 40.0
  6372.     
  6373.     AdditionalGeometry    = BOX
  6374.     GeometryMajorRadius   = 10.0 
  6375.     GeometryMinorRadius   = 10.0 
  6376.     GeometryHeight        = 50.0
  6377.     GeometryOffset          = X:0 Y:0 Z:40
  6378.     
  6379.     AdditionalGeometry         = BOX
  6380.     GeometryMajorRadius       = 5.0        ;10.0
  6381.     GeometryMinorRadius       = 20.0  
  6382.     GeometryHeight            = 40.0        ;50.0
  6383.  
  6384.  
  6385.     
  6386.     Shadow                = SHADOW_VOLUME
  6387.     BuildCompletion     = PLACED_BY_PLAYER
  6388. End
  6389.  
  6390. //---------------------------------------------
  6391. Object MenWallTrebuchetSmall
  6392.  
  6393.     // *** ART Parameters ***
  6394.     
  6395.     SelectPortrait  =  UPGondor_Trebuchet
  6396.     
  6397.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  6398.         OkToChangeModelColor    = Yes
  6399.         UseStandardModelNames    = Yes
  6400.         
  6401.         DefaultModelConditionState
  6402.             Model = GBWallTrebN
  6403.         End
  6404.            
  6405.         IdleAnimationState
  6406.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  6407.             Animation                =    ReallyDamagedanimation
  6408.                 AnimationName        =     GBWallrampart.GBWallrampart
  6409.                 AnimationMode        =    LOOP
  6410.                End
  6411.                StateName = STATE_None
  6412.         End    
  6413.  
  6414.  
  6415.         //--------- Damage States
  6416.         ModelConditionState  = DAMAGED
  6417.             Model         = GBWallTrebN_D1
  6418.             Texture          = GBFortress1.tga GBFortress1D.tga
  6419.         End
  6420.         AnimationState = DAMAGED
  6421.             Animation            =    DamagedAnimation
  6422.                 AnimationName        =    GBWallTrebN_D1.GBWallTrebN_D1
  6423.                 AnimationMode        =    ONCE
  6424.                End
  6425.         End     
  6426.  
  6427.         ModelConditionState  = REALLYDAMAGED
  6428.             Model         = GBWallTrebN_D2
  6429.             Texture          = GBFortress1.tga GBFortress1D.tga
  6430.         End
  6431.         AnimationState = REALLYDAMAGED
  6432.             Animation            =    DamagedAnimation
  6433.                 AnimationName        =    GBWallTrebN_D2.GBWallTrebN_D2
  6434.                 AnimationMode        =    ONCE
  6435.                End
  6436.         End     
  6437.  
  6438.         ModelConditionState  = RUBBLE
  6439.             Model         = GBWallTrebN_D3
  6440.             Texture          = GBFortress1.tga GBFortress1D.tga
  6441.             ParticleSysBone SmokeLarge01 SmokeBuildingLarge
  6442.         End
  6443.         AnimationState = RUBBLE
  6444.               Animation                =    RubbleAnimation
  6445.                 AnimationName        =     GBWallTrebN_D3.GBWallTrebN_D3
  6446.                 AnimationMode        =    ONCE
  6447.               End
  6448.         End
  6449.  
  6450.         ModelConditionState  = POST_RUBBLE
  6451.             Model         = None
  6452.             ParticleSysBone NONE SmokeBuildingMediumRubble
  6453.         End
  6454.         ModelConditionState  = POST_COLLAPSE
  6455.             Model         = None
  6456.             ParticleSysBone NONE SmokeBuildingMediumRubble
  6457.         End
  6458.  
  6459.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  6460.             Model    = GBWallTrebN
  6461.             Texture    = GBFortress1.tga GBFortress1_U.tga
  6462.         End
  6463.         
  6464.         ModelConditionState = SNOW 
  6465.             Model   = GBWallTrebN
  6466.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  6467.         End    
  6468.                 
  6469.     End
  6470.  
  6471.     // ***DESIGN parameters ***
  6472.     DisplayName         = OBJECT:GondorCastleWallTrebuchet
  6473.     Side                = Men
  6474.     EditorSorting       = STRUCTURE
  6475.     ThreatLevel            = 1.0
  6476.      
  6477.     BuildCost           = MEN_WALLTREBUCHET_SMALL_BUILDCOST
  6478.     BuildTime           = MEN_WALLTREBUCHET_SMALL_BUILDTIME
  6479.     VisionRange         = MEN_WALLTREBUCHET_SMALL_VISION_RANGE       // Shroud clearing distance
  6480.     ShroudClearingRange = MEN_WALLTREBUCHET_SMALL_SHROUD_CLEAR        
  6481.  
  6482.     // *** AUDIO Parameters ***
  6483.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  6484.  
  6485.     VoiceSelect                        = DwarvenCatapultExpansionSelect
  6486.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  6487.  
  6488.     SoundOnDamaged                    = BuildingLightDamageStone
  6489.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  6490.  
  6491.     UnitSpecificSounds
  6492.         UnderConstruction        = WallConstructionLoop      ;Built first time
  6493.         ; UnderRepairFromDamage    = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
  6494.         UnderRepairFromRubble    = WallConstructionLoop        ;Repaired from completely destroyed (not used???)
  6495.     End
  6496.  
  6497.     CampnessValue = CAMPNESS_WALL
  6498.  
  6499.     // *** ENGINEERING Parameters ***
  6500.     RadarPriority       = STRUCTURE
  6501.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_UPGRADE MADE_OF_STONE CAN_CAST_REFLECTIONS
  6502.     
  6503.     ThreatBreakdown MenWallTrebuchetSmall_DetailedThreat
  6504.         AIKindOf = WALL
  6505.     End
  6506.  
  6507.     Behavior    = GettingBuiltBehavior ModuleTag_04
  6508.         ;WorkerName    = GondorWorkerNoSelect    
  6509.         UseSpawnTimerWithoutWorker         = Yes
  6510.            SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  6511.              SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  6512.          SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  6513.          SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  6514.     End
  6515.  
  6516.     Body                = StructureBody ModuleTag_05
  6517.         MaxHealth                = MEN_WALLTREBUCHET_SMALL_HEALTH
  6518.         MaxHealthDamaged        = MEN_WALLTREBUCHET_SMALL_HEALTH_DAMAGED
  6519.         MaxHealthReallyDamaged    = MEN_WALLTREBUCHET_SMALL_HEALTH_REALLY_DAMAGED
  6520.     End
  6521.  
  6522.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  6523.         Radius            = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  6524.         Upgrade            = Upgrade_MenFortressNumenorStonework
  6525.         ObjectFilter    = ANY +MenFortressCitadel
  6526.     End
  6527.   
  6528.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  6529.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  6530.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  6531.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  6532.     End
  6533.  
  6534.     Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones
  6535.         TriggeredBy            = Upgrade_MenFortressNumenorStonework        
  6536.         AddConditionFlags    = UPGRADE_NUMENOR_STONEWORK
  6537.         Permanent            = Yes
  6538.     End
  6539.  
  6540.     Behavior                = SlowDeathBehavior ModuleTag_SlowDeath
  6541.         DeathTypes            = ALL
  6542.         DestructionDelay    = 5000
  6543.     End
  6544.  
  6545.     //Trebuchet Behaviors    
  6546.     Behavior = ProductionUpdate ProductionUpdateModuleTag
  6547.     End
  6548.     Behavior = GrantUpgradeCreate ModuleTag_ActLikeAnOldUpgrade
  6549.         UpgradeToGrant        = Upgrade_TrebuchetTurret
  6550.         GiveOnBuildComplete = Yes        //The ExemptStatus UnderConstruction hack doesn't work on foundation buildings.
  6551.     End
  6552.     Behavior = CommandSetUpgrade ModueTag_TrebCommandSet
  6553.         TriggeredBy            = Upgrade_TrebuchetTurret
  6554.         ConflictsWith        = Upgrade_HasWallTrebuchet 
  6555.         CommandSet            = GondorCastleWallUpgradeCommandSetBuyNewTreb
  6556.     End
  6557.     Behavior = CommandSetUpgrade ModueTag_TrebCommandSet3
  6558.         TriggeredBy            = Upgrade_HasWallTrebuchet Upgrade_TrebuchetTurret
  6559.         CommandSet            = SellableCommandSet
  6560.         RequiresAllTriggers    = Yes
  6561.     End
  6562.     Behavior = ObjectCreationUpgrade MakeTheFreeTreb
  6563.         TriggeredBy        = Upgrade_TrebuchetTurret
  6564.         Delay            = 0
  6565.         
  6566.         RemoveUpgrade    = Upgrade_WallTrebuchetButtonEnable
  6567.         GrantUpgrade    = Upgrade_HasWallTrebuchet
  6568.         DestroyWhenSold = Yes
  6569.         DeathAnimAndDuration = AnimState:DEATH_2 AnimTime:999999
  6570.         Offset            = X:0.0 Y:0.0 Z:51.0
  6571.     End
  6572.     Behavior = ObjectCreationUpgrade MakeTheFreeTreb2
  6573.         TriggeredBy        = Upgrade_HasWallTrebuchet
  6574.         ConflictsWith    = Upgrade_OpenGarrison Upgrade_PosternGate
  6575.         Delay            = 0.0
  6576.         
  6577.         RemoveUpgrade    = Upgrade_WallTrebuchetButtonEnable
  6578.         ThingToSpawn    = GondorTrebuchetWall
  6579.         Offset            = X:0.0 Y:0.0 Z:51.0
  6580.         FadeInTime        = 600
  6581.     End
  6582.     Behavior = SlaveWatcherBehavior WatchTheTreb
  6583.         RemoveUpgrade        =    Upgrade_HasWallTrebuchet            //when our slave dies, remove this upgrade, so we can get the upgrade again.
  6584.         GrantUpgrade        =    Upgrade_WallTrebuchetButtonEnable    //when our slave dies, enable the button that allows us to buy a new one
  6585.         ShareUpgrades        =    Yes                                    //So He'll get our Flaming Munitions
  6586.     End
  6587.     //End Trebuchet Behaviors
  6588.  
  6589.     GeometryIsSmall            = No
  6590.  
  6591.     AdditionalGeometry        = CYLINDER
  6592.     GeometryMajorRadius       = 25.0 
  6593.     GeometryHeight            = 50.0
  6594.     
  6595.     Shadow                    = SHADOW_VOLUME
  6596.     BuildCompletion            = PLACED_BY_PLAYER
  6597.  
  6598.     GeometryContactPoint    = X:25.0    Y:15    Z:0        Repair    
  6599. End
  6600.  
  6601.  
  6602. //---------------------------------------------
  6603. Object MenWallHubSmall
  6604.   
  6605.     // *** ART Parameters ***  
  6606.       SelectPortrait  =  BPGWall_WallHub
  6607.   
  6608.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  6609.         OkToChangeModelColor  = Yes
  6610.         UseStandardModelNames = Yes
  6611.         DefaultModelConditionState
  6612.             Model = GBWallRmprtN
  6613.         End
  6614.  
  6615.         //------------ New Build Up States coming soon. 
  6616.         ModelConditionState = SNOW AWAITING_CONSTRUCTION
  6617.             Model   = GBWallRmprtN_A
  6618.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  6619.         End    
  6620.         
  6621.         ModelConditionState   = AWAITING_CONSTRUCTION 
  6622.             Model               = GBWallRmprtN_A
  6623.         End
  6624.         
  6625.         AnimationState        = AWAITING_CONSTRUCTION
  6626.             Animation           =  GBWallRmprtN_A
  6627.                 AnimationName     =  GBWallRmprtN_A.GBWallRmprtN_A
  6628.                 AnimationMode     = MANUAL
  6629.                 AnimationBlendTime = 0
  6630.             End
  6631.             Flags                  = START_FRAME_FIRST
  6632. ;            BeginScript
  6633. ;                CurDrawablePlaySound("GondorBarracksBeginConstruction")
  6634. ;            EndScript
  6635.         End
  6636.  
  6637.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  6638.             Model    = GBWallRmprtN_A
  6639.             Texture    = GBFortress1.tga GBFortress1_U.tga
  6640.         End
  6641.         ModelConditionState = SNOW ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  6642.             Model   = GBWallRmprtN_A
  6643.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  6644.         End    
  6645.         
  6646.         ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  6647.             Model               = GBWallRmprtN_A
  6648.             ParticleSysBone   = NONE WallConstructDust FollowBone:Yes
  6649.         End
  6650.         
  6651.         AnimationState        = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  6652.             Animation           = GBWallRmprtN_A
  6653.                 AnimationName     = GBWallRmprtN_A.GBWallRmprtN_A
  6654.                 AnimationMode     = MANUAL
  6655.                 AnimationBlendTime = 0
  6656.             End
  6657.             Flags                  = START_FRAME_FIRST
  6658.             StateName              = BeingConstructed
  6659.             BeginScript
  6660.                 CurDrawablePlaySound("GondorBarracksBeginConstruction")
  6661.             EndScript
  6662.         End
  6663.  
  6664. ;--------- Damage States
  6665.  
  6666.         ModelConditionState  = DAMAGED
  6667.             Model       = GBWallRmprtN
  6668.             Texture        = GBFortress1.tga GBFortress1D.tga
  6669.         End
  6670.         AnimationState = DAMAGED            
  6671.                EnteringStateFX    = FX_BuildingDamaged
  6672.         End     
  6673.  
  6674.         ModelConditionState  = REALLYDAMAGED
  6675.             Model         = GBWallRmprtN_D2
  6676.         End
  6677.         AnimationState = REALLYDAMAGED
  6678.             Animation            =    DamagedAnimation
  6679.                 AnimationName        =    GBWallRmprtN_D2.GBWallRmprtN_D2
  6680.                 AnimationMode        =    ONCE
  6681.                End
  6682.                EnteringStateFX    = FX_BuildingReallyDamaged
  6683.         End     
  6684.  
  6685.         ModelConditionState  = COLLAPSING
  6686.             Model         = GBWallRmprtN_D3
  6687.         End
  6688.         AnimationState = COLLAPSING
  6689.               Animation                =    RubbleAnimation
  6690.                 AnimationName        =     GBWallRmprtN_D3.GBWallRmprtN_D3
  6691.                 AnimationMode        =    ONCE
  6692.               End
  6693.               EnteringStateFX    = FX_StructureMediumCollapse
  6694.               ParticleSysBone NONE HubDestructionDust
  6695.         End
  6696.  
  6697.  
  6698.         ModelConditionState  = DYING
  6699.             Model         = GBWallRmprtN_D3
  6700.         End
  6701.         AnimationState = DYING
  6702.               Animation                =    RubbleAnimation
  6703.                 AnimationName        =     GBWallRmprtN_D3.GBWallRmprtN_D3
  6704.                 AnimationMode        =    ONCE
  6705.               End
  6706.               EnteringStateFX    = FX_StructureMediumCollapse
  6707.               ParticleSysBone NONE HubDestructionDust
  6708.         End
  6709.  
  6710.  
  6711.         ModelConditionState  = RUBBLE
  6712.             Model         = None
  6713.             ;ParticleSysBone SmokeLarge01 SmokeBuildingLarge
  6714.         End
  6715.         AnimationState = RUBBLE
  6716.         End
  6717.  
  6718.         ModelConditionState  = POST_RUBBLE
  6719.             Model         = None
  6720.         End
  6721.         ModelConditionState  = POST_COLLAPSE
  6722.             Model         = None
  6723.         End
  6724.  
  6725.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  6726.             Model    = GBWallRmprtN
  6727.             Texture    = GBFortress1.tga GBFortress1_U.tga
  6728.         End
  6729.             
  6730.         ModelConditionState = SNOW 
  6731.             Model   = GBWallRmprtN
  6732.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  6733.         End    
  6734.  
  6735.     End
  6736.  
  6737.     Draw = W3DFloorDraw ModuleTag_DrawFloor    
  6738. ;            StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD
  6739.           ModelName = GBWallRmprtNBib
  6740.         WeatherTexture        = SNOWY GBWall_Bib_Snow.tga            
  6741.           HideIfModelConditions    =    AWAITING_CONSTRUCTION
  6742.           HideIfModelConditions    =    PARTIALLY_CONSTRUCTED
  6743.     End
  6744.          
  6745.     ; ***DESIGN parameters ***
  6746.     RadarPriority       = STRUCTURE
  6747.     DisplayName         = OBJECT:GondorWallHub
  6748.     Side                = Men
  6749.     EditorSorting       = STRUCTURE
  6750.     ThreatLevel = 1.0
  6751.      
  6752.     BuildCost           = MEN_WALLHUB_SMALL_BUILDCOST
  6753.     BuildTime           = MEN_WALLHUB_SMALL_BUILDTIME           ; in seconds
  6754.     VisionRange         = MEN_WALLHUB_SMALL_VISION_RANGE        ; Shroud clearing distance
  6755.     ShroudClearingRange = MEN_WALLHUB_SMALL_SHROUD_CLEAR
  6756.     
  6757.     ArmorSet
  6758.         Conditions        = None
  6759.         Armor             = MenWallArmor
  6760.         DamageFX          = None
  6761.     End
  6762.  
  6763.     CommandSet = GondorCastleWallHubSmallCommandSet
  6764.  
  6765.   ; *** AUDIO Parameters ***
  6766.  
  6767.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  6768.  
  6769.     ;VoiceFullyCreated                = EVA:GenericBuildingComplete-Builder        ;this causes EVA to play when building long wall segments with multiple hubs even when unfinished
  6770.  
  6771.     VoiceSelect                        = NeutralWallHubSelect
  6772.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  6773.  
  6774.     SoundOnDamaged                    = BuildingLightDamageStone
  6775.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  6776.  
  6777.     UnitSpecificSounds
  6778.         UnderConstruction        = BuildingConstructionLoop      ;Built first time
  6779.         UnderRepairFromDamage    = NoSound                        ; Repaired No animation on the building, so don't bother playing sound
  6780.         UnderRepairFromRubble    = BuildingConstructionLoop        ;Repaired from completely destroyed (not used???)
  6781.     End
  6782.  
  6783.     CampnessValue = CAMPNESS_WALL
  6784.  
  6785.     ; *** ENGINEERING Parameters ***
  6786.     RadarPriority       = STRUCTURE
  6787.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_HUB WALL_UPGRADE MADE_OF_STONE CAN_CAST_REFLECTIONS
  6788.     
  6789.     ThreatBreakdown MenWallHubSmall_DetailedThreat
  6790.         AIKindOf = WALL
  6791.     End
  6792.      
  6793.     Behavior            = GettingBuiltBehavior ModuleTag_04
  6794.         UseSpawnTimerWithoutWorker         = Yes
  6795.            SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  6796.         ;SelfBuildingLoop            = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  6797.         SelfRepairFromDamageLoop    = WallConstructionLoop
  6798.         ;SelfRepairFromRubbleLoop    = BuildingConstructionLoop
  6799.     End
  6800.  
  6801.     Behavior = TerrainResourceBehavior ModuleTag_NewMoneyDeadSpot
  6802.         Radius            = 100        ;// How far we try to claim ground
  6803.         MaxIncome        = 0            ;// If we were to get all we wanted, how much we would earn.  Linear slope to 0 at 0% claim
  6804.         IncomeInterval    = 999999    ;// How often (in msec) we give that much money
  6805.         HighPriority    = Yes        ;// A high priority claim gets to pretend it was there first.
  6806.         Visible = No         ;// Don't show decal when a resource building is selected.
  6807.     End
  6808.  
  6809.     Body                = StructureBody ModuleTag_05
  6810.         MaxHealth         = 1500.0
  6811.     End
  6812.         
  6813.     
  6814.     Behavior                = SlowDeathBehavior ModuleTag_SlowDeath
  6815.         DeathTypes            = ALL
  6816.         DestructionDelay    = 5000
  6817.     End
  6818.  
  6819.  
  6820.  
  6821.     
  6822.     Behavior = WallHubBehavior ModuleTag_Build_A_Span
  6823.     
  6824.         Options = OPTION_ONE
  6825.     
  6826.         MaxBuildoutDistance = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  6827.     
  6828.         StaggeredBuildFactor = STANDARD_WALL_STAGGERED_BUILD_FACTOR
  6829.     
  6830.         ;;This defines the pattern built on flat terrain
  6831.         SegmentTemplateName = MenWallSegmentSmall
  6832.         SegmentTemplateName = MenWallSegmentSmall
  6833.         SegmentTemplateName = MenWallSegmentSmall
  6834.         SegmentTemplateName = MenWallSegmentSmall
  6835.         SegmentTemplateName = MenWallSegmentSmall
  6836.         SegmentTemplateName = MenWallSegmentSmall
  6837.         SegmentTemplateName = MenWallSegmentSmall
  6838.         SegmentTemplateName = MenWallSegmentSmall
  6839.         SegmentTemplateName = MenWallHubSmall
  6840.         
  6841.         BuilderRadius = 20
  6842.         
  6843.         HubCapTemplateName = MenWallHubSmall
  6844.         DefaultSegmentTemplateName = MenWallSegmentSmall
  6845.         
  6846.         CliffCapTemplateName =     MenWallCliffCap
  6847.         ;ShoreCapTemplateName = [NAME]        
  6848.         ;BorderCapTemplateName = [NAME]        
  6849.         ;ElevatedSegmentTemplateName = [NAME]
  6850.         
  6851.     End
  6852.   
  6853.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  6854.         Radius = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  6855.         Upgrade = Upgrade_MenFortressNumenorStonework
  6856.         ObjectFilter = ANY +MenFortressCitadel
  6857.     End
  6858.   
  6859.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  6860.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  6861.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  6862.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  6863.     End
  6864.     
  6865.     Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones
  6866.         TriggeredBy            = Upgrade_MenFortressNumenorStonework        
  6867.         AddConditionFlags    = UPGRADE_NUMENOR_STONEWORK
  6868.         Permanent            = Yes
  6869.     End
  6870.  
  6871.     Geometry              = CYLINDER
  6872.     GeometryMajorRadius   = 20.0 ; 
  6873.     GeometryMinorRadius   = 20.0 ; 
  6874.     GeometryHeight        = 70.0
  6875.     GeometryIsSmall       = No
  6876.  
  6877.     ; additional geometry, exactly same as the wall piece - if this isn't here we might get holes!    
  6878.     AdditionalGeometry      = BOX
  6879.     GeometryMajorRadius       = 5.0        ;10.0
  6880.     GeometryMinorRadius       = 20.0  
  6881.     GeometryHeight            = 40.0        ; 50.0
  6882.     
  6883.     Shadow                = SHADOW_VOLUME
  6884.     BuildCompletion     = PLACED_BY_PLAYER
  6885.     
  6886. End
  6887.  
  6888.  
  6889.  
  6890. //---------------------------------------------
  6891. Object MenWallHubSmallUpgradeable
  6892.   
  6893.     // *** ART Parameters ***
  6894.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  6895.         OkToChangeModelColor  = Yes
  6896.         UseStandardModelNames = Yes
  6897.         DefaultModelConditionState
  6898.             Model = GBWallUpgrdN
  6899.         End
  6900.         IdleAnimationState
  6901.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  6902.             Animation                =    ReallyDamagedanimation
  6903.                 AnimationName        =     GBWallrampart.GBWallrampart
  6904.                 AnimationMode        =    LOOP
  6905.                End
  6906.                StateName = STATE_None
  6907.         End    
  6908.  
  6909.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  6910.             Model    = GBWallUpgrdN
  6911.             Texture    = GBFortress1.tga GBFortress1_U.tga
  6912.         End
  6913.  
  6914.         ModelConditionState = SNOW 
  6915.             Model   = GBWallUpgrdN
  6916.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  6917.         End    
  6918.                 
  6919.     End
  6920.   
  6921.     Draw = W3DFloorDraw ModuleTag_DrawFloor    
  6922. ;            StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD
  6923.           ModelName = GBWallUpgrdNBib
  6924.         WeatherTexture        = SNOWY GBWall_Bib_Snow.tga          
  6925.     End
  6926.     
  6927.     // ***DESIGN parameters ***
  6928.     DisplayName         = OBJECT:GondorCastleWallSegment
  6929.     Side                = Men
  6930.     EditorSorting       = STRUCTURE
  6931.     ThreatLevel = 1.0
  6932.      
  6933.     BuildCost           = 30
  6934.     BuildTime           = 5.0           ; in seconds
  6935.     VisionRange         = 160.0          ; Shroud clearing distance
  6936.     ShroudClearingRange = 160
  6937.     
  6938.     CommandSet = GondorCastleWallHubSmallUpgradeableCommandSet    
  6939.  
  6940.     // *** AUDIO Parameters ***
  6941.  
  6942.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  6943.  
  6944.     VoiceSelect                        = Gui_PlotSelect2        ;WallHubSelect
  6945.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  6946.  
  6947.     SoundOnDamaged                    = BuildingLightDamageStone
  6948.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  6949.  
  6950.     UnitSpecificSounds
  6951.         UnderConstruction        = BuildingConstructionLoop      ;Built first time
  6952.         ; UnderRepairFromDamage    = NoSound                        ; Repaired No animation on the building, so don't bother playing sound
  6953.         UnderRepairFromRubble    = BuildingConstructionLoop        ;Repaired from completely destroyed (not used???)
  6954.     End
  6955.  
  6956.     CampnessValue = CAMPNESS_WALL
  6957.  
  6958.     // *** ENGINEERING Parameters ***
  6959.     RadarPriority       = STRUCTURE
  6960.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_HUB WALL_SEGMENT SCALEABLE_WALL MADE_OF_STONE CAN_CAST_REFLECTIONS
  6961.     
  6962.     ThreatBreakdown MenWallHubSmallUpgradable_DetailedThreat
  6963.         AIKindOf = WALL
  6964.     End
  6965.      
  6966.     Behavior            = GettingBuiltBehavior ModuleTag_04
  6967.         UseSpawnTimerWithoutWorker         = Yes
  6968.            SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  6969.         SelfBuildingLoop            = BuildingConstructionLoop        // Only played if we DON'T spawn a worker
  6970.         SelfRepairFromDamageLoop    = WallConstructionLoop
  6971.         SelfRepairFromRubbleLoop    = BuildingConstructionLoop
  6972.     End
  6973.  
  6974.     Body                = StructureBody ModuleTag_05
  6975.         MaxHealth         = 1500.0
  6976.     End
  6977.      
  6978.     // These should always appear together on wall segments
  6979.     Behavior = KeepObjectDie ModuleTag_IWantRubble 
  6980.         DeathTypes            = ALL -SUICIDED
  6981.     End
  6982.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  6983.         DeathTypes            = NONE +SUICIDED
  6984.         DestructionDelay = 5000
  6985.     End                                                
  6986.     // These should always appear together on wall segments
  6987.  
  6988.     Behavior = WallHubBehavior ModuleTag_Build_A_Span
  6989.     
  6990.         Options = OPTION_ONE
  6991.         MaxBuildoutDistance = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  6992.  
  6993.         //This defines the pattern built on flat terrain
  6994.         SegmentTemplateName = MenWallSegmentSmall
  6995.         
  6996.         HubCapTemplateName = MenWallHubSmall
  6997.         DefaultSegmentTemplateName = MenWallSegmentSmall
  6998.         
  6999.         BuilderRadius = 20.0 ; this matches the cylinder in my objects geometery
  7000.         
  7001.         ;CliffCapTemplateName = [NAME]        
  7002.         ;ShoreCapTemplateName = [NAME]        
  7003.         ;BorderCapTemplateName = [NAME]        
  7004.         ;ElevatedSegmentTemplateName = [NAME]
  7005.         
  7006.     End
  7007.  
  7008.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Hub
  7009.         ReplaceWith = GondorCastleWallHub
  7010.         TriggeredBy = Upgrade_MenWallHub
  7011.         ConflictsWith = Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  7012.     End
  7013.         
  7014.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Gate
  7015.         ReplaceWith = MenWallGateSmall
  7016.         TriggeredBy = Upgrade_MenWallRegularGate
  7017.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  7018.     End
  7019.  
  7020.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_PosternGate
  7021.         ReplaceWith = MenWallPosternGateSmall
  7022.         TriggeredBy = Upgrade_MenWallPosternGate
  7023.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  7024.     End
  7025.  
  7026.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Tower
  7027.         ReplaceWith = MenWallTowerSmall
  7028.         TriggeredBy = Upgrade_MenWallTower
  7029.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTrebuchet
  7030.     End
  7031.  
  7032.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Trebuchet
  7033.         ReplaceWith = MenWallTrebuchetSmall
  7034.         TriggeredBy = Upgrade_MenWallTrebuchet
  7035.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower
  7036.     End
  7037.  
  7038.     Behavior = ProductionUpdate ModuleTag_RequiredForUpgradeProduction
  7039.     End
  7040.   
  7041.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  7042.         Radius = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  7043.         Upgrade = Upgrade_MenFortressNumenorStonework
  7044.         ObjectFilter = ANY +MenFortressCitadel
  7045.     End
  7046.   
  7047.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  7048.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  7049.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  7050.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  7051.     End
  7052.  
  7053.     Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones
  7054.         TriggeredBy            = Upgrade_MenFortressNumenorStonework        
  7055.         AddConditionFlags    = UPGRADE_NUMENOR_STONEWORK
  7056.         Permanent            = Yes
  7057.     End
  7058.  
  7059.     Geometry              = CYLINDER
  7060.     GeometryMajorRadius   = 20.0 ; 
  7061.     GeometryMinorRadius   = 20.0 ; 
  7062.     GeometryHeight        = 70.0
  7063.     
  7064.     AdditionalGeometry    = BOX
  7065.     GeometryMajorRadius   = 10.0  
  7066.     GeometryMinorRadius   = 60.0 ; must be a multiple of 20
  7067.     GeometryHeight        = 40
  7068.  
  7069.     
  7070.     GeometryIsSmall       = No
  7071.     Shadow                = SHADOW_VOLUME
  7072.     BuildCompletion     = PLACED_BY_PLAYER
  7073.     
  7074. End
  7075.  
  7076.  
  7077. ;---------------------------------------------------------
  7078. Object MenWallUpgradeNodeSmall
  7079.    
  7080.    ; *** ART Parameters ***
  7081.      Draw = W3DScriptedModelDraw ModuleTag_Draw
  7082.          OkToChangeModelColor  = Yes
  7083.          UseStandardModelNames = Yes
  7084.          DefaultModelConditionState
  7085.              Model = GBWallUpgrd
  7086.          End
  7087.         IdleAnimationState
  7088.             Flags = ADJUST_HEIGHT_BY_CONSTRUCTION_PERCENT
  7089.             Animation                =    ReallyDamagedanimation
  7090.                 AnimationName        =     GBWallrampart.GBWallrampart
  7091.                 AnimationMode        =    LOOP
  7092.                End
  7093.                StateName = STATE_None
  7094.         End    
  7095.         
  7096.         ModelConditionState = SNOW 
  7097.             Model   = GBWallUpgrd
  7098.             Texture    = GBFortress1.tga GBFortress1_snow.tga
  7099.         End    
  7100.         
  7101.      End 
  7102.         
  7103.     ; ***DESIGN parameters ***
  7104.     DisplayName         = OBJECT:GondorCastleWallUpgradeNodeSmall
  7105.     Side                = Gondor
  7106.     EditorSorting       = STRUCTURE
  7107.     ThreatLevel = 1.0
  7108.       
  7109.     BuildCost           = 50
  7110.     BuildTime           = 20.0           ; in seconds
  7111.     VisionRange         = 160.0          ; Shroud clearing distance
  7112.     ShroudClearingRange = 160
  7113.  
  7114.   
  7115.     CommandSet = MenWallUpgradeNodeCommandSet
  7116.      
  7117.     ; *** AUDIO Parameters ***
  7118.  
  7119.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  7120.  
  7121.     VoiceSelect                        = Gui_PlotSelect2        ;WallHubSelect
  7122.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  7123.  
  7124.     SoundOnDamaged                    = BuildingLightDamageStone
  7125.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  7126.  
  7127.     UnitSpecificSounds
  7128.         UnderConstruction        = BuildingConstructionLoop      ;Built first time
  7129.         ; UnderRepairFromDamage    = NoSound                        ; Repaired No animation on the building, so don't bother playing sound
  7130.         UnderRepairFromRubble    = BuildingConstructionLoop        ;Repaired from completely destroyed (not used???)
  7131.     End
  7132.  
  7133.     CampnessValue = CAMPNESS_WALL
  7134.      
  7135.     ; *** ENGINEERING Parameters ***
  7136.     RadarPriority       = STRUCTURE
  7137.     KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE WALL_SEGMENT SCALEABLE_WALL MADE_OF_STONE CAN_CAST_REFLECTIONS
  7138.   
  7139.     Behavior            = GettingBuiltBehavior ModuleTag_04
  7140.         UseSpawnTimerWithoutWorker         = Yes
  7141.            SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  7142.         SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
  7143.          SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  7144.          SelfRepairFromRubbleLoop  = BuildingConstructionLoop
  7145.     End
  7146.      
  7147.     Body                = StructureBody ModuleTag_05
  7148.         MaxHealth         = 1500.0
  7149.     End
  7150.       
  7151.     // These should always appear together on wall segments
  7152.     Behavior = KeepObjectDie ModuleTag_IWantRubble 
  7153.         DeathTypes            = ALL -SUICIDED
  7154.     End
  7155.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  7156.         DeathTypes            = NONE +SUICIDED
  7157.         DestructionDelay = 5000
  7158.     End                                                
  7159.     // These should always appear together on wall segments
  7160.  
  7161.  
  7162.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Hub
  7163.         ReplaceWith = GondorCastleWallSegment
  7164.         AndThenAddA = GondorCastleWallHub
  7165.         AndThenAddA = GondorCastleWallSegment
  7166.         TriggeredBy = Upgrade_MenWallHub
  7167.         ConflictsWith = Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  7168.     End
  7169.         
  7170.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Gate
  7171.         ReplaceWith = MenWallGate
  7172.         TriggeredBy = Upgrade_MenWallRegularGate
  7173.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallPosternGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  7174.     End
  7175.  
  7176.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_PosternGate
  7177.         ReplaceWith = MenWallPosternGate
  7178.         TriggeredBy = Upgrade_MenWallPosternGate
  7179.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallTower Upgrade_MenWallTrebuchet
  7180.     End
  7181.  
  7182.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Tower
  7183.         ReplaceWith = GondorCastleWallTower
  7184.         TriggeredBy = Upgrade_MenWallTower
  7185.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTrebuchet
  7186.     End
  7187.  
  7188.     Behavior = ReplaceSelfUpgrade ModuleTag_Replace_With_Trebuchet
  7189.         ReplaceWith = GondorCastleWallTrebuchet
  7190.         TriggeredBy = Upgrade_MenWallTrebuchet
  7191.         ConflictsWith = Upgrade_MenWallHub Upgrade_MenWallRegularGate Upgrade_MenWallPosternGate Upgrade_MenWallTower
  7192.     End
  7193.  
  7194.     Behavior = ProductionUpdate ModuleTag_RequiredForUpgradeProduction
  7195.     End
  7196.   
  7197.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  7198.         Radius = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  7199.         Upgrade = Upgrade_MenFortressNumenorStonework
  7200.         ObjectFilter = ANY +MenFortressCitadel
  7201.     End
  7202.   
  7203.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  7204.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  7205.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  7206.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  7207.     End
  7208.  
  7209.     Geometry              = BOX
  7210.     GeometryMajorRadius   = 25.0  
  7211.     GeometryMinorRadius   = 98.0 ; must be a multiple of 20
  7212.     GeometryHeight        = 50
  7213.  
  7214.     AdditionalGeometry    = CYLINDER
  7215.     GeometryMajorRadius   = 40.0 
  7216.     GeometryMinorRadius   = 40.0 
  7217.     GeometryHeight        = 50.0
  7218.  
  7219.    
  7220.     GeometryIsSmall       = No
  7221.     Shadow                = SHADOW_VOLUME
  7222.     BuildCompletion     = PLACED_BY_PLAYER
  7223. End
  7224.    
  7225. ;-----------------------------------------------------------------------   
  7226. Object MenWallCliffCap
  7227.  
  7228.     SelectPortrait  =  BPGWall_Wall
  7229.     ButtonImage  =  BGWall_Wall
  7230.   
  7231.   ; *** ART Parameters ***
  7232.     Draw = W3DScriptedModelDraw ModuleTag_Draw
  7233.         OkToChangeModelColor  = Yes
  7234.         UseStandardModelNames = Yes
  7235.         DefaultModelConditionState
  7236.             Model = GBWallNE
  7237.         End
  7238.  
  7239.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK AWAITING_CONSTRUCTION
  7240.             Model   = GBWallNE_A
  7241.             Texture        = GBWall.tga GBFortress1_U.tga
  7242.         End    
  7243.         ModelConditionState = SNOW AWAITING_CONSTRUCTION
  7244.             Model   = GBWallNE_A
  7245.             Texture    = GBWall.tga GBWall_snow.tga
  7246.         End    
  7247.         ModelConditionState   = AWAITING_CONSTRUCTION 
  7248.             Model               = GBWallNE_A
  7249.         End
  7250.         AnimationState        = AWAITING_CONSTRUCTION
  7251.             Animation           =  GBWallNE_A
  7252.                 AnimationName     =  GBWallNE_A.GBWallNE_A
  7253.                 AnimationMode     = MANUAL
  7254.                 AnimationBlendTime = 0
  7255.             End
  7256.             Flags                  = START_FRAME_FIRST
  7257.         End
  7258.         
  7259.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  7260.             Model = GBWallNE_A
  7261.             Texture        = GBWall.tga GBFortress1_U.tga
  7262.             ParticleSysBone   = NONE WallConstructDust FollowBone:Yes
  7263.         End                
  7264.         ModelConditionState = SNOW ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  7265.             Model = GBWallNE_A
  7266.             Texture    = GBWall.tga GBWall_snow.tga
  7267.             ParticleSysBone   = NONE WallConstructDust FollowBone:Yes
  7268.         End
  7269.         ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  7270.             Model               = GBWallNE_A
  7271.             ParticleSysBone   = NONE WallConstructDust FollowBone:Yes
  7272.         End
  7273.         AnimationState        = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED
  7274.             Animation           =  GBWallNE_A
  7275.                 AnimationName     =  GBWallNE_A.GBWallNE_A
  7276.                 AnimationMode     = MANUAL
  7277.                 AnimationBlendTime = 0
  7278.             End
  7279.             Flags                  = START_FRAME_FIRST
  7280.         End
  7281.         
  7282.  
  7283.         ModelConditionState  = DAMAGED
  7284.             Model         = GBWallNE_D1
  7285.         End
  7286.         AnimationState = DAMAGED
  7287.             EnteringStateFX    = FX_WallDamaged
  7288.         End     
  7289.  
  7290.  
  7291.         ModelConditionState  = REALLYDAMAGED
  7292.             Model         = GBWallNE_D2
  7293.         End
  7294.         AnimationState = REALLYDAMAGED
  7295.             Animation            =    DamagedAnimation
  7296.                 AnimationName        =    GBWallNE_D2.GBWallNE_D2
  7297.                 AnimationMode        =    ONCE
  7298.                End
  7299.             EnteringStateFX    = FX_WallDamaged
  7300.         End     
  7301.  
  7302.         ModelConditionState  = COLLAPSING
  7303.             Model         = GBWallN_D3
  7304.         End
  7305.         
  7306.         AnimationState = COLLAPSING
  7307.               Animation                =    RubbleAnimation
  7308.                 AnimationName        =     GBWallNE_D3.GBWallNE_D3
  7309.                 AnimationMode        =    ONCE
  7310.               End
  7311.               ParticleSysBone NONE WallDestructionDust
  7312.             EnteringStateFX            = FX_StructureMediumCollapse
  7313.         End
  7314.  
  7315.         ModelConditionState  = RUBBLE
  7316.             Model         = None ;GBWall_Rubble
  7317.         End
  7318.         AnimationState = RUBBLE
  7319.             BeginScript
  7320.                 CurDrawableHideSubObject("ModuleTag_DrawFloor")
  7321.             EndScript
  7322.         End
  7323.  
  7324.         ModelConditionState  = POST_RUBBLE
  7325.             Model         = None ;GBWall_Rubble
  7326.         End
  7327.  
  7328.         ModelConditionState  = POST_COLLAPSE
  7329.             Model         = None
  7330.         End
  7331.  
  7332.         ModelConditionState = UPGRADE_NUMENOR_STONEWORK
  7333.             Model        = GBWallNE
  7334.             Texture        = GBWall.tga GBFortress1_U.tga
  7335.         End
  7336.  
  7337.         ModelConditionState = SNOW
  7338.             Model   = GBWallNE
  7339.             Texture    = GBWall.tga GBWall_snow.tga
  7340.         End    
  7341.                 
  7342.     End
  7343.    
  7344. ;    Draw = W3DFloorDraw ModuleTag_DrawFloor    
  7345. ;            StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD
  7346. ;          ModelName = GBWallN_Bib
  7347. ;          WeatherTexture        = SNOWY GBWall_Bib_Snow.tga
  7348. ;    End
  7349.   
  7350.   ; ***DESIGN parameters ***
  7351.   DisplayName         = OBJECT:GondorCastleWallSegment
  7352.   Side                = Men
  7353.   EditorSorting       = STRUCTURE
  7354.   ThreatLevel = 1.0
  7355.  
  7356.  
  7357.     CommandSet = MenWallCliffCapCommandSet
  7358.  
  7359.  
  7360.   BuildCost           = MEN_WALLSEGMENT_SMALL_BUILDCOST
  7361.   BuildTime           = MEN_WALLSEGMENT_SMALL_BUILDTIME
  7362.   VisionRange         = MEN_WALLSEGMENT_SMALL_VISION_RANGE
  7363.   ShroudClearingRange = MEN_WALLSEGMENT_SMALL_SHROUD_CLEAR
  7364.  
  7365.   ; *** AUDIO Parameters ***
  7366.  
  7367.     #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
  7368.  
  7369.     VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction
  7370.  
  7371.     SoundOnDamaged                    = BuildingLightDamageStone
  7372.     SoundOnReallyDamaged            = BuildingHeavyDamageStone
  7373.  
  7374.     UnitSpecificSounds
  7375.         UnderConstruction        = BuildingConstructionLoop      ;Built first time
  7376.         ; UnderRepairFromDamage    = NoSound                        ; Repaired No animation on the building, so don't bother playing sound
  7377.         UnderRepairFromRubble    = BuildingConstructionLoop        ;Repaired from completely destroyed (not used???)
  7378.     End
  7379.  
  7380.     CampnessValue = CAMPNESS_WALL
  7381.  
  7382.   ; *** ENGINEERING Parameters ***
  7383.   RadarPriority       = STRUCTURE
  7384.   KindOf              = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE DEFENSIVE_WALL MADE_OF_STONE CAN_CAST_REFLECTIONS
  7385.   
  7386.   ThreatBreakdown MenWallCliffCap_DetailedThreat
  7387.         AIKindOf = WALL
  7388.   End
  7389.  
  7390.   Behavior            = GettingBuiltBehavior ModuleTag_04
  7391.     UseSpawnTimerWithoutWorker         = Yes
  7392.        SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
  7393.     SelfBuildingLoop = WallConstructionLoop ; Only played if we DON'T spawn a worker
  7394.     SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
  7395.     SelfRepairFromRubbleLoop  = WallConstructionLoop
  7396.   End
  7397.  
  7398.   Body                = StructureBody ModuleTag_05
  7399.     MaxHealth         = MEN_WALLSEGMENT_SMALL_HEALTH
  7400.   End
  7401.  
  7402.     // These should always appear together on wall segments
  7403.     Behavior = KeepObjectDie ModuleTag_IWantRubble 
  7404.         DeathTypes            = ALL -SUICIDED
  7405.     End
  7406.     Behavior            = SlowDeathBehavior ModuleTag_SlowDeath
  7407.         DeathTypes            = NONE +SUICIDED
  7408.         DestructionDelay    = 5000
  7409.     End                                                
  7410.     // These should always appear together on wall segments
  7411.      
  7412. ;    Behavior            = DestroyDie ModuleTag_07
  7413. ;        ;nothing
  7414. ;    End
  7415.   
  7416.     Behavior = InheritUpgradeCreate ModuleTag_InheritNumenorStonework
  7417.         Radius = MEN_FORTRESS_WALL_EFFECTIVE_RADIUS
  7418.         Upgrade = Upgrade_MenFortressNumenorStonework
  7419.         ObjectFilter = ANY +MenFortressCitadel
  7420.     End
  7421.   
  7422.     Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
  7423.         TriggeredBy                = Upgrade_MenFortressNumenorStonework
  7424.         AttributeModifier        = NumenorStoneworkKeep_Bonus
  7425.         CustomAnimAndDuration    = AnimState:UPGRADE_NUMENOR_STONEWORK AnimTime:0
  7426.     End
  7427.  
  7428.     Geometry                  = BOX
  7429.     GeometryMajorRadius       = 10.0 
  7430.     GeometryMinorRadius       = 40.0   
  7431.     GeometryHeight            = 80
  7432.     GeometryIsSmall            = No
  7433.     GeometryOffset            = X:0 Y:-20 Z:-40
  7434.   
  7435.   
  7436.     Shadow                    = SHADOW_VOLUME
  7437.     BuildCompletion            = PLACED_BY_PLAYER
  7438. End
  7439.  
  7440.  
  7441.  
  7442.