Imladris production
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Imladris production

Le forum français de création de cartes et de mods pour Bataille pour la Terre du Milieu
 
AccueilRechercherDernières imagesS'enregistrerConnexion
Le Deal du moment :
Pokémon EV06 : où acheter le Bundle Lot ...
Voir le deal

 

 Questions

Aller en bas 
4 participants
AuteurMessage
Saroumane
Moddeur confirmé
Moddeur confirmé
Saroumane


Nombre de messages : 202
Location : Où j'habite ?
Add-On : Oui
Date d'inscription : 14/07/2012

Questions Empty
MessageSujet: Questions   Questions Icon_minitimeVen 16 Nov - 22:09

Salut à tous,

J'aimerai bien finir mon mods mais pour cela j'ai besoin de votre aide =)

-Est-il possible de créer un héros en prenant l'apparence de Sauron ? si oui comment ?
-Comment prendre l'apparence d'une unité (ex: sorcier) pour mettre cette apparence sur un héros ?
-Comment changer les couleurs des héros ?
-Je m'adresse plus particulièrement à Korl mais si quelqu'un connais le moyen de le faire alors =), Comment faire pour créer des hordes de héros (ex: horde de Gandalf) et aussi comment faire pour mettre des aigles autour de la forteresse ?

Voilà je pense que c'est tout merci d'avance et bonne soirée Very Happy
Revenir en haut Aller en bas
grego
Moddeur expert
Moddeur expert
grego


Nombre de messages : 655
Age : 25
Location : Chez moi
Add-On : Bien sur que oui!
Date d'inscription : 28/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeVen 16 Nov - 22:15

Salut
Saroumane a écrit:

-Est-il possible de créer un héros en prenant l'apparence de Sauron ? si oui comment ?
Oui tu reprend le code d'un héro comme Gandalf.ini et tu change tout les noms (gandalf)
Saroumane a écrit:

-Comment prendre l'apparence d'une unité (ex: sorcier) pour mettre cette apparence sur un héros ?
Tu veut dire comme le pouvoir des heros que l'ont créer (pour se dissimuler) ?
Saroumane a écrit:

-Comment changer les couleurs des héros ?
Ou tu change depuis les INI des héro comme galdalf.ini ou tu passe avec la 3D.

Voilà ses tout se que je sais !
J'espere que sa ta aider .
Je peut pas te dire tout en detaille car je vien de reprendre donc ...


Revenir en haut Aller en bas
Saroumane
Moddeur confirmé
Moddeur confirmé
Saroumane


Nombre de messages : 202
Location : Où j'habite ?
Add-On : Oui
Date d'inscription : 14/07/2012

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeSam 17 Nov - 10:48

Merci grego, j'ai pas très bien compris le truc avec Sauron enfet moi je veux créer un héros avec l'apparence de Sauron juste l'apparence, pareil pour les sorciers.

/!\Quand je dis héros je ne parle pas des héros crées mais des héros dans l'ini que je créer moi même^^

Revenir en haut Aller en bas
grego
Moddeur expert
Moddeur expert
grego


Nombre de messages : 655
Age : 25
Location : Chez moi
Add-On : Bien sur que oui!
Date d'inscription : 28/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeSam 17 Nov - 12:39

Alors tu reprend l'ini de sauron dans l'ini du jeu et tu change tout se qui est le nom du perso SAUF TOUT SE QUI EST AUDIO ET 3D. (sauf si tu veut le changer)
Surtout n'oublie pas de rajouter ton perso dans le gamedata.ini (si je me souvien bien) , tu copie sauron et tu met le nom de ton perso si je me souvien et met le dans un batiment xD.
Et pour prendre leurs apparence tu reprend le code pour que le roi sorcier a un cheval ou pas et tu le modifie pour que sa a l'apparence d'un sorcier par exemple.
Revenir en haut Aller en bas
Saroumane
Moddeur confirmé
Moddeur confirmé
Saroumane


Nombre de messages : 202
Location : Où j'habite ?
Add-On : Oui
Date d'inscription : 14/07/2012

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeSam 17 Nov - 13:13

Ok je pense avoir compris merci^^
Revenir en haut Aller en bas
Korl
Moddeur expert
Moddeur expert
Korl


Nombre de messages : 564
Add-On : Oui
Date d'inscription : 26/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeDim 18 Nov - 14:12

Yop

Ta Horde de gandalf tu veux que l'I.a puisse la joué ou juste toit?
Pour l'aigle il s’agit d'un petit code hyper simple :

https://imladrisproduction.forumotion.com/t61-codes-utiles-et-sympas
Sur ce tutos tu en saura plus.
Note : il faut crée un object special esclave pour l'aigle par exemple.
Exemple :
Code:

;-----------------------------------------------------------------------------
;
;   Gwaihir.ini                ; il s'aggit de l'Aigle géant pour la fortress elfe.
;
;-----------------------------------------------------------------------------

; aka Gwaihir, Giant Eagle, GiantEagle
Object GondorGwaihir01 

   ShockwaveResistance = SHOCKWAVE_RESISTANCE_ALWAYS

   Scale = 1            ;0.9
                     
   ; *** ART Parameters ***

   SelectPortrait        = HPGwahir
   ButtonImage      = HIGwahir

   Draw = W3DScriptedModelDraw ModuleTag_01
       
        OkToChangeModelColor = Yes
       
        StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD

      ExtraPublicBone = B_Passenger
   
      DefaultModelConditionState
         Model              = GUGwaihir_SKN
         Skeleton            = GUGwaihir_SKL
      End

      ModelConditionState      =   USER_3
         Model              = GUGwaihir_SKN
         Texture            = GUGwaihir.tga GUGwaihir_White.tga
      End
      
      IdleAnimationState
         StateName = Idle
         Animation          = FlyB
            AnimationName    = GUGwaihir_HVRA
            AnimationMode    = LOOP
            AnimationBlendTime = 10
            
         End
      End



      AnimationState  STUNNED SPECIAL_DAMAGED
         StateName =  STUNNED
         Animation = HitB
            AnimationName = GUGwaihir_HITB
            AnimationMode = ONCE
            AnimationBlendTime = 6
         End
      End
      AnimationState  STUNNED
         Animation = HitB
            AnimationName = GUGwaihir_HITA
            AnimationMode = ONCE
            AnimationBlendTime = 6
         End
      End


       AnimationState   = BACKING_UP
           StateName = backup
           Animation = FlyB
              AnimationName = GUGwaihir_FLYB
              AnimationMode = LOOP
              AnimationBlendTime = 9
           End
        End

        AnimationState = DIVING
           StateName = Diving
           Animation = DiveA
              AnimationName = GUGwaihir_DIVA
              AnimationMode = LOOP
              AnimationBlendTime = 9
           End
        End

      AnimationState = ABOUT_TO_HIT                        ; clawing
         StateName = Claw
         Animation = Claw
            AnimationName = GUGwaihir_ATKB
            AnimationMode = LOOP
            AnimationBlendTime = 9
         End
      End

      ;--- HARD FLAPPING ------------------------
      AnimationState = CLIMBING
         StateName = Climbing
         Animation = FlyB(climb)
            AnimationName = GUGwaihir_FLYB
            AnimationMode = LOOP
            AnimationBlendTime = 9
            AnimationSpeedFactorRange = 1.5 1.55
         End
      End
      AnimationState = FREEFALL
         StateName = Freefall
         Animation = Freefall(ilde)
            AnimationName = GUGwaihir_IDLA
            AnimationMode = LOOP
            AnimationBlendTime = 9
            AnimationSpeedFactorRange = 0.7 0.75
         End
      End
   

      AnimationState = MOVING
         StateName = Moving
         Animation          = FLYA
            AnimationName    = GUGwaihir_FLYA
            AnimationMode    = LOOP
            AnimationBlendTime  = 12
         End

         BeginScript
             Prev = CurDrawablePrevAnimationState()
             if Prev == "Idle"   then CurDrawableSetTransitionAnimState("Trans_Begin_Moving") return end
          EndScript
      End
         TransitionState = Trans_Begin_Moving
           Animation = Transition
              AnimationName = GUGwaihir_HVRC
              AnimationMode = ONCE
              AnimationBlendTime = 4
           End 
        End         

       TransitionState = Trans_Dying
         Animation = Transition
            AnimationName = GUGwaihir_DIED
            AnimationMode = ONCE
            AnimationBlendTime = 9
         End 
      End         


      AnimationState = DYING DEATH_1
         StateName = DYING
         Animation = DyingA
            AnimationName = GUGwaihir_DIEE
            AnimationMode = LOOP
            AnimationBlendTime = 9
         End
         BeginScript
            Prev = CurDrawablePrevAnimationState()
            if Prev == "Idle"   then CurDrawableSetTransitionAnimState("Trans_Dying") return end
            if Prev == "Moving"   then CurDrawableSetTransitionAnimState("Trans_Dying") return end
         EndScript
       End

      AnimationState = DYING DEATH_2
         StateName = DYING
         Animation = DyingA
            AnimationName = GUGwaihir_HVRA
            AnimationMode = LOOP
            AnimationBlendTime = 9
         End
       End




   End
   
   ; ***DESIGN parameters ***
   Side            = Elves
   EditorSorting      = UNIT
   ThreatLevel         = GWAIHIR_THREAT_LEVEL
   ThingClass         = LARGE_MONSTER
   TransportSlotCount   = TRANSPORTSLOTCOUNT_NOT_TRANSPORTABLE

        Scale = 0.4
 
   WeaponSet
      Conditions      = None
      Weapon             = PRIMARY      EagleGrabAttack
      PreferredAgainst   = PRIMARY      INFANTRY THROWN_OBJECT CAVALRY

      Weapon            = SECONDARY      EagleClawAttack
      OnlyAgainst         = SECONDARY      MONSTER

      Weapon              = TERTIARY      EaglePlowAttack
      PreferredAgainst   = TERTIARY      STRUCTURE MACHINE HORDE   
      
      Weapon            = QUATERNARY   EagleClawWyrmAttack
      PreferredAgainst   = QUATERNARY   CLEANUP_HAZARD            ; Used as a user defined kindof, only the wyrm uses it.
   End

   ArmorSet
      Conditions      = None
      Armor          = EagleArmor
      DamageFX        = GwaihirDamageFX
   End   
   
   VisionRange = VISION_FLIER
   ShroudClearingRange = SHROUD_CLEAR_FLIER

   BountyValue = GONDOR_GWAIHIR_BOUNTY_VALUE
   DisplayName = OBJECT:GondorGwiegher
   ;//DisplayMeleeDamage = EAGLE_PLOW_DAMAGE_INNER

   CrusherLevel          = 3  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
   RamPower = 30;
   RamZMult = 0.5;
   CommandSet = GwaihirCommandSet
   CommandPoints = 50
   

   ; *** AUDIO Parameters ***;

   VoiceAttack         = EagleVoiceAttack
   VoiceMove         = EagleVoiceMove
   VoicePriority         = 60
   VoiceSelect         = EagleVoiceSelect
   VoiceGuard         = EagleVoiceMove

   SoundAmbient         = EagleAmbienceVoice
   SoundImpact         = ImpactHorse

   
   ;UnitSpecificSounds
   ;End

    #include "..\..\..\includes\StandardUnitEvaEvents.inc"

   ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
      MaxUpdateRangeCap = 800
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYA Frames: 2
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYB Frames: 2
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYC Frames: 2 63
      ;AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYC Frames: 4 34

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HVRA Frames: 4
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HVRC Frames: 4

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HITA Frames: 0
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HITB Frames: 0

      AnimationSound = Sound: EagleHurt      Animation:GUGwaihir_SKL.GUGWAIHIR_HITA Frames: 1
      AnimationSound = Sound: EagleHurt      Animation:GUGwaihir_SKL.GUGWAIHIR_HITB Frames: 1
      AnimationSound = Sound: EagleHurt      Animation:GUGwaihir_SKL.GUGWAIHIR_DIED Frames: 1

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_ATKB Frames: 0
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_GRBB Frames: 0

      AnimationSound = Sound: EagleAttack      Animation:GUGwaihir_SKL.GUGWAIHIR_ATKB Frames: 1
      AnimationSound = Sound: EagleAttack      Animation:GUGwaihir_SKL.GUGWAIHIR_GRBB Frames: 1

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_DIED Frames: 0
      AnimationSound = Sound: TrollBodyfall      Animation:GUGwaihir_SKL.GUGWAIHIR_DIEF Frames: 2
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_DIEF Frames: 0
   End

   ; Tie into LargeGroupAudio system
   ; No, we never do anything with this unit
   ;Behavior = LargeGroupAudioUpdate ModuleTag_LGAU
   ;   Key = Eagle Unit Flyer
   ;End


   ; *** ENGINEERING Parameters ***
   RadarPriority      = UNIT
   KindOf            = PRELOAD HERO SELECTABLE CAN_CAST_REFLECTIONS SCORE NO_FREEWILL_ENTER MONSTER SCARY CANNOT_RETALIATE
   

   
   Body = ActiveBody ModuleTag_02
      CheerRadius      = EMOTION_CHEER_RADIUS
      MaxHealth        = GIANT_EAGLE_HEALTH   ;BALANCE Gwaihir Health
;      MaxHealthDamaged  = 500
;      RecoveryTime      = 5000

      HealingBuffFx = None
   End

   Behavior = AutoHealBehavior ModuleTag_GwaihirHealing
      StartsActive = Yes
      HealingAmount = HERO_HEAL_AMOUNT
      HealingDelay = 1000
      StartHealingDelay = 15000
      HealOnlyIfNotInCombat = Yes
   End
   
   Behavior = GiantBirdAIUpdate ModuleTag_GiantBirdAI
      AutoAcquireEnemiesWhenIdle   =   Yes ATTACK_BUILDINGS
      MoodAttackCheckRate         =   500
      AILuaEventsList            =   GwaihirFunctions   
      
      FollowThroughDistance      =   160
      FollowThroughCheckStep      =   50
      FollowThroughGradient      =   1.0
      
      GrabTossTimeTrigger         =   3.0
      GrabTossHeightTrigger      =  80.0
      TossFX            = FX_DiebyFalling
      SpecialContactPoints      = Swoop
      
      AttackPriority = AttackPriority_Eagle
   End

   Behavior = ModelConditionUpgrade ModuleTag_All_FactionUpgrade
      TriggeredBy            = Upgrade_AllFactionUpgrade
      AddConditionFlags      = USER_3
      Permanent            = Yes
   End
   
   LocomotorSet
      Locomotor = FellBeastLocomotor ;BALANCE Gwaihir
      Condition = SET_NORMAL
      Speed    = 88
   End
   LocomotorSet
      Locomotor = FellBeastLocomotor ;BALANCE Gwaihir
      Condition = SET_SUPERSONIC
      Speed    = 114
   End
   LocomotorSet
      Locomotor = FellBeastLocomotor ; BALANCE Gwaihir
      Condition = SET_WANDER
      Speed    = 78
   End

   
   Behavior = PhysicsBehavior ModuleTag_04
   End
   
   Behavior = NotifyTargetsOfImminentProbableCrushingUpdate ModuleTag_NotifyCrushScan
   End

   
   Behavior = TransportContain TransportContainModuleTag
      ObjectStatusOfContained = UNSELECTABLE UNATTACKABLE
      PassengerFilter = ANY +INFANTRY +HULK +CAVALRY +GRAB_AND_DROP -HERO -PORTER
      Slots = 1
      ShowPips = No
      CanGrabStructure = Yes
      AllowEnemiesInside = Yes
      AllowNeutralInside = Yes
      AllowAlliesInside  = No
      DamagePercentToUnits = 100%
      KillPassengersOnDeath = Yes
      PassengerBonePrefix = PassengerBone:B_Passenger      KindOf:GRAB_AND_DROP
      GrabWeapon = FellbeastGrabWeapon      ; fire this weapon when eagle grabs a victim
      FireGrabWeaponOnVictim = No
      
      ReleaseSnappyness = 0.05 ; 1.0 is very snappy, 0.0 is very loose

   End
   
   Behavior = SquishCollide ModuleTag_06
      ;nothing
   End
   
;   Behavior = GiantBirdSlowDeathBehavior ModuleTag_GiantBirdSlowDeath
;      DeathTypes = ALL ;-KNOCKBACK
;      SinkDelay = 8000
;      SinkRate = 1.6    ; in Dist/Sec
;      DestructionDelay = 15000
;      
;      Sound   = INITIAL   EagleVoiceDie         ;FellBeastDie
;      Weapon   = HIT_GROUND   GondorTrebuchetRockWarhead
;      FX = INITIAL FX_FellBeastSpell
;      Sound   = HIT_GROUND   FellBeastDieImpact
;
;      CrashAvoidKindOfs = STRUCTURE
;      CrashAvoidRadius  = 800
;      CrashAvoidStrength = 0.2
;      NeedToMaintainFlailingHeight = No
;                           
;   End

   Behavior = SlowDeathBehavior ModuleTag_SlowDeath
      DeathTypes = ALL -FADED
      DestructionDelay = 1000
      ShadowWhenDead = No
      FX = INITIAL FX_GwaihirDeath
      Sound = INITIAL EagleVoiceDie
           DeathFlags = DEATH_1
   End
   
     Behavior = SlowDeathBehavior ModuleTag_FadeDeath
      DeathTypes = NONE +FADED
      FadeDelay = 0
      FadeTime = 2500
      DestructionDelay = 2500
      ;Sound = INITIAL EagleVoiceDie   
           DeathFlags = DEATH_2
   End
 
   Behavior = DualWeaponBehavior ModuleTag_10
      SwitchWeaponOnCloseRangeDistance = 24
   End
   
   FormationPreviewDecal
           Texture = FPflyingUnitDecal
           Width = 128
           Height = 128
       End

 
   /////////////////////
   // AISpecialPowers
   /////////////////////


   Behavior = AISpecialPowerUpdate GondorFighterHordeStanceBattle
      CommandButtonName = Command_SetStanceBattle
      SpecialPowerAIType = AI_SPECIAL_POWER_STANCEBATTLE
   End

   Behavior = AISpecialPowerUpdate GondorFighterHordeStanceAggressive
      CommandButtonName = Command_SetStanceAggressive
      SpecialPowerAIType = AI_SPECIAL_POWER_STANCEAGGRESSIVE
   End

   Behavior = AISpecialPowerUpdate GondorFighterHordeHoldGround
      CommandButtonName = Command_SetStanceHoldGround
      SpecialPowerAIType = AI_SPECIAL_POWER_STANCEHOLDGROUND
   End


   Geometry            = CYLINDER
   GeometryMajorRadius    = 30.0
   GeometryMinorRadius    = 30.0
   GeometryHeight         = 16.0
   GeometryIsSmall         = No
   
   HealthBoxScale         = 3.0
   HealthBoxHeightOffset   = 25.0   
   
   Shadow = SHADOW_VOLUME_NON_SELF_3   // volumetric shadow that doesn't cast onto all objects using SHADOW_VOLUME_NON_SELF_3
   ShadowSunAngle = 89               // clamp the angle so shadow casts straight down.
