Jump to content


Photo

Another bug ...


  • Please log in to reply
27 replies to this topic

#21 AleAleWitchKing

AleAleWitchKing
  • Members
  • 156 posts
  • Location:Italy

Posted 26 August 2009 - 06:36 AM

I'm trying to add a button at my fortress to create an Army of the Dead Horde (RohanOathbreakerHorde), but I 'm not able to remove the "time remaining", so my horde disappears after a while. This is my parts of code: menhorde.ini
CODE

Object MiddleEarthOathbreakerHorde

SelectPortrait = UPOathBreakers

Draw = W3DScriptedModelDraw ModuleTag_W3DModelDraw
DependencySharedModelFlags = EMOTION_ALERT EMOTION_MORALE_HIGH EMOTION_MORALE_LOW EMOTION_AFRAID EMOTION_COWER SELECTED EMOTION_TERROR
DefaultModelConditionState
Model = None //InvisHrdeTmp
End
ModelConditionState = HORDE_EMPTY
Model = None
End
ModelConditionState = WORLD_BUILDER
Model = HordeMarkRUOat
End
End


Side = MiddleEarth
EditorSorting = UNIT
EmotionRange = 240
DisplayName = OBJECT:HordeOathBreakers

WeaponSet
Conditions = None
Weapon = PRIMARY OathbreakerSword // NormalMeleeHordeRangefinder
// Weapon = PRIMARY NormalMeleeHordeRangefinder
End

CommandSet = RohanOathbreakerHordeCommandSet

// *** 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 = 1000 //not build just spawned
BuildTime = 40
VisionRange = 500
VisionSide = 50%
VisionRear = 25%
VisionBonusPercentPerFoot = 1.0%
CommandPoints = 50

// AOD can crush anything.
CrushableLevel = 4 //What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 5
MinCrushVelocityPercent = 0% // Always crushes
CrushDecelerationPercent = 0% // Lose 0 percent of max velocity when crushing.
CrushKnockback = 0 // Don't knock back.
CrushZFactor = 100.0 // How much we knock upwards.

TransportSlotCount = TRANSPORTSLOTCOUNT_SMALL_HORDE
KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE MELEE_HORDE NO_FORMATION_MOVEMENT ARMY_OF_DEAD SCARY SUMMONED //UNATTACKABLE

Body = ImmortalBody ModuleTag_ImmortalBody
MaxHealth = 1
End

Behavior = StancesBehavior ModuleTag_StancesBehavior
StanceTemplate = FighterHorde
End

Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate = 500
MaxCowerTime = 5000
MinCowerTime = 3000
AttackPriority = DefaultAttackPriority
End

;Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
; MinLifetime = OATHBREAKER_LIFETIME
; MaxLifetime = OATHBREAKER_LIFETIME
; DeathType = FADED
;End

Behavior = AODHordeContain ModuleTag_HordeContain
ObjectStatusOfContained =
InitialPayload = RohanOathbreaker OATHBREAKER_HORDE_SIZE
Slots = 10
PassengerFilter = ANY +INFANTRY +CAVALRY
ShowPips = No
ThisFormationIsTheMainFormation = Yes //Used to determine which armorset to use (and anything else we want!)
RandomOffset = X:0 Y:0 // X:25 Y:25

// AOD sine wave movement.
FrequencyScale = 0.3// // how fast they move left to right.
FrequencyRandomness = 0.3// how random - 0==no randomness, 1.0 = very random.
AmplitudeScale = 20// how far they move left to right.
AmplitudeRandomness = 0.4// how random - 0==no randomness, 1.0 = very random.
StillAmplitude = 0.10// // how much they move left to right when not moving. 0==none, 1.0==full movement.

// z movement.
FrequencyScaleZ = 0.2// // how fast they move up&down.
FrequencyRandomnessZ = 0.4// how random - 0==no randomness, 1.0 = very random.
AmplitudeScaleZ = 4// how far they up and down.
AmplitudeRandomnessZ = 0.2// how random - 0==no randomness, 1.0 = very random.
StillAmplitudeZ = 0.15// // how much they move up & down when not moving. 0==none, 1.0==full movement.

