Hallo liebe MU,
ich bin momentan dabei, mir mein eigenes Hobbitvolk zu erstellen. Habe schon 2 Gebäude integriert und bin jetzt beim Coding meiner ersten Einheit. Wie nicht anders zu erwarten, wollte ich erstmal mit einer HobbitHorde anfangen, die im Grunde der gleicht, die die Elben im Gasthaus ausbilden können.
Habe dafür das Object RohanHobbit aus der data\ini\object\goodfaction\generic\hobbit.ini genommen (Child Objects weggelassen) und als neue ini in data\...\goodfaction\units\hobbits\hobbitfighter.ini eingefügt. Im Anschluss habe ich noch die Horde dazu erstellt (data\...\goodfaction\hordes\hobbits\hobbithordes.ini). Die Objects (Name, etc.) scheine ich richtig angepasst zu haben, denn das Spiel startet und die Einheit und die Gebäude werden korrekt angezeigt und ich kann die Horde mit der richtigen Größe auch ausbilden.
Nach und nach habe ich dann versucht, vorhandene Fehler zu beheben (z.B. Einheit kann keine Gasthäuser etc. einnehmen, gelöst!
)
Mein Problem liegt jetzt darin, dass meine Hobbits feindliche Objekte (seien es Creeps oder feindliche Einheiten/Gebäude) mit den Sticks nicht angreift. Ich kann das Objekt zwar anklicken und den Angriffsbefehl erteilen, die Angriffsanimation (Stöcke gehoben, "Angriffsschreie") werden ausgeführt, jedoch bleiben meine Hobbits ein paar Zentimeter vor dem Objekt stehen und machen gar nichts mehr. Wird die Horde jetzt angegriffen, verteidigt sie sich entweder gar nicht oder ganz selten schlägt zufällig mal eine Hobbiteinheit aus der Horde zurück, doch die anderen Einheiten aus der Horde machen nichts. Wechsle ich auf den Steinwurf, klappt alles wunderbar. Feindliche Objekte werden angegriffen, die Hobbits verteidigen sich und jede Einheit aus der Horde wirft einen Stein.
Daher vermute ich ja, dass das ganze irgendwas mit den Engineering Parameters bzw. dem Behavior zu tun hat. Bin mir dabei aber auch nicht sicher, da ich mich noch nicht allzu lange mit SuMII-Modding auseinandersetze.
Hoffe ihr könnt mir helfen und bedanke mich jetzt schon mal für eure Mühen!
Das hier ist übrigens der Code meiner Einheit, falls es irgendwie weiterhilft:
;------------------------------------------------------------------------------
;
; HobbitFighter.ini
;
;------------------------------------------------------------------------------
; aka Hobbit
Object HobbitFighter
; *** ART Parameters ***
; SelectPortrait for Heros is portrait behind skill buttons. HP = HeroPortrait.
SelectPortrait = UPHobbits
Draw = W3DScriptedModelDraw ModuleTag_01
OkToChangeModelColor = Yes
StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD
RandomTexture = GUHbtShfA.tga 0 GUHbtShfA.tga
;RandomTexture = GUHbtShfB.tga 0 GUHbtShfA.tga
;RandomTexture = GUHbtShfC.tga 0 GUHbtShfA.tga
;RandomTexture = GUHbtShfD.tga 0 GUHbtShfA.tga
DefaultModelConditionState
Model = GUHbtShfA_SKN
Skeleton = GUHbtShf_SKL
WeaponLaunchBone = PRIMARY B_HANDR ;sometimes it's in primary sometimes in secondary.
WeaponLaunchBone = SECONDARY B_HANDR
End
;;--------------- DYING & FLYING --------------------------------------------------
;;======= DYING
AnimationState = STUNNED_FLAILING WEAPONSET_TOGGLE_1
StateName = STATE_Bored_Rocks
Animation = FLYA
AnimationName = GUHbtShfB_FLYA
AnimationMode = LOOP
AnimationBlendTime = 0
AnimationSpeedFactorRange = 0.4 0.6
End
Flags = RANDOMSTART
End
AnimationState = STUNNED_FLAILING
StateName = STATE_Bored_Sword
Animation = FLYA
AnimationName = GUHbtShfS_FLYA
AnimationMode = LOOP
AnimationBlendTime = 0
AnimationSpeedFactorRange = 0.4 0.6
End
Flags = RANDOMSTART
End
AnimationState = PASSENGER FREEFALL
Animation
AnimationName = GUHbtShfB_FLLA
AnimationMode = LOOP
End
End
AnimationState = DYING DEATH_2 WEAPONSET_TOGGLE_1
Animation
AnimationName = GUHbtShfB_IDLB
AnimationMode = LOOP
End
End
AnimationState = DYING DEATH_2
Animation
AnimationName = GUHbtShfS_IDLB
AnimationMode = LOOP
End
End
AnimationState = DYING BURNINGDEATH
Animation
AnimationName = GUHbtShfB_DIEA
AnimationMode = ONCE
AnimationBlendTime = 10
End
Animation
AnimationName = GUHbtShfB_DIEB
AnimationMode = ONCE
AnimationBlendTime = 10
End
Animation
AnimationName = GUHbtShfB_DIEC
AnimationMode = ONCE
AnimationBlendTime = 10
End
End
AnimationState = DYING SPLATTED WEAPONSET_TOGGLE_1
Animation = LNDA
AnimationName = GUHbtShfB_LNDA
AnimationMode = ONCE
End
End
AnimationState = DYING SPLATTED
Animation
AnimationName = GUHbtShfS_LNDA
AnimationMode = ONCE
End
End
AnimationState = DYING WEAPONSET_TOGGLE_1
StateName = STATE_Bored_Rocks
Animation = DIEA
AnimationName = GUHbtShfB_DIEA
AnimationMode = ONCE
End
Animation = DIEA
AnimationName = GUHbtShfB_DIEB
AnimationMode = ONCE
End
Animation = DIEA
AnimationName = GUHbtShfB_DIEC
AnimationMode = ONCE
End
End
AnimationState = DYING
Animation
AnimationName = GUHbtShfS_DIEA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_DIEB
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_DIEC
AnimationMode = ONCE
End
End
AnimationState = BURNINGDEATH
Animation
AnimationName = GUHbtShfB_MFDA
AnimationMode = LOOP
Distance = 80
End
End
AnimationState = PARALYZED WEAPONSET_TOGGLE_1
Animation
AnimationName = GUHbtShfB_IDLB
AnimationMode = LOOP
End
End
AnimationState = PARALYZED
Animation
AnimationName = GUHbtShfS_IDLB
AnimationMode = LOOP
End
End
;;======= STUNNED
AnimationState = STUNNED_STANDING_UP WEAPONSET_TOGGLE_1
StateName = STATE_Ready_Rocks
Animation = GTPA
AnimationName = GUHbtShfB_GTPA
AnimationMode = ONCE
AnimationSpeedFactorRange = 1.5 1.5
End
End
AnimationState = STUNNED_STANDING_UP
StateName = STATE_Ready_Sword
Animation
AnimationName = GUHbtShfS_GTPA
AnimationMode = ONCE
AnimationSpeedFactorRange = 1.5 1.5
End
End
AnimationState = STUNNED WEAPONSET_TOGGLE_1
StateName = STATE_Bored_Rocks
Animation = LNDA
AnimationName = GUHbtShfB_LNDA
AnimationMode = ONCE
End
End
AnimationState = STUNNED
StateName = STATE_Bored_Sword
Animation = LNDA
AnimationName = GUHbtShfS_LNDA
AnimationMode = ONCE
End
End
;;---------------- ATTAFIRING_OR_RELOADING_ACKING -----------------------------------------------------------------
AnimationState = MOVING FIRING_OR_PREATTACK_A
ShareAnimation = Yes
Animation
AnimationName = GUHbtShfS_RUNC
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_RUND
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
End
AnimationState = MOVING EMOTION_TERROR WEAPONSET_TOGGLE_1
Animation
AnimationName = GUHbtShfB_RUNC
AnimationMode = LOOP
End
End
AnimationState = MOVING EMOTION_TERROR
Animation
AnimationName = GUHbtShfS_RUNE
AnimationMode = LOOP
End
End
AnimationState = BETWEEN_FIRING_SHOTS_A WEAPONSET_TOGGLE_1
StateName = STATE_Ready_Rocks
Animation = IDLA
AnimationName = GUHbtShfB_IDLA
AnimationMode = LOOP
AnimationBlendTime = 20
End
BeginScript
CurDrawableAllowToContinue()
EndScript
End
AnimationState = BETWEEN_FIRING_SHOTS_A
StateName = STATE_Ready_Sword
Animation = IDLB
AnimationName = GUHbtShfS_IDLA
AnimationMode = LOOP
AnimationBlendTime = 10
End
BeginScript
CurDrawableAllowToContinue()
EndScript
End
AnimationState = FIRING_OR_PREATTACK_A WEAPONSET_TOGGLE_1
StateName = STATE_Ready_Rocks
Animation = THRA
AnimationName = GUHbtShfB_ATKA
AnimationMode = ONCE
UseWeaponTiming = Yes
End
FrameForPristineBonePositions = 21
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Attention_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
EndScript
End
AnimationState = FIRING_OR_PREATTACK_A
StateName = STATE_Ready_Sword
Animation = ATKA
AnimationName = GUHbtShfS_ATKA
AnimationMode = ONCE
UseWeaponTiming = Yes
AnimationBlendTime = 10
End
Animation = ATKB
AnimationName = GUHbtShfS_ATKB
AnimationMode = ONCE
UseWeaponTiming = Yes
AnimationBlendTime = 10
End
Animation = ATKB
AnimationName = GUHbtShfS_ATKB
AnimationMode = ONCE
UseWeaponTiming = Yes
AnimationBlendTime = 10
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Ready_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Attention_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Running_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
EndScript
End
;;--------------------- MOVING ---------------------------------------------------------------------
;;======= MOVING
AnimationState = MOVING WEAPONSET_TOGGLE_1
StateName = STATE_Running_Rocks
Animation = RUNA
AnimationName = GUHbtShfB_RUNA
AnimationMode = ONCE
End
Animation = RUNA
AnimationName = GUHbtShfB_RUNB
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_Running_SwordToRocks") end
EndScript
End
AnimationState = MOVING ATTACKING
StateName = STATE_Running_Sword
Animation = RUNA
AnimationName = GUHbtShfS_RUNC
AnimationMode = ONCE
End
Animation = RUNA
AnimationName = GUHbtShfS_RUND
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Running_Rocks" then CurDrawableSetTransitionAnimState("TRANS_Running_RocksToSword") end
EndScript
End
AnimationState = MOVING BACKING_UP WEAPONSET_TOGGLE_1
StateName = STATE_Running_Rocks
Animation
AnimationName = GUHbtShfB_BAKA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfB_BAKB
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
End
AnimationState = MOVING BACKING_UP
StateName = STATE_Running_Sword
Animation
AnimationName = GUHbtShfS_BAKA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_BAKB
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
End
AnimationState = MOVING
StateName = STATE_Running_Sword
Animation = RUNA
AnimationName = GUHbtShfS_RUNB
AnimationMode = LOOP
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_Running_RocksToSword") end
EndScript
End
;;---------------------- HIT REACTIONS ----------------------------------------------------------
; AnimationState = HIT_REACTION WEAPONSET_TOGGLE_1
; Animation
; AnimationName = GUHbtShfB_HITA
; AnimationMode = ONCE
; End
; End
; AnimationState = HIT_REACTION
; Animation
; AnimationName = GUHbtShfS_HITA
; AnimationMode = ONCE
; End
; End
;;---------------------- EMOTIONS ---------------------------------------------------------------
AnimationState = EMOTION_POINTING WEAPONSET_TOGGLE_1
StateName = STATE_Ready_Rocks
Animation = IDLA
AnimationName = GUHbtShfB_PNTA
AnimationMode = ONCE
End
Animation = IDLA
AnimationName = GUHbtShfB_PNTB
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Attention_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
EndScript
End
AnimationState = EMOTION_POINTING
StateName = STATE_Ready_Sword
Animation
AnimationName = GUHbtShfS_PNTA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_PNTB
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Ready_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Attention_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Running_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
EndScript
End
AnimationState = EMOTION_TAUNTING WEAPONSET_TOGGLE_1
StateName = STATE_Ready_Rocks
Animation
AnimationName = GUHbtShfB_TNTA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfB_TNTB
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfB_TNTC
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Attention_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
EndScript
End
AnimationState = EMOTION_TAUNTING
StateName = STATE_Ready_Sword
Animation
AnimationName = GUHbtShfS_TNTA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_TNTB
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_TNTC
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Ready_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Attention_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Running_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
EndScript
End
AnimationState = EMOTION_AFRAID
Animation
AnimationName = GUHbtShfB_FERA
AnimationMode = LOOP
End
End
AnimationState = EMOTION_CELEBRATING WEAPONSET_TOGGLE_1
StateName = STATE_Ready_Rocks
Animation
AnimationName = GUHbtShfB_CHRA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfB_CHRB
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfB_CHRC
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Attention_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
EndScript
End
AnimationState = EMOTION_CELEBRATING
StateName = STATE_Ready_Sword
Animation
AnimationName = GUHbtShfS_CHRA
AnimationMode = ONCE
End
Animation
AnimationName = GUHbtShfS_CHRB
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Ready_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Attention_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Running_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
EndScript
End
AnimationState = RAISING_FLAG WEAPONSET_TOGGLE_1
StateName = STATE_Ready_Rocks
Animation
AnimationName = GUHbtShfB_CHRA
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation
AnimationName = GUHbtShfB_CHRB
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation
AnimationName = GUHbtShfB_CHRC
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Flags = RESTART_ANIM_WHEN_COMPLETE
End
;;------------------ SELECTED STATE -------------------------------------------------------------
AnimationState = SELECTED WEAPONSET_TOGGLE_1
StateName = STATE_Attention_Rocks
Animation = IDLA
AnimationName = GUHbtShfB_ATNB
AnimationMode = LOOP
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Attention_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Bored_Rocks" then CurDrawableSetTransitionAnimState("TRANS_BoredToAttention_Rocks") end
EndScript
End
AnimationState = RAISING_FLAG
StateName = STATE_Ready_Sword
Animation
AnimationName = GUHbtShfS_CHRA
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation
AnimationName = GUHbtShfS_CHRB
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Flags = RESTART_ANIM_WHEN_COMPLETE
End
AnimationState = SELECTED
StateName = STATE_Attention_Sword
Animation = IDLA
AnimationName = GUHbtShfS_ATNB
AnimationMode = LOOP
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Ready_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Attention_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Running_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BoredToAttention_Sword") end
EndScript
End
;;------------------ IDLE STATES ----------------------------------------------------------------
AnimationState = WEAPONSET_TOGGLE_1
StateName = STATE_Bored_Rocks
Animation
AnimationName = GUHbtShfB_IDLB
AnimationMode = ONCE
AnimationPriority = 100
End
Animation
AnimationName = GUHbtShfB_IDLC
AnimationMode = ONCE
AnimationPriority = 10
End
Animation
AnimationName = GUHbtShfB_IDLD
AnimationMode = ONCE
AnimationPriority = 10
End
Animation
AnimationName = GUHbtShfB_IDLE
AnimationMode = ONCE
AnimationPriority = 10
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Attention_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToRocks") end
if Prev == "STATE_Attention_Rocks" then CurDrawableSetTransitionAnimState("TRANS_AttentionToBored_Rocks") end
EndScript
End
IdleAnimationState
StateName = STATE_Bored_Sword
Animation = IDLA
AnimationName = GUHbtShfS_IDLB
AnimationMode = ONCE
AnimationPriority = 100
End
Animation
AnimationName = GUHbtShfS_IDLC
AnimationMode = ONCE
AnimationPriority = 10
End
Animation
AnimationName = GUHbtShfS_IDLD
AnimationMode = ONCE
AnimationPriority = 10
End
Animation
AnimationName = GUHbtShfS_IDLE
AnimationMode = ONCE
AnimationPriority = 10
End
Animation
AnimationName = GUHbtShfS_IDLF
AnimationMode = ONCE
AnimationPriority = 10
End
Animation
AnimationName = GUHbtShfS_IDLG
AnimationMode = ONCE
AnimationPriority = 10
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Running_Sword" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Attention_Rocks" then CurDrawableSetTransitionAnimState("TRANS_RocksToSword") end
if Prev == "STATE_Attention_Sword" then CurDrawableSetTransitionAnimState("TRANS_AttentionToBored_Sword") end
EndScript
End
;;------------------ TRANSITIONS ----------------------------------------------------------------
;;====== GETTING SWORD
TransitionState = TRANS_RocksToSword
Animation = STHA
AnimationName = GUHbtShfB_STHB
AnimationMode = ONCE
End
End
TransitionState = TRANS_Running_RocksToSword
Animation = STHA
AnimationName = GUHbtShfB_STHD
AnimationMode = ONCE
End
End
TransitionState = TRANS_SwordToRocks
Animation = STHA
AnimationName = GUHbtShfB_STHA
AnimationMode = ONCE
End
End
TransitionState = TRANS_Running_SwordToRocks
Animation = STHA
AnimationName = GUHbtShfB_STHC
AnimationMode = ONCE
End
End
TransitionState = TRANS_BoredToAttention_Rocks
Animation = ATNA
AnimationName = GUHbtShfB_ATNA
AnimationMode = ONCE
End
End
TransitionState = TRANS_AttentionToBored_Rocks
Animation = ATNC
AnimationName = GUHbtShfB_ATNC
AnimationMode = ONCE
End
End
TransitionState = TRANS_BoredToAttention_Sword
Animation = ATNA
AnimationName = GUHbtShfS_ATNA
AnimationMode = ONCE
End
End
TransitionState = TRANS_AttentionToBored_Sword
Animation = ATNC
AnimationName = GUHbtShfBS_ATNC
AnimationMode = ONCE
End
End
;;----------------------------------------------------------------------------------------
End
; #include "..\..\includes\StunDrawModuleSmall.inc"
; ***DESIGN parameters ***
Side = Hobbits
EditorSorting = UNIT
ThreatLevel = 4.0
ThingClass = CHARACTER_UNIT
BuildCost = 200
BuildTime = 15
TransportSlotCount = TRANSPORTSLOTCOUNT_UNIT
;//DisplayMeleeDamage = HOBBIT_SWORD_DAMAGE
;//DisplayRangedDamage = HOBBIT_ROCK_DAMAGE
HeroSortOrder = 90
WeaponSet
Conditions = None
Weapon = PRIMARY HobbitSword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
WeaponSet
Conditions = WEAPONSET_TOGGLE_1
Weapon = PRIMARY HobbitRockThrow
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
ArmorSet
Conditions = None
Armor = SoldierArmor
DamageFX = NormalDamageFX
End
VisionRange = VISION_HOBBIT
ShroudClearingRange = SHROUD_CLEAR_STANDARD
BountyValue = HOBBIT_BOUNTY_VALUE
DisplayName = OBJECT:RohanHobbit
RecruitText = CONTROLBAR:RohanHobbitRecruit
Hotkey = CONTROLBAR:RohanHobbitHotkey
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = RohanHobbitCommandSet
CommandPoints = 2
; *** AUDIO Parameters ***;
VoiceAttack = HobbitShirriffVoiceAttack
VoiceAttackCharge = HobbitShirriffVoiceAttack
VoiceAttackMachine = HobbitShirriffVoiceAttack
VoiceAttackStructure = HobbitShirriffVoiceAttack
VoiceCreated = HobbitShirriffVoiceSalute
VoiceFullyCreated = HobbitShirriffVoiceSalute
VoiceGuard = HobbitShirriffVoiceMove
VoiceMove = HobbitShirriffVoiceMove
VoiceMoveToCamp = HobbitShirriffVoiceMove
VoiceMoveWhileAttacking = HobbitShirriffVoiceMove
VoicePriority = 35
VoiceRetreatToCastle = HobbitShirriffVoiceRetreat
VoiceSelect = HobbitShirriffVoiceSelectMS
VoiceSelectBattle = HobbitShirriffVoiceSelectBattle
;VoiceEnterStateAttack = HobbitShirriffVoiceEnterStateAttack
;VoiceEnterStateAttackCharge = HobbitShirriffVoiceEnterStateAttackCharge
;VoiceEnterStateAttackMachine = HobbitShirriffVoiceEnterStateAttackBuilding
;VoiceEnterStateAttackStructure = HobbitShirriffVoiceEnterStateAttackBuilding
;VoiceEnterStateMove = HobbitShirriffVoiceEnterStateMove
;VoiceEnterStateMoveToCamp = HobbitShirriffVoiceEnterStateMoveCamp
;VoiceEnterStateMoveWhileAttacking = HobbitShirriffVoiceEnterStateDisengage
;VoiceEnterStateRetreatToCastle = HobbitShirriffVoiceEnterStateRetreat
SoundImpact = ImpactHorse
UnitSpecificSounds
VoiceCreatedFromInn = HobbitShirriffVoiceSaluteInn
VoiceEnterUnitElvenTransportShip = HobbitShirriffVoiceMove
VoiceFullyCreatedFromInn = HobbitShirriffVoiceSaluteInn
VoiceGarrison = HobbitShirriffVoiceMove
VoiceInitiateCaptureBuilding = HobbitShirriffVoiceCaptureBuilding
;VoiceEnterStateInitiateCaptureBuilding =
End
; #include "..\..\includes\StandardUnitEvaEvents.inc"
CrowdResponseKey = Hobbit
Behavior = LargeGroupAudioUpdate ModuleTag_LGAU ; Tie into LargeGroupAudio system
Key = Hobbit Unit Infantry
End
ClientBehavior = ModelConditionAudioLoopClientBehavior ModuleTag_foo
ModelCondition = Required:EMOTION_CELEBRATING Excluded:DYING ENGAGED Sound:EmotionHobbitVoxCheerLoop
ModelCondition = Required:EMOTION_POINTING Excluded:DYING ENGAGED Sound:EmotionHobbitVoxTauntLoop
ModelCondition = Required:EMOTION_TAUNTING Excluded:DYING ENGAGED Sound:EmotionHobbitVoxTauntLoop
ModelCondition = Required:RAISING_FLAG Excluded:DYING ENGAGED Sound:EmotionHobbitVoxCheerLoop
End
ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
MaxUpdateRangeCap = 800
AnimationSound = Sound:FootstepDirtA Animation:GUHbtShf_SKL.RUMerry_RUNA Frames:10 20
AnimationSound = Sound:FootstepDirtA Animation:GUHbtShf_SKL.RUMerry_RUNC Frames:10 20
AnimationSound = Sound:FootstepDirtA Animation:GUHbtShf_SKL.RUMerry_STHC Frames:10 20
AnimationSound = Sound:FootstepDirtA Animation:GUHbtShf_SKL.RUMerry_STHD Frames:10 20
AnimationSound = Sound:SwordShingClean2 Animation:GUHbtShf_SKL.RUMerry_STHA Frames:18
AnimationSound = Sound:SwordIntoScabbard2 Animation:GUHbtShf_SKL.RUMerry_STHB Frames:21
AnimationSound = Sound:SwordIntoScabbard2 Animation:GUHbtShf_SKL.RUMerry_STHC Frames:2
AnimationSound = Sound:SwordShingClean2 Animation:GUHbtShf_SKL.RUMerry_STHD Frames:8
AnimationSound = Sound:BodyFallGenericNoArmor Animation:GUHbtShf_SKL.RUMerry_LNDA Frames:0
AnimationSound = Sound:BodyFallGenericNoArmor Animation:GUHbtShf_SKL.RUMerry_DIEA Frames:44
AnimationSound = Sound:BodyFallGenericNoArmor Animation:GUHbtShf_SKL.RUMerry_DIEB Frames:33
AnimationSound = Sound:BodyFallGeneric1 Animation:GUHBTSHF_SKL.GUHBTSHF_LNDA Frames:6
AnimationSound = Sound:BodyFallGeneric1 Animation:GUHBTSHF_SKL.GUHBTSHF_DIEA Frames:48
AnimationSound = Sound:BodyFallGeneric1 Animation:GUHBTSHF_SKL.GUHBTSHF_DIEB Frames:67
AnimationSound = Sound:BodyFallGeneric1 Animation:GUHBTSHF_SKL.GUHBTSHF_DIEC Frames:25
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE THROWN_OBJECT HOBBIT HOBBIT ATTACK_NEEDS_LINE_OF_SIGHT MELEE_HORDE
BuildCost = 200
BuildTime = 15
Body = ActiveBody ModuleTag_02
CheerRadius = EMOTION_CHEER_RADIUS
MaxHealth = 100;HOBBIT_HEALTH
MaxHealthDamaged = HOBBIT_HEALTH_DAMAGED
RecoveryTime = HOBBIT_HEALTH_RECOVERY_TIME
BurningDeathBehavior = Yes
BurningDeathFX = FX_InfantryBurningFlame
End
; #include "..\..\includes\CaptureBuilding.inc"
Behavior = AIUpdateInterface ModuleTag_AIUpdateInterface
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate = 500
HoldGroundCloseRangeDistance = 40
BurningDeathTime = BURNINGDEATH_DURATION_INFANTRY
End
LocomotorSet
Locomotor = HeroHumanLocomotor
Condition = SET_NORMAL
Speed = NORMAL_GOOD_HOBBIT_SPEED
End
LocomotorSet
Locomotor = HumanContainedLocomotor
Condition = SET_CONTAINED
Speed = 0.0
End
LocomotorSet
Locomotor = BurningDeathLocomotorInfantry
Condition = SET_BURNINGDEATH
Speed = BURNINGDEATH_WANDERSPEED_INFANTRY
End
Behavior = PhysicsBehavior ModuleTag_04
GravityMult = 1.0
ShockStandingTime = 1300 ;msec
End
Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL -KNOCKBACK
SinkDelay = 3000
SinkRate = 0.40 ; in Dist/Sec
DestructionDelay = 8000
Sound = INITIAL HobbitShirriffVoiceDie
End
Behavior = SquishCollide ModuleTag_06
;nothing
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 = 8000
End
Behavior = BezierProjectileBehavior ModuleTag_08 ; Module starts asleep, and wakes up when thrown.
;
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 = No
OrientToFlightPath =No
CrushStyle = Yes ; I don't detonate, I just hit
DieOnImpact = No
BounceCount = 0 ; 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
; Behavior = HitReactionBehavior HitReactionBehaviorModuleTag
; HitReactionLifeTimer1 = 7 ; level 1 (light damage) hit reaction animations in frames (5 per sec)
; HitReactionLifeTimer2 = 15 ; level 2 (medium damage) hit reaction animations in frames (5 per sec)
; HitReactionLifeTimer3 = 10 ; level 3 (heavy damage) hit reaction animations in frames (5 per sec)
; 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
; End
Geometry = CYLINDER
GeometryMajorRadius = 8.0
GeometryMinorRadius = 8.0
GeometryHeight = 19.2
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 18;
ShadowSizeY = 18;
ShadowTexture = ShadowI;
End
Und das hier der Code der Horde:
;------------------------------------------------------------------------------
;
; HobbitHordes.ini
;
;------------------------------------------------------------------------------
Object HobbitFighterHorde
; This is required for garrisoned objects - please put in all objects.
ButtonImage = BRArcheryRange_YeomanArchers
Draw = W3DScriptedModelDraw ModuleTag_W3DModelDraw
DependencySharedModelFlags = EMOTION_ALERT EMOTION_MORALE_HIGH EMOTION_MORALE_LOW EMOTION_AFRAID EMOTION_COWER SELECTED EMOTION_TERROR
DefaultModelConditionState
Model = None ;InvisHrdeTmp5x2
End
ModelConditionState = HORDE_EMPTY
Model = None
End
ModelConditionState = WORLD_BUILDER
Model = HordeMarkRUYeo
End
End
Side = Hobbits
EditorSorting = UNIT
EmotionRange = 240
DisplayName = OBJECT:Horde
WeaponSet
Conditions = None
Weapon = PRIMARY NormalMissileHordeRangefinder
End
CommandSet = RohanHobbitHordeCommandSet
; *** 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 = 200
BuildTime = 20.0
VisionRange = 300
ShroudClearingRange = 161
CommandPoints = 4
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 ARMY_SUMMARY MELEE_HORDE;UNATTACKABLE
Body = ImmortalBody ModuleTag_ImmortalBody
MaxHealth = 1
End
Behavior = StancesBehavior ModuleTag_StancesBehavior
StanceTemplate = FighterHorde
End
#include "..\..\..\includes\CaptureBuilding.inc"
Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate = 500
MaxCowerTime = 5000
MinCowerTime = 3000
CanAttackWhileContained = Yes ; Can fire out of garrisoned building
AttackPriority = AttackPriority_Archer
End
Behavior = HordeContain ModuleTag_HordeContain
FrontAngle = 270
FlankedDelay = 2000
ObjectStatusOfContained =
InitialPayload = HobbitFighter GOOD_MEN_GIANT_HORDE_SIZE
Slots = 15
PassengerFilter = NONE +INFANTRY
ShowPips = No
ThisFormationIsTheMainFormation = Yes ;// Used to determine which armorset to use (and anything else we want!)
RandomOffset = X:0 Y:0
MeleeBehavior = Amoeba
End
RankInfo = RankNumber:1 UnitType:HobbitFighter Position:X:34 Y:0 Position:X:34 Y:15 Position:X:34 Y:-15 Position:X:34 Y:30 Position:X:34 Y:-30
RankInfo = RankNumber:2 UnitType:HobbitFighter Position:X:22 Y:0 Leader 1 0 Position:X:22 Y:15 Leader 1 1 Position:X:22 Y:-15 Leader 1 2 Position:X:22 Y:30 Leader 1 3 Position:X:22 Y:-30 Leader 1 4
RankInfo = RankNumber:3 UnitType:HobbitFighter Position:X:10 Y:0 Leader 2 0 Position:X:10 Y:15 Leader 2 1 Position:X:10 Y:-15 Leader 2 2 Position:X:10 Y:30 Leader 2 3 Position:X:10 Y:-30 Leader 2 4
;// Positions for 5
RanksToReleaseWhenAttacking = 1 2 3
MeleeAttackLeashDistance = 25 ;// 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
LocomotorSet
Locomotor = NormalRangedHordeLocomotor
Condition = SET_NORMAL
Speed = NORMAL_GOOD_INFANTRY_HORDE_SPEED
End
Geometry = BOX
GeometryMajorRadius = 20.0
GeometryMinorRadius = 20.0
GeometryHeight = 20.0
GeometryIsSmall = No
End