Jump to content


HKFrenchtoast

Member Since 04 Jun 2012
Offline Last Active Jun 20 2012 01:01 AM

Topics I've Started

Morthond Bowman

09 June 2012 - 02:43 AM

I got Morthond Bowman into my mod, but two problem arises. Second, the units cannot move, they SLIDE. They slide around...How do I fix that?


First, the arrows ARE STILL PURPLE. Please don't tell me it's the asset.dat's problem, because it's not.

"As has been pointed out before, the Morthond Bowmen arrows are untextured and therefore show up purple (at least in BFME1). W3D Viewer shows that it requires the file w_arrowb.dds, a file not included in any version of BFME.

So, to anyone who got these to work, what did you do for that?
And to Nertea, is this a mistake with the models or am I overlooking something incredibly obvious?"



I was told this is how to fix it:

"To fix this, open up the _skn file in a hex editor.

Search for .dds, replace it with .tga.

The game cannot use textures when they are referenced as a .dds in the model. It has to be a .tga, even if the physical texture file is a .dds.



But it did not work, the arrows are still purple.

Second, the units cannot move, they SLIDE. They slide around...How do I fix that?

My Morthond Bowman code:

Object MorthondBowman
	
	// *** ART Parameters ***
	SelectPortrait		 = UPGondor_Ranger
	ButtonImage		 = SFMortbow

	Draw = W3DHordeModelDraw ModuleTag_01
		OkToChangeModelColor = Yes	
		StaticModelLODMode = Yes
		ParticlesAttachedToAnimatedBones = Yes
		
		//specify options for static LODs
		LodOptions	= LOW
			AllowMultipleModels		=	ALLOW_MULTIPLE_MODELS_LOW
			MaxRandomTextures		=	MAX_RANDOM_TEXTURES_LOW
			MaxRandomAnimations		=	MAX_RANDOM_ANIMATIONS_LOW
			MaxAnimFrameDelta		=	MAX_ANIM_FRAME_DELTA_LOW
		End
		
		LodOptions	= MEDIUM
			AllowMultipleModels		=	ALLOW_MULTIPLE_MODELS_MED
			MaxRandomTextures		=	MAX_RANDOM_TEXTURES_MED
			MaxRandomAnimations		=	MAX_RANDOM_ANIMATIONS_MED
			MaxAnimFrameDelta		=	MAX_ANIM_FRAME_DELTA_MED
		End
		
		LodOptions	= HIGH
			AllowMultipleModels		=	ALLOW_MULTIPLE_MODELS_HIGH
			MaxRandomTextures		=	MAX_RANDOM_TEXTURES_HIGH
			MaxRandomAnimations		=	MAX_RANDOM_ANIMATIONS_HIGH
			MaxAnimFrameDelta		=	MAX_ANIM_FRAME_DELTA_HIGH
		End

