BFME II players might want code as Lindons are a RotWK unit:
CODE
;
; ElvenRivendellArcherHorde
;
;------------------------------------------------------------------------------
Object ElvenRivendellArcherHorde
; This is required for garrisoned objects - please put in all objects.
ButtonImage = WOR_RivendellArcher
SelectPortrait = UPHorseArcherPortrait
Draw = W3DScriptedModelDraw ModuleTag_W3DModelDraw
DependencySharedModelFlags = EMOTION_ALERT EMOTION_MORALE_HIGH EMOTION_MORALE_LOW EMOTION_AFRAID EMOTION_COWER SELECTED EMOTION_TERROR EMOTION_CELEBRATING
DefaultModelConditionState
Model = None ;InvisHrdeTmp5x1
End
ModelConditionState = HORDE_EMPTY
Model = None
End
ModelConditionState = WORLD_BUILDER
Model = HordeMarkEURIL
End
End
Side = Elves
EditorSorting = UNIT
EmotionRange = 240
DisplayName = OBJECT:HordeElvenRivendellArcher
DisplayNameStrategic = CONTROLBAR:LW_Unit_ElvenRivendellArcherHorde
DescriptionStrategic = CONTROLBAR:LW_ToolTip_ElvenRivendellArcherHorde
WeaponSet
Conditions = None
Weapon = PRIMARY NormalMissileHordeRangefinder ; Spear
End
; *** AUDIO Parameters ***;
; Note: Don't put voice parameters here -- they will be ignored. Voice play requests
; are always passed through to members
#include "..\..\..\includes\StandardHordeEvaEvents.inc"
BuildCost = ELVEN_RIVENDELLARCHER_BUILDCOST
BuildTime = ELVEN_RIVENDELLARCHER_BUILDTIME
VisionRange = ELVEN_RIVENDELLARCHER_HORDE_VISION_RANGE
VisionSide = 50%
VisionRear = 25%
VisionBonusPercentPerFoot = 1.0%
ShroudClearingRange = ELVEN_RIVENDELLARCHER_SHROUD_RANGE
CommandPoints = 80
FormationWidth = 2 ; Width it occupies in formations. Current choices are 1 or 2.
FormationDepth = 1 ; Depth it occupies in formations. Current choices are 1 or 2.
CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 1
MinCrushVelocityPercent = 50% ; Has to be moving at at least 25% of full speed.
CrushDecelerationPercent = 30% ; Lose 10 percent (100/5 horde members) of max velocity when crushing.
CrushKnockback = 40 ; how hard we knock back crushed units.
CrushZFactor = 1.0 ; How much we knock upwards.
TransportSlotCount = TRANSPORTSLOTCOUNT_SMALL_HORDE
KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAVALRY HORDE MELEE_HORDE ARMY_SUMMARY LARGE_RECTANGLE_PATHFIND
CommandSet = ElvenRivendellArcherHordeCommandSet
ThreatLevel = ELVEN_RIVENDELLARCHER_HORDE_THREAT
ThreatBreakdown ElvenRivendellLancerHorde_DetailedThreat
AIKindOf = CAVALRY
End
Body = ImmortalBody ModuleTag_ImmortalBody
MaxHealth = 1
End
Behavior = StancesBehavior ModuleTag_StancesBehavior
StanceTemplate = CavalryHorde
End
Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate = 500
MaxCowerTime = 5000
MinCowerTime = 3000
AILuaEventsList = CavalryFunctions
AttackPriority = AttackPriority_Cavalry
End
Behavior = HorseHordeContain ModuleTag_HordeContain
FrontAngle = 270
FlankedDelay = 2000
ObjectStatusOfContained =
InitialPayload = ElvenRivendellArcher GOOD_RIDER_LARGE_HORDE_SIZE
Slots = 10
PassengerFilter = NONE +CAVALRY +ElvenRivendellLancerBanner +ElvenRivendellArcherBanner
ShowPips = No
RandomOffset = X:2 y:3
MeleeBehavior = Amoeba
End
ThisFormationIsTheMainFormation = Yes ;Used to determine which armorset to use (and anything else we want!)
; Banner Carrier info
BannerCarriersAllowed = ElvenRivendellArcherBanner ; types of units that are allowed as banner carriers
BannerCarrierPosition = UnitType:ElvenRivendellArcher Pos:X:75.0 Y:0.0 ; (DEFAULT) position of banner carrier for archer horde ;;,;; UnitType:ElvenRivendellLancer
RankInfo = RankNumber:1 UnitType:ElvenRivendellArcher Position:X:45 Y:0 Position:X:45 Y:20 Position:X:45 Y:-20 Position:X:45 Y:40 Position:X:45 Y:-40
RankInfo = RankNumber:2 UnitType:ElvenRivendellArcher Position:X:10 Y:0 Leader 1 0 Position:X:10 Y:20 Leader 1 1 Position:X:10 Y:-20 Leader 1 2 Position:X:10 Y:40 Leader 1 3 Position:X:10 Y:-40 Leader 1 4
RanksToReleaseWhenAttacking = 1 2
MeleeAttackLeashDistance = 1 //How far the hordes can move from the center of the horde when melee attacking.
BackUpMinDelayTime = 1 //The minimum amount of time to delay before backing up
BackUpMaxDelayTime = 3000 //The maximum amount of time to delay before backing up
BackUpMinDistance = 1 //The minimum number of cells to backup
BackUpMaxDistance = 3 //The maximum number of cells to backup
BackupPercentage = 80% //The amount of chance that a unit will back up.
End
Behavior = PhysicsBehavior ModuleTag_PhysicsBehavior
GravityMult = 1.0
End
Behavior = HordeNotifyTargetsOfImminentProbableCrushingUpdate ModuleTag_NotifyCrushScan
ScanWidth = 70.0 ; A little less than the width of the horde (which is 2 * 40 = 80)
End
Behavior = EmotionTrackerUpdate Module_EmotionTracker
TauntAndPointDistance = INFANTRY_TAUNT_POINT_RADIUS ; max distance to taunted/pointed objet
TauntAndPointUpdateDelay = 1000 ; how often scan (milliseconds)
TauntAndPointExcluded = NONE
AfraidOf = EMOTION_AFRAIDOF_OBJECTFILTER
AlwaysAfraidOf = EMOTION_ALWAYS_AFRAIDOF_OBJECTFILTER
PointAt = EMOTION_POINTAT_OBJECTFILTER
HeroScanDistance = 150
FearScanDistance = CAVALRY_FEAR_SCAN_RADIUS
AddEmotion = Terror_Base
AddEmotion = Doom_Base
AddEmotion = BraceForBeingCrushed_Base
AddEmotion = UncontrollableFear_Base
AddEmotion = FearIdle_Base
AddEmotion = FearBusy_Base
AddEmotion = Point_Base
AddEmotion = Taunt_Base
AddEmotion = CheerIdle_Base
AddEmotion = CheerBusy_Base
AddEmotion = HeroCheerIdle_Base
AddEmotion = HeroCheerBusy_Base
AddEmotion = Alert_Base
AddEmotion = CheerForAboutToCrush_Base
End
LocomotorSet
Locomotor = NormalCavalryHordeLocomotor
Condition = SET_NORMAL
Speed = NORMAL_MOUNTED_FAST_HORDE_SPEED
End
Behavior = ProductionUpdate ProductionUpdateModuleTag
GiveNoXP = Yes
End
#include "..\..\..\includes\CaptureBuilding.inc"
Behavior = LevelUpUpgrade ModuleTag_BasicTraining
TriggeredBy = Upgrade_ElvenBasicTraining
LevelsToGain = 1
LevelCap = 2
End
Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality
TriggeredBy = Upgrade_ElvenSilverthornArrows
End
Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality2
TriggeredBy = Upgrade_ElvenHeavyArmor
End
;;,;; Behavior = AISpecialPowerUpdate RivendellLancerHordeCaptureBuildingAI
;;,;; CommandButtonName = Command_CaptureBuilding
;;,;; SpecialPowerAIType = AI_SPECIAL_POWER_CAPTURE_BUILDING
;;,;; End
Behavior = PickupStuffUpdate ModuleTag_PickupStuffUpdate
SkirmishAIOnly = Yes
StuffToPickUp = NONE +CRATE
ScanRange = 200
ScanIntervalSeconds = 0.5
End
;///////////////////
; AISpecialPowers
;///////////////////
Behavior = AISpecialPowerUpdate ElvenMirkwoodArcherHordeCaptureBuildingAI
CommandButtonName = Command_CaptureBuilding
SpecialPowerAIType = AI_SPECIAL_POWER_CAPTURE_BUILDING
End
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 = BOX
GeometryMajorRadius = 30.0
GeometryMinorRadius = 40.0
GeometryHeight = 20.0
GeometryIsSmall = No
// *** AUTO RESOLVE DATA ***
AutoResolveUnitType = AutoResolveUnit_Cavalry
AutoResolveCombatChain =AutoResolve_SoldierCombatChain ;;,;; AutoResolve_CavalryCombatChain
AutoResolveBody = AutoResolve_ElvenRivendellArcherHordeBody ;;,;; AutoResolve_ElvenRivendellLancerHordeBody
AutoResolveArmor
RequiredUpgrades = Upgrade_ElvenHeavyArmor
Armor = AutoResolve_ElvenRivendellArcherHeavyArmor ;;,;; AutoResolve_ElvenRivendellLancerHeavyArmor
End
AutoResolveArmor
ExcludedUpgrades = Upgrade_ElvenHeavyArmor
Armor = AutoResolve_ElvenRivendellArcherArmor ;;,;; AutoResolve_ElvenRivendellLancerArmor
End
AutoResolveWeapon
RequiredUpgrades = Upgrade_ElvenSilverthornArrows
Weapon = AutoResolve_ElvenRivendellArcherWeapon ;;,;; AutoResolve_ElvenLorienArcherUpgradedWeapon
End
AutoResolveWeapon
ExcludedUpgrades = Upgrade_ElvenSilverthornArrows
Weapon = AutoResolve_ElvenRivendellArcherWeapon ;;,;; AutoResolve_ElvenLorienArcherWeapon
End
WorldMapArmoryUpgradesAllowed = Upgrade_ElvenBasicTraining Upgrade_ElvenSilverthornArrows Upgrade_ElvenHeavyArmor
End