End

//---------------------------------------------------------------------
ChildObject GondorGwaihir_Summoned GondorGwaihir
   IsTrainable = No
   CommandPoints = 0

   KindOf = PRELOAD HERO SELECTABLE CAN_CAST_REFLECTIONS SCORE NO_FREEWILL_ENTER MONSTER SCARY CANNOT_RETALIATE SUMMONED

     Behavior = SlowDeathBehavior ModuleTag_FadeDeath
      DeathTypes = NONE +FADED
      FadeDelay = 0
      FadeTime = 2500
      DestructionDelay = 2500
      Sound = INITIAL SpellGenericUnsummonFasterMS
           DeathFlags = DEATH_2
   End
End

//---------------------------------------------------------------------
ChildObject ElvenFortressEagle GondorGwaihir
   ; this unit should cost 0 because the user is charged for the upgrade that creates it
   BuildCost = 0

   CommandPoints = 0
End

;------------------------------------------------------------------------------
;
;   These child objects are used in the fire drake lair.
;
ChildObject GondorGwaihir01_Slaved GondorGwaihir01

     EvaEnemyObjectSightedEvent = DiscoveredEnemyDrake
     EvaEnemyObjectSightedAfterRespawnEvent = DiscoveredEnemyDrake ; Event to run after the Fire Drake Lair is respawned. WARNING: This INI field only works for "SlavedUpdate.UseSlaverAsControlForEvaObjectSightedEvents = Yes" units

   ; Should be the same as WildFireDrake except with CREEP.
   KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS MONSTER CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT SCORE CREEP

   VisionRange = CREEP_VISION
   DisplayName = OBJECT:GondorGwiegher
   Behavior = SlavedUpdate ModuleTag_Slave
      GuardMaxRange      = 350
      GuardWanderRange   = 80
      UseSlaverAsControlForEvaObjectSightedEvents = Yes
   End

End

Cette fin de code implique un module esclave :

Citation :
;------------------------------------------------------------------------------
;
; These child objects are used in the fire drake lair.
;
ChildObject GondorGwaihir01_Slaved GondorGwaihir01

EvaEnemyObjectSightedEvent = DiscoveredEnemyDrake
EvaEnemyObjectSightedAfterRespawnEvent = DiscoveredEnemyDrake ; Event to run after the Fire Drake Lair is respawned. WARNING: This INI field only works for "SlavedUpdate.UseSlaverAsControlForEvaObjectSightedEvents = Yes" units

; Should be the same as WildFireDrake except with CREEP.
KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS MONSTER CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT SCORE CREEP

VisionRange = CREEP_VISION
DisplayName = OBJECT:GondorGwiegher
Behavior = SlavedUpdate ModuleTag_Slave
GuardMaxRange = 350
GuardWanderRange = 80
UseSlaverAsControlForEvaObjectSightedEvents = Yes
End

End

Puis ta forto :
Code:

;//------------------------------------------------------------------------------
;// This is the magic thing in the .bse file that tells how to center the base layout compared to the game position of the fortress
Object ElvenFortressCenterGeneric

   SelectPortrait = BPEFortress
   
   Draw = W3DScriptedModelDraw ModuleTag_01

       DefaultModelConditionState
            Model = None
       End
       
      ModelConditionState = WORLD_BUILDER
         Model = NBasePin
      End
   End
   
   Side         = Elves
   EditorSorting   = STRUCTURE
   KindOf         = IMMOBILE BASE_FOUNDATION CASTLE_CENTER
 
   Behavior = CastleBehavior ModuleTag_castle
      ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.   
      FilterValidOwnedEntries = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER            
   End 
End

;//------------------------------------------------------------------------------
;// These are the four corner buildplots.  Difference is just the BuildVariation flag they give the Expansion.
Object ElvenFortressExpansionPadCorner   
   
   SelectPortrait = BPEFortress_BuildPlot
   
   
   ;// *** ART Parameters ***
   Draw = W3DFloorDraw DrawFloorBase 
      ModelName = EBFoundation
   End
      
   Draw = W3DScriptedModelDraw ModuleTag_DrawMain
      DefaultModelConditionState
         Model = WBFoundationP         
      End
      ;//Remove the buildplot when it's been constructed on
      ModelConditionState = CONSTRUCTION_COMPLETE
         Model = None
      End         
   End

   ;//PlacementViewAngle  = 0

   ;// ***DESIGN parameters ***
   DisplayName        = OBJECT:ElvenBuildingFoundation
   Side                = Elves
   EditorSorting      = STRUCTURE
   ThreatLevel         = 1.0

   BuildCost          = 1
   BuildTime          = 5.0          ;// in seconds
   VisionRange        = 0.0          ;// Shroud clearing distance
   ShroudClearingRange = 0

   CommandSet = ElvenFortressExpansionPadCornerCommandSet

   ;// *** AUDIO Parameters ***

   VoiceSelect = Gui_PlotSelect2   ;MenFortressSelect


   ;// *** ENGINEERING Parameters ***   
   KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION UNATTACKABLE MP_COUNT_FOR_VICTORY NO_COLLIDE DO_NOT_CLASSIFY EXPANSION_PAD

   Behavior      = FoundationAIUpdate ModuleTag_foundationAI
      BuildVariation   = 2 ;// Will give BUILD_VARIATION_TWO to anything built on it
   End

   Behavior = CastleMemberBehavior ModuleTag_CMB
   End

   Body                = ImmortalBody ModuleTag_05
      MaxHealth        = 15000.0
   End

   Geometry            = CYLINDER
   GeometryMajorRadius      = 15.0
   GeometryMinorRadius      = 15.0
   GeometryHeight         = 0.8
   GeometryIsSmall         = No
   Shadow               = SHADOW_VOLUME
   BuildCompletion         = PLACED_BY_PLAYER
End

;// And these are the 3 on the sides.
ChildObject ElvenFortressExpansionPadSide ElvenFortressExpansionPadCorner
   
;   Draw = W3DScriptedModelDraw ModuleTag_DrawMain
;      DefaultModelConditionState
;         Model = EBFoundation
;      End
;   End

   CommandSet = ElvenFortressExpansionPadSideCommandSet

   Behavior            = FoundationAIUpdate ModuleTag_foundationAI
      BuildVariation = 1 ;// Will give BUILD_VARIATION_ONE to anything built on it
   End
End

;//------------------------------------------------------------------------------
;// Elven Fortress Citadel
;// This is the center part of the full Fortress.  This plus the buildplots make up the full fortress
Object ElvenCitadel

   SelectPortrait = BPEFortress
 
   Draw = W3DScriptedModelDraw ModuleTag_Draw
      ExtraPublicBone       = ARROW_01
      ExtraPublicBone       = ARROW_02
      ExtraPublicBone       = ARROW_03
      ExtraPublicBone       = ARROW_04
      ExtraPublicBone       = ARROW_05
      ExtraPublicBone       = ARROW_06
      ExtraPublicBone       = ARROW_07
      ExtraPublicBone       = ARROW_08
      ExtraPublicBone       = ARROW_09
      ExtraPublicBone       = ARROW_10
      ExtraPublicBone       = ARROW_11
      ExtraPublicBone       = ARROW_12
      ExtraPublicBone       = ARROW_13
      ExtraPublicBone       = ARROW_14
      ExtraPublicBone       = ARROW_15
      ExtraPublicBone       = ARROW_16
      ExtraPublicBone       = ARROW_17
      ExtraPublicBone       = ARROW_18
      ExtraPublicBone       = ARROW_19
      ExtraPublicBone       = ARROW_20
      ExtraPublicBone       = ARROW_21
      ExtraPublicBone       = ARROW_22
      ExtraPublicBone       = ARROW_23
      ExtraPublicBone       = ARROW_24
      ExtraPublicBone       = ARROW_25
      ExtraPublicBone       = ARROW_26
      ExtraPublicBone       = ARROW_27
      ExtraPublicBone       = ARROW_28
      ExtraPublicBone       = ARROW_29
      ExtraPublicBone       = ARROW_30
      ExtraPublicBone       = ARROW_31
      ExtraPublicBone       = ARROW_32
      
      OkToChangeModelColor   = Yes
      UseStandardModelNames   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      
      
      DefaultModelConditionState
         Model = EBFortress
         WeaponLaunchBone   = PRIMARY ARROW_
      End
      
      ModelConditionState = DAMAGED         
         Model      = EBFortress
         Texture      = EBFortress.tga EBFortress_D.tga
      End
      
      AnimationState   = DAMAGED
         Animation   = Fortress_ReallyDamaged
            AnimationName      = WBFortress_D2S.WBFortress_D2A
            AnimationMode      = ONCE            
         End         
         EnteringStateFX   = FX_FortressDamaged
      End

      ModelConditionState = REALLYDAMAGED
         Model      = EBFortress_D2
      End

      AnimationState   = REALLYDAMAGED
         Animation   = Fortress_ReallyDamaged
            AnimationName      = EBFortress_D2S.EBFortress_D2A
            AnimationMode      = ONCE            
         End
         EnteringStateFX   = FX_FortressReallyDamaged
      End

      ModelConditionState = RUBBLE
         Model      = EBFortress_D3
      End

      AnimationState   = RUBBLE
         Animation   = Fortress_Rubble
            AnimationName      = EBFortress_D3S.EBFortress_D3A
            AnimationMode      = ONCE            
         End         
         EnteringStateFX   = FX_FortressCollapse
      End

      ModelConditionState  = POST_RUBBLE
         Model        = None
         ParticleSysBone NONE SmokeBuildingMediumRubble
      End
      
      AnimationState = POST_RUBBLE
      End

      ModelConditionState  = POST_COLLAPSE
         Model        = None
         ParticleSysBone NONE SmokeBuildingMediumRubble
      End
      
      AnimationState = POST_COLLAPSE
      End 

      //---Vines---
      ModelConditionState = SNOW UPGRADE_NUMENOR_STONEWORK
         Model   = EBFortress
         Texture   = EBFortress.tga EBFortress_U_Snow.tga
      End
      
      ModelConditionState = UPGRADE_NUMENOR_STONEWORK
         Model   = EBFortress
         Texture   = EBFortress.tga EBFortress_U.tga
      End
      
      //---Snow---
      ModelConditionState = SNOW 
         Model = EBFortress
         Texture   = EBFortress.tga EBFortress_snow.tga
         Texture   = CBHarlindonruins.tga CBHarlindonruins_S.tga
      End    
   End

   Draw = W3DScriptedModelDraw ModuleTag_Draw_HCBanner
      OkToChangeModelColor  = Yes
      DefaultModelConditionState
         Model = EBHCFortress
      End
      MultiPlayerOnly = Yes
   End
   
   //Eagle's Nest
   Draw = W3DScriptedModelDraw ModuleTag_EaglesNestDraw
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model          = None
      End

      //Build up
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2 DAMAGED
         Model          = EBFENest_A
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2 REALLYDAMAGED
         Model          = EBFENest_A
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2 SNOW
         Model          = EBFENest_A
         Texture         = EBFortress.tga EBFortress_snow.tga
      End
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2
         Model          = EBFENest_A
      End
      
      AnimationState = UPGRADE_FORTRESS_MONUMENT USER_2
         Animation               = RiseUp
            AnimationName         = EBFENest_ASKL.EBFENest_ABLD
            AnimationMode         = ONCE
            AnimationSpeedFactorRange = 5.0 5.0
         End
      End

      //Damage States
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT DAMAGED         
         Model      = EBFENest
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT REALLYDAMAGED
         Model      = EBFENest_D2
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT REALLYDAMAGED
         Animation   = EBFENest_ReallyDamaged
            AnimationName      = EBFENest_D2SKL.EBFENest_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT RUBBLE
         Model      = EBFENest_D3
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT RUBBLE
         Animation   = EBFENest_Rubble
            AnimationName      = EBFENest_D3SKL.EBFENest_D3AN
            AnimationMode      = ONCE            
         End         
      End

      // snow state
      ModelConditionState = SNOW UPGRADE_FORTRESS_MONUMENT
         Model         = EBFENest
         Texture         = EBFortress.tga EBFortress_snow.tga
      End    
      
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT
         Model          = EBFENest
      End
   End

   ;//Eagles Nest Eagle Model
   Draw = W3DScriptedModelDraw ModuleTag_DrawEagle      
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model         = None
      End
      
      IdleAnimationState
         StateName      = NoEagle

      ; --- below worked but a little too much delay ---
      ;
      ;   BeginScript
      ;      Prev = CurDrawablePrevAnimationState()
      ;      if Prev == "BeingConstructed" then
      ;          ; Don't play completed sound when canceling build-in-progress or when
      ;          ; destroyed halfway
      ;          if not CurDrawableModelcondition( "DYING" ) then
      ;            CurDrawablePlaySound("UpgradeElfFortressEaglesNest")
      ;         end
      ;      end
      ;   EndScript
      End

      //Build up
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2 DAMAGED
         Model         = EBFE_A
         Texture         = EBFortress.tga EBFortress_D.tga
         ParticleSysBone = NONE EaglesNestbuildleaves
         ParticleSysBone = NONE EaglesNestbuilddust   
      End
      
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2 REALLYDAMAGED
         Model         = EBFE_A
         Texture         = EBFortress.tga EBFortress_D.tga
         ParticleSysBone = NONE EaglesNestbuildleaves
         ParticleSysBone = NONE EaglesNestbuilddust   
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2
         Model         = EBFE_A
         ParticleSysBone = NONE EaglesNestbuildleaves
         ParticleSysBone = NONE EaglesNestbuilddust   
      End
      
      AnimationState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2
         Animation               = RiseUp
            AnimationName         = EBFE_ASKL.EBFE_ABLD
            AnimationMode         = ONCE
            AnimationSpeedFactorRange = 5.0 5.0            
         End
         StateName = BeingConstructed
      End

      //Damage States
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE DAMAGED
         Model      = EBFE
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE REALLYDAMAGED
         Model      = EBFE_D2
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE REALLYDAMAGED
         Animation   = EBFENest_ReallyDamaged
            AnimationName      = EBFE_D2SKL.EBFE_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE RUBBLE
         Model      = EBFE_D3
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE RUBBLE
         Animation   = EBFENest_Rubble
            AnimationName      = EBFE_D3SKL.EBFE_D3AN
            AnimationMode      = ONCE            
         End         
      End

      //Normal States
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE
        Model         = EBFE
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_UNAVAILABLE         
         Model         = None         
      End

      AnimationState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_UNAVAILABLE
         StateName   = EagleGone
      End
   End

   //Mystic Fountains
   Draw = W3DScriptedModelDraw ModuleTag_DrawMysticFountains
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model          = None
      End   

      //Build Up      
      ModelConditionState = FORTRESS_IMPROVEMENT_2 USER_3 DAMAGED
         Model          = EBFMFount_A         
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_2 USER_3 REALLYDAMAGED
         Model          = EBFMFount_A         
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_2 USER_3
         Model          = EBFMFount_A         
      End
      
      AnimationState = FORTRESS_IMPROVEMENT_2 USER_3
         Animation               = UpAndStill
            AnimationName         = EBFMFount_ASKL.EBFMFount_ABLD
            AnimationMode         = ONCE
            AnimationSpeedFactorRange = 30.0 30.0
         End
      End
      
      //Damage States
      ModelConditionState     = FORTRESS_IMPROVEMENT_2 DAMAGED
         Model      = EBFMFount
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_2 REALLYDAMAGED
         Model      = EBFMFount_D2
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      AnimationState   = FORTRESS_IMPROVEMENT_2 REALLYDAMAGED
         Animation   = MysticFountains_ReallyDamaged
            AnimationName      = EBFMFount_D2SK.EBFMFount_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_2 RUBBLE
         Model      = EBFMFount_D3
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      AnimationState   = FORTRESS_IMPROVEMENT_2 RUBBLE
         Animation   = MysticFountains_ReallyDamaged
            AnimationName      = EBFMFount_D3SK.EBFMFount_D3AN
            AnimationMode      = ONCE            
         End         
      End

      //Normal
      ModelConditionState = FORTRESS_IMPROVEMENT_2
         Model          = EBFMFount
      End
   End

   //Enchanted Anvil
   Draw = W3DScriptedModelDraw ModuleTag_DrawEnchantedAnvil
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model          = None
      End   

      //---Build up Damaged---
      ModelConditionState     = FORTRESS_IMPROVEMENT_3 DAMAGED USER_1
         Model      = EBFAnvil_A
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 REALLYDAMAGED USER_1
         Model      = EBFAnvil_A
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      //Build up
      ModelConditionState = FORTRESS_IMPROVEMENT_3 USER_1
         Model   = EBFAnvil_A
      End
      
      AnimationState = FORTRESS_IMPROVEMENT_3 USER_1
         Animation                  = RiseUp
            AnimationName            = EBFAnvil_ASKL.EBFAnvil_ABLD
            AnimationMode            = ONCE
            AnimationSpeedFactorRange   = 7.0 7.0
         End
      End

      //---Damaged---
      ModelConditionState     = FORTRESS_IMPROVEMENT_3 DAMAGED
         Model      = EBFAnvil
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 REALLYDAMAGED
         Model      = EBFAnvil_D2         
      End

      AnimationState   = FORTRESS_IMPROVEMENT_3 REALLYDAMAGED
         Animation   = EBFAnvil_ReallyDamaged
            AnimationName      = EBFAnvil_D2SKL.EBFAnvil_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 RUBBLE
         Model      = EBFAnvil_D3         
      End

      AnimationState   = FORTRESS_IMPROVEMENT_3 RUBBLE
         Animation   = EBFAnvil_ReallyDamaged
            AnimationName      = EBFAnvil_D3SKL.EBFAnvil_D3AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_3
         Model          = EBFAnvil         
      End
   End

   Draw = W3DScriptedModelDraw ModuleTag_DrawAnvilGuy
      AttachToBoneInAnotherModule = PositionBone

      DefaultModelConditionState
         Model          = None
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_3 USER_1
        Model         = None
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 RUBBLE
         Model      = None         
      End
      
      ModelConditionState = FORTRESS_IMPROVEMENT_3
         Model          = EBFAnvlGuy_SKN         
      End   

      AnimationState = FORTRESS_IMPROVEMENT_3
         Animation            = IDLA
            AnimationName      = EBFAnvlGuy_SKL.EBFAnvlGuy_IDLA
            AnimationMode      = ONCE
            AnimationPriority  = 20
         End
         Animation            = IDLB
            AnimationName      = EBFAnvlGuy_SKL.EBFAnvlGuy_IDLB
            AnimationMode      = ONCE
            AnimationPriority  = 1
         End
         Animation            = IDLC
            AnimationName      = EBFAnvlGuy_SKL.EBFAnvlGuy_IDLC
            AnimationMode      = ONCE
            AnimationPriority  = 1
         End
         Flags               = RESTART_ANIM_WHEN_COMPLETE
      End
   End

   //Blessed Mist
   Draw = W3DScriptedModelDraw ModuleTag_DrawMist
      
      DefaultModelConditionState
         Model            = None
      End
      
      ModelConditionState  = FORTRESS_IMPROVEMENT_8
         Model            = None
         ParticleSysBone      = NONE EnshroudingMist
      End        
   End