//=================== MODELS ============================================================
// --------- With Bow ------------
// Bah, must come first even though all the other bow stuff is below the sword stuff
		DefaultModelConditionState
			Model							= gumorthond_skn
			Skeleton						= gumorthond_skl
			WeaponLaunchBone				= PRIMARY ARROW
			WeaponLaunchBone				= TERTIARY ARROW
		End

		ModelConditionState				WEAPONSET_PLAYER_UPGRADE
			WeaponLaunchBone				= PRIMARY ARROW
			WeaponLaunchBone				= SECONDARY ARROWNOCK	; when upgraded to flaming arrow
			WeaponLaunchBone				= TERTIARY ARROW
		End

		#include "GondorRangerAnims.inc"

	End
	
	
	#include "..\..\..\includes\StunDrawModuleSmall.inc"

	// ***DESIGN parameters ***
	Side				= Men
	EditorSorting		= UNIT
	ThreatLevel			= 1.0
	ThingClass			= HORDE_UNIT
	CommandPoints		= 4
	BountyValue			= GONDOR_RANGER_BOUNTY_VALUE	
	TransportSlotCount	= TRANSPORTSLOTCOUNT_UNIT
	
	WeaponSet
		Conditions	= None
		Weapon		= PRIMARY	MortBowmanBow
		Weapon		= TERTIARY	MortBowmanBowBombard
		AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT			; Not from AI.
	End
	WeaponSet
		Conditions	= CLOSE_RANGE CONTESTING_BUILDING
		Weapon		= PRIMARY	MortBowmanBow
		Weapon		= SECONDARY   GondorRangerSword
		Weapon		= TERTIARY	MortBowmanBowBombard
		OnlyAgainst = PRIMARY STRUCTURE
		AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT			; Not from AI.
	End

	ArmorSet
		Conditions	  = None
		Armor		   = MortArmor
		DamageFX		= NormalDamageFX
	End

		ArmorSet
			   Conditions = PLAYER_UPGRADE
			   Armor = MortHeavyArmor
			   DamageFX = NormalDamageFX
		End
	
	// Gondor Ranger is no longer eligible for this upgrade.
	//ArmorSet
	//	Conditions	  = PLAYER_UPGRADE
	//	Armor		   = HeavyArmor
	//	DamageFX		= NormalDamageFX
	//End
	
	VisionRange		= GONDOR_RANGER_VISION_RANGE
	ShroudClearingRange	 = SHROUD_CLEAR_STANDARD
	
	VisionSide = 35%
	VisionRear = 25%
	
	MaxVisionBonusPercent = 300%
	VisionBonusTestRadius = 200
	VisionBonusPercentPerFoot = 2.0%
	

	DisplayName			= OBJECT:GondorRanger
	CrushableLevel		= 0  //What am I?:		0 = for infantry, 1 = for trees, 2 = general vehicles
	CrushRevengeWeapon	= RangedInfantryCrushRevenge
	
	CommandSet			= GondorRangerCommandSet


	// *** AUDIO Parameters ***
	VoiceAttack								= RangerVoiceAttack
	VoiceAttackAir							= RangerVoiceAttack				
	VoiceAttackCharge						= RangerVoiceAttack
	VoiceAttackMachine						= RangerVoiceAttack
	VoiceAttackStructure					= RangerVoiceAttackBuilding
	VoiceEnterStateAttack					= RangerVoiceEnterStateAttack	
	VoiceEnterStateAttackCharge				= RangerVoiceEnterStateAttack
	VoiceEnterStateAttackMachine			= RangerVoiceEnterStateAttackBuilding
	VoiceEnterStateAttackStructure			= RangerVoiceEnterStateAttackBuilding
	VoiceCreated							= RangerVoiceSalute
	VoiceFullyCreated						 = RangerVoiceSalute		
	VoiceGuard								= RangerVoiceMove
	VoiceMove								= RangerVoiceMove		
	VoiceMoveToCamp							= RangerVoiceMoveCamp
	VoiceMoveWhileAttacking					= RangerVoiceDisengage
	VoiceEnterStateMove						= RangerVoiceEnterStateMove
	VoiceEnterStateMoveToCamp				= RangerVoiceEnterStateMoveCamp
	VoiceEnterStateMoveWhileAttacking		= RangerVoiceEnterStateDisengage
	VoicePriority							= 43
	VoiceRetreatToCastle					= RangerVoiceRetreat
	VoiceEnterStateRetreatToCastle			= RangerVoiceEnterStateRetreat
	VoiceSelect								= RangerVoiceSelectMS
	VoiceSelectBattle						 = RangerVoiceSelectBattle

	SoundImpact								= ImpactHorse

	CrowdResponseKey = GoodMen

	UnitSpecificSounds
		VoiceGarrison						= RangerVoiceGarrison
		;VoiceCreatedFromInn				= TEMP_RangerVoiceSaluteInn
		;VoiceFullyCreatedFromInn			 = TEMP_RangerVoiceSaluteInn
		VoiceEnterUnitElvenTransportShip	= DunedainVoiceMoveShip
		VoiceInitiateCaptureBuilding		= DunedainVoiceCaptureBuilding
		VoiceMoveToTrees					= RangerVoiceMoveTrees				
		VoiceEnterStateMoveToTrees			= RangerVoiceEnterStateMoveTrees
		;VoiceEnterStateInitiateCaptureBuilding	=
	End

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

	Behavior = LargeGroupAudioUpdate ModuleTag_LGAU			// Tie into LargeGroupAudio system
		Key = Humanoid_Male Man Man_Male Unit Infantry Ranger
	End

	ClientBehavior = ModelConditionAudioLoopClientBehavior ModuleTag_foo
		ModelCondition = Required:RAISING_FLAG			Excluded:DYING ENGAGED	Sound:EmotionMenGoodCompilationBFME1and2VoxTauntSinglesLoop
	End

	ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
		MaxUpdateRangeCap = 800
		AnimationSound = Sound:ArrowDrawBow						Animation:GURanger_SKL.GURanger_ATKD1	Frames:7
		AnimationSound = Sound:ArrowDrawBow						Animation:GURanger_SKL.GURanger_ATKD2	Frames:17

		AnimationSound = Sound:SwordShingClean1ForHordes		 Animation:GURanger_SKL.GURanger_STHA	 Frames:10
		AnimationSound = Sound:SwordIntoScabbard1ForHordes		Animation:GURanger_SKL.GURanger_STHB	 Frames:6

		AnimationSound = Sound:BodyFallGenericNoArmor			Animation:GURanger_SKL.GURanger_LNDA	Frames:4
		AnimationSound = Sound:BodyFallGenericNoArmor			Animation:GURanger_SKL.GURanger_LNDB	Frames:5

		AnimationSound = Sound:BodyFallGenericNoArmor			Animation:GURanger_SKL.GURanger_DIEA	Frames:50
		AnimationSound = Sound:BodyFallGenericNoArmor			Animation:GURanger_SKL.GURanger_DIEB	Frames:51
	End


	// *** ENGINEERING Parameters ***
	RadarPriority = UNIT	
	KindOf = GONDOR_RANGER_KINDOF
	CamouflageDetectionMultiplier	= CAMOUFLAGE_DETECTION_DISTANCE_SHEDIUM
	
	Body = ActiveBody ModuleTag_02
		CheerRadius	   = EMOTION_CHEER_RADIUS
		MaxHealth		 = SFMOTHOND_ARCHER_HEALTH
		MaxHealthDamaged  = SFMOTHOND_ARCHER_HEALTH_DAMAGED
		BurningDeathBehavior = Yes
		BurningDeathFX	   = FX_InfantryBurningFlame
		   DodgePercent			  = 50%
	End
	
	// Fire arrow upgrade
	Behavior = WeaponSetUpgrade ModuleTag_WeaponSetUpgradeTag
		TriggeredBy = Upgrade_GondorFireArrows
	End

		Behavior = ArmorUpgrade ModuleTag_ArmorUpgrade
				TriggeredBy = Upgrade_GondorHeavyArmor
		End
		Behavior = SubObjectsUpgrade ModuleTag_HeavyArmorUpgrade
				TriggeredBy = Upgrade_GondorHeavyArmor
				UpgradeTexture	= gumorthond2.tga 0 gumothond2ha.tga
				RecolorHouse	= Yes
				ExcludeSubobjects = FireArowTip