// Horde flowing up over large units it kills.
LargeUnitHeightFactor = 0.85 // Start with this * the object's geometry height.
LargeUnitMinHeight = 20.0// Go up at least this amount.
LargeUnitMaxHeight = 300.0// Go up at no more than amount.
LargeUnitTimeout = 12000// How long the horde flows up over the unit, ms. 4000==4 seconds.
LargeUnitTailOff = 2.0f// How quickly the units drop back to the ground.

// Oath fulfilled behavior.
//E3 No up OathFulfilledZFactor = 0.5 // How fast they rise up after oath is fulfilled.
ScatterSpeedFactor = 0.4// How fast they scatter.
ScatterRandomness = 0.1// How random the scatter speed is.

// Positions for 40
//RankInfo = RankNumber:1 UnitType:RohanOathbreaker Position:X:45 Y:0 Position:X:45 Y:90 Position:X:45 Y:-45 //Position:X:45 Y:45
//RankInfo = RankNumber:6 UnitType:RohanOathbreaker Position:X:45 Y:45
//RankInfo = RankNumber:2 UnitType:RohanOathbreaker Position:X:0 Y:0 Position:X:0 Y:45 Position:X:0 Y:90 //Position:X:0 Y:-45
//RankInfo = RankNumber:7 UnitType:RohanOathbreaker Position:X:0 Y:-45
//RankInfo = RankNumber:3 UnitType:RohanOathbreaker Position:X:-45 Y:0 Position:X:-45 Y:45 Position:X:-45 Y:-45 //Position:X:-45 Y:90
//RankInfo = RankNumber:8 UnitType:RohanOathbreaker Position:X:-45 Y:90
//RankInfo = RankNumber:4 UnitType:RohanOathbreaker Position:X:-91 Y:45 Position:X:-91 Y:-45 Position:X:-91 Y:90 //Position:X:-91 Y:0
//RankInfo = RankNumber:9 UnitType:RohanOathbreaker Position:X:-91 Y:0
//RankInfo = RankNumber:5 UnitType:RohanOathbreaker Position:X:-135 Y:0 Position:X:-135 Y:45 Position:X:-135 Y:-45 Position:X:-135 Y:90

//RankInfo = RankNumber:10 UnitType:RohanOathbreaker Position:X:-180 Y:0 Position:X:-180 Y:90 Position:X:-180 Y:-45 //Position:X:-180 Y:45
//RankInfo = RankNumber:15 UnitType:RohanOathbreaker Position:X:-180 Y:45
//RankInfo = RankNumber:11 UnitType:RohanOathbreaker Position:X:-225 Y:0 Position:X:-225 Y:45 Position:X:-225 Y:90 //Position:X:-225 Y:-45
//RankInfo = RankNumber:16 UnitType:RohanOathbreaker Position:X:-225 Y:-45
//RankInfo = RankNumber:12 UnitType:RohanOathbreaker Position:X:-270 Y:0 Position:X:-270 Y:45 Position:X:-270 Y:-45 //Position:X:-270 Y:90
//RankInfo = RankNumber:17 UnitType:RohanOathbreaker Position:X:-270 Y:90
//RankInfo = RankNumber:13 UnitType:RohanOathbreaker Position:X:-315 Y:45 Position:X:-315 Y:-45 Position:X:-315 Y:90 //Position:X:-315 Y:0
//RankInfo = RankNumber:18 UnitType:RohanOathbreaker Position:X:-315 Y:0
//RankInfo = RankNumber:14 UnitType:RohanOathbreaker Position:X:-360 Y:0 Position:X:-360 Y:45 Position:X:-360 Y:-45 Position:X:-360 Y:90
// Positions for 20
//RankInfo = RankNumber:1 UnitType:RohanOathbreaker Position:X:45 Y:0 Position:X:45 Y:90 Position:X:45 Y:-45 //Position:X:45 Y:45
//RankInfo = RankNumber:6 UnitType:RohanOathbreakersCavalry Position:X:45 Y:45
//RankInfo = RankNumber:2 UnitType:RohanOathbreaker Position:X:0 Y:0 Position:X:0 Y:45 Position:X:0 Y:90 //Position:X:0 Y:-45
//RankInfo = RankNumber:7 UnitType:RohanOathbreakersCavalry Position:X:0 Y:-45
//RankInfo = RankNumber:3 UnitType:RohanOathbreaker Position:X:-45 Y:0 Position:X:-45 Y:45 Position:X:-45 Y:-45 //Position:X:-45 Y:90
//RankInfo = RankNumber:8 UnitType:RohanOathbreakersCavalry Position:X:-45 Y:90
//RankInfo = RankNumber:4 UnitType:RohanOathbreaker Position:X:-91 Y:45 Position:X:-91 Y:-45 Position:X:-91 Y:90 //Position:X:-91 Y:0
//RankInfo = RankNumber:9 UnitType:RohanOathbreakersCavalry Position:X:-91 Y:0
//RankInfo = RankNumber:5 UnitType:RohanOathbreaker Position:X:-135 Y:0 Position:X:-135 Y:45 Position:X:-135 Y:-45 Position:X:-135 Y:90