;//   Draw = W3DFloorDraw ModuleTag_DrawFloor   
;//      StaticModelLODMode = Yes      ;// THIS NEEDS TO BE COMMENTED OUT WHEN ENGINEERING ENABLES LOD'S IN THE FLOOR DRAW
;//       ModelName = GBWorkshop_Bib
;//   End
 

   PlacementViewAngle  = 0
   
   ;// ***DESIGN parameters ***
   DisplayName        = OBJECT:ElvenFortress
   Description        = OBJECT:ElvenFortressDescription

   Side                = Elves
   EditorSorting      = STRUCTURE
   ThreatLevel         = 1.0
   CommandPointBonus   = GENERIC_FORTRESS_COMMAND_POINT_BONUS
   
   CommandSet          = ElvenFortressCommandSet
   BuildCost          = ELVEN_FORTRESS_BUILDCOST
   BuildTime          = ELVEN_FORTRESS_BUILDTIME
   BountyValue        = ELVEN_FORTRESS_BOUNTY_VALUE
   VisionRange        = ELVEN_FORTRESS_VISION_RANGE   ;// Shroud clearing distance
   ShroudClearingRange = ELVEN_FORTRESS_SHROUD_CLEAR

   WeaponSet
      Weapon            = PRIMARY GoodStructureBow
      AutoChooseSources   = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
   End
      
   ArmorSet
      Conditions        = None
      Armor            = FortressArmor
      ;DamageFX          = StructureDamageFXNoShake
   End

   ;// *** AUDIO Parameters ***

   #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"

   EvaEventDieOwner             = EvaFortressDie

   VoiceSelect                  = ElfFortressSelect      ;GondorWorkshopSelect
   VoiceSelectUnderConstruction   = BuildingGoodVoiceSelectUnderConstruction

   SoundOnDamaged               = BuildingLightDamageStone
   SoundOnReallyDamaged         = BuildingHeavyDamageStone

   UnitSpecificSounds
      UnderConstruction      = BuildingBigConstructionLoop  ; Built first time
      ; UnderRepairFromDamage   = NoSound               ; Repaired No animation on the building, so don't bother playing sound
      UnderRepairFromRubble   = BuildingBigConstructionLoop   ; Repaired from completely destroyed (not used???)
   End

   ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
      MaxUpdateRangeCap = 800
      AnimationSound = Sound:UpgradeElfFortressEaglesNest      Animation:EBFE_ASKL.EBFE_ABLD   Frames:1250
   End
   
   CampnessValue = CAMPNESS_FORTRESS

 
   ;// *** ENGINEERING Parameters ***
   RadarPriority      = STRUCTURE   
   KindOf            = PRELOAD COMMANDCENTER VITAL_FOR_BASE_SURVIVAL STRUCTURE IMMOBILE CASTLE_KEEP MP_COUNT_FOR_VICTORY SELECTABLE FS_FACTORY AUTO_RALLYPOINT MADE_OF_WOOD SCORE DOZER_FACTORY
   
   Behavior            = GettingBuiltBehavior GetBuiltBehaviorTag
      WorkerName        = ElvenWorkerNoSelect
      SpawnTimer   = DEFAULT_STRUCTURE_HEALDELAY
   End

   Behavior = CastleMemberBehavior ModuleTag_CMB
   End

   Body                        = StructureBody ModuleTag_05
      MaxHealth                  = ELVEN_FORTRESS_HEALTH
      MaxHealthDamaged            = ELVEN_FORTRESS_HEALTH_DAMAGED
      MaxHealthReallyDamaged         = ELVEN_FORTRESS_HEALTH_REALLY_DAMAGED
          
;      DamageCreationList = OCL_BuildingDamageList01 CATAPULT_ROCK
;      DamageCreationList = OCL_GBStable_Chunk1 CATAPULT_ROCK FRONT_DESTROYED
;      DamageCreationList = OCL_GBStable_Chunk2 CATAPULT_ROCK RIGHT_DESTROYED
;      DamageCreationList = OCL_GBStable_Chunk3 CATAPULT_ROCK BACK_DESTROYED
;      DamageCreationList = OCL_GBStable_Chunk4 CATAPULT_ROCK LEFT_DESTROYED
      
   End

        Behavior = SpawnBehavior ModuleTag_Spawn
      SpawnNumber            = 2
      InitialBurst         = 2
      SpawnTemplateName      = GondorGwaihir01_Slaved
      SpawnReplaceDelay      = 60000                      ;120000
      CanReclaimOrphans      = Yes
   End

   Behavior = KeepObjectDie ModuleTag_IWantRubble
   End
 
   Behavior                  = BuildingBehavior BuildingModuleTag
   ; NightWindowName         = GBWORKSHOPN
   ; FireWindowName         = WINDOW_F01
   ; GlowWindowName         = WINDOW_G01
   ; FireName               = FIRE01
   End

   Behavior                  = StructureCollapseUpdate ModuleTag_06
      MinCollapseDelay        = 000
      MaxCollapseDelay        = 000
      CollapseDamping        = .5
      MaxShudder              = 0.6
      MinBurstDelay          = 250
      MaxBurstDelay          = 800
      BigBurstFrequency      = 4
      FXList                  = INITIAL  FX_FortressCollapse
      ;FXList                  = ALMOST_FINAL  FX_FortressCollapse
      DestroyObjectWhenDone   = Yes
      CollapseHeight         = 120
   End

   Behavior = ProductionUpdate ProductionUpdateModuleTag      
      ProductionModifier      
         RequiredUpgrade = Upgrade_ElvenFortressMysticFountains         
         TimeMultiplier = 0.75
         HeroRevive = Yes
      End
   End

   Behavior = QueueProductionExitUpdate QueueProductionModuleTag
      UnitCreatePoint         = X:41.0 Y:0.00 Z:0.0
      NaturalRallyPoint      = X:109.0 Y:0.00 Z:0.0
      //AllowAirborneCreation   = Yes
      ExitDelay            = 50
   End

   //Eagles Nest Behaviors
   Behavior = GrantUpgradeCreate ModuleTag_ActLikeAnOldUpgrade      
      UpgradeToGrant      = Upgrade_EaglesNestEagleButtonEnable
      GiveOnBuildComplete = Yes ;// The ExemptStatus UnderConstruction hack doesn't work on foundation buildings.
   End

   Behavior = ModelConditionUpgrade ModuleTag_ShowTheEaglesNest
      TriggeredBy         = Upgrade_ElvenFortressEaglesNest
      AddConditionFlags   = UPGRADE_FORTRESS_MONUMENT
      AddTempConditionFlag   = ModelConditionState:USER_2 //For buildup
      TempConditionTime      = 11.0                   //try to match buildup anim time
      Permanent            = Yes
   End

   Behavior = AudioLoopUpgrade ModuleTag_EaglesNestBuildLoop
      ; Play a "build loop" while the Eagle's Nest is building up
      TriggeredBy         = Upgrade_ElvenFortressEaglesNest
      ;ConflictsWith      = Upgrade_PosternGate Upgrade_WallBanner
      SoundToPlay         = BuildingBigConstructionLoop
      KillOnDeath        = Yes
      KillAfterMS         = 9000  ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
   End
   
   Behavior = GeometryUpgrade TowerGeom
      TriggeredBy         = Upgrade_ElvenFortressEaglesNest
      ShowGeometry      = HighTowerGeom
   End

   Behavior = AudioLoopUpgrade ModuleTag_EagleCreated
      ; Play a "build loop" while the Eagle's Nest is building up
      TriggeredBy         = Upgrade_HasEaglesNestEagle
      SoundToPlay         = ElvenFortressEagleCreated
   End


   Behavior = ObjectCreationUpgrade MaketheEagle
      TriggeredBy            = Upgrade_HasEaglesNestEagle
      Delay               = 0.0
      
      RemoveUpgrade         = Upgrade_EaglesNestEagleButtonEnable
      ThingToSpawn         = ElvenFortressEagle
      //Offset            = X:90.0 Y:0.0 Z:120.0
      FadeInTime            = 600
      UseBuildingProduction   = Yes
   End

   Behavior = SlaveWatcherBehavior WatchTheEagle
      RemoveUpgrade      =   Upgrade_HasEaglesNestEagle         ;//when our slave dies, remove this upgrade, so we can get the upgrade again.
      GrantUpgrade      =   Upgrade_EaglesNestEagleButtonEnable   ;//when our slave dies, enable the button that allows us to buy a new one      
      LetSlaveLive      = Yes
   End

   Behavior = ModelConditionUpgrade ModuleTag_AnimateEagle
      TriggeredBy            = Upgrade_EaglesNestEagleButtonEnable
      AddConditionFlags      = FORTRESS_MONUMENT_CREATURE_AVAILABLE
      RemoveConditionFlags   = FORTRESS_MONUMENT_CREATURE_UNAVAILABLE
      Permanent            = Yes
   End

   Behavior = ModelConditionUpgrade ModuleTag_HideEagle
      TriggeredBy            = Upgrade_HasEaglesNestEagle
      AddConditionFlags      = FORTRESS_MONUMENT_CREATURE_UNAVAILABLE
      RemoveConditionFlags   = FORTRESS_MONUMENT_CREATURE_AVAILABLE
      Permanent            = Yes
   End
   //This behavior allows me to queue this unit up for the citadel to build.  Otherwise I would need a hidden command button.
   //The production behavior checks to see if there is actually a commandset button setup to build this unit.  This bypasses that.
   Behavior      = SpawnUnitBehavior ModuleTag_allowMeToBuildDrakeFromCitadel
      UnitName      = ElvenFortressEagle      
    End   
   //End Eagles Nest Behaviors

   ;//Encasing Vines improvement
   Behavior = CastleUpgrade ModuleTag_PassOutEncasingVinesUpgrade
      TriggeredBy         = Upgrade_ElvenFortressEncasingVinesTrigger
      Upgrade            = Upgrade_ElvenFortressEncasingVines
      WallUpgradeRadius   = ELVEN_FORTRESS_WALL_EFFECTIVE_RADIUS
   End
   
   Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
      TriggeredBy            = Upgrade_ElvenFortressEncasingVines
      AttributeModifier      = EncasingVines_Bonus
   End

   Behavior = ModelConditionUpgrade ModuleTag_ShowTheVines
      TriggeredBy         = Upgrade_ElvenFortressEncasingVines      
      AddConditionFlags   = UPGRADE_NUMENOR_STONEWORK
      Permanent         = Yes
   End

   ;//Mystic Fountains improvement
   Behavior = ModelConditionUpgrade ModuleTag_ShowMysticFountains
      TriggeredBy            = Upgrade_ElvenFortressMysticFountains
      AddConditionFlags      = FORTRESS_IMPROVEMENT_2
      AddTempConditionFlag   = ModelConditionState:USER_3 //For buildup
      TempConditionTime      = 10.0                   //try to match buildup anim time
      Permanent            = Yes
   End
   
   Behavior = StatusBitsUpgrade ModuleTag_FakeOutMysticFountains ;// Visual only upgrade needs a fake out to react to it.
      TriggeredBy   = Upgrade_ElvenFortressMysticFountains
   End

   Behavior = PassiveAreaEffectBehavior ModuleTag_MysticFountainsHealing
      UpgradeRequired         = Upgrade_ElvenFortressMysticFountains
      EffectRadius         = 200 // please update the decal size in experience lvl INI if you change this... the value there is about 2.2x the value here      
      PingDelay            = 2000;msec
      HealPercentPerSecond   = 3%
      AllowFilter            = ANY +INFANTRY +CAVALRY +HERO -MACHINE +MONSTER -IMMOBILE +DOZER
      NonStackable         = Yes
      HealFX               = FX_SpellHealUnitHealBuff
   End

   Behavior = BannerCarrierUpdate BannerCarrierUpdateModuleTag
      UpgradeRequired         = Upgrade_ElvenFortressMysticFountains
      IdleSpawnRate         = 5000                     // spawn a new member every n seconds when idle (in miliseconds)      
      UnitSpawnFX            = FX_BannerCarrierSpawnUnit      // name of particle FX to use when the BannerCarrier spawns a new unit      

      // This well object acts like a banner carrier except it spawns unit on nearby hordes instead of itself.
      ReplenishNearbyHorde   = Yes
      ScanHordeDistance      = 200
   End

   ;//Enchanted Anvil improvement
   Behavior = CostModifierUpgrade ModuleTag_EnchantedAnvilUpgrades
      LabelForPalantirString   = GUI:UPGRADE_DISCOUNT
      TriggeredBy            = Upgrade_ElvenFortressEnchantedAnvil      
      UpgradeDiscount         = Yes
      ApplyToTheseUpgrades   = Upgrade_ElvenSilverthornArrows Upgrade_ElvenForgedBlades Upgrade_ElvenHeavyArmor Upgrade_ElvenBasicTraining
      Percentage            = -10%
      Percentage            = -20%
      Percentage            = -25%
      Percentage            = -30%
      Percentage            = -35%      
   End

   Behavior = ModelConditionUpgrade ModuleTag_ShowTheAnvil
      TriggeredBy            = Upgrade_ElvenFortressEnchantedAnvil
      AddConditionFlags      = FORTRESS_IMPROVEMENT_3
      AddTempConditionFlag   = ModelConditionState:USER_1 //For buildup
      TempConditionTime      = 5.0                   //try to match buildup anim time
      Permanent            = Yes
   End

   Behavior = AudioLoopUpgrade ModuleTag_EnchantedAnvilBuildLoop
      TriggeredBy         = Upgrade_ElvenFortressEnchantedAnvil
      ;ConflictsWith      = Upgrade_PosternGate Upgrade_WallBanner
      SoundToPlay         = BuildingConstructionLoop
      KillOnDeath        = Yes
      KillAfterMS         = 3500  ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
   End

   ;//Blessed Mist improvement   
   Behavior = InvisibilityUpdate ModuleTag_BroadcastCamouflage
      InvisibilityNugget
         InvisibilityType   = CAMOUFLAGE
         DetectionRange      = ELVEN_MIST_CAMOUFLAGE_DETECTION_RANGE
      End
      UpdatePeriod         = 1000
      Broadcast            = Yes
      BroadcastRange         = 300
      BroadcastObjectFilter   = ELVEN_MIST_OBJECT_FILTER
      StartsActive         = Yes
      RequiredUpgrades      = Upgrade_ElvenFortressBlessedMist
   End

   Behavior = ModelConditionUpgrade ModuleTag_AnimateNestDrake
      TriggeredBy            = Upgrade_ElvenFortressBlessedMist
      AddConditionFlags      = FORTRESS_IMPROVEMENT_8      
      Permanent            = Yes
   End

   ;//Crystal Moat   
   Behavior = ObjectCreationUpgrade CreateTheMoat
      TriggeredBy      = Upgrade_ElvenFortressCrystalMoat      
      Delay         = 0.0            
      ThingToSpawn   = ElvenFortressCrystalMoat      
      FadeInTime      = 600
   End

   Behavior = CitadelSlaughterHordeContain ModuleTag_SlaughterMe
      PassengerFilter               = GENERIC_FACTION_SLAUGHTERABLE
      ObjectStatusOfContained         = UNSELECTABLE ENCLOSED
      CashBackPercent               = 200%      
      ContainMax                  = 99;// give it a huge capacity, just in case player sends his whole army in at once
      AllowEnemiesInside            = No
      AllowAlliesInside            = No
       AllowNeutralInside            = No
       AllowOwnPlayerInsideOverride   = Yes
      EnterSound                  = GUI_RingReturned
      EntryOffset                  = X:129.0 Y:5.0 Z:0.0
      EntryPosition               = X:100.0 Y:0.0 Z:0.0      // entry position needs to be offset from the root transform, otherwise fortress obscures point.
      
      ExitOffset                  = X:129.0 Y:0.0 Z:0.0
      StatusForRingEntry            = HOLDING_THE_RING
      UpgradeForRingEntry            = Upgrade_RingHero Upgrade_FortressRingHero
      ObjectToDestroyForRingEntry      = NONE +TheDroppedRing
      FXForRingEntry               = FX_OneRingFlare
   End

   Behavior = AIUpdateInterface ModuleTag_AI
      AILuaEventsList            = FortressFunctions
      AutoAcquireEnemiesWhenIdle   = Yes
      MoodAttackCheckRate         = 250
   End

   ;//Money Maker   
   Behavior = AutoDepositUpdate AutoDepositModuleTag
      DepositTiming         = GENERIC_KEEP_MONEY_TIME
      DepositAmount         = GENERIC_KEEP_MONEY_AMOUNT
      InitialCaptureBonus    = 0  ;// no initial bonus
   End

   Behavior = TerrainResourceBehavior ModuleTag_NewMoneyDeadSpot
      Radius         = GENERIC_KEEP_MONEY_RANGE   ;// How far we try to claim ground
      MaxIncome      = 0                     ;// If we were to get all we wanted, how much we would earn.  Linear slope to 0 at 0% claim
      IncomeInterval   = 999999               ;// How often (in msec) we give that much money
      HighPriority   = Yes                  ;// A high priority claim gets to pretend it was there first.
   End

   #include "..\..\..\FortressRingFunc.inc"
      
   //Main
   Geometry            = CYLINDER
    GeometryName         = Geom_Orig
     GeometryMajorRadius      = 50.0   
   GeometryHeight         = 55.0
   GeometryOffset         = X:0 Y:0 Z:0   

   //Towers
   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:25 Y:25 Z:0   

   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:-25 Y:25 Z:0   

   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:-25 Y:-25 Z:0   

   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:25 Y:-25 Z:0   

   //Front
   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 15.0   
   GeometryMinorRadius      = 20.0
   GeometryHeight         = 80.0
   GeometryOffset         = X:60 Y:0 Z:0   

   //Ramp (So units can attack it when the moat is in place)
   AdditionalGeometry      = BOX
   GeometryMajorRadius      = 12.0
    GeometryMinorRadius      = 16.0
    GeometryHeight         = 22.0
   GeometryOffset         = X:85 Y:0 Z:0
   
   AdditionalGeometry      = BOX
   GeometryName         = HighTowerGeom
   GeometryMajorRadius     = 12
   GeometryMinorRadius     = 12
   GeometryHeight           = 150
   GeometryOffset         = X:0 Y:0 Z:0
   GeometryUsedForHealthBox = No
      
   GeometryIsSmall         = No
   Shadow               = SHADOW_VOLUME
   BuildCompletion         = PLACED_BY_PLAYER
   
   GeometryContactPoint = X:-50.348   Y:26.9      Z:0         Repair
   GeometryContactPoint = X:47.546      Y:-38.677   Z:0         Repair
   GeometryContactPoint = X:47.546      Y:36.435   Z:0
   GeometryContactPoint = X:-32.763   Y:-46.121   Z:0
   ;GeometryContactPoint = X:26.753      Y:26.753   Z:67.933   Swoop
   GeometryContactPoint = X:0         Y:0         Z:180      Swoop