End
	
	Behavior = SubObjectsUpgrade FireArrows_Upgrade

		  TriggeredBy		= Upgrade_GondorFireArrows
		  ShowSubObjects	= FireArowTip ArrowNock	
		  HideSubObjects	= arrow
	  End

	Behavior = AIUpdateInterface ModuleTag_03
		AutoAcquireEnemiesWhenIdle		= Yes ATTACK_BUILDINGS STEALTHED
		StopChaseDistance				= 562
		MoodAttackCheckRate				= 500
		HoldGroundCloseRangeDistance	= 40
		CanAttackWhileContained			= Yes
		AILuaEventsList					=	RangerFunctions
		MinCowerTime					=	4000
		MaxCowerTime					=	6000
		AttackPriority					=	 AttackPriority_Archer

		BurningDeathTime				=	BURNINGDEATH_DURATION_INFANTRY
	End
	
;	Behavior = HitReactionBehavior HitReactionBehaviorModuleTag
;		HitReactionLifeTimer1 = 1667	 // level 1 (light  damage)  hit reaction animations in ms
;		HitReactionLifeTimer2 = 1667	 // level 2 (medium damage)  hit reaction animations in ms
;		HitReactionLifeTimer3 = 1667	 // level 3 (heavy  damage)  hit reaction animations in ms