// Positions for 10
RankInfo = RankNumber:1 UnitType:MiddleEarthOathbreaker Position:X:10 Y:0 Position:X:10 Y:20 Position:X:10 Y:-20 Position:X:10 Y:40 Position:X:10 Y:-40
RankInfo = RankNumber:2 UnitType:MiddleEarthOathbreaker Position:X:-10 Y:0 Position:X:-10 Y:20 Position:X:-10 Y:-20 Position:X:-10 Y:40 Position:X:-10 Y:-40

RanksToReleaseWhenAttacking = 1 2

End

Behavior = PhysicsBehavior ModuleTag_PhysicsBehavior
GravityMult = 1.0
End

Behavior = OathbreakersFadeAwayBehavior ModuleTag_05
FadeOutTime = 999999 // Hordes don't fade out, members do.
End

Behavior = CommandButtonHuntUpdate ModuleTag_CommandButtonHuntUpdate
End

Behavior = HordeNotifyTargetsOfImminentProbableCrushingUpdate ModuleTag_NotifyCrushScan
ScanWidth = 30.0 ; A little less than the width of the horde (which is 2 * 20 = 40)
End

LocomotorSet
Locomotor = AODHordeLocomotor
Condition = SET_NORMAL
Speed = 65
End


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

Behavior = AISpecialPowerUpdate MenRohirrimHordeCaptureBuildingAI
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 = 20.0
GeometryMinorRadius = 20.0
GeometryHeight = 10.0
GeometryIsSmall = No
End


and neutralunits.ini:
CODE
Object MiddleEarthOathbreaker
; *** ART Parameters ***

SelectPortrait = UPOathBreakers

Draw = W3DHordeModelDraw ModuleTag_01

DefaultModelConditionState
Model = RUOath3A_SKN
Skeleton = RUOath3_SKL
ParticleSysBone = NONE AODTrails FollowBone:no
End

IdleAnimationState
StateName = STATE_Idle
Animation = IDLA
AnimationName = RUOath3_IDLB
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
AnimationBlendTime = 20
End
End


AnimationState = DYING
Animation = RUNA
AnimationName = RUOath3A_DIEA
End
EnteringStateFX = FX_AODDeath
End

AnimationState = OATH_FULLFILLED
Animation = WLK
AnimationName = RUOath3_WLKA
AnimationMode = LOOP
End
ParticleSysBone = NONE AODtrackingLightShafts
End

AnimationState = ATTACKING
Animation = ATA1
AnimationName = RUOath3_ATKA
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.75 1.25
End
End

AnimationState = FIRING_A
Animation = ATA1
AnimationName = RUOath3_ATKA
AnimationMode = LOOP
End
End

AnimationState = MOVING
Animation = RUNA
AnimationName = RUOath3_RUNA
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

End

; ***DESIGN parameters ***
Side = MiddleEarth
IsTrainable = No
EditorSorting = UNIT
ThreatLevel = 3.0
ThingClass = HORDE_UNIT
CommandPoints = 50

EmotionRange = 0 ; Make sure this value is greater than the fear distribution range.

TransportSlotCount = TRANSPORTSLOTCOUNT_UNIT
WeaponSet
Conditions = None
Weapon = PRIMARY OathbreakerSword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
ArmorSet
Conditions = None
Armor = OathBreakerArmor
DamageFX = NormalDamageFX
End
VisionRange = 81
DisplayName = OBJECT:Oathbreaker
CrushableLevel = 5 ; Nothing can crush these guys. What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
; CrusherLevel = 4 ; They don't crush anyone - they use a custom module to do damage. What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles

ShockwaveResistance = SHOCKWAVE_RESISTANCE_ALWAYS

CommandSet = RohanOathbreakerHordeCommandSet

BuildCost = 1000 //not build just spawned
BuildTime = 40

; *** AUDIO Parameters ***;

VoiceAttack = OathbreakerVoxSelect
; VoiceCreated = OathbreakerVoxSelect
; VoiceFullyCreated = OathbreakerVoxSelect
VoiceMove = OathbreakerVoxSelect
VoicePriority = 15
VoiceSelect = OathbreakerVoxSelect

SoundImpact = ImpactHorse

UnitSpecificSounds
VoiceGarrison = OathbreakerVoxSelect
VoiceEnterUnitElvenTransportShip = OathbreakerVoxSelect
VoiceEnterUnitEvilMenTransportShip = OathbreakerVoxSelect
VoiceEnterUnitMordorMumakil = OathbreakerVoxSelect
VoiceEnterUnitSlaughterHouse = OathbreakerVoxSelect
VoiceInitiateCaptureBuilding = OathbreakerVoxSelect
End

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

; Warn the player when the enemy gets a unit. Override the normal sighting event from StandardUnitEvaEvents.inc
EvaEnemyObjectSightedEvent = DiscoveredEnemyOathbreaker ;GenericEnemyUnitSighted ; Normal response to enemy units

ClientUpdate = EvaAnnounceClientCreate ModuleTag_CreateAnnounce
AnnouncementEventEnemy = DiscoveredEnemyOathbreaker
AnnouncementEventAlly = None
AnnouncementEventOwner = None

OnlyIfVisible = Yes ; Don't announce if hidden in the shroud
CountAsFirstSightedAnnoucement = Yes ; Don't re-annouce if going into shroud & back
UseObjectsPosition = No ; Play from central Fortress, not at unit's position
CreateFakeRadarEvent = Yes ; Allow player to jump to unit after hearing annoucement
End

; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE THROWN_OBJECT ATTACK_NEEDS_LINE_OF_SIGHT ARMY_OF_DEAD

Body = ActiveBody ModuleTag_02
MaxHealth = 2000
MaxHealthDamaged = 2000
;RecoveryTime = 15000
End

Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate = 500
End

LocomotorSet
Locomotor = ArmyOfTheDeadLocomotor
Condition = SET_NORMAL
Speed = 100

End

;Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
; MinLifetime = OATHBREAKER_LIFETIME
; MaxLifetime = OATHBREAKER_LIFETIME
;End

Behavior = PhysicsBehavior ModuleTag_04
GravityMult = 1.0
ShockStunnedTimeLow = 1400
ShockStunnedTimeHigh = 2400
ShockStandingTime = 2400
End

Behavior = SlowDeathBehavior ModuleTag_SlowDeath_01
DeathTypes = ALL
; SinkDelay = 200
; Rising in animation, don't sink SinkRate = 5.40 ; in Dist/Sec
DestructionDelay = 3000
FadeTime = 1000
FadeDelay = 1000
;Sound = INITIAL OathbreakerDie
End


Behavior = OathbreakersFadeAwayBehavior ModuleTag_05
FadeOutTime = 3500 ; Fade time in ms - 4000 == 4 seconds.
End

Behavior = AODCrushCollide ModuleTag_06
SmallFXList = FX_AODHitSmall; FXList for small objects.
MediumFXList = FX_AODHitMedium; FXList for medium objects.
; LargeFXList = FX_AODHitLarge; FXList for medium objects.
;MediumObjectCreationList = OCL_FireFieldSmall; disabled for now.

; Normal damage delivered.
Damage = 50 ;10.0
DamageType = MAGIC
DeathType = SUPERNATURAL

SpecialObject = NONE +MordorBalrog +GondorAragorn -SELECTABLE -CAVALRY -INFANTRY -HERO -MONSTER; Special objects receive and dish out special damage.
SpecialDamage = 5.0 ; not as lethal (has to be really small so as not to provoke a hit reaction from balrog, who wants to only react to phaser and lightning)
SpecialDamageType = MAGIC
SpecialDeathType = CRUSHED