End

;//------------------------------------------------------------------------------
;//Elven Fortress
;// This is the one object that you would place on a map and that the porter builds.
;// It unpacks in to the citadel and the buildplots.  It's an old CampFlag.
Object ElvenFortress

   SelectPortrait = BPEFortress

   Draw   = W3DScriptedModelDraw ModuleTag_01      
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes // Will append M or L to the skin name depending on GameLOD
      
      DefaultModelConditionState
         Model          = None
      End

      ;dummy idle animation state for audio
       IdleAnimationState
         ;StateName   =   STATE_Idle
      End   

      ;//Need this since the default condition is none
      ModelConditionState = WORLD_BUILDER
         Model   = EBFortress
      End

      ;//Phantom structure when placing a new building to be build
      ModelConditionState = BUILD_PLACEMENT_CURSOR
         Model   = None   //EBFortress
      End

      ;//Structure that stays where you will be building until the porter reaches the place to start building.
      ModelConditionState =  PHANTOM_STRUCTURE
         Model   = EBFortress
      End

      ModelConditionState = RUBBLE
         Model      = EBFortress_D3
      End

      AnimationState   = RUBBLE
         Animation   = Fortress_Rubble
            AnimationName      = EBFortress_D3S.EBFortress_D3A
            AnimationMode      = ONCE            
         End         
         EnteringStateFX   = FX_FortressCollapse
      End
      
      ModelConditionState = ACTIVELY_BEING_CONSTRUCTED SNOW
         Model         = EBFortress_A
         Texture   = EBFortress.tga EBFortress_U_Snow.tga
      End
      ModelConditionState = ACTIVELY_BEING_CONSTRUCTED
         Model         = EBFortress_A
      End

      AnimationState = ACTIVELY_BEING_CONSTRUCTED
         Animation               = UpAndStill
            AnimationName         = EBFortress_ASK.EBFortress_ABL
            AnimationMode         = MANUAL
         End
         ParticleSysBone = NONE BuildingContructDustCastles FollowBone:YES
         ParticleSysBone = NONE FortressElven FollowBone:YES
         StateName = BeingConstructed
         BeginScript
            CurDrawablePlaySound("GondorBarracksBeginConstruction")
         EndScript
      End
   End

     ArmorSet
      Conditions        = None
        Armor            = FortressArmor
        ;//DamageFX          = StructureDamageFXNoShake
     End

   Side                = Elves
   EditorSorting      = STRUCTURE

   PlacementViewAngle = -45 ;// A -90 makes the door of the base face natural south.  0 would have it to the East.
   
   BuildCost          = ELVEN_FORTRESS_BUILDCOST
   BuildTime          = ELVEN_FORTRESS_BUILDTIME //0

   DisplayName        = OBJECT:ElvenFortress

   ; *** AUDIO Parameters ***
   #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"

   VoiceFullyCreated            = EVA:FortressComplete-Builder-Elf
   VoiceSelect                  = ElfFortressSelect
   VoiceSelectUnderConstruction   = BuildingGoodVoiceSelectUnderConstruction

   SoundOnDamaged               = BuildingLightDamageStone
   SoundOnReallyDamaged         = BuildingHeavyDamageStone

   UnitSpecificSounds
      UnderConstruction         = BuildingBigConstructionLoop  ; Built first time
      ; UnderRepairFromDamage      = NoSound               ; Repaired No animation on the building, so don't bother playing sound
      UnderRepairFromRubble      = BuildingBigConstructionLoop   ; Repaired from completely destroyed (not used???)
   End

   ClientBehavior = ModelConditionAudioLoopClientBehavior ModuleTag_PlayCollapseSound
      ModelCondition = REQUIRED:RUBBLE Sound:BuildingSink
   End

   // *** AUTO RESOLVE DATA ***
   ; When fighting an auto-resolve battle, a World Map castle actually becomes this unit
   AutoResolveUnitType = AutoResolveUnit_Fortress
   
       AutoResolveBody = AutoResolve_ElvenFortressBody
   
       AutoResolveArmor
          Armor = AutoResolve_ElvenFortressArmor
       End

       AutoResolveWeapon
          Weapon = AutoResolve_ElvenFortressWeapon
       End


   ;// *** ENGINEERING Parameters *** 
   RadarPriority      = STRUCTURE
   KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION MP_COUNT_FOR_VICTORY BASE_SITE CAN_SEE_THROUGH_STRUCTURE LIVING_WORLD_BUILDING_MIRROR
   
   //We can now take damage and die but only during construction.  The castle system will make us invulnerable when construction completes.
   Body                        = StructureBody ModuleTag_05
      MaxHealth                  = ELVEN_FORTRESS_HEALTH      
   End

   Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves
      CastleToUnpackForFaction   = Angmar Fortress_Elves
      CastleToUnpackForFaction   = Arnor  Fortress_Elves

      ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER      

      MaxCastleRadius          = 130.0
      InstantUnpack            = Yes      
      KeepDeathKillsEverything   = Yes

      EvaEnemyCastleSightedEvent = EnemyFortressSighted      
   End

   Behavior                  = StructureCollapseUpdate ModuleTag_06
      MinCollapseDelay        = 000
      MaxCollapseDelay        = 000
      CollapseDamping        = .5
      MaxShudder              = 0.6
      MinBurstDelay          = 250
      MaxBurstDelay          = 800
      BigBurstFrequency      = 4
      FXList                  = INITIAL  FX_FortressCollapse
      ;FXList                  = ALMOST_FINAL  FX_FortressCollapse
      DestroyObjectWhenDone   = Yes
      CollapseHeight         = 120
   End

   Behavior            = GettingBuiltBehavior ModuleTag_GettingBuiltBehavior
      WorkerName   = ElvenWorkerNoSelect
      SpawnTimer   = DEFAULT_STRUCTURE_HEALDELAY
   End

   Behavior = AIUpdateInterface ModuleTag_AI
      AILuaEventsList      =   FortressFunctions
   End
   
   //Main
   Geometry            = CYLINDER
    GeometryName         = Geom_Orig
     GeometryMajorRadius      = 85.0   
   GeometryHeight         = 55.0   

   //Plot locations
   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:66.49 Y:-66.49 Z:0   

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:0 Y:-94.0 Z:0   

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:-66.49 Y:-66.49 Z:0   

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:-94.0 Y:0 Z:0

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:-66.49 Y:66.49 Z:0

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:0 Y:94.0 Z:0

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:66.49 Y:66.49 Z:0

   //Ramp (So units can attack it when the moat is in place)
   AdditionalGeometry      = BOX
   GeometryMajorRadius      = 12.0
    GeometryMinorRadius      = 16.0
    GeometryHeight         = 22.0
   GeometryOffset         = X:85 Y:0 Z:0

   GeometryIsSmall       = No
   Shadow               = SHADOW_VOLUME
End

//------------------------------------------------------------------------------
//Elven Fortress Crystal Moat
// This is the moat around the fortress.  This is a separate object so that it can
// prevent units from being able to attack the fortress except at the ramp.
Object ElvenFortressCrystalMoat

   SelectPortrait = BPEFortress

   Draw   = W3DScriptedModelDraw ModuleTag_01      
      OkToChangeModelColor   = Yes
      
      DefaultModelConditionState
         Model          = EBFCMoat
      End

      ModelConditionState = DAMAGED
         Model         = EBFCMoat_D1
      End

      ModelConditionState = REALLYDAMAGED
         Model         = EBFCMoat_D2
      End

      AnimationState   = REALLYDAMAGED
         Animation   = EBFCMoat_ReallyDamaged
            AnimationName      = EBFCMoat_D2.EBFCMoat_D2
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = RUBBLE
         Model         = EBFCMoat_D3
      End

      AnimationState   = RUBBLE
         Animation   = EBFCMoat_ReallyDamaged
            AnimationName      = EBFCMoat_D3.EBFCMoat_D3
            AnimationMode      = ONCE            
         End         
      End
   End

   ArmorSet
      Conditions        = None
        Armor            = NoArmor
        //DamageFX          = StructureDamageFXNoShake
     End

   Side                = Elves
   EditorSorting      = STRUCTURE

   // *** AUDIO Parameters ***
   #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
   CampnessValue = 0


   // *** ENGINEERING Parameters *** 
   RadarPriority      = STRUCTURE
   KindOf              = STRUCTURE IMMOBILE UNATTACKABLE NOT_AUTOACQUIRABLE BASE_SITE CAN_SEE_THROUGH_STRUCTURE
   
   Body = HighlanderBody ModuleTag_02 //Can take damage, but won't die.  Can only die from ::kill() or other unresistable damage
      MaxHealth      = 50.0
   End

   Behavior = SlavedUpdate ModuleTag_Slave
      DieOnMastersDeath = Yes
   End

   Geometry                 = CYLINDER
   GeometryMajorRadius     = 80   
   GeometryHeight         = 10
   GeometryIsSmall       = No
   Shadow               = SHADOW_VOLUME
End

/////////////////////////fort for adams  mission
ChildObject MER_ElvenFortress_1 ElvenFortress

  Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves

      //Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER      
      MaxCastleRadius          = 130.0 http://80.0
      FadeTime               = 2.0 ; 2 seconds
      InstantUnpack            = Yes      
      KeepDeathKillsEverything   = Yes
      EvaEnemyCastleSightedEvent = EnemyFortressSighted
       PreBuiltList = ElvenVigilantEntExpansion 3   
        PreBuiltList = ElvenFloodgateExpansion 0
        PreBuiltList = ElvenWatchtowerExpansion 4
        PreBuiltList = ElvenVigilantEntExpansion 1
        PreBuiltList = ElvenWatchtowerExpansion 5
        PreBuiltList = ElvenFloodgateExpansion 2
        PreBuiltList = ElvenVigilantEntExpansion 6
      PreBuiltPlyr = PlyrRivendell

   End
END

//-------------------------------------------
ChildObject MER_ElvenFortress_2 ElvenFortress

  Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves

      ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER      
      MaxCastleRadius          = 130.0 http://80.0
      FadeTime               = 2.0 ; 2 seconds
      InstantUnpack            = Yes      
      KeepDeathKillsEverything   = Yes
      EvaEnemyCastleSightedEvent = EnemyFortressSighted
       PreBuiltList = ElvenWatchtowerExpansion 3   
        PreBuiltList = ElvenVigilantEntExpansion 0
        PreBuiltList = ElvenWatchtowerExpansion 4
        PreBuiltList = ElvenVigilantEntExpansion 1
        PreBuiltList = ElvenWatchtowerExpansion 5
        PreBuiltList = ElvenVigilantEntExpansion 2
        PreBuiltList = ElvenWatchtowerExpansion 6
        
      PreBuiltPlyr = PlyrRivendell

   End
END

//------------------------------------------- For Evil Grey Havens
ChildObject EGH_ElvenFortress_1 ElvenFortress                                    
   Behavior = CastleBehavior ModuleTag_castle                                 
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves

      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER   
      MaxCastleRadius          = 130.0 http://80.0
      FadeTime            = 2.0 ; 2 seconds                              
      InstantUnpack         = Yes                                    
      KeepDeathKillsEverything   = Yes                                    
      EvaEnemyCastleSightedEvent   = EnemyFortressSighted                           
      PreBuiltList          = ElvenWatchtowerExpansion -2                     
        PreBuiltList          = ElvenWatchtowerExpansion -2                        
        PreBuiltList          = ElvenWatchtowerExpansion -2                        
        PreBuiltList          = ElvenWatchtowerExpansion -2   
        PreBuiltList          = ElvenWatchtowerExpansion -2
        PreBuiltList          = ElvenWatchtowerExpansion -2                  
      PreBuiltPlyr          = PlyrElves                              
   End                                                       
End   

//------------------------------------------- For Evil Grey Havens
ChildObject EGH_ElvenFortress_2 ElvenCitadel ;ElvenFortress   

   ArmorSet
      Conditions        = None
      Armor            = EGH_FortArmor
      ;DamageFX          = StructureDamageFXNoShake
   End
   
   ;Body                        = StructureBody ModuleTag_05
   ;   MaxHealth                  = 4000
   ;   MaxHealthDamaged            = 2000
   ;   MaxHealthReallyDamaged             = 1000
   ;              
   ;End
   
                                                      
End   

En simple c'est l'ajout d'un behavior :
Citation :

;// *** ENGINEERING Parameters ***
RadarPriority = STRUCTURE
KindOf = PRELOAD COMMANDCENTER VITAL_FOR_BASE_SURVIVAL STRUCTURE IMMOBILE CASTLE_KEEP MP_COUNT_FOR_VICTORY SELECTABLE FS_FACTORY AUTO_RALLYPOINT MADE_OF_WOOD SCORE DOZER_FACTORY

Behavior = GettingBuiltBehavior GetBuiltBehaviorTag
WorkerName = ElvenWorkerNoSelect
SpawnTimer = DEFAULT_STRUCTURE_HEALDELAY
End

Behavior = CastleMemberBehavior ModuleTag_CMB
End

Body = StructureBody ModuleTag_05
MaxHealth = ELVEN_FORTRESS_HEALTH
MaxHealthDamaged = ELVEN_FORTRESS_HEALTH_DAMAGED
MaxHealthReallyDamaged = ELVEN_FORTRESS_HEALTH_REALLY_DAMAGED

; DamageCreationList = OCL_BuildingDamageList01 CATAPULT_ROCK
; DamageCreationList = OCL_GBStable_Chunk1 CATAPULT_ROCK FRONT_DESTROYED
; DamageCreationList = OCL_GBStable_Chunk2 CATAPULT_ROCK RIGHT_DESTROYED
; DamageCreationList = OCL_GBStable_Chunk3 CATAPULT_ROCK BACK_DESTROYED
; DamageCreationList = OCL_GBStable_Chunk4 CATAPULT_ROCK LEFT_DESTROYED

End

Behavior = SpawnBehavior ModuleTag_Spawn
SpawnNumber = 2
InitialBurst = 2
SpawnTemplateName = GondorGwaihir01_Slaved
SpawnReplaceDelay = 60000 ;120000
CanReclaimOrphans = Yes
End
Pour l'apparence d'un héros on a tout le code du début à avant ; ***DESIGN parameters ***
Ne pas oublié audio à remplacer et les pouvoirs sauf si tu désire d'autres audio et les pouvoirs ne marcheront pas , c'est complexe.
Revenir en haut Aller en bas
Saroumane
Moddeur confirmé
Moddeur confirmé
Saroumane


Nombre de messages : 202
Location : Où j'habite ?
Add-On : Oui
Date d'inscription : 14/07/2012

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeDim 18 Nov - 18:20

Merci beaucoup korl =)
Et pour la horde de gandalf je voudrais que l'IA puisse la joué
Revenir en haut Aller en bas
Leithian...
Moddeur expert
Moddeur expert
Leithian...


Nombre de messages : 750
Age : 31
Location : @ Home ! =D
Add-On : Quelle question, bien sûr que non !
Date d'inscription : 03/03/2010

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeLun 19 Nov - 0:17

Pour que ton héros prenne l'apparence de sauron, tu peux aussi simplement copier le nom du model 3D qui est en début de fichier ini à la place du model du héros...plutôt que de bazarder tout un bloc ini comme te l'a suggéré grego. Plus simple, plus efficace Wink
Revenir en haut Aller en bas
https://vexod14.artstation.com
Korl
Moddeur expert
Moddeur expert
Korl


Nombre de messages : 564
Add-On : Oui
Date d'inscription : 26/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeLun 19 Nov - 4:15

Sauf qu'il répondra pas au mouvement si tu changes pas ses animations (obligatoire) sage
Revenir en haut Aller en bas
grego
Moddeur expert
Moddeur expert
grego


Nombre de messages : 655
Age : 25
Location : Chez moi
Add-On : Bien sur que oui!
Date d'inscription : 28/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeMar 20 Nov - 23:38

Korl a écrit:
Yop

Ta Horde de gandalf tu veux que l'I.a puisse la joué ou juste toit?
Pour l'aigle il s’agit d'un petit code hyper simple :

https://imladrisproduction.forumotion.com/t61-codes-utiles-et-sympas
Sur ce tutos tu en saura plus.
Note : il faut crée un object special esclave pour l'aigle par exemple.
Exemple :
Code:

;-----------------------------------------------------------------------------
;
;   Gwaihir.ini                ; il s'aggit de l'Aigle géant pour la fortress elfe.
;
;-----------------------------------------------------------------------------

