for some reason both arnor and gondor ranger longshot ability aren't working when upgrading them to level 2 , ive check sevevral times on their commandbutton and their hordes file but still not working,
//////////////////////////////////////////////////////////////////////////////////
Object GondorRangerHorde
// This is required for garrisoned objects - please put in all objects.
SelectPortrait = UPIthilienRangernew
ButtonImage = UIIthilienRanger
Draw = W3DScriptedModelDraw ModuleTag_W3DModelDraw
DependencySharedModelFlags = EMOTION_ALERT EMOTION_MORALE_HIGH EMOTION_MORALE_LOW EMOTION_AFRAID EMOTION_COWER SELECTED EMOTION_TERROR EMOTION_LOOK_TO_SKY EMOTION_TAUNTING
DefaultModelConditionState
Model = None //InvisHrdeTmp5x2
End
ModelConditionState = HORDE_EMPTY
Model = None
End
ModelConditionState = WORLD_BUILDER
Model = HordeMarkGURan
End
End
Side = Men
EditorSorting = UNIT
EmotionRange = 240
DisplayName = OBJECT:HordeGondorRanger
DisplayNameStrategic = CONTROLBAR:LW_Unit_GondorRangerHorde
DescriptionStrategic = CONTROLBAR:LW_ToolTip_GondorRangerHorde
WeaponSet
Conditions = None
Weapon = PRIMARY GondorRangerMissileHordeRangefinder
;Weapon = SECONDARY NormalMeleeHordeRangefinder
Weapon = TERTIARY GondorRangerMissileHordeRangefinderBombard
;AutoChooseSources = SECONDARY NONE
AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT ; Not AI.
End
WeaponSet
Conditions = WEAPONSET_TOGGLE_1
Weapon = PRIMARY NormalMeleeHordeRangefinder
Weapon = TERTIARY GondorRangerMissileHordeRangefinderBombard
AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT ; Not AI.
End
; WeaponSet ;;,;;
; Conditions = WEAPONSET_TOGGLE_1 CONTAINED
; Weapon = PRIMARY GondorRangerMissileHordeRangefinder
; Weapon = PRIMARY GondorRangerMissileHordeRangefinderBombard
; 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 = GONDOR_RANGER_BUILDCOST
BuildTime = GONDOR_RANGER_BUILDTIME
VisionRange = GONDOR_RANGER_HORDE_VISION_RANGE
ShroudClearingRange = GONDOR_RANGER_HORDE_SHROUD_RANGE
VisionSide = 50%
VisionRear = 25%
MaxVisionBonusPercent = 300%
VisionBonusTestRadius = 200
VisionBonusPercentPerFoot = 1.0%
CommandPoints = 72 ; originally 60
CrushableLevel = 0 //What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 0
UseCrushAttack = No ;Archer hordes cannot crush or Bombard will not work
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.
TransportSlotCount = TRANSPORTSLOTCOUNT_SMALL_HORDE
KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE ARCHER ARMY_SUMMARY LARGE_RECTANGLE_PATHFIND MELEE_HORDE//UNATTACKABLE
Body = ImmortalBody ModuleTag_ImmortalBody
MaxHealth = 1
End
ThreatLevel = GONDOR_RANGER_HORDE_THREAT
ThreatBreakdown GondorRangerHorde_DetailedThreat
AIKindOf = ARCHER
End
#include "..\..\..\includes\CaptureBuilding.inc"
Behavior = StancesBehavior ModuleTag_StancesBehavior
StanceTemplate = ArcherHorde
End
Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS STEALTHED
MoodAttackCheckRate = 500
MaxCowerTime = 5000
MinCowerTime = 3000
CanAttackWhileContained = Yes // Can fire out of garrisoned building
AILuaEventsList = InfantryFunctions
AttackPriority = AttackPriority_Archer
End
Behavior = HordeContain ModuleTag_HordeContain
FrontAngle = 270
FlankedDelay = 2000
ObjectStatusOfContained =
InitialPayload = GondorRanger 12
Slots = 12
PassengerFilter = NONE +INFANTRY
ShowPips = No
ThisFormationIsTheMainFormation = Yes //Used to determine which armorset to use (and anything else we want!)
RandomOffset=X:4 Y:4
MeleeBehavior = Amoeba
End
// Banner Carrier info
BannerCarriersAllowed = GondorRangerCaptain ;GondorInfantryBanner // types of units that are allowed as banner carriers
BannerCarrierPosition = UnitType:GondorRanger Pos:X:40.0 Y:0.0 ; (DEFAULT) position of banner carrier for archer horde
; Positions for 5
RandomOffset = X:0 Y:-12
RankInfo = RankNumber:1 UnitType:GondorRanger Position:X:0 Y:12 Position:X:0 Y:-12 Position:X:0 Y:-36 Position:X:0 Y:36 Position:X:0 Y:-60 Position:X:0 Y:60
RankInfo = RankNumber:2 UnitType:GondorRanger Position:X:20 Y:12 Position:X:20 Y:-12 Position:X:20 Y:-36 Position:X:20 Y:36 Position:X:20 Y:-60 Position:X:20 Y:60 ;;.;; Fixed mistake on front middle-right horde member. Position:X:15 Y:-12 ---> Position:X:20 Y:-12
; BannerCarrierPosition = UnitType:GondorRanger Pos:X:30.0 Y:0.0 // (DEFAULT) position of banner carrier
// Positions for 5
; RankInfo = RankNumber:1 UnitType:GondorRanger Position:X:20 Y:0 Position:X:20 Y:25 Position:X:20 Y:-25 Position:X:20 Y:50 Position:X:20 Y:-50
; RankInfo = RankNumber:2 UnitType:GondorRanger Position:X:0 Y:0 Leader 1 0 Position:X:0 Y:25 Leader 1 1 Position:X:0 Y:-25 Leader 1 2 Position:X:0 Y:50 Leader 1 3 Position:X:0 Y:-50 Leader 1 4
RanksToReleaseWhenAttacking = 1 2
MeleeAttackLeashDistance = 50 //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
#include "..\..\..\includes\DefaultInvisibilityUpdate.inc"
Behavior = PhysicsBehavior ModuleTag_PhysicsBehavior
GravityMult = 1.0
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 = ARCHER_FEAR_SCAN_RADIUS
AddEmotion = Terror_Base
AddEmotion = Doom_Base
AddEmotion = BraceForBeingCrushed_Base
AddEmotion = UncontrollableFear_Base
AddEmotion = FearIdle_Base
AddEmotion = FearBusy_Base
AddEmotion = Point_Base
//Rangers are very stoic and do not taunt. -
//AddEmotion = OVERRIDE Taunt_Base
//AttributeModifier = GondorFighterTaunt
//End
AddEmotion = CheerIdle_Base
AddEmotion = CheerBusy_Base
AddEmotion = HeroCheerIdle_Base
AddEmotion = HeroCheerBusy_Base
AddEmotion = Alert_Base
End
LocomotorSet
Locomotor = NormalRangedHordeLocomotor
Condition = SET_NORMAL
Speed = NORMAL_FOOT_FAST_HORDE_SPEED
End
CommandSet = GondorRangerHordeCommandSet
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_KnifeEnabler
SpecialPowerTemplate = SpecialAbilityKnifeFighter
TriggeredBy = Upgrade_ObjectLevel2
End
Behavior = WeaponModeSpecialPowerUpdate ModuleTag_KnifeFighterPowerUpdate
SpecialPowerTemplate = SpecialAbilityKnifeFighter
Duration = 30000
AttributeModifier = RangerToggleBonus
LockWeaponSlot = SECONDARY
StartsPaused = Yes
InitiateSound = LegolasKnifeModeMS
End
Behavior = AutoAbilityBehavior ModuleTag_AutoAbilityKnifeFighter
SpecialAbility = SpecialAbilityKnifeFighter
ForbiddenStatus = INSIDE_GARRISON
MaxScanRange = 100
Query = 1 ALL ENEMIES -STRUCTURE -WALL_UPGRADE -WALL_HUB -WALL_SEGMENT -DEFENSIVE_WALL -FS_BASE_DEFENSE
End
;;; TOGGLE WEAPON SPECIAL POWER ;;;
Behavior = WeaponChangeSpecialPowerModule THING
SpecialPowerTemplate = SpecialAbilityBerserkerLightTorch
FlagsUsedForToggle = WEAPONSET_TOGGLE_1
ToggleOnAttributeModifier = IthilienRangerToggleBonus
End
;-------------------;;.;;
;2.02 balance - adding the behaviors to prevent non level 2 or higher horde from using longshot when multi-selected with a level 2 or higher horde
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_LongshotEnabler
SpecialPowerTemplate = SpecialAbilityMenLongShot
TriggeredBy = Upgrade_ObjectLevel2
End
Behavior = OCLSpecialPower ModuleTag_ArrowVolleyEvil
SpecialPowerTemplate = SpecialAbilityMenLongShot
OCL = OCL_LongShotAbility
CreateLocation = CREATE_AT_LOCATION
UpdateModuleStartsAttack = No
StartsPaused = No ;;.;;added
;// Need to set a model condition (unused by the horde anyway) in order to
;// freeze the horde for the duration of the spell
SetModelCondition = ModelConditionState:USER_1
SetModelConditionTime = 5.0
DisableDuringAnimDuration = Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_FireballUpdate
SpecialPowerTemplate = SpecialAbilityMenLongShot
PackTime = 5000 // returning to flap
MustFinishAbility = Yes
SpecialWeapon = MenLongShotWeapon
NeedLivingTargets = No
;PackSound = LongshotRangerCall ;this worked!
;UnpackSound = LongshotRangerCall ;this didn't work
;PrepSoundLoop = LongshotRangerCall ;this worked!
TriggerSound = RangerVoiceLongShot
ApproachRequiresLOS = No
End
Behavior = ProductionUpdate ProductionUpdateModuleTag
GiveNoXP = Yes
End
Behavior = LevelUpUpgrade ModuleTag_BasicTraining
TriggeredBy = Upgrade_GondorBasicTraining
LevelsToGain = 1
LevelCap = 2
End
Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality
TriggeredBy = Upgrade_GondorFireArrows
End
Behavior = PickupStuffUpdate ModuleTag_PickupStuffUpdate
SkirmishAIOnly = Yes
StuffToPickUp = NONE +CRATE
ScanRange = 200
ScanIntervalSeconds = 0.5
End
/////////////////////
// AISpecialPowers
/////////////////////
Behavior = AISpecialPowerUpdate GondorRangerHordeCaptureBuildingAI
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
Behavior = AISpecialPowerUpdate RangerLongshotAI ;;,;; Added for 2.02c
CommandButtonName = Command_MenLongShotAbility
SpecialPowerAIType = AI_SPELLBOOK_ASSIST_BATTLE_DEBUFF ;;,;; AI_SPECIAL_POWER_RANGED_AOE_ATTACK ;;,;; Changed for 2.4
End
Geometry = BOX
GeometryMajorRadius = 20.0
GeometryMinorRadius = 60.0
GeometryHeight = 10.0
GeometryIsSmall = No
// *** AUTO RESOLVE DATA ***
AutoResolveUnitType = AutoResolveUnit_Archer
AutoResolveCombatChain = AutoResolve_ArcherCombatChain
AutoResolveBody = AutoResolve_GondorRangerHordeBody
AutoResolveArmor
Armor = AutoResolve_GondorRangerArmor
End
AutoResolveWeapon
RequiredUpgrades = Upgrade_GondorFireArrows
Weapon = AutoResolve_GondorRangerUpgradedWeapon
End
AutoResolveWeapon
ExcludedUpgrades = Upgrade_GondorFireArrows
Weapon = AutoResolve_GondorRangerWeapon
End
WorldMapArmoryUpgradesAllowed = Upgrade_GondorBasicTraining Upgrade_GondorFireArrows
End
//////////////////////////////////////////////////////////////////////////////////
ChildObject GondorRangerInnHorde GondorRangerHorde
BuildCost = INN_UNIT_BUILDCOST_MEN ;;,;; GONDOR_RANGER_BUILDCOST ;;.;; INN_UNIT_BUILDCOST_MEN
BuildTime = INN_UNIT_BUILDTIME_MEN ;;,;; GONDOR_RANGER_BUILDTIME ;;.;; INN_UNIT_BUILDTIME_MEN ;;.;; Added
EquivalentTo = GondorRangerHorde_Summoned
DisplayName = OBJECT:HordeDunedainRanger ;;,;; Added for 2.1
Behavior = HordeContain ModuleTag_HordeContain
FrontAngle = 270
FlankedDelay = 2000
ObjectStatusOfContained =
InitialPayload = GondorRangerInn 12 ;2.02 balance ;;.;;GOOD_MEN_HORDE_SIZE
Slots = 12 ;2.02 balance ;;.;;10
PassengerFilter = NONE +INFANTRY
ShowPips = No
ThisFormationIsTheMainFormation = Yes //Used to determine which armorset to use (and anything else we want!)
RandomOffset=X:4 Y:4
MeleeBehavior = Amoeba
End
// Banner Carrier info
BannerCarriersAllowed = GondorInfantryBanner // types of units that are allowed as banner carriers
BannerCarrierPosition = UnitType:GondorRangerInn Pos:X:30.0 Y:0.0 // (DEFAULT) position of banner carrier
;;.;; Legacy horde positions
; // Positions for 5
; RankInfo = RankNumber:1 UnitType:GondorRangerInn Position:X:0 Y:0 Position:X:0 Y:25 Position:X:0 Y:-25 Position:X:0 Y:50 Position:X:0 Y:-50
; RankInfo = RankNumber:2 UnitType:GondorRangerInn Position:X:20 Y:0 Position:X:15 Y:25 Position:X:20 Y:-25 Position:X:20 Y:50 Position:X:20 Y:-50
;;.;; 2.02 horde positions
RankInfo = RankNumber:1 UnitType:GondorRangerInn Position:X:0 Y:12 Position:X:0 Y:-12 Position:X:0 Y:-36 Position:X:0 Y:36 Position:X:0 Y:-60 Position:X:0 Y:60
RankInfo = RankNumber:2 UnitType:GondorRangerInn Position:X:20 Y:12 Position:X:20 Y:-12 Position:X:20 Y:-36 Position:X:20 Y:36 Position:X:20 Y:-60 Position:X:20 Y:60
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 = WeaponFireSpecialAbilityUpdate ModuleTag_FireballUpdate ;;,;;
SpecialPowerTemplate = SpecialAbilityMenLongShot
PackTime = 5000 // returning to flap
MustFinishAbility = Yes
SpecialWeapon = MenLongShotWeapon
NeedLivingTargets = No
;PackSound = LongshotRangerCall ;this worked!
;UnpackSound = LongshotRangerCall ;this didn't work
;PrepSoundLoop = LongshotRangerCall ;this worked!
TriggerSound = DunedainVoiceLongShot
ApproachRequiresLOS = No
End
End
//////////////////////////////////////////////////////////////////////////////////
ChildObject GondorRangerHorde_Summoned GondorRangerHorde
IsTrainable = No
CommandPoints = 0
CommandSet = GondorRangerHordeCommandSet_Summoned
EquivalentTo = GondorRangerInnHorde
DisplayName = OBJECT:HordeDunedainRanger
KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE ARCHER ARMY_SUMMARY LARGE_RECTANGLE_PATHFIND SUMMONED
Behavior = HordeContain ModuleTag_HordeContain
FrontAngle = 270
FlankedDelay = 2000
ObjectStatusOfContained =
InitialPayload = GondorRanger_Summoned 12 ;;,;; GOOD_MEN_HORDE_SIZE
Slots = 12 ;;,;; 10
PassengerFilter = NONE +INFANTRY
ShowPips = No
ThisFormationIsTheMainFormation = Yes //Used to determine which armorset to use (and anything else we want!)
RandomOffset=X:4 Y:4
// Positions for 5
;;,;; RankInfo = RankNumber:1 UnitType:GondorRanger_Summoned Position:X:0 Y:0 Position:X:0 Y:20 Position:X:0 Y:-20 Position:X:0 Y:40 Position:X:0 Y:-40
;;,;; RankInfo = RankNumber:2 UnitType:GondorRanger_Summoned Position:X:15 Y:0 Position:X:15 Y:20 Position:X:15 Y:-20 Position:X:15 Y:40 Position:X:15 Y:-40
RankInfo = RankNumber:1 UnitType:GondorRanger_Summoned Position:X:0 Y:12 Position:X:0 Y:-12 Position:X:0 Y:-36 Position:X:0 Y:36 Position:X:0 Y:-60 Position:X:0 Y:60 ;;,;;
RankInfo = RankNumber:2 UnitType:GondorRanger_Summoned Position:X:20 Y:12 Position:X:20 Y:-12 Position:X:20 Y:-36 Position:X:20 Y:36 Position:X:20 Y:-60 Position:X:20 Y:60 ;;,;;
RanksToReleaseWhenAttacking = 1 2
MeleeAttackLeashDistance = 25// How far the hordes can move from the center of the horde when melee attacking.
End
Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
// This one displays the timer, but the one in the uint does the work
MinLifetime = DUNEDAIN_ALLIES_LIFETIME
MaxLifetime = DUNEDAIN_ALLIES_LIFETIME
DeathType = FADED
End
;;,;; //Summoned Rangers can detect Stealthed Units
;;,;; Behavior = StealthDetectorUpdate StealthDetectorUpdateModuleTag
;;,;; DetectionRange = 100 // range to detect
;;,;; DetectionRate = 500 // how often to rescan for stealthed things in my sight (msec)
;;,;; CancelOneRingEffect = Yes // forces uses of one-ring to pop out of it
;;,;; End
End
ChildObject GondorRangerFreeHorde GondorRangerInnHorde ;;,;; GondorRangerHorde
BuildCost = 0
KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE ARCHER LARGE_RECTANGLE_PATHFIND
EquivalentTo = GondorRangerInnHorde ;;,;;
End
CommandButton Command_MenLongShotAbility
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityMenLongShot
Options = NEED_UPGRADE OK_FOR_MULTI_SELECT NEED_TARGET_POS
NeededUpgrade = Upgrade_ObjectLevel2
TextLabel = CONTROLBAR:MenLongShotAbility
DescriptLabel = CONTROLBAR:ToolTipMenLongShotAbility
ButtonImage = UCCommon_Longshot
ButtonBorderType = ACTION
InPalantir = Yes
PresetRange = GONDOR_RANGER_LONGSHOT_RANGE
RadiusCursorType = LongShotRadiusCursor
CursorName = AttackObj
InvalidCursorName = GenericInvalid
End