SelfDamage = 9999.0 ; Damaging a special object inflicts damage on self.
SelfDamageType = FLAME
SelfDeathType = BURNED
End

; Tie into LargeGroupAudio system
Behavior = LargeGroupAudioUpdate ModuleTag_LGAU
Key = Oathbreaker
End

Geometry = CYLINDER
GeometryMajorRadius = 12.0
GeometryMinorRadius = 12.0
GeometryHeight = 19.2
GeometryIsSmall = No
;Shadow = SHADOW_DECAL
;Shadow = SHADOW_VOLUME
;ShadowSizeX = 10;
;ShadowSizeY = 10;
;ShadowTexture = ShadowI;
End


Did I forget anything? Where are these codes wrong? :p

#22 MrFurious

MrFurious
  • Members
  • 87 posts
  • Location:The Netherlands
  • Projects:Memories Through Middle-Earth Coder

Posted 26 August 2009 - 09:34 AM

CODE

Object MiddleEarthOathbreakerHorde
...
Behavior = AODHordeContain ModuleTag_HordeContain
ObjectStatusOfContained =
InitialPayload = RohanOathbreaker OATHBREAKER_HORDE_SIZE
Slots = 10
PassengerFilter = ANY +INFANTRY +CAVALRY
ShowPips = No
ThisFormationIsTheMainFormation = Yes //Used to determine which armorset to use (and anything else we want!)
RandomOffset = X:0 Y:0 // X:25 Y:25
...


Change the RohanOathbreaker after InitialPayload to MiddleEarthOathbreaker.

#23 AleAleWitchKing

AleAleWitchKing
  • Members
  • 156 posts
  • Location:Italy

Posted 28 August 2009 - 03:33 PM

Thanks, now the oathbreaker doesn't disappear :rolleyes: , but I have another problem: when I create a horde from the fortress many groups of three soldiers comes out. If I wanna unit all these groups to create an only horde, how can I do? And I'd like to add that line that comes around the unti ... Ridder Geel explained me how to add at new porters, I added the new unit in experienceslevels.ini, but the lines did't appear ...

This problem is solved, but another came out :dry: I created a horde with 10 units, but when I move the horde a unit moves normally, but the others 9 walks very slowly. What part of code have I to modify in order to move the horde normally?

Attached File  horde.bmp   617.46KB   57 downloads

Any ideas? ;)

Edited by AleAleWitchKing, 11 September 2009 - 01:44 PM.


#24 AleAleWitchKing

AleAleWitchKing
  • Members
  • 156 posts
  • Location:Italy

Posted 11 September 2009 - 01:47 PM

I've tried to edit many parts of the horde, but it moves very slowly ... only one of the units move normally ... Is ther anybody who knows where I can modify the file to solve this problem? Solving the problem I can remove the Army of Dead Spell from my spell book 'cause I 'd be able to summon that horde from my fortress ...

Edited by AleAleWitchKing, 11 September 2009 - 01:48 PM.


#25 Gfire

Gfire

    Nuju

  • Project Team
  • 2,173 posts
  • Location:I have returned from the depths
  • Projects:Finding My Way
  •  The Perfectionist

Posted 11 September 2009 - 07:53 PM

Is the fast unit the same object as the slow units?

Make sure that the speed of all the objects is a little faster than the horde speed.
Greetings, community.

#26 AleAleWitchKing

AleAleWitchKing
  • Members
  • 156 posts
  • Location:Italy

Posted 12 September 2009 - 11:11 AM

I supposed that the speed of unit has to be the same of the horde's ... Now the horde moves normally :) thanks Gfire :p

#27 AleAleWitchKing

AleAleWitchKing
  • Members
  • 156 posts
  • Location:Italy

Posted 22 September 2009 - 07:07 AM

About the points that are available for the spell book at the startup ... In another topic I read that I can change them modifying the rank.ini file ... Is there a way to change that points only for a faction and not for all? If I change them every faction 'd have the same number of points at the beginning ... I 'd like to change that number of points only for a faction ... :p

#28 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 22 September 2009 - 03:03 PM

...dont think thats possible :p And it would be considered unfair :p
Ridder Geel


Back to BFME2 & RotWK Modding


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users