; aka Gwaihir, Giant Eagle, GiantEagle
Object GondorGwaihir01 

   ShockwaveResistance = SHOCKWAVE_RESISTANCE_ALWAYS

   Scale = 1            ;0.9
                     
   ; *** ART Parameters ***

   SelectPortrait        = HPGwahir
   ButtonImage      = HIGwahir

   Draw = W3DScriptedModelDraw ModuleTag_01
       
        OkToChangeModelColor = Yes
       
        StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD

      ExtraPublicBone = B_Passenger
   
      DefaultModelConditionState
         Model              = GUGwaihir_SKN
         Skeleton            = GUGwaihir_SKL
      End

      ModelConditionState      =   USER_3
         Model              = GUGwaihir_SKN
         Texture            = GUGwaihir.tga GUGwaihir_White.tga
      End
      
      IdleAnimationState
         StateName = Idle
         Animation          = FlyB
            AnimationName    = GUGwaihir_HVRA
            AnimationMode    = LOOP
            AnimationBlendTime = 10
            
         End
      End



      AnimationState  STUNNED SPECIAL_DAMAGED
         StateName =  STUNNED
         Animation = HitB
            AnimationName = GUGwaihir_HITB
            AnimationMode = ONCE
            AnimationBlendTime = 6
         End
      End
      AnimationState  STUNNED
         Animation = HitB
            AnimationName = GUGwaihir_HITA
            AnimationMode = ONCE
            AnimationBlendTime = 6
         End
      End


       AnimationState   = BACKING_UP
           StateName = backup
           Animation = FlyB
              AnimationName = GUGwaihir_FLYB
              AnimationMode = LOOP
              AnimationBlendTime = 9
           End
        End

        AnimationState = DIVING
           StateName = Diving
           Animation = DiveA
              AnimationName = GUGwaihir_DIVA
              AnimationMode = LOOP
              AnimationBlendTime = 9
           End
        End

      AnimationState = ABOUT_TO_HIT                        ; clawing
         StateName = Claw
         Animation = Claw
            AnimationName = GUGwaihir_ATKB
            AnimationMode = LOOP
            AnimationBlendTime = 9
         End
      End

      ;--- HARD FLAPPING ------------------------
      AnimationState = CLIMBING
         StateName = Climbing
         Animation = FlyB(climb)
            AnimationName = GUGwaihir_FLYB
            AnimationMode = LOOP
            AnimationBlendTime = 9
            AnimationSpeedFactorRange = 1.5 1.55
         End
      End
      AnimationState = FREEFALL
         StateName = Freefall
         Animation = Freefall(ilde)
            AnimationName = GUGwaihir_IDLA
            AnimationMode = LOOP
            AnimationBlendTime = 9
            AnimationSpeedFactorRange = 0.7 0.75
         End
      End
   

      AnimationState = MOVING
         StateName = Moving
         Animation          = FLYA
            AnimationName    = GUGwaihir_FLYA
            AnimationMode    = LOOP
            AnimationBlendTime  = 12
         End

         BeginScript
             Prev = CurDrawablePrevAnimationState()
             if Prev == "Idle"   then CurDrawableSetTransitionAnimState("Trans_Begin_Moving") return end
          EndScript
      End
         TransitionState = Trans_Begin_Moving
           Animation = Transition
              AnimationName = GUGwaihir_HVRC
              AnimationMode = ONCE
              AnimationBlendTime = 4
           End 
        End         

       TransitionState = Trans_Dying
         Animation = Transition
            AnimationName = GUGwaihir_DIED
            AnimationMode = ONCE
            AnimationBlendTime = 9
         End 
      End         


      AnimationState = DYING DEATH_1
         StateName = DYING
         Animation = DyingA
            AnimationName = GUGwaihir_DIEE
            AnimationMode = LOOP
            AnimationBlendTime = 9
         End
         BeginScript
            Prev = CurDrawablePrevAnimationState()
            if Prev == "Idle"   then CurDrawableSetTransitionAnimState("Trans_Dying") return end
            if Prev == "Moving"   then CurDrawableSetTransitionAnimState("Trans_Dying") return end
         EndScript
       End

      AnimationState = DYING DEATH_2
         StateName = DYING
         Animation = DyingA
            AnimationName = GUGwaihir_HVRA
            AnimationMode = LOOP
            AnimationBlendTime = 9
         End
       End




   End
   
   ; ***DESIGN parameters ***
   Side            = Elves
   EditorSorting      = UNIT
   ThreatLevel         = GWAIHIR_THREAT_LEVEL
   ThingClass         = LARGE_MONSTER
   TransportSlotCount   = TRANSPORTSLOTCOUNT_NOT_TRANSPORTABLE

        Scale = 0.4
 
   WeaponSet
      Conditions      = None
      Weapon             = PRIMARY      EagleGrabAttack
      PreferredAgainst   = PRIMARY      INFANTRY THROWN_OBJECT CAVALRY

      Weapon            = SECONDARY      EagleClawAttack
      OnlyAgainst         = SECONDARY      MONSTER

      Weapon              = TERTIARY      EaglePlowAttack
      PreferredAgainst   = TERTIARY      STRUCTURE MACHINE HORDE   
      
      Weapon            = QUATERNARY   EagleClawWyrmAttack
      PreferredAgainst   = QUATERNARY   CLEANUP_HAZARD            ; Used as a user defined kindof, only the wyrm uses it.
   End

   ArmorSet
      Conditions      = None
      Armor          = EagleArmor
      DamageFX        = GwaihirDamageFX
   End   
   
   VisionRange = VISION_FLIER
   ShroudClearingRange = SHROUD_CLEAR_FLIER

   BountyValue = GONDOR_GWAIHIR_BOUNTY_VALUE
   DisplayName = OBJECT:GondorGwiegher
   ;//DisplayMeleeDamage = EAGLE_PLOW_DAMAGE_INNER

   CrusherLevel          = 3  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
   RamPower = 30;
   RamZMult = 0.5;
   CommandSet = GwaihirCommandSet
   CommandPoints = 50
   

   ; *** AUDIO Parameters ***;

   VoiceAttack         = EagleVoiceAttack
   VoiceMove         = EagleVoiceMove
   VoicePriority         = 60
   VoiceSelect         = EagleVoiceSelect
   VoiceGuard         = EagleVoiceMove

   SoundAmbient         = EagleAmbienceVoice
   SoundImpact         = ImpactHorse

   
   ;UnitSpecificSounds
   ;End

    #include "..\..\..\includes\StandardUnitEvaEvents.inc"

   ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
      MaxUpdateRangeCap = 800
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYA Frames: 2
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYB Frames: 2
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYC Frames: 2 63
      ;AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_FLYC Frames: 4 34

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HVRA Frames: 4
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HVRC Frames: 4

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HITA Frames: 0
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_HITB Frames: 0

      AnimationSound = Sound: EagleHurt      Animation:GUGwaihir_SKL.GUGWAIHIR_HITA Frames: 1
      AnimationSound = Sound: EagleHurt      Animation:GUGwaihir_SKL.GUGWAIHIR_HITB Frames: 1
      AnimationSound = Sound: EagleHurt      Animation:GUGwaihir_SKL.GUGWAIHIR_DIED Frames: 1

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_ATKB Frames: 0
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_GRBB Frames: 0

      AnimationSound = Sound: EagleAttack      Animation:GUGwaihir_SKL.GUGWAIHIR_ATKB Frames: 1
      AnimationSound = Sound: EagleAttack      Animation:GUGwaihir_SKL.GUGWAIHIR_GRBB Frames: 1

      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_DIED Frames: 0
      AnimationSound = Sound: TrollBodyfall      Animation:GUGwaihir_SKL.GUGWAIHIR_DIEF Frames: 2
      AnimationSound = Sound: EagleWingFlaps      Animation:GUGwaihir_SKL.GUGWAIHIR_DIEF Frames: 0
   End

   ; Tie into LargeGroupAudio system
   ; No, we never do anything with this unit
   ;Behavior = LargeGroupAudioUpdate ModuleTag_LGAU
   ;   Key = Eagle Unit Flyer
   ;End


   ; *** ENGINEERING Parameters ***
   RadarPriority      = UNIT
   KindOf            = PRELOAD HERO SELECTABLE CAN_CAST_REFLECTIONS SCORE NO_FREEWILL_ENTER MONSTER SCARY CANNOT_RETALIATE
   

   
   Body = ActiveBody ModuleTag_02
      CheerRadius      = EMOTION_CHEER_RADIUS
      MaxHealth        = GIANT_EAGLE_HEALTH   ;BALANCE Gwaihir Health
;      MaxHealthDamaged  = 500
;      RecoveryTime      = 5000

      HealingBuffFx = None
   End

   Behavior = AutoHealBehavior ModuleTag_GwaihirHealing
      StartsActive = Yes
      HealingAmount = HERO_HEAL_AMOUNT
      HealingDelay = 1000
      StartHealingDelay = 15000
      HealOnlyIfNotInCombat = Yes
   End
   
   Behavior = GiantBirdAIUpdate ModuleTag_GiantBirdAI
      AutoAcquireEnemiesWhenIdle   =   Yes ATTACK_BUILDINGS
      MoodAttackCheckRate         =   500
      AILuaEventsList            =   GwaihirFunctions   
      
      FollowThroughDistance      =   160
      FollowThroughCheckStep      =   50
      FollowThroughGradient      =   1.0
      
      GrabTossTimeTrigger         =   3.0
      GrabTossHeightTrigger      =  80.0
      TossFX            = FX_DiebyFalling
      SpecialContactPoints      = Swoop
      
      AttackPriority = AttackPriority_Eagle
   End

   Behavior = ModelConditionUpgrade ModuleTag_All_FactionUpgrade
      TriggeredBy            = Upgrade_AllFactionUpgrade
      AddConditionFlags      = USER_3
      Permanent            = Yes
   End
   
   LocomotorSet
      Locomotor = FellBeastLocomotor ;BALANCE Gwaihir
      Condition = SET_NORMAL
      Speed    = 88
   End
   LocomotorSet
      Locomotor = FellBeastLocomotor ;BALANCE Gwaihir
      Condition = SET_SUPERSONIC
      Speed    = 114
   End
   LocomotorSet
      Locomotor = FellBeastLocomotor ; BALANCE Gwaihir
      Condition = SET_WANDER
      Speed    = 78
   End

   
   Behavior = PhysicsBehavior ModuleTag_04
   End
   
   Behavior = NotifyTargetsOfImminentProbableCrushingUpdate ModuleTag_NotifyCrushScan
   End

   
   Behavior = TransportContain TransportContainModuleTag
      ObjectStatusOfContained = UNSELECTABLE UNATTACKABLE
      PassengerFilter = ANY +INFANTRY +HULK +CAVALRY +GRAB_AND_DROP -HERO -PORTER
      Slots = 1
      ShowPips = No
      CanGrabStructure = Yes
      AllowEnemiesInside = Yes
      AllowNeutralInside = Yes
      AllowAlliesInside  = No
      DamagePercentToUnits = 100%
      KillPassengersOnDeath = Yes
      PassengerBonePrefix = PassengerBone:B_Passenger      KindOf:GRAB_AND_DROP
      GrabWeapon = FellbeastGrabWeapon      ; fire this weapon when eagle grabs a victim
      FireGrabWeaponOnVictim = No
      
      ReleaseSnappyness = 0.05 ; 1.0 is very snappy, 0.0 is very loose

   End
   
   Behavior = SquishCollide ModuleTag_06
      ;nothing
   End
   
;   Behavior = GiantBirdSlowDeathBehavior ModuleTag_GiantBirdSlowDeath
;      DeathTypes = ALL ;-KNOCKBACK
;      SinkDelay = 8000
;      SinkRate = 1.6    ; in Dist/Sec
;      DestructionDelay = 15000
;      
;      Sound   = INITIAL   EagleVoiceDie         ;FellBeastDie
;      Weapon   = HIT_GROUND   GondorTrebuchetRockWarhead
;      FX = INITIAL FX_FellBeastSpell
;      Sound   = HIT_GROUND   FellBeastDieImpact
;
;      CrashAvoidKindOfs = STRUCTURE
;      CrashAvoidRadius  = 800
;      CrashAvoidStrength = 0.2
;      NeedToMaintainFlailingHeight = No
;                           
;   End

   Behavior = SlowDeathBehavior ModuleTag_SlowDeath
      DeathTypes = ALL -FADED
      DestructionDelay = 1000
      ShadowWhenDead = No
      FX = INITIAL FX_GwaihirDeath
      Sound = INITIAL EagleVoiceDie
           DeathFlags = DEATH_1
   End
   
     Behavior = SlowDeathBehavior ModuleTag_FadeDeath
      DeathTypes = NONE +FADED
      FadeDelay = 0
      FadeTime = 2500
      DestructionDelay = 2500
      ;Sound = INITIAL EagleVoiceDie   
           DeathFlags = DEATH_2
   End
 
   Behavior = DualWeaponBehavior ModuleTag_10
      SwitchWeaponOnCloseRangeDistance = 24
   End
   
   FormationPreviewDecal
           Texture = FPflyingUnitDecal
           Width = 128
           Height = 128
       End

 
   /////////////////////
   // AISpecialPowers
   /////////////////////


   Behavior = AISpecialPowerUpdate GondorFighterHordeStanceBattle
      CommandButtonName = Command_SetStanceBattle
      SpecialPowerAIType = AI_SPECIAL_POWER_STANCEBATTLE
   End

   Behavior = AISpecialPowerUpdate GondorFighterHordeStanceAggressive
      CommandButtonName = Command_SetStanceAggressive
      SpecialPowerAIType = AI_SPECIAL_POWER_STANCEAGGRESSIVE
   End

   Behavior = AISpecialPowerUpdate GondorFighterHordeHoldGround
      CommandButtonName = Command_SetStanceHoldGround
      SpecialPowerAIType = AI_SPECIAL_POWER_STANCEHOLDGROUND
   End


   Geometry            = CYLINDER
   GeometryMajorRadius    = 30.0
   GeometryMinorRadius    = 30.0
   GeometryHeight         = 16.0
   GeometryIsSmall         = No
   
   HealthBoxScale         = 3.0
   HealthBoxHeightOffset   = 25.0   
   
   Shadow = SHADOW_VOLUME_NON_SELF_3   // volumetric shadow that doesn't cast onto all objects using SHADOW_VOLUME_NON_SELF_3
   ShadowSunAngle = 89               // clamp the angle so shadow casts straight down.
End

//---------------------------------------------------------------------
ChildObject GondorGwaihir_Summoned GondorGwaihir
   IsTrainable = No
   CommandPoints = 0

   KindOf = PRELOAD HERO SELECTABLE CAN_CAST_REFLECTIONS SCORE NO_FREEWILL_ENTER MONSTER SCARY CANNOT_RETALIATE SUMMONED

     Behavior = SlowDeathBehavior ModuleTag_FadeDeath
      DeathTypes = NONE +FADED
      FadeDelay = 0
      FadeTime = 2500
      DestructionDelay = 2500
      Sound = INITIAL SpellGenericUnsummonFasterMS
           DeathFlags = DEATH_2
   End
End

//---------------------------------------------------------------------
ChildObject ElvenFortressEagle GondorGwaihir
   ; this unit should cost 0 because the user is charged for the upgrade that creates it
   BuildCost = 0

   CommandPoints = 0
End

;------------------------------------------------------------------------------
;
;   These child objects are used in the fire drake lair.
;
ChildObject GondorGwaihir01_Slaved GondorGwaihir01

     EvaEnemyObjectSightedEvent = DiscoveredEnemyDrake
     EvaEnemyObjectSightedAfterRespawnEvent = DiscoveredEnemyDrake ; Event to run after the Fire Drake Lair is respawned. WARNING: This INI field only works for "SlavedUpdate.UseSlaverAsControlForEvaObjectSightedEvents = Yes" units

   ; Should be the same as WildFireDrake except with CREEP.
   KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS MONSTER CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT SCORE CREEP

   VisionRange = CREEP_VISION
   DisplayName = OBJECT:GondorGwiegher
   Behavior = SlavedUpdate ModuleTag_Slave
      GuardMaxRange      = 350
      GuardWanderRange   = 80
      UseSlaverAsControlForEvaObjectSightedEvents = Yes
   End

End

Cette fin de code implique un module esclave :

Citation :
;------------------------------------------------------------------------------
;
; These child objects are used in the fire drake lair.
;
ChildObject GondorGwaihir01_Slaved GondorGwaihir01

EvaEnemyObjectSightedEvent = DiscoveredEnemyDrake
EvaEnemyObjectSightedAfterRespawnEvent = DiscoveredEnemyDrake ; Event to run after the Fire Drake Lair is respawned. WARNING: This INI field only works for "SlavedUpdate.UseSlaverAsControlForEvaObjectSightedEvents = Yes" units

; Should be the same as WildFireDrake except with CREEP.
KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS MONSTER CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT SCORE CREEP

VisionRange = CREEP_VISION
DisplayName = OBJECT:GondorGwiegher
Behavior = SlavedUpdate ModuleTag_Slave
GuardMaxRange = 350
GuardWanderRange = 80
UseSlaverAsControlForEvaObjectSightedEvents = Yes
End

End

Puis ta forto :
Code:

;//------------------------------------------------------------------------------
;// This is the magic thing in the .bse file that tells how to center the base layout compared to the game position of the fortress
Object ElvenFortressCenterGeneric

   SelectPortrait = BPEFortress
   
   Draw = W3DScriptedModelDraw ModuleTag_01

       DefaultModelConditionState
            Model = None
       End
       
      ModelConditionState = WORLD_BUILDER
         Model = NBasePin
      End
   End
   
   Side         = Elves
   EditorSorting   = STRUCTURE
   KindOf         = IMMOBILE BASE_FOUNDATION CASTLE_CENTER
 
   Behavior = CastleBehavior ModuleTag_castle
      ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.   
      FilterValidOwnedEntries = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER            
   End 
End