;		HitReactionThreshold1 = 0.0	   // level 1 (light  damage) threshold trigger
;		HitReactionThreshold2 = 25.0	  // level 2 (medium damage) threshold trigger
;		HitReactionThreshold3 = 50.0	  // level 3 (heavy  damage) threshold trigger

;		FastHitsResetReaction = Yes		//If set -- when hits occur faster than the reaction animations, it will reset the animation. (like getting riddled with machine gun bullets)
;	End

	LocomotorSet
		Locomotor = HumanLocomotor
		Condition = SET_NORMAL
		Speed	 = 50 ; ; NORMAL_GOOD_INFANTRY_MEMBER_SPEED
	
	End

	LocomotorSet
		Locomotor = HumanWanderLocomotor
		Condition = SET_WANDER
		Speed	 = 50 ; ; NORMAL_GOOD_INFANTRY_MEMBER_SPEED
  
	End

	LocomotorSet
		Locomotor = BurningDeathLocomotorInfantry
		Condition = SET_BURNINGDEATH
		Speed	  = BURNINGDEATH_WANDERSPEED_INFANTRY
	End

	Behavior = DualWeaponBehavior ModuleTag_13
		SwitchWeaponOnCloseRangeDistance = 24
	End

	Behavior = PhysicsBehavior ModuleTag_04
		GravityMult = 1.0
	End
	
	Behavior = SlowDeathBehavior ModuleTag_05
		DeathTypes			= ALL -KNOCKBACK -FADED
		SinkDelay			= 3000
		SinkRate			= 0.40	 // in Dist/Sec
		DestructionDelay	= 15000
		Sound				= INITIAL HumanVoiceDie
		DeathFlags			= DEATH_1
	End
	
	  Behavior = SlowDeathBehavior ModuleTag_FadeDeath
		DeathTypes			= NONE +FADED
		FadeDelay			= 0
		FadeTime			= 5000
		DestructionDelay	= 5000
		DeathFlags			= DEATH_2
		FX					= INITIAL FX_UnSummonElvenAllies
	End
	
	Behavior = SlowDeathBehavior ModuleTag_07
		// Same as normal death, but no sound (sound already played by SoundImpact = ... )
		DeathTypes			= NONE +KNOCKBACK
		SinkDelay			= 3000
		SinkRate			= 0.40	 // in Dist/Sec
		DestructionDelay	= 15000
	End

	Behavior = SquishCollide ModuleTag_06
		//nothing
	End
	
	// GondorRanger
	Behavior = HordeMemberCollide ModuleTag_HMC
		//nothing
	End
	
	// Module starts asleep, and wakes up when thrown.
	Behavior = BezierProjectileBehavior ModuleTag_08
		// To tweak a Bezier path
		FirstHeight					= 24	// Height of Bezier control points above highest intervening terrain
		SecondHeight				= 24
		FirstPercentIndent			= 30%	// Percentage of shot distance control points are placed
		SecondPercentIndent			= 70%
		TumbleRandomly				= Yes

		CrushStyle					= Yes	// I don't detonate, I just hit
		DieOnImpact					= Yes
		BounceCount					= 1		// When I hit the ground, I'll arc again
		BounceDistance				= 40	// this far
		BounceFirstHeight			= 24	// Height of Bezier control points above highest intervening terrain
		BounceSecondHeight			= 24
		BounceFirstPercentIndent	= 20%	// Percentage of shot distance control points are placed
		BounceSecondPercentIndent	= 80%

		GroundHitFX	   = FX_ThrownRockGroundHit
		GroundBounceFX	= FX_ThrownRockBounceHit
	End

	Geometry = CYLINDER
	GeometryMajorRadius = 8.0
	GeometryMinorRadius = 8.0
	GeometryHeight = 19.2
	GeometryIsSmall = Yes

	Shadow					= SHADOW_DECAL
	ShadowSizeX				= 19
	ShadowSizeY				= 19
	ShadowTexture			= ShadowI
End


The Horde code:

Object MorthondBowmanHorde

	// This is required for garrisoned objects - please put in all objects.
	ButtonImage		= WOR_IthilienRangers
	SelectPortrait	= UPGondor_Ranger

	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:MorthondBowman
	DisplayNameStrategic = CONTROLBAR:LW_Unit_MorthondBowmanHorde
	DescriptionStrategic = CONTROLBAR:ConstructMorthondBowmanHorde
	
	WeaponSet
		Conditions = None
		Weapon = PRIMARY	GondorRangerMissileHordeRangefinder
		Weapon = TERTIARY   GondorRangerMissileHordeRangefinderBombard
		AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT				; Not AI.
	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 = 190
	BuildTime = GONDOR_ARCHER_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 = 60 ; ;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//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 = MorthondBowman 12
		Slots = 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	= southernfiefdominfantrybanner										// types of units that are allowed as banner carriers
		BannerCarrierPosition	= UnitType:MorthondBowman	Pos:X:70.0 Y:0.0		// (DEFAULT) position of banner carrier
		
		// Positions for 5
		RankInfo = RankNumber:1 UnitType:MorthondBowman Position:X:50 Y:0			Position:X:50 Y:20		Position:X:50 Y:-20		Position:X:50 Y:40		Position:X:50 Y:-40
		RankInfo = RankNumber:2 UnitType:MorthondBowman Position:X:30 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
		RankInfo = RankNumber:3 UnitType:MorthondBowman Position:X:10 Y:0 Leader 2 0	Position:X:10 Y:20 Leader 2 1	Position:X:10 Y:-20 Leader 2 2	Position:X:10 Y:40 Leader 2 3	Position:X:10 Y:-40 Leader 2 4
		RanksToReleaseWhenAttacking = 1 2 3
				
		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

	#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_GOOD_INFANTRY_HORDE_SPEED
	End

	CommandSet = MorthondBowmanHordeCommandSet

	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_LongShotUnpause
		SpecialPowerTemplate	  = SpecialAbilityMenLongShot
		TriggeredBy				  = Upgrade_ObjectLevel2
	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 = StatusBitsUpgrade ModuleTag_ProductionLegality2
				TriggeredBy = Upgrade_GondorHeavyArmor
		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
	
	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 Upgrade_GondorHeavyArmor
End

"As has been pointed out before, the Morthond Bowmen arrows are untextured and therefore show up purple (at least in BFME1). W3D Viewer shows that it requires the file w_arrowb.dds, a file not included in any version of BFME.

So, to anyone who got these to work, what did you do for that?
And to Nertea, is this a mistake with the models or am I overlooking something incredibly obvious?"


Strange problem involving around gamedata.ini and weapon.ini

08 June 2012 - 05:24 AM

Recently, I made this in the gamedata.ini:


;------------------------Southern Fiefdom----------------------------
;------------------------UNITS------------------------
;------------------------ARCHER-------------
#define SFMothond_ARCHER_BUILDCOST				 210 ;200 ; ; 250
#define SFMothond_ARCHER_BUILDTIME				  22 ; 20
#define SFMothond_ARCHER_HEALTH					130 ; 80
#define SFMothond_ARCHER_HEALTH_DAMAGED			65 ; 80