;//------------------------------------------------------------------------------
;// These are the four corner buildplots.  Difference is just the BuildVariation flag they give the Expansion.
Object ElvenFortressExpansionPadCorner   
   
   SelectPortrait = BPEFortress_BuildPlot
   
   
   ;// *** ART Parameters ***
   Draw = W3DFloorDraw DrawFloorBase 
      ModelName = EBFoundation
   End
      
   Draw = W3DScriptedModelDraw ModuleTag_DrawMain
      DefaultModelConditionState
         Model = WBFoundationP         
      End
      ;//Remove the buildplot when it's been constructed on
      ModelConditionState = CONSTRUCTION_COMPLETE
         Model = None
      End         
   End

   ;//PlacementViewAngle  = 0

   ;// ***DESIGN parameters ***
   DisplayName        = OBJECT:ElvenBuildingFoundation
   Side                = Elves
   EditorSorting      = STRUCTURE
   ThreatLevel         = 1.0

   BuildCost          = 1
   BuildTime          = 5.0          ;// in seconds
   VisionRange        = 0.0          ;// Shroud clearing distance
   ShroudClearingRange = 0

   CommandSet = ElvenFortressExpansionPadCornerCommandSet

   ;// *** AUDIO Parameters ***

   VoiceSelect = Gui_PlotSelect2   ;MenFortressSelect


   ;// *** ENGINEERING Parameters ***   
   KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION UNATTACKABLE MP_COUNT_FOR_VICTORY NO_COLLIDE DO_NOT_CLASSIFY EXPANSION_PAD

   Behavior      = FoundationAIUpdate ModuleTag_foundationAI
      BuildVariation   = 2 ;// Will give BUILD_VARIATION_TWO to anything built on it
   End

   Behavior = CastleMemberBehavior ModuleTag_CMB
   End

   Body                = ImmortalBody ModuleTag_05
      MaxHealth        = 15000.0
   End

   Geometry            = CYLINDER
   GeometryMajorRadius      = 15.0
   GeometryMinorRadius      = 15.0
   GeometryHeight         = 0.8
   GeometryIsSmall         = No
   Shadow               = SHADOW_VOLUME
   BuildCompletion         = PLACED_BY_PLAYER
End

;// And these are the 3 on the sides.
ChildObject ElvenFortressExpansionPadSide ElvenFortressExpansionPadCorner
   
;   Draw = W3DScriptedModelDraw ModuleTag_DrawMain
;      DefaultModelConditionState
;         Model = EBFoundation
;      End
;   End

   CommandSet = ElvenFortressExpansionPadSideCommandSet

   Behavior            = FoundationAIUpdate ModuleTag_foundationAI
      BuildVariation = 1 ;// Will give BUILD_VARIATION_ONE to anything built on it
   End
End

;//------------------------------------------------------------------------------
;// Elven Fortress Citadel
;// This is the center part of the full Fortress.  This plus the buildplots make up the full fortress
Object ElvenCitadel

   SelectPortrait = BPEFortress
 
   Draw = W3DScriptedModelDraw ModuleTag_Draw
      ExtraPublicBone       = ARROW_01
      ExtraPublicBone       = ARROW_02
      ExtraPublicBone       = ARROW_03
      ExtraPublicBone       = ARROW_04
      ExtraPublicBone       = ARROW_05
      ExtraPublicBone       = ARROW_06
      ExtraPublicBone       = ARROW_07
      ExtraPublicBone       = ARROW_08
      ExtraPublicBone       = ARROW_09
      ExtraPublicBone       = ARROW_10
      ExtraPublicBone       = ARROW_11
      ExtraPublicBone       = ARROW_12
      ExtraPublicBone       = ARROW_13
      ExtraPublicBone       = ARROW_14
      ExtraPublicBone       = ARROW_15
      ExtraPublicBone       = ARROW_16
      ExtraPublicBone       = ARROW_17
      ExtraPublicBone       = ARROW_18
      ExtraPublicBone       = ARROW_19
      ExtraPublicBone       = ARROW_20
      ExtraPublicBone       = ARROW_21
      ExtraPublicBone       = ARROW_22
      ExtraPublicBone       = ARROW_23
      ExtraPublicBone       = ARROW_24
      ExtraPublicBone       = ARROW_25
      ExtraPublicBone       = ARROW_26
      ExtraPublicBone       = ARROW_27
      ExtraPublicBone       = ARROW_28
      ExtraPublicBone       = ARROW_29
      ExtraPublicBone       = ARROW_30
      ExtraPublicBone       = ARROW_31
      ExtraPublicBone       = ARROW_32
      
      OkToChangeModelColor   = Yes
      UseStandardModelNames   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      
      
      DefaultModelConditionState
         Model = EBFortress
         WeaponLaunchBone   = PRIMARY ARROW_
      End
      
      ModelConditionState = DAMAGED         
         Model      = EBFortress
         Texture      = EBFortress.tga EBFortress_D.tga
      End
      
      AnimationState   = DAMAGED
         Animation   = Fortress_ReallyDamaged
            AnimationName      = WBFortress_D2S.WBFortress_D2A
            AnimationMode      = ONCE            
         End         
         EnteringStateFX   = FX_FortressDamaged
      End

      ModelConditionState = REALLYDAMAGED
         Model      = EBFortress_D2
      End

      AnimationState   = REALLYDAMAGED
         Animation   = Fortress_ReallyDamaged
            AnimationName      = EBFortress_D2S.EBFortress_D2A
            AnimationMode      = ONCE            
         End
         EnteringStateFX   = FX_FortressReallyDamaged
      End

      ModelConditionState = RUBBLE
         Model      = EBFortress_D3
      End

      AnimationState   = RUBBLE
         Animation   = Fortress_Rubble
            AnimationName      = EBFortress_D3S.EBFortress_D3A
            AnimationMode      = ONCE            
         End         
         EnteringStateFX   = FX_FortressCollapse
      End

      ModelConditionState  = POST_RUBBLE
         Model        = None
         ParticleSysBone NONE SmokeBuildingMediumRubble
      End
      
      AnimationState = POST_RUBBLE
      End

      ModelConditionState  = POST_COLLAPSE
         Model        = None
         ParticleSysBone NONE SmokeBuildingMediumRubble
      End
      
      AnimationState = POST_COLLAPSE
      End 

      //---Vines---
      ModelConditionState = SNOW UPGRADE_NUMENOR_STONEWORK
         Model   = EBFortress
         Texture   = EBFortress.tga EBFortress_U_Snow.tga
      End
      
      ModelConditionState = UPGRADE_NUMENOR_STONEWORK
         Model   = EBFortress
         Texture   = EBFortress.tga EBFortress_U.tga
      End
      
      //---Snow---
      ModelConditionState = SNOW 
         Model = EBFortress
         Texture   = EBFortress.tga EBFortress_snow.tga
         Texture   = CBHarlindonruins.tga CBHarlindonruins_S.tga
      End    
   End

   Draw = W3DScriptedModelDraw ModuleTag_Draw_HCBanner
      OkToChangeModelColor  = Yes
      DefaultModelConditionState
         Model = EBHCFortress
      End
      MultiPlayerOnly = Yes
   End
   
   //Eagle's Nest
   Draw = W3DScriptedModelDraw ModuleTag_EaglesNestDraw
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model          = None
      End

      //Build up
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2 DAMAGED
         Model          = EBFENest_A
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2 REALLYDAMAGED
         Model          = EBFENest_A
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2 SNOW
         Model          = EBFENest_A
         Texture         = EBFortress.tga EBFortress_snow.tga
      End
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT USER_2
         Model          = EBFENest_A
      End
      
      AnimationState = UPGRADE_FORTRESS_MONUMENT USER_2
         Animation               = RiseUp
            AnimationName         = EBFENest_ASKL.EBFENest_ABLD
            AnimationMode         = ONCE
            AnimationSpeedFactorRange = 5.0 5.0
         End
      End

      //Damage States
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT DAMAGED         
         Model      = EBFENest
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT REALLYDAMAGED
         Model      = EBFENest_D2
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT REALLYDAMAGED
         Animation   = EBFENest_ReallyDamaged
            AnimationName      = EBFENest_D2SKL.EBFENest_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT RUBBLE
         Model      = EBFENest_D3
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT RUBBLE
         Animation   = EBFENest_Rubble
            AnimationName      = EBFENest_D3SKL.EBFENest_D3AN
            AnimationMode      = ONCE            
         End         
      End

      // snow state
      ModelConditionState = SNOW UPGRADE_FORTRESS_MONUMENT
         Model         = EBFENest
         Texture         = EBFortress.tga EBFortress_snow.tga
      End    
      
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT
         Model          = EBFENest
      End
   End

   ;//Eagles Nest Eagle Model
   Draw = W3DScriptedModelDraw ModuleTag_DrawEagle      
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model         = None
      End
      
      IdleAnimationState
         StateName      = NoEagle

      ; --- below worked but a little too much delay ---
      ;
      ;   BeginScript
      ;      Prev = CurDrawablePrevAnimationState()
      ;      if Prev == "BeingConstructed" then
      ;          ; Don't play completed sound when canceling build-in-progress or when
      ;          ; destroyed halfway
      ;          if not CurDrawableModelcondition( "DYING" ) then
      ;            CurDrawablePlaySound("UpgradeElfFortressEaglesNest")
      ;         end
      ;      end
      ;   EndScript
      End

      //Build up
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2 DAMAGED
         Model         = EBFE_A
         Texture         = EBFortress.tga EBFortress_D.tga
         ParticleSysBone = NONE EaglesNestbuildleaves
         ParticleSysBone = NONE EaglesNestbuilddust   
      End
      
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2 REALLYDAMAGED
         Model         = EBFE_A
         Texture         = EBFortress.tga EBFortress_D.tga
         ParticleSysBone = NONE EaglesNestbuildleaves
         ParticleSysBone = NONE EaglesNestbuilddust   
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2
         Model         = EBFE_A
         ParticleSysBone = NONE EaglesNestbuildleaves
         ParticleSysBone = NONE EaglesNestbuilddust   
      End
      
      AnimationState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE USER_2
         Animation               = RiseUp
            AnimationName         = EBFE_ASKL.EBFE_ABLD
            AnimationMode         = ONCE
            AnimationSpeedFactorRange = 5.0 5.0            
         End
         StateName = BeingConstructed
      End

      //Damage States
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE DAMAGED
         Model      = EBFE
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE REALLYDAMAGED
         Model      = EBFE_D2
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE REALLYDAMAGED
         Animation   = EBFENest_ReallyDamaged
            AnimationName      = EBFE_D2SKL.EBFE_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE RUBBLE
         Model      = EBFE_D3
      End

      AnimationState   = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE RUBBLE
         Animation   = EBFENest_Rubble
            AnimationName      = EBFE_D3SKL.EBFE_D3AN
            AnimationMode      = ONCE            
         End         
      End

      //Normal States
      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_AVAILABLE
        Model         = EBFE
      End

      ModelConditionState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_UNAVAILABLE         
         Model         = None         
      End

      AnimationState = UPGRADE_FORTRESS_MONUMENT FORTRESS_MONUMENT_CREATURE_UNAVAILABLE
         StateName   = EagleGone
      End
   End

   //Mystic Fountains
   Draw = W3DScriptedModelDraw ModuleTag_DrawMysticFountains
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model          = None
      End   

      //Build Up      
      ModelConditionState = FORTRESS_IMPROVEMENT_2 USER_3 DAMAGED
         Model          = EBFMFount_A         
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_2 USER_3 REALLYDAMAGED
         Model          = EBFMFount_A         
         Texture         = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_2 USER_3
         Model          = EBFMFount_A         
      End
      
      AnimationState = FORTRESS_IMPROVEMENT_2 USER_3
         Animation               = UpAndStill
            AnimationName         = EBFMFount_ASKL.EBFMFount_ABLD
            AnimationMode         = ONCE
            AnimationSpeedFactorRange = 30.0 30.0
         End
      End
      
      //Damage States
      ModelConditionState     = FORTRESS_IMPROVEMENT_2 DAMAGED
         Model      = EBFMFount
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_2 REALLYDAMAGED
         Model      = EBFMFount_D2
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      AnimationState   = FORTRESS_IMPROVEMENT_2 REALLYDAMAGED
         Animation   = MysticFountains_ReallyDamaged
            AnimationName      = EBFMFount_D2SK.EBFMFount_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_2 RUBBLE
         Model      = EBFMFount_D3
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      AnimationState   = FORTRESS_IMPROVEMENT_2 RUBBLE
         Animation   = MysticFountains_ReallyDamaged
            AnimationName      = EBFMFount_D3SK.EBFMFount_D3AN
            AnimationMode      = ONCE            
         End         
      End

      //Normal
      ModelConditionState = FORTRESS_IMPROVEMENT_2
         Model          = EBFMFount
      End
   End

   //Enchanted Anvil
   Draw = W3DScriptedModelDraw ModuleTag_DrawEnchantedAnvil
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes ;// Will append M or L to the skin name depending on GameLOD      

      DefaultModelConditionState
         Model          = None
      End   

      //---Build up Damaged---
      ModelConditionState     = FORTRESS_IMPROVEMENT_3 DAMAGED USER_1
         Model      = EBFAnvil_A
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 REALLYDAMAGED USER_1
         Model      = EBFAnvil_A
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      //Build up
      ModelConditionState = FORTRESS_IMPROVEMENT_3 USER_1
         Model   = EBFAnvil_A
      End
      
      AnimationState = FORTRESS_IMPROVEMENT_3 USER_1
         Animation                  = RiseUp
            AnimationName            = EBFAnvil_ASKL.EBFAnvil_ABLD
            AnimationMode            = ONCE
            AnimationSpeedFactorRange   = 7.0 7.0
         End
      End

      //---Damaged---
      ModelConditionState     = FORTRESS_IMPROVEMENT_3 DAMAGED
         Model      = EBFAnvil
         Texture      = EBFortress.tga EBFortress_D.tga
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 REALLYDAMAGED
         Model      = EBFAnvil_D2         
      End

      AnimationState   = FORTRESS_IMPROVEMENT_3 REALLYDAMAGED
         Animation   = EBFAnvil_ReallyDamaged
            AnimationName      = EBFAnvil_D2SKL.EBFAnvil_D2AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 RUBBLE
         Model      = EBFAnvil_D3         
      End

      AnimationState   = FORTRESS_IMPROVEMENT_3 RUBBLE
         Animation   = EBFAnvil_ReallyDamaged
            AnimationName      = EBFAnvil_D3SKL.EBFAnvil_D3AN
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_3
         Model          = EBFAnvil         
      End
   End

   Draw = W3DScriptedModelDraw ModuleTag_DrawAnvilGuy
      AttachToBoneInAnotherModule = PositionBone

      DefaultModelConditionState
         Model          = None
      End

      ModelConditionState = FORTRESS_IMPROVEMENT_3 USER_1
        Model         = None
      End

      ModelConditionState     = FORTRESS_IMPROVEMENT_3 RUBBLE
         Model      = None         
      End
      
      ModelConditionState = FORTRESS_IMPROVEMENT_3
         Model          = EBFAnvlGuy_SKN         
      End   

      AnimationState = FORTRESS_IMPROVEMENT_3
         Animation            = IDLA
            AnimationName      = EBFAnvlGuy_SKL.EBFAnvlGuy_IDLA
            AnimationMode      = ONCE
            AnimationPriority  = 20
         End
         Animation            = IDLB
            AnimationName      = EBFAnvlGuy_SKL.EBFAnvlGuy_IDLB
            AnimationMode      = ONCE
            AnimationPriority  = 1
         End
         Animation            = IDLC
            AnimationName      = EBFAnvlGuy_SKL.EBFAnvlGuy_IDLC
            AnimationMode      = ONCE
            AnimationPriority  = 1
         End
         Flags               = RESTART_ANIM_WHEN_COMPLETE
      End
   End

   //Blessed Mist
   Draw = W3DScriptedModelDraw ModuleTag_DrawMist
      
      DefaultModelConditionState
         Model            = None
      End
      
      ModelConditionState  = FORTRESS_IMPROVEMENT_8
         Model            = None
         ParticleSysBone      = NONE EnshroudingMist
      End        
   End


;//   Draw = W3DFloorDraw ModuleTag_DrawFloor   
;//      StaticModelLODMode = Yes      ;// THIS NEEDS TO BE COMMENTED OUT WHEN ENGINEERING ENABLES LOD'S IN THE FLOOR DRAW
;//       ModelName = GBWorkshop_Bib
;//   End
 

   PlacementViewAngle  = 0
   
   ;// ***DESIGN parameters ***
   DisplayName        = OBJECT:ElvenFortress
   Description        = OBJECT:ElvenFortressDescription

   Side                = Elves
   EditorSorting      = STRUCTURE
   ThreatLevel         = 1.0
   CommandPointBonus   = GENERIC_FORTRESS_COMMAND_POINT_BONUS
   
   CommandSet          = ElvenFortressCommandSet
   BuildCost          = ELVEN_FORTRESS_BUILDCOST
   BuildTime          = ELVEN_FORTRESS_BUILDTIME
   BountyValue        = ELVEN_FORTRESS_BOUNTY_VALUE
   VisionRange        = ELVEN_FORTRESS_VISION_RANGE   ;// Shroud clearing distance
   ShroudClearingRange = ELVEN_FORTRESS_SHROUD_CLEAR

   WeaponSet
      Weapon            = PRIMARY GoodStructureBow
      AutoChooseSources   = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
   End
      
   ArmorSet
      Conditions        = None
      Armor            = FortressArmor
      ;DamageFX          = StructureDamageFXNoShake
   End

   ;// *** AUDIO Parameters ***

   #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"

   EvaEventDieOwner             = EvaFortressDie

   VoiceSelect                  = ElfFortressSelect      ;GondorWorkshopSelect
   VoiceSelectUnderConstruction   = BuildingGoodVoiceSelectUnderConstruction

   SoundOnDamaged               = BuildingLightDamageStone
   SoundOnReallyDamaged         = BuildingHeavyDamageStone

   UnitSpecificSounds
      UnderConstruction      = BuildingBigConstructionLoop  ; Built first time
      ; UnderRepairFromDamage   = NoSound               ; Repaired No animation on the building, so don't bother playing sound
      UnderRepairFromRubble   = BuildingBigConstructionLoop   ; Repaired from completely destroyed (not used???)
   End

   ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
      MaxUpdateRangeCap = 800
      AnimationSound = Sound:UpgradeElfFortressEaglesNest      Animation:EBFE_ASKL.EBFE_ABLD   Frames:1250
   End
   
   CampnessValue = CAMPNESS_FORTRESS

 
   ;// *** ENGINEERING Parameters ***
   RadarPriority      = STRUCTURE   
   KindOf            = PRELOAD COMMANDCENTER VITAL_FOR_BASE_SURVIVAL STRUCTURE IMMOBILE CASTLE_KEEP MP_COUNT_FOR_VICTORY SELECTABLE FS_FACTORY AUTO_RALLYPOINT MADE_OF_WOOD SCORE DOZER_FACTORY
   
   Behavior            = GettingBuiltBehavior GetBuiltBehaviorTag
      WorkerName        = ElvenWorkerNoSelect
      SpawnTimer   = DEFAULT_STRUCTURE_HEALDELAY
   End

   Behavior = CastleMemberBehavior ModuleTag_CMB
   End

   Body                        = StructureBody ModuleTag_05
      MaxHealth                  = ELVEN_FORTRESS_HEALTH
      MaxHealthDamaged            = ELVEN_FORTRESS_HEALTH_DAMAGED
      MaxHealthReallyDamaged         = ELVEN_FORTRESS_HEALTH_REALLY_DAMAGED
          
;      DamageCreationList = OCL_BuildingDamageList01 CATAPULT_ROCK
;      DamageCreationList = OCL_GBStable_Chunk1 CATAPULT_ROCK FRONT_DESTROYED
;      DamageCreationList = OCL_GBStable_Chunk2 CATAPULT_ROCK RIGHT_DESTROYED
;      DamageCreationList = OCL_GBStable_Chunk3 CATAPULT_ROCK BACK_DESTROYED
;      DamageCreationList = OCL_GBStable_Chunk4 CATAPULT_ROCK LEFT_DESTROYED
      
   End

        Behavior = SpawnBehavior ModuleTag_Spawn
      SpawnNumber            = 2
      InitialBurst         = 2
      SpawnTemplateName      = GondorGwaihir01_Slaved
      SpawnReplaceDelay      = 60000                      ;120000
      CanReclaimOrphans      = Yes
   End

   Behavior = KeepObjectDie ModuleTag_IWantRubble
   End
 
   Behavior                  = BuildingBehavior BuildingModuleTag
   ; NightWindowName         = GBWORKSHOPN
   ; FireWindowName         = WINDOW_F01
   ; GlowWindowName         = WINDOW_G01
   ; FireName               = FIRE01
   End

   Behavior                  = StructureCollapseUpdate ModuleTag_06
      MinCollapseDelay        = 000
      MaxCollapseDelay        = 000
      CollapseDamping        = .5
      MaxShudder              = 0.6
      MinBurstDelay          = 250
      MaxBurstDelay          = 800
      BigBurstFrequency      = 4
      FXList                  = INITIAL  FX_FortressCollapse
      ;FXList                  = ALMOST_FINAL  FX_FortressCollapse
      DestroyObjectWhenDone   = Yes
      CollapseHeight         = 120
   End

   Behavior = ProductionUpdate ProductionUpdateModuleTag      
      ProductionModifier      
         RequiredUpgrade = Upgrade_ElvenFortressMysticFountains         
         TimeMultiplier = 0.75
         HeroRevive = Yes
      End
   End

   Behavior = QueueProductionExitUpdate QueueProductionModuleTag
      UnitCreatePoint         = X:41.0 Y:0.00 Z:0.0
      NaturalRallyPoint      = X:109.0 Y:0.00 Z:0.0
      //AllowAirborneCreation   = Yes
      ExitDelay            = 50
   End

   //Eagles Nest Behaviors
   Behavior = GrantUpgradeCreate ModuleTag_ActLikeAnOldUpgrade      
      UpgradeToGrant      = Upgrade_EaglesNestEagleButtonEnable
      GiveOnBuildComplete = Yes ;// The ExemptStatus UnderConstruction hack doesn't work on foundation buildings.
   End

   Behavior = ModelConditionUpgrade ModuleTag_ShowTheEaglesNest
      TriggeredBy         = Upgrade_ElvenFortressEaglesNest
      AddConditionFlags   = UPGRADE_FORTRESS_MONUMENT
      AddTempConditionFlag   = ModelConditionState:USER_2 //For buildup
      TempConditionTime      = 11.0                   //try to match buildup anim time
      Permanent            = Yes
   End

   Behavior = AudioLoopUpgrade ModuleTag_EaglesNestBuildLoop
      ; Play a "build loop" while the Eagle's Nest is building up
      TriggeredBy         = Upgrade_ElvenFortressEaglesNest
      ;ConflictsWith      = Upgrade_PosternGate Upgrade_WallBanner
      SoundToPlay         = BuildingBigConstructionLoop
      KillOnDeath        = Yes
      KillAfterMS         = 9000  ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
   End
   
   Behavior = GeometryUpgrade TowerGeom
      TriggeredBy         = Upgrade_ElvenFortressEaglesNest
      ShowGeometry      = HighTowerGeom
   End

   Behavior = AudioLoopUpgrade ModuleTag_EagleCreated
      ; Play a "build loop" while the Eagle's Nest is building up
      TriggeredBy         = Upgrade_HasEaglesNestEagle
      SoundToPlay         = ElvenFortressEagleCreated
   End


   Behavior = ObjectCreationUpgrade MaketheEagle
      TriggeredBy            = Upgrade_HasEaglesNestEagle
      Delay               = 0.0
      
      RemoveUpgrade         = Upgrade_EaglesNestEagleButtonEnable
      ThingToSpawn         = ElvenFortressEagle
      //Offset            = X:90.0 Y:0.0 Z:120.0
      FadeInTime            = 600
      UseBuildingProduction   = Yes
   End

   Behavior = SlaveWatcherBehavior WatchTheEagle
      RemoveUpgrade      =   Upgrade_HasEaglesNestEagle         ;//when our slave dies, remove this upgrade, so we can get the upgrade again.
      GrantUpgrade      =   Upgrade_EaglesNestEagleButtonEnable   ;//when our slave dies, enable the button that allows us to buy a new one      
      LetSlaveLive      = Yes
   End

   Behavior = ModelConditionUpgrade ModuleTag_AnimateEagle
      TriggeredBy            = Upgrade_EaglesNestEagleButtonEnable
      AddConditionFlags      = FORTRESS_MONUMENT_CREATURE_AVAILABLE
      RemoveConditionFlags   = FORTRESS_MONUMENT_CREATURE_UNAVAILABLE
      Permanent            = Yes
   End

   Behavior = ModelConditionUpgrade ModuleTag_HideEagle
      TriggeredBy            = Upgrade_HasEaglesNestEagle
      AddConditionFlags      = FORTRESS_MONUMENT_CREATURE_UNAVAILABLE
      RemoveConditionFlags   = FORTRESS_MONUMENT_CREATURE_AVAILABLE
      Permanent            = Yes
   End
   //This behavior allows me to queue this unit up for the citadel to build.  Otherwise I would need a hidden command button.
   //The production behavior checks to see if there is actually a commandset button setup to build this unit.  This bypasses that.
   Behavior      = SpawnUnitBehavior ModuleTag_allowMeToBuildDrakeFromCitadel
      UnitName      = ElvenFortressEagle      
    End   
   //End Eagles Nest Behaviors

   ;//Encasing Vines improvement
   Behavior = CastleUpgrade ModuleTag_PassOutEncasingVinesUpgrade
      TriggeredBy         = Upgrade_ElvenFortressEncasingVinesTrigger
      Upgrade            = Upgrade_ElvenFortressEncasingVines
      WallUpgradeRadius   = ELVEN_FORTRESS_WALL_EFFECTIVE_RADIUS
   End
   
   Behavior = AttributeModifierUpgrade ModuleTag_Reinforced
      TriggeredBy            = Upgrade_ElvenFortressEncasingVines
      AttributeModifier      = EncasingVines_Bonus
   End

   Behavior = ModelConditionUpgrade ModuleTag_ShowTheVines
      TriggeredBy         = Upgrade_ElvenFortressEncasingVines      
      AddConditionFlags   = UPGRADE_NUMENOR_STONEWORK
      Permanent         = Yes
   End

   ;//Mystic Fountains improvement
   Behavior = ModelConditionUpgrade ModuleTag_ShowMysticFountains
      TriggeredBy            = Upgrade_ElvenFortressMysticFountains
      AddConditionFlags      = FORTRESS_IMPROVEMENT_2
      AddTempConditionFlag   = ModelConditionState:USER_3 //For buildup
      TempConditionTime      = 10.0                   //try to match buildup anim time
      Permanent            = Yes
   End
   
   Behavior = StatusBitsUpgrade ModuleTag_FakeOutMysticFountains ;// Visual only upgrade needs a fake out to react to it.
      TriggeredBy   = Upgrade_ElvenFortressMysticFountains
   End

   Behavior = PassiveAreaEffectBehavior ModuleTag_MysticFountainsHealing
      UpgradeRequired         = Upgrade_ElvenFortressMysticFountains
      EffectRadius         = 200 // please update the decal size in experience lvl INI if you change this... the value there is about 2.2x the value here      
      PingDelay            = 2000;msec
      HealPercentPerSecond   = 3%
      AllowFilter            = ANY +INFANTRY +CAVALRY +HERO -MACHINE +MONSTER -IMMOBILE +DOZER
      NonStackable         = Yes
      HealFX               = FX_SpellHealUnitHealBuff
   End

   Behavior = BannerCarrierUpdate BannerCarrierUpdateModuleTag
      UpgradeRequired         = Upgrade_ElvenFortressMysticFountains
      IdleSpawnRate         = 5000                     // spawn a new member every n seconds when idle (in miliseconds)      
      UnitSpawnFX            = FX_BannerCarrierSpawnUnit      // name of particle FX to use when the BannerCarrier spawns a new unit      

      // This well object acts like a banner carrier except it spawns unit on nearby hordes instead of itself.
      ReplenishNearbyHorde   = Yes
      ScanHordeDistance      = 200
   End

   ;//Enchanted Anvil improvement
   Behavior = CostModifierUpgrade ModuleTag_EnchantedAnvilUpgrades
      LabelForPalantirString   = GUI:UPGRADE_DISCOUNT
      TriggeredBy            = Upgrade_ElvenFortressEnchantedAnvil      
      UpgradeDiscount         = Yes
      ApplyToTheseUpgrades   = Upgrade_ElvenSilverthornArrows Upgrade_ElvenForgedBlades Upgrade_ElvenHeavyArmor Upgrade_ElvenBasicTraining
      Percentage            = -10%
      Percentage            = -20%
      Percentage            = -25%
      Percentage            = -30%
      Percentage            = -35%      
   End

   Behavior = ModelConditionUpgrade ModuleTag_ShowTheAnvil
      TriggeredBy            = Upgrade_ElvenFortressEnchantedAnvil
      AddConditionFlags      = FORTRESS_IMPROVEMENT_3
      AddTempConditionFlag   = ModelConditionState:USER_1 //For buildup
      TempConditionTime      = 5.0                   //try to match buildup anim time
      Permanent            = Yes
   End

   Behavior = AudioLoopUpgrade ModuleTag_EnchantedAnvilBuildLoop
      TriggeredBy         = Upgrade_ElvenFortressEnchantedAnvil
      ;ConflictsWith      = Upgrade_PosternGate Upgrade_WallBanner
      SoundToPlay         = BuildingConstructionLoop
      KillOnDeath        = Yes
      KillAfterMS         = 3500  ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
   End

   ;//Blessed Mist improvement   
   Behavior = InvisibilityUpdate ModuleTag_BroadcastCamouflage
      InvisibilityNugget
         InvisibilityType   = CAMOUFLAGE
         DetectionRange      = ELVEN_MIST_CAMOUFLAGE_DETECTION_RANGE
      End
      UpdatePeriod         = 1000
      Broadcast            = Yes
      BroadcastRange         = 300
      BroadcastObjectFilter   = ELVEN_MIST_OBJECT_FILTER
      StartsActive         = Yes
      RequiredUpgrades      = Upgrade_ElvenFortressBlessedMist
   End

   Behavior = ModelConditionUpgrade ModuleTag_AnimateNestDrake
      TriggeredBy            = Upgrade_ElvenFortressBlessedMist
      AddConditionFlags      = FORTRESS_IMPROVEMENT_8      
      Permanent            = Yes
   End

   ;//Crystal Moat   
   Behavior = ObjectCreationUpgrade CreateTheMoat
      TriggeredBy      = Upgrade_ElvenFortressCrystalMoat      
      Delay         = 0.0            
      ThingToSpawn   = ElvenFortressCrystalMoat      
      FadeInTime      = 600
   End

   Behavior = CitadelSlaughterHordeContain ModuleTag_SlaughterMe
      PassengerFilter               = GENERIC_FACTION_SLAUGHTERABLE
      ObjectStatusOfContained         = UNSELECTABLE ENCLOSED
      CashBackPercent               = 200%      
      ContainMax                  = 99;// give it a huge capacity, just in case player sends his whole army in at once
      AllowEnemiesInside            = No
      AllowAlliesInside            = No
       AllowNeutralInside            = No
       AllowOwnPlayerInsideOverride   = Yes
      EnterSound                  = GUI_RingReturned
      EntryOffset                  = X:129.0 Y:5.0 Z:0.0
      EntryPosition               = X:100.0 Y:0.0 Z:0.0      // entry position needs to be offset from the root transform, otherwise fortress obscures point.
      
      ExitOffset                  = X:129.0 Y:0.0 Z:0.0
      StatusForRingEntry            = HOLDING_THE_RING
      UpgradeForRingEntry            = Upgrade_RingHero Upgrade_FortressRingHero
      ObjectToDestroyForRingEntry      = NONE +TheDroppedRing
      FXForRingEntry               = FX_OneRingFlare
   End

   Behavior = AIUpdateInterface ModuleTag_AI
      AILuaEventsList            = FortressFunctions
      AutoAcquireEnemiesWhenIdle   = Yes
      MoodAttackCheckRate         = 250
   End

   ;//Money Maker   
   Behavior = AutoDepositUpdate AutoDepositModuleTag
      DepositTiming         = GENERIC_KEEP_MONEY_TIME
      DepositAmount         = GENERIC_KEEP_MONEY_AMOUNT
      InitialCaptureBonus    = 0  ;// no initial bonus
   End

   Behavior = TerrainResourceBehavior ModuleTag_NewMoneyDeadSpot
      Radius         = GENERIC_KEEP_MONEY_RANGE   ;// How far we try to claim ground
      MaxIncome      = 0                     ;// If we were to get all we wanted, how much we would earn.  Linear slope to 0 at 0% claim
      IncomeInterval   = 999999               ;// How often (in msec) we give that much money
      HighPriority   = Yes                  ;// A high priority claim gets to pretend it was there first.
   End

   #include "..\..\..\FortressRingFunc.inc"
      
   //Main
   Geometry            = CYLINDER
    GeometryName         = Geom_Orig
     GeometryMajorRadius      = 50.0   
   GeometryHeight         = 55.0
   GeometryOffset         = X:0 Y:0 Z:0   

   //Towers
   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:25 Y:25 Z:0   

   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:-25 Y:25 Z:0   

   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:-25 Y:-25 Z:0   

   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 12.0   
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 120.0
   GeometryOffset         = X:25 Y:-25 Z:0   

   //Front
   AdditionalGeometry      = BOX
    GeometryName         = Geom_V2
     GeometryMajorRadius      = 15.0   
   GeometryMinorRadius      = 20.0
   GeometryHeight         = 80.0
   GeometryOffset         = X:60 Y:0 Z:0   

   //Ramp (So units can attack it when the moat is in place)
   AdditionalGeometry      = BOX
   GeometryMajorRadius      = 12.0
    GeometryMinorRadius      = 16.0
    GeometryHeight         = 22.0
   GeometryOffset         = X:85 Y:0 Z:0
   
   AdditionalGeometry      = BOX
   GeometryName         = HighTowerGeom
   GeometryMajorRadius     = 12
   GeometryMinorRadius     = 12
   GeometryHeight           = 150
   GeometryOffset         = X:0 Y:0 Z:0
   GeometryUsedForHealthBox = No
      
   GeometryIsSmall         = No
   Shadow               = SHADOW_VOLUME
   BuildCompletion         = PLACED_BY_PLAYER
   
   GeometryContactPoint = X:-50.348   Y:26.9      Z:0         Repair
   GeometryContactPoint = X:47.546      Y:-38.677   Z:0         Repair
   GeometryContactPoint = X:47.546      Y:36.435   Z:0
   GeometryContactPoint = X:-32.763   Y:-46.121   Z:0
   ;GeometryContactPoint = X:26.753      Y:26.753   Z:67.933   Swoop
   GeometryContactPoint = X:0         Y:0         Z:180      Swoop

End