#define SFMothond_ARCHER_DAMAGE					 20  
#define SFMothond_ARCHER_FIRE_UPGRADE_DAMAGE			30  ; ; 25
#define SFMothond_ARCHER_FIRE_UPGRADE_FLAME			 23

and this in the weapon.ini:

;------------------------------------------------------------------------------
Weapon MortBowmanBow  
AttackRange         = GONDOR_RANGER_RANGE

RangeBonusMinHeight = 10
RangeBonus = 1
RangeBonusPerFoot = 1 ; ;#MULTIPLY( GONDOR_RANGER_RANGE .01 )

     
    LeechRangeWeapon    = Yes
WeaponSpeed         = 321         ; dist/sec 
MinWeaponSpeed      = 241
MaxWeaponSpeed      = 481      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
FireFX              = FX_RohanArcherBowWeapon
ScaleWeaponSpeed    = Yes ; Used for lob weapons, scales speed proportional to range
HitPercentage       = 100     ;When this weapon is used it will hit exactly 50% of the time.
ScatterRadius       = 16.0     ;When this weapon misses it can randomly miss by as much as this distance.

AcceptableAimDelta = 20 ; prevent twitchy reaiming in horde on horde
DelayBetweenShots   = 0
PreAttackDelay      = GONDOR_ARCHER_BOW_PREATTACKDELAY   
PreAttackRandomAmount     = 40 ; ;200  
PreAttackType       = PER_POSITION
FiringDuration      = 0

ClipSize = 1
AutoReloadsClip = Yes
AutoReloadWhenIdle = 1 
ClipReloadTime = Min:GONDOR_ARCHER_BOW_RELOADTIME_MIN Max:GONDOR_ARCHER_BOW_RELOADTIME_MAX
ContinuousFireOne = 0
ContinuousFireCoast = GONDOR_ARCHER_BOW_RELOADTIME_MAX  

AntiAirborneVehicle = Yes
AntiAirborneMonster = Yes
HitPassengerPercentage = 20%
CanBeDodged = Yes ; Will check for a DodgePercent on the target to have a second chance at failing HitPercent

ProjectileNugget                    ; Default arrow
ProjectileTemplateName    = GoodFactionArrow
WarheadTemplateName       = MortBowmanWarhead
ForbiddenUpgradeNames     = Upgrade_GondorFireArrows
End
ProjectileNugget                    ; Fire arrow available from fire arrow upgrade
ProjectileTemplateName    = GoodFactionFireArrow
WarheadTemplateName       = MortBowmanFireWarhead
RequiredUpgradeNames      = Upgrade_GondorFireArrows
End
End

Weapon MortBowmanBowBombard
AttackRange         = GONDOR_ARCHER_BOMBARD_MAXRANGE
MinimumAttackRange = #SUBTRACT( GONDOR_ARCHER_BOMBARD_MINRANGE 75 )

RangeBonusMinHeight = 10
RangeBonus = 1
RangeBonusPerFoot = 1 ; ;#MULTIPLY( GONDOR_ARCHER_BOMBARD_MAXRANGE .01 )

    LeechRangeWeapon    = Yes
WeaponSpeed         = 321         ; dist/sec 
MinWeaponSpeed      = 241
MaxWeaponSpeed      = 481      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
FireFX              = FX_RohanArcherBowWeapon
ScaleWeaponSpeed    = Yes ; Used for lob weapons, scales speed proportional to range
HitPercentage       = 0     ; Always miss and get scattered
ScatterRadius       = ARCHER_BOMBARD_SCATTER_RADIUS     ;When this weapon misses it can randomly miss by as much as this distance.

AcceptableAimDelta = 20 ; prevent twitchy reaiming in horde on horde
DelayBetweenShots   = 0
PreAttackDelay      = GONDOR_ARCHER_BOW_PREATTACKDELAY  
PreAttackRandomAmount     = 200  
PreAttackType       = PER_POSITION
FiringDuration      = 0

ClipSize = 1
AutoReloadsClip = Yes
AutoReloadWhenIdle = 1 
ClipReloadTime = Min:GONDOR_ARCHER_BOW_RELOADTIME_MIN Max:GONDOR_ARCHER_BOW_RELOADTIME_MAX
ContinuousFireOne = 0
ContinuousFireCoast = GONDOR_ARCHER_BOW_RELOADTIME_MAX 

AntiAirborneVehicle = Yes
AntiAirborneMonster = Yes
HitPassengerPercentage = 20%
CanBeDodged = Yes ; Will check for a DodgePercent on the target to have a second chance at failing HitPercent

NoVictimNeeded = Yes ; For use with Bombard
BombardType = Yes

ProjectileNugget ; Default arrow
ProjectileTemplateName  = GondorArcherArrowBombard
WarheadTemplateName     = MortBowmanBowBombardWarhead
ForbiddenUpgradeNames   = Upgrade_GondorArcherFireArrows ; ;Upgrade_GondorFireArrows
End
ProjectileNugget ; Fire arrow available through fire upgrade
ProjectileTemplateName  = GondorArcherFireArrowBombard
WarheadTemplateName     = MortBowmanBowBombardFireWarhead
RequiredUpgradeNames    = Upgrade_GondorArcherFireArrows ; ;Upgrade_GondorFireArrows
End
End


;----------------------------
Weapon MortBowmanWarhead
  ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS 
  RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
  HitStoredTarget = Yes ; Always hits initial target.
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = SFMothond_ARCHER_DAMAGE
    Radius        = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
    DelayTime     = 0
    DamageType    = PIERCE
    DamageFXType  = GOOD_ARROW_PIERCE
    DeathType     = NORMAL
  End
End

Weapon MortBowmanBowBombardWarhead
  ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS 
  RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = SFMothond_ARCHER_DAMAGE
    Radius        = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
    DelayTime     = 0
    DamageType    = PIERCE
    DamageFXType  = GOOD_ARROW_PIERCE
    DeathType     = NORMAL
  End
End


Weapon MortBowmanBowFireWarhead
ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS 
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
HitStoredTarget = Yes ; Always hits initial target.

DamageNugget                        ; A basic Nugget that just does damage
Damage          = 1
Radius          = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DamageType      = FLAME
DamageFXType    = FLAME
DeathType       = BURNED
AcceptDamageAdd = No
DamageScalar    = 50000% NONE +MINE ; Make sure we one shot kill mines, without risking wasting some poor hero with a torch
End

DamageNugget                        
Damage          = SFMothond_ARCHER_FIRE_UPGRADE_DAMAGE
Radius          = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DelayTime       = 0
DamageType      = FLAME
DamageFXType    = GOOD_ARROW_PIERCE
DeathType       = BURNED
AcceptDamageAdd = No
DamageScalar  = 25% ALL -STRUCTURE
End

DamageNugget                        ; A basic Nugget that just does damage
Damage          = SFMothond_ARCHER_DAMAGE 
Radius          = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DelayTime       = 0
DamageType      = PIERCE
DamageFXType    = GOOD_ARROW_PIERCE
DeathType       = NORMAL
End
End

Weapon MortBowmanBowBombardFireWarhead
ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS 
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES

DamageNugget                        ; A basic Nugget that just does damage
Damage          = 1
Radius          = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DamageType      = FLAME
DamageFXType    = FLAME
DeathType       = BURNED
AcceptDamageAdd = No
DamageScalar    = 50000% NONE +MINE ; Make sure we one shot kill mines, without risking wasting some poor hero with a torch
End

DamageNugget                        
Damage          = SFMothond_ARCHER_FIRE_UPGRADE_DAMAGE
Radius          = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DelayTime       = 0
DamageType      = FLAME
DamageFXType    = GOOD_ARROW_PIERCE
DeathType       = BURNED
AcceptDamageAdd = No
DamageScalar  = 25% ALL -STRUCTURE
End

DamageNugget                        ; A basic Nugget that just does damage
Damage          = SFMothond_ARCHER_DAMAGE
Radius          = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DelayTime       = 0
DamageType      = PIERCE
DamageFXType    = GOOD_ARROW_PIERCE
DeathType       = NORMAL
End

FireLogicNugget
LogicType = INCREASE_BURN_RATE
Radius = 1.0
Damage = ARCHER_BOMBARD_FIREARROW_BURNRATEINCREASE
End
End


;------------------------------------------------------------------------------
Weapon MortBowmanSword 
LeechRangeWeapon      = Yes
AttackRange           = STANDARD_MELEE_ATTACK_RANGE
MeleeWeapon           = Yes
DelayBetweenShots     = 800            ; time between shots, msec
PreAttackDelay        = 700             ; 567 is sword swing delay time before contact with target.
PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
FireFX                = FX_GondorSwordHit
FireFlankFX = FX_Flanking
FiringDuration        = 800    ; Duration of the sword swing
;OverrideVoiceAttackSound = ElvenWarriorVoiceAttack   ;RangerVoiceAttackSword


DamageNugget                        ; A basic Nugget that just does damage
   Damage        = GONDOR_RANGER_SWORD_DAMAGE
   Radius        = 0.0
   DelayTime     = 0
   DamageType    = SLASH
   DamageFXType  = SWORD_SLASH
   DeathType     = NORMAL
   FlankingBonus = 50%
End
End

;------------------------------------------------------------------------------




When I started the mod, it states there's an error with this line:

Damage        = SFMothond_ARCHER_DAMAGE


which is inside this part of the code:



Weapon MortBowmanWarhead
  ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS 
  RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
  HitStoredTarget = Yes ; Always hits initial target.
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = SFMothond_ARCHER_DAMAGE
    Radius        = 0.0 ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
    DelayTime     = 0
    DamageType    = PIERCE
    DamageFXType  = GOOD_ARROW_PIERCE
    DeathType     = NORMAL
  End
End


I tried going back to gamedata.ini to see if I have messed up with the spelling, but I don't see any spelling mistakes...so I am stumped. Please help, thank you!

Problems, problems, and more problems.

06 June 2012 - 05:36 AM

Hello, there! I hope some of you can solve my many problems regarding my mod.

1. I editted the ring hero, Galadriel, to make her not glow and made her a new hero for the Elves. Here is where the problem arises, it can not do any damage to any units. I looked at the weapon.ini, and it looks fine. Regardless of that, here it is:

;------------------------------------------------------------------------------
Weapon GaladrielSword2
	RadiusDamageAffects			= ENEMIES NEUTRALS NOT_SIMILAR
	LeechRangeWeapon			= Yes
	CanFireWhileMoving			= No
	AttackRange					= 30.0
	MeleeWeapon					= Yes
	AcceptableAimDelta			= 60				; Just needs to sort of face in the general direction
	FireFX						= FX_GondorSwordHit	; steal from gondor
	DelayBetweenShots			= 500				; time between shots, msec
	PreAttackDelay				= 550				; TEMP 350 is sword swing delay time before contact with target
	PreAttackType				= PER_SHOT			; Do the delay each time we attack
	FiringDuration				= 800				; TEMP Duration of the sword swing
	DamageDealtAtSelfPosition	= Yes				; A melee based AoE.  Arc radiates from me, not them

	; Magic damage
	DamageNugget									; A basic Nugget that just does damage
		Damage			= 400
		Radius			= 0.0

		DamageArc		= 75
		DelayTime		= 0
		DamageType		= HERO
		DamageFXType	= SWORD_SLASH
		DeathType		= NORMAL
		DamageScalar		  = 40% NONE +HERO
	End
End

2. Can anyone help me find a topic on Tower Guard's formations. I remember making it able to have the BFME animation using old codes. (Shield Formation)

3. Is there anyway I can make it so when a group of units are selected at the same time, they can move at the same movement speed like Warcraft 3?

4. Morthond Bowman have purple arrows, is there anyway I can fix that? Here is the link to the texture: http://www.the3rdage...tem-136?addview (scroll down to Morthond Bowman pictures)