;//------------------------------------------------------------------------------
;//Elven Fortress
;// This is the one object that you would place on a map and that the porter builds.
;// It unpacks in to the citadel and the buildplots.  It's an old CampFlag.
Object ElvenFortress

   SelectPortrait = BPEFortress

   Draw   = W3DScriptedModelDraw ModuleTag_01      
      OkToChangeModelColor   = Yes
      StaticModelLODMode      = Yes // Will append M or L to the skin name depending on GameLOD
      
      DefaultModelConditionState
         Model          = None
      End

      ;dummy idle animation state for audio
       IdleAnimationState
         ;StateName   =   STATE_Idle
      End   

      ;//Need this since the default condition is none
      ModelConditionState = WORLD_BUILDER
         Model   = EBFortress
      End

      ;//Phantom structure when placing a new building to be build
      ModelConditionState = BUILD_PLACEMENT_CURSOR
         Model   = None   //EBFortress
      End

      ;//Structure that stays where you will be building until the porter reaches the place to start building.
      ModelConditionState =  PHANTOM_STRUCTURE
         Model   = EBFortress
      End

      ModelConditionState = RUBBLE
         Model      = EBFortress_D3
      End

      AnimationState   = RUBBLE
         Animation   = Fortress_Rubble
            AnimationName      = EBFortress_D3S.EBFortress_D3A
            AnimationMode      = ONCE            
         End         
         EnteringStateFX   = FX_FortressCollapse
      End
      
      ModelConditionState = ACTIVELY_BEING_CONSTRUCTED SNOW
         Model         = EBFortress_A
         Texture   = EBFortress.tga EBFortress_U_Snow.tga
      End
      ModelConditionState = ACTIVELY_BEING_CONSTRUCTED
         Model         = EBFortress_A
      End

      AnimationState = ACTIVELY_BEING_CONSTRUCTED
         Animation               = UpAndStill
            AnimationName         = EBFortress_ASK.EBFortress_ABL
            AnimationMode         = MANUAL
         End
         ParticleSysBone = NONE BuildingContructDustCastles FollowBone:YES
         ParticleSysBone = NONE FortressElven FollowBone:YES
         StateName = BeingConstructed
         BeginScript
            CurDrawablePlaySound("GondorBarracksBeginConstruction")
         EndScript
      End
   End

     ArmorSet
      Conditions        = None
        Armor            = FortressArmor
        ;//DamageFX          = StructureDamageFXNoShake
     End

   Side                = Elves
   EditorSorting      = STRUCTURE

   PlacementViewAngle = -45 ;// A -90 makes the door of the base face natural south.  0 would have it to the East.
   
   BuildCost          = ELVEN_FORTRESS_BUILDCOST
   BuildTime          = ELVEN_FORTRESS_BUILDTIME //0

   DisplayName        = OBJECT:ElvenFortress

   ; *** AUDIO Parameters ***
   #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"

   VoiceFullyCreated            = EVA:FortressComplete-Builder-Elf
   VoiceSelect                  = ElfFortressSelect
   VoiceSelectUnderConstruction   = BuildingGoodVoiceSelectUnderConstruction

   SoundOnDamaged               = BuildingLightDamageStone
   SoundOnReallyDamaged         = BuildingHeavyDamageStone

   UnitSpecificSounds
      UnderConstruction         = BuildingBigConstructionLoop  ; Built first time
      ; UnderRepairFromDamage      = NoSound               ; Repaired No animation on the building, so don't bother playing sound
      UnderRepairFromRubble      = BuildingBigConstructionLoop   ; Repaired from completely destroyed (not used???)
   End

   ClientBehavior = ModelConditionAudioLoopClientBehavior ModuleTag_PlayCollapseSound
      ModelCondition = REQUIRED:RUBBLE Sound:BuildingSink
   End

   // *** AUTO RESOLVE DATA ***
   ; When fighting an auto-resolve battle, a World Map castle actually becomes this unit
   AutoResolveUnitType = AutoResolveUnit_Fortress
   
       AutoResolveBody = AutoResolve_ElvenFortressBody
   
       AutoResolveArmor
          Armor = AutoResolve_ElvenFortressArmor
       End

       AutoResolveWeapon
          Weapon = AutoResolve_ElvenFortressWeapon
       End


   ;// *** ENGINEERING Parameters *** 
   RadarPriority      = STRUCTURE
   KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION MP_COUNT_FOR_VICTORY BASE_SITE CAN_SEE_THROUGH_STRUCTURE LIVING_WORLD_BUILDING_MIRROR
   
   //We can now take damage and die but only during construction.  The castle system will make us invulnerable when construction completes.
   Body                        = StructureBody ModuleTag_05
      MaxHealth                  = ELVEN_FORTRESS_HEALTH      
   End

   Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves
      CastleToUnpackForFaction   = Angmar Fortress_Elves
      CastleToUnpackForFaction   = Arnor  Fortress_Elves

      ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER      

      MaxCastleRadius          = 130.0
      InstantUnpack            = Yes      
      KeepDeathKillsEverything   = Yes

      EvaEnemyCastleSightedEvent = EnemyFortressSighted      
   End

   Behavior                  = StructureCollapseUpdate ModuleTag_06
      MinCollapseDelay        = 000
      MaxCollapseDelay        = 000
      CollapseDamping        = .5
      MaxShudder              = 0.6
      MinBurstDelay          = 250
      MaxBurstDelay          = 800
      BigBurstFrequency      = 4
      FXList                  = INITIAL  FX_FortressCollapse
      ;FXList                  = ALMOST_FINAL  FX_FortressCollapse
      DestroyObjectWhenDone   = Yes
      CollapseHeight         = 120
   End

   Behavior            = GettingBuiltBehavior ModuleTag_GettingBuiltBehavior
      WorkerName   = ElvenWorkerNoSelect
      SpawnTimer   = DEFAULT_STRUCTURE_HEALDELAY
   End

   Behavior = AIUpdateInterface ModuleTag_AI
      AILuaEventsList      =   FortressFunctions
   End
   
   //Main
   Geometry            = CYLINDER
    GeometryName         = Geom_Orig
     GeometryMajorRadius      = 85.0   
   GeometryHeight         = 55.0   

   //Plot locations
   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:66.49 Y:-66.49 Z:0   

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:0 Y:-94.0 Z:0   

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:-66.49 Y:-66.49 Z:0   

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:-94.0 Y:0 Z:0

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:-66.49 Y:66.49 Z:0

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:0 Y:94.0 Z:0

   AdditionalGeometry      = BOX
   GeometryName         = Plots
   GeometryMajorRadius      = 10.0
   GeometryMinorRadius      = 10.0
   GeometryHeight         = 0.8
   GeometryOffset         = X:66.49 Y:66.49 Z:0

   //Ramp (So units can attack it when the moat is in place)
   AdditionalGeometry      = BOX
   GeometryMajorRadius      = 12.0
    GeometryMinorRadius      = 16.0
    GeometryHeight         = 22.0
   GeometryOffset         = X:85 Y:0 Z:0

   GeometryIsSmall       = No
   Shadow               = SHADOW_VOLUME
End

//------------------------------------------------------------------------------
//Elven Fortress Crystal Moat
// This is the moat around the fortress.  This is a separate object so that it can
// prevent units from being able to attack the fortress except at the ramp.
Object ElvenFortressCrystalMoat

   SelectPortrait = BPEFortress

   Draw   = W3DScriptedModelDraw ModuleTag_01      
      OkToChangeModelColor   = Yes
      
      DefaultModelConditionState
         Model          = EBFCMoat
      End

      ModelConditionState = DAMAGED
         Model         = EBFCMoat_D1
      End

      ModelConditionState = REALLYDAMAGED
         Model         = EBFCMoat_D2
      End

      AnimationState   = REALLYDAMAGED
         Animation   = EBFCMoat_ReallyDamaged
            AnimationName      = EBFCMoat_D2.EBFCMoat_D2
            AnimationMode      = ONCE            
         End         
      End

      ModelConditionState = RUBBLE
         Model         = EBFCMoat_D3
      End

      AnimationState   = RUBBLE
         Animation   = EBFCMoat_ReallyDamaged
            AnimationName      = EBFCMoat_D3.EBFCMoat_D3
            AnimationMode      = ONCE            
         End         
      End
   End

   ArmorSet
      Conditions        = None
        Armor            = NoArmor
        //DamageFX          = StructureDamageFXNoShake
     End

   Side                = Elves
   EditorSorting      = STRUCTURE

   // *** AUDIO Parameters ***
   #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
   CampnessValue = 0


   // *** ENGINEERING Parameters *** 
   RadarPriority      = STRUCTURE
   KindOf              = STRUCTURE IMMOBILE UNATTACKABLE NOT_AUTOACQUIRABLE BASE_SITE CAN_SEE_THROUGH_STRUCTURE
   
   Body = HighlanderBody ModuleTag_02 //Can take damage, but won't die.  Can only die from ::kill() or other unresistable damage
      MaxHealth      = 50.0
   End

   Behavior = SlavedUpdate ModuleTag_Slave
      DieOnMastersDeath = Yes
   End

   Geometry                 = CYLINDER
   GeometryMajorRadius     = 80   
   GeometryHeight         = 10
   GeometryIsSmall       = No
   Shadow               = SHADOW_VOLUME
End

/////////////////////////fort for adams  mission
ChildObject MER_ElvenFortress_1 ElvenFortress

  Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves

      //Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER      
      MaxCastleRadius          = 130.0 http://80.0
      FadeTime               = 2.0 ; 2 seconds
      InstantUnpack            = Yes      
      KeepDeathKillsEverything   = Yes
      EvaEnemyCastleSightedEvent = EnemyFortressSighted
       PreBuiltList = ElvenVigilantEntExpansion 3   
        PreBuiltList = ElvenFloodgateExpansion 0
        PreBuiltList = ElvenWatchtowerExpansion 4
        PreBuiltList = ElvenVigilantEntExpansion 1
        PreBuiltList = ElvenWatchtowerExpansion 5
        PreBuiltList = ElvenFloodgateExpansion 2
        PreBuiltList = ElvenVigilantEntExpansion 6
      PreBuiltPlyr = PlyrRivendell

   End
END

//-------------------------------------------
ChildObject MER_ElvenFortress_2 ElvenFortress

  Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves

      ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER      
      MaxCastleRadius          = 130.0 http://80.0
      FadeTime               = 2.0 ; 2 seconds
      InstantUnpack            = Yes      
      KeepDeathKillsEverything   = Yes
      EvaEnemyCastleSightedEvent = EnemyFortressSighted
       PreBuiltList = ElvenWatchtowerExpansion 3   
        PreBuiltList = ElvenVigilantEntExpansion 0
        PreBuiltList = ElvenWatchtowerExpansion 4
        PreBuiltList = ElvenVigilantEntExpansion 1
        PreBuiltList = ElvenWatchtowerExpansion 5
        PreBuiltList = ElvenVigilantEntExpansion 2
        PreBuiltList = ElvenWatchtowerExpansion 6
        
      PreBuiltPlyr = PlyrRivendell

   End
END

//------------------------------------------- For Evil Grey Havens
ChildObject EGH_ElvenFortress_1 ElvenFortress                                    
   Behavior = CastleBehavior ModuleTag_castle                                 
        CastleToUnpackForFaction   = Elves Fortress_Elves
      CastleToUnpackForFaction   = Dwarves Fortress_Elves
      CastleToUnpackForFaction   = Men Fortress_Elves
      CastleToUnpackForFaction   = Wild Fortress_Elves
      CastleToUnpackForFaction   = Isengard Fortress_Elves
      CastleToUnpackForFaction   = Mordor Fortress_Elves

      FilterValidOwnedEntries      = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER   
      MaxCastleRadius          = 130.0 http://80.0
      FadeTime            = 2.0 ; 2 seconds                              
      InstantUnpack         = Yes                                    
      KeepDeathKillsEverything   = Yes                                    
      EvaEnemyCastleSightedEvent   = EnemyFortressSighted                           
      PreBuiltList          = ElvenWatchtowerExpansion -2                     
        PreBuiltList          = ElvenWatchtowerExpansion -2                        
        PreBuiltList          = ElvenWatchtowerExpansion -2                        
        PreBuiltList          = ElvenWatchtowerExpansion -2   
        PreBuiltList          = ElvenWatchtowerExpansion -2
        PreBuiltList          = ElvenWatchtowerExpansion -2                  
      PreBuiltPlyr          = PlyrElves                              
   End                                                       
End   

//------------------------------------------- For Evil Grey Havens
ChildObject EGH_ElvenFortress_2 ElvenCitadel ;ElvenFortress   

   ArmorSet
      Conditions        = None
      Armor            = EGH_FortArmor
      ;DamageFX          = StructureDamageFXNoShake
   End
   
   ;Body                        = StructureBody ModuleTag_05
   ;   MaxHealth                  = 4000
   ;   MaxHealthDamaged            = 2000
   ;   MaxHealthReallyDamaged             = 1000
   ;              
   ;End
   
                                                      
End   

En simple c'est l'ajout d'un behavior :
Citation :

;// *** ENGINEERING Parameters ***
RadarPriority = STRUCTURE
KindOf = PRELOAD COMMANDCENTER VITAL_FOR_BASE_SURVIVAL STRUCTURE IMMOBILE CASTLE_KEEP MP_COUNT_FOR_VICTORY SELECTABLE FS_FACTORY AUTO_RALLYPOINT MADE_OF_WOOD SCORE DOZER_FACTORY

Behavior = GettingBuiltBehavior GetBuiltBehaviorTag
WorkerName = ElvenWorkerNoSelect
SpawnTimer = DEFAULT_STRUCTURE_HEALDELAY
End

Behavior = CastleMemberBehavior ModuleTag_CMB
End

Body = StructureBody ModuleTag_05
MaxHealth = ELVEN_FORTRESS_HEALTH
MaxHealthDamaged = ELVEN_FORTRESS_HEALTH_DAMAGED
MaxHealthReallyDamaged = ELVEN_FORTRESS_HEALTH_REALLY_DAMAGED

; DamageCreationList = OCL_BuildingDamageList01 CATAPULT_ROCK
; DamageCreationList = OCL_GBStable_Chunk1 CATAPULT_ROCK FRONT_DESTROYED
; DamageCreationList = OCL_GBStable_Chunk2 CATAPULT_ROCK RIGHT_DESTROYED
; DamageCreationList = OCL_GBStable_Chunk3 CATAPULT_ROCK BACK_DESTROYED
; DamageCreationList = OCL_GBStable_Chunk4 CATAPULT_ROCK LEFT_DESTROYED

End

Behavior = SpawnBehavior ModuleTag_Spawn
SpawnNumber = 2
InitialBurst = 2
SpawnTemplateName = GondorGwaihir01_Slaved
SpawnReplaceDelay = 60000 ;120000
CanReclaimOrphans = Yes
End
Pour l'apparence d'un héros on a tout le code du début à avant ; ***DESIGN parameters ***
Ne pas oublié audio à remplacer et les pouvoirs sauf si tu désire d'autres audio et les pouvoirs ne marcheront pas , c'est complexe.

Sa peut marcher pour BFME1 ?
Revenir en haut Aller en bas
Korl
Moddeur expert
Moddeur expert
Korl


Nombre de messages : 564
Add-On : Oui
Date d'inscription : 26/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeMer 21 Nov - 13:37

Oui
Revenir en haut Aller en bas
Leithian...
Moddeur expert
Moddeur expert
Leithian...


Nombre de messages : 750
Age : 31
Location : @ Home ! =D
Add-On : Quelle question, bien sûr que non !
Date d'inscription : 03/03/2010

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeMer 21 Nov - 22:49

Tout dépends Korl. Les trois quarts des meshes du jeu utilisent le même squelette, pas sous le même nom, mais leur architecture reste la même. C'est pourquoi tu peux "facilement" choper un perso et le forcer à suivre d'autres anims que celles de bases, du moment que son bipède ou squelette ( mais dans BFME comme dans bcp de jeux c'est du bipède ) est identique ou relativement similaire à celui d'origine. Tous les persos humains sont identiques si on ne regarde que leurs structure de squelette principale ( en faisant abstraction des capes et tout le tralala ).

Après, le truc, c'est de skinner le model sur le nouveau squelette, je ne suis pas sûr que par exemple passer de sauron à saroumne soit super pratique étant donné que sauron est plus grand et donc que toutes ses anims ne coïncident qu'avec lui, on risquerait d'avoir des trucs qui suivent pas forcément le mesh de base. Cependant, il est toujours possible de tricher mais faut se retaper un skinning sous RenX avec le WWWSkin ( qui est à chier car trop peu d'options et impossibilité de voir en temps réel, sous RenX, si le skinning est bon ou non ). Ce type d'opération demande du temps et de la patience. Cependant, passer de aragorn à boromir ça se fait tout seul, ou avec un autre perso...c'est con mais c'est comme ça Wink Moi pour le coupe, j'ai fait une héroïne dragonne en reprenant l'animation de base de drogoth mais le mesh d'un specialpower, comme ils avaient le même squelette, ça s'est torché en moins de 15 minutes ( fallait que j'apprenne en même temps aussi donc ça m'a pris du temps mais normalement y en a pour 2 à 5 min grand max ). Et je l'ai fait sans passer par la 3D Wink ça reste une méthode simple et efficace, mais après, vous faites ce que vous voulez, je n'ai jamais prétendu être un bon moddeur ok!
Revenir en haut Aller en bas
https://vexod14.artstation.com
grego
Moddeur expert
Moddeur expert
grego


Nombre de messages : 655
Age : 25
Location : Chez moi
Add-On : Bien sur que oui!
Date d'inscription : 28/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeJeu 22 Nov - 19:45

Le truck que je comprend pas , c'est que quand j'avais ajouter une uniter sa ma game crash et falais que je retire seulement le 3D mais j'avais plus le perso --'
Revenir en haut Aller en bas
Korl
Moddeur expert
Moddeur expert
Korl


Nombre de messages : 564
Add-On : Oui
Date d'inscription : 26/06/2011

Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitimeSam 24 Nov - 20:10

Leithian... a écrit:
Tout dépends Korl. Les trois quarts des meshes du jeu utilisent le même squelette, pas sous le même nom, mais leur architecture reste la même. C'est pourquoi tu peux "facilement" choper un perso et le forcer à suivre d'autres anims que celles de bases, du moment que son bipède ou squelette ( mais dans BFME comme dans bcp de jeux c'est du bipède ) est identique ou relativement similaire à celui d'origine. Tous les persos humains sont identiques si on ne regarde que leurs structure de squelette principale ( en faisant abstraction des capes et tout le tralala ).

Après, le truc, c'est de skinner le model sur le nouveau squelette, je ne suis pas sûr que par exemple passer de sauron à saroumne soit super pratique étant donné que sauron est plus grand et donc que toutes ses anims ne coïncident qu'avec lui, on risquerait d'avoir des trucs qui suivent pas forcément le mesh de base. Cependant, il est toujours possible de tricher mais faut se retaper un skinning sous RenX avec le WWWSkin ( qui est à chier car trop peu d'options et impossibilité de voir en temps réel, sous RenX, si le skinning est bon ou non ). Ce type d'opération demande du temps et de la patience. Cependant, passer de aragorn à boromir ça se fait tout seul, ou avec un autre perso...c'est con mais c'est comme ça Wink Moi pour le coupe, j'ai fait une héroïne dragonne en reprenant l'animation de base de drogoth mais le mesh d'un specialpower, comme ils avaient le même squelette, ça s'est torché en moins de 15 minutes ( fallait que j'apprenne en même temps aussi donc ça m'a pris du temps mais normalement y en a pour 2 à 5 min grand max ). Et je l'ai fait sans passer par la 3D Wink ça reste une méthode simple et efficace, mais après, vous faites ce que vous voulez, je n'ai jamais prétendu être un bon moddeur ok!

Oui ben suffit de prendre les codes de bfme1 simplement le skin et saroumane et de gandalf ainsi que leur pouvoirs actuel , même système c'est ce que jvoulais dire ok!
Revenir en haut Aller en bas
Contenu sponsorisé





Questions Empty
MessageSujet: Re: Questions   Questions Icon_minitime

Revenir en haut Aller en bas
 
Questions
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» 2 questions
» Des questions
» 3D et questions
» Questions Worldbuilder.exe
» Some Questions

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Imladris production :: Ini codes et .str :: Discussion-
Sauter vers: