Здравствуйте! Авторизуйтесь или зарегистрируйтесь, чтобы использовать полный функционал сайта
Быстрая авторизация через соцсети:

Главная » Статьи » Моддинг » Коддинг
Кавалерия мёртвых
Всем привет. Сегодня я сегодня будем добавлять в игру кавалерию мёртвых.
Добавим их людям в стайни, в найм с третьего уровня постройки как обычных (не временных) юнов за 5000 золотых.

Нам понадобятся следующие адреса:
1.data\ini\object\neutral\neutralunits.ini.
2.data\ini\object\goodfaction\units\men\rohanrohirrim.ini.
3.data\ini\object\goodfaction\hordes\men\menhordes.ini.
4.data\ini\armor.ini.
5.data\ini\weapon.ini.
6.data\ini\gamedata.ini.
7.data\ini\commandbutton.ini.
8.data\ini\commandset.ini.
9.data\ini\object\goodfaction\units\men\oathcavalry.ini. Но этот адрес нам только ещё предстоит сделать.


Первым делом сделаем сам объект. Они уже есть в data\ini\object\neutral\neutralunits.ini. Вбиваем в поиск: RohanOathbreakersCavalry.
Находим вот что:

;------------------------------------------------------------------------------
; Rohirrim Oathbreakers on a Horse
Object RohanOathbreakersCavalry
; *** ART Parameters ***
; NOTE: If you are updating any of the art parameters, you should really check
; GondorCavalryRiderless in FactionSubObject.ini and see if it needs to be updated

SelectPortrait = UPOathBreakers

Draw = W3DScriptedModelDraw ModuleTag_01
StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD


DefaultModelConditionState
Model = RUOthHrse_SKN
End

IdleAnimationState
Animation = IdleA
AnimationName = RURohrm_SKL.RURohrm_IDLA
AnimationPriority = 20
AnimationMode = ONCE
AnimationBlendTime = 15
End

Обратите внимание на RURohrm_SKL.RURohrm_IDLA. Это значит, что скелет у них как у роханских всадников.
Теперь идём к самим роханцам: data\ini\object\goodfaction\units\men\rohanrohirrim.ini.
Там копируем всё содержимое иника и вставляем в пустой файл блокнота (сия простая прога - незаменимая для меня вещь при коддинге).
Внеся определённые изменения*, получим там следующее:

; aka Rohirrim
Object MenOathbreakersCavalry
; *** ART Parameters ***
; NOTE: If you are updating any of the art parameters, you should really check
; GondorCavalryRiderless in FactionSubObject.ini and see if it needs to be updated

SelectPortrait = UPOathBreakers
ButtonImage = UCOathbreaker_OathTimer

Draw = W3DHordeModelDraw ModuleTag_01

OkToChangeModelColor = No

StaticModelLODMode = 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

WadingParticleSys = WaterRipplesTrail ; used when the unit is wading in shallow water.
;--------------------------------------------------
; new method
RandomTexture = RUHorse01.tga 0 RUHorse03.tga
RandomTexture = RUHorse02.tga 0 RUHorse03.tga
RandomTexture = RUHorse03.tga 0 RUHorse03.tga
RandomTexture = RUHorse04.tga 0 RUHorse03.tga

;--------------------------------------------------
;Random Rohirrim Riders textures - new method
RandomTexture = RURohrm01.tga 0 RURohrm02.tga
RandomTexture = RURohrm02.tga 0 RURohrm02.tga
RandomTexture = RURohrm03.tga 0 RURohrm02.tga
RandomTexture = RURohrm04.tga 0 RURohrm02.tga

ParticlesAttachedToAnimatedBones = yes

;;====================== MODELS ================================================================
;-----Spear-----
DefaultModelConditionState
Model = RUOthHrse_SKN
End
ModelConditionState = SWAPPING_TO_WEAPONSET_1 ; swapping to bow
Model = RUOthHrse_SKN

End


;;================== ANIMATIONS =================================================================
;---------------------------------------------
;-----------------Bow Anims-------------------
;---------------------------------------------
AnimationState = PASSENGER WEAPONSET_TOGGLE_1
Animation = grabbed
AnimationName = RURhrmArch_SKL.RURhrmArch_GBDA
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

; --- stunned anims
AnimationState = FREEFALL WEAPONSET_TOGGLE_1
Animation = free fall
AnimationName = RURhrmArch_SKL.RURhrmArch_FLYA
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

AnimationState = STUNNED_FLAILING WEAPONSET_TOGGLE_1
Animation = JustDie
AnimationName = RURhrmArch_SKL.RURhrmArch_FLYC
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

AnimationState = DYING BURNINGDEATH
Animation
AnimationName = RURohrm_SKL.RURohrm_DIEA
AnimationMode = ONCE
AnimationBlendTime = 10
End
End

; This is the no-spawn-horse type of death
AnimationState = DYING SPLATTED WEAPONSET_TOGGLE_1
Animation = splatted
AnimationName = RURhrmArch_SKL.RURhrmArch_LNDA
AnimationMode = ONCE
AnimationBlendTime = 2
End
FXEvent = Frame:2 Name:FX_SplatDust
End

AnimationState = DYING WEAPONSET_TOGGLE_1
Animation = JustDie
AnimationName = RURhrmArch_SKL.RURhrmArch_DIEA
AnimationMode = ONCE
End
End

AnimationState = STUNNED_STANDING_UP WEAPONSET_TOGGLE_1
Animation = StandUp
AnimationName = RURhrmArch_SKL.RURhrmArch_GTPA
AnimationMode = ONCE
AnimationSpeedFactorRange = 1.5 1.5
End
End

AnimationState = STUNNED WEAPONSET_TOGGLE_1
Animation = Land
AnimationName = RURhrmArch_SKL.RURhrmArch_LNDA
AnimationMode = ONCE
End
End

; Shooting whilst moving - 4 versions, one for each side.
;---------------------------------------------------------------------------------------------------------
AnimationState = FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
Animation = MoveAndFireBow
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKF
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
Animation = MoveAndFireBow
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKH
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
Animation = MoveAndFireBow
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKJ
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B MOVING WEAPONSET_TOGGLE_1
Animation = MoveAndFireBow
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKD
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
;---------------------------------------------------------------------------------------------------------

;;======= BACKING UP

AnimationState = MOVING BACKING_UP WEAPONSET_TOGGLE_1
Animation = BACKING UP
AnimationName = RURhrmArch_SKL.RURhrmArch_BAKA
AnimationMode = LOOP
End
End

AnimationState = MOVING TURN_LEFT_HIGH_SPEED WEAPONSET_TOGGLE_1
Animation = TurnLeft
AnimationName = RURhrmArch_SKL.RURhrmArch_TNL1
AnimationMode = LOOP
AnimationBlendTime = 20
End
End

AnimationState = MOVING TURN_RIGHT_HIGH_SPEED WEAPONSET_TOGGLE_1
Animation = TurnRight
AnimationName = RURhrmArch_SKL.RURhrmArch_TNR1
AnimationMode = LOOP
AnimationBlendTime = 20
End
End

AnimationState = MOVING WANDER WEAPONSET_TOGGLE_1
Animation = WLKA
AnimationName = RURhrmArch_SKL.RURhrmArch_WLKA
AnimationMode = LOOP
End
End

AnimationState = MOVING TURN_LEFT WEAPONSET_TOGGLE_1
Animation = TurnLeft
AnimationName = RURhrmArch_SKL.RURhrmArch_TRNL
AnimationMode = LOOP
End
End

AnimationState = MOVING TURN_RIGHT WEAPONSET_TOGGLE_1
Animation = TurnRight
AnimationName = RURhrmArch_SKL.RURhrmArch_TRNR
AnimationMode = LOOP
End
End

AnimationState = MOVING ENGAGED WEAPONSET_TOGGLE_1
Animation = Moving_Engaged
AnimationName = RURhrmArch_SKL.RURhrmArch_RUNC
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

; AnimationState = MOVING WALKING WEAPONSET_TOGGLE_1
; Animation = Walk1
; AnimationName = RURhrmArch_SKL.RURhrmArch_WLKB
; AnimationMode = LOOP
; Distance = 25
; End
; End

AnimationState = MOVING ACCELERATE WEAPONSET_TOGGLE_1
Animation = RunA
AnimationName = RURhrmArch_SKL.RURhrmArch_ACCL
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

AnimationState = DECELERATE WEAPONSET_TOGGLE_1
Animation = RunA
AnimationName = RURhrmArch_SKL.RURhrmArch_DECL
AnimationMode = LOOP
AnimationSpeedFactorRange = 0.55 0.55
End
Flags = RANDOMSTART
End

AnimationState = MOVING WEAPONSET_TOGGLE_1
Animation = RunA
AnimationName = RURhrmArch_SKL.RURhrmArch_RUNA
AnimationMode = LOOP
Distance = 40
End
Flags = RANDOMSTART
End

; Shooting with Fire Upgrade - 4 versions, one for each side.
;---------------------------------------------------------------------------------------------------------
AnimationState = FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKL
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKN
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKP
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKB
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
;---------------------------------------------------------------------------------------------------------

; Shooting - 4 versions, one for each side.
;---------------------------------------------------------------------------------------------------------
AnimationState = FIRING_OR_PREATTACK_B TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKL
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKN
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKP
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
AnimationState = FIRING_OR_PREATTACK_B WEAPONSET_TOGGLE_1
Animation = AttackA1
AnimationName = RURhrmArch_SKL.RURhrmArch_ATKB
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES
FrameForPristineBonePositions = 20
End
;---------------------------------------------------------------------------------------------------------

AnimationState = BETWEEN_FIRING_SHOTS_B WEAPONSET_TOGGLE_1
Animation = BetweenFiringShots
AnimationName = RURhrmArch_SKL.RURhrmArch_IDLA
AnimationMode = LOOP
AnimationBlendTime = 15
End
End

;;--------------------- EMOTIONS ----------------------------------------------------------------------------------
;;===== TERROR
AnimationState = MOVING EMOTION_TERROR EMOTION_LOOK_TO_SKY WEAPONSET_TOGGLE_1
Animation = TerrorFromTheSky
AnimationName = RURhrmArch_SKL.RURhrmArch_RUNB
AnimationMode = LOOP
End
End

AnimationState = MOVING EMOTION_TERROR WEAPONSET_TOGGLE_1
Animation = TerrorFromTheSky
AnimationName = RURhrmArch_SKL.RURhrmArch_RUNB
AnimationMode = LOOP
End
End

;;======= APPREHENSIVE

AnimationState = EMOTION_ALERT EMOTION_AFRAID WEAPONSET_TOGGLE_1
Animation = Apprehensive
AnimationName = RURhrmArch_SKL.RURhrmArch_APPA
AnimationMode = LOOP ;Change this to ONCE if adding additional anims
End
End

;;======= AFRAID

AnimationState = EMOTION_AFRAID WEAPONSET_TOGGLE_1
Animation = FERA
AnimationName = RURhrmArch_SKL.RURhrmArch_FERA
AnimationMode = LOOP
End
; Animation = FERB

; AnimationName = RURhrmArch_SKL.RURhrmArch_FERB
; AnimationMode = LOOP
; End
End

;;======= CELEBRATING

; This is what happens when Theo gives his rousing speech
AnimationState = EMOTION_CELEBRATING WEAPONSET_TOGGLE_1
Animation = CheerA
AnimationName = RURhrmArch_SKL.RURhrmArch_CHRA
AnimationMode = ONCE
End
Animation = CheerB
AnimationName = RURhrmArch_SKL.RURhrmArch_CHRB
AnimationMode = ONCE
End
Animation = CheerD
AnimationName = RURhrmArch_SKL.RURhrmArch_CHRD
AnimationMode = ONCE
End
Animation = Salute
AnimationName = RURhrmArch_SKL.RURhrmArch_SLTA
AnimationMode = ONCE
End
Flags = RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
End

;;======= TAUNTING

AnimationState = EMOTION_TAUNTING WEAPONSET_TOGGLE_1
Animation = Taunting
AnimationName = RURhrmArch_SKL.RURhrmArch_TNTA
AnimationMode = ONCE
End
Animation = Taunting2
AnimationName = RURhrmArch_SKL.RURhrmArch_TNTB
AnimationMode = ONCE
End
Flags = RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
End

;;======= POINTING

AnimationState = EMOTION_POINTING WEAPONSET_TOGGLE_1
Animation = Pointing1
AnimationName = RURhrmArch_SKL.RURhrmArch_PNTA
AnimationMode = LOOP
End
End

;;======== ALERT

AnimationState = EMOTION_ALERT WEAPONSET_TOGGLE_1
Animation = IDLA
AnimationName = RURhrmArch_SKL.RURhrmArch_IDLA
AnimationMode = LOOP
End
End

AnimationState = ATTACKING WEAPONSET_TOGGLE_1
Animation = Reloading
AnimationName = RURhrmArch_SKL.RURhrmArch_IDLA
AnimationMode = LOOP
End
End


; Swapping to bow -----
AnimationState = SWAPPING_TO_WEAPONSET_1 ; note - needs to go above any WEAPONSET_TOGGLE_1.
StateName = State_PuttingSpearAway
Animation
AnimationName = RURohrm_SKL.RURohrm_WPNB ; putting spear away.
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 0.5 0.7 ; Needs to match one second.
End
Flags = START_FRAME_LAST
End

AnimationState = RAISING_FLAG WEAPONSET_TOGGLE_1
Animation = CheerA
AnimationName = RURhrmArch_SKL.RURhrmArch_CHRA
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation = CheerB
AnimationName = RURhrmArch_SKL.RURhrmArch_CHRB
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation = CheerD
AnimationName = RURhrmArch_SKL.RURhrmArch_CHRD
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation = Salute
AnimationName = RURhrmArch_SKL.RURhrmArch_SLTA
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Flags = RESTART_ANIM_WHEN_COMPLETE
End

;;-------------------- SELECTED ---------------------------------------------------------------

AnimationState = SELECTED WEAPONSET_TOGGLE_1
StateName = State_Selected
SimilarRestart = Yes
Animation = AtAttention
AnimationName = RURhrmArch_SKL.RURhrmArch_ATNB
AnimationMode = LOOP
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "Idle" then
CurDrawableSetTransitionAnimState("TRANS_Idle_to_SelectedWEAPONSET1")
elseif Prev == "State_PuttingSpearAway" then
CurDrawableSetTransitionAnimState("TRANS_SpearAway_To_SelectedWEAPONSET1")
end
EndScript
End

; Swapping to spear -----
AnimationState = SWAPPING_TO_WEAPONSET_2
StateName = State_PuttingBowAway
Animation
AnimationName = RURhrmArch_SKL.RURhrmArch_WPNA ; putting bow away.
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.5 0.6 ; Needs to match one second, approx.
End
End

; Idle
AnimationState = WEAPONSET_TOGGLE_1
StateName = Idle
Animation = IDLB
AnimationName = RURhrmArch_SKL.RURhrmArch_IDLB
AnimationMode = LOOP
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "State_Selected" then
CurDrawableSetTransitionAnimState("TRANS_Selected_to_IdleWEAPONSET1")
elseif Prev == "State_PuttingSpearAway" then
CurDrawableSetTransitionAnimState("TRANS_SpearAway_To_IdleWEAPONSET1")
end
EndScript
End

TransitionState = TRANS_Idle_to_SelectedWEAPONSET1
Animation = ATNA
AnimationName = RURhrmArch_SKL.RURhrmArch_ATNA
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.8 1.2
End
End

TransitionState = TRANS_SpearAway_To_SelectedWEAPONSET1 ; get bow out
Animation = ATNA
AnimationName = RURhrmArch_SKL.RURhrmArch_WPNA
AnimationMode = ONCE_BACKWARDS
End
Flags = START_FRAME_LAST
End

TransitionState = TRANS_Selected_to_IdleWEAPONSET1
Animation = ATNC
AnimationName = RURhrmArch_SKL.RURhrmArch_ATNA
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 0.8 1.2
End
Flags = START_FRAME_LAST
End

TransitionState = TRANS_SpearAway_To_IdleWEAPONSET1 ; get bow out
Animation
AnimationName = RURhrmArch_SKL.RURhrmArch_WPNA
AnimationMode = ONCE_BACKWARDS
End
Flags = START_FRAME_LAST
End


;---------------------------------------------
;-----------------Spear Anims-----------------
;---------------------------------------------
IdleAnimationState
StateName = Idle
Animation = IdleB
AnimationName = RURohrm_SKL.RURohrm_IDLB
AnimationMode = ONCE
AnimationBlendTime = 15
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "State_Selected" then
CurDrawableSetTransitionAnimState("TRANS_Selected_To_Idle")
elseif Prev == "State_PuttingBowAway" then
CurDrawableSetTransitionAnimState("TRANS_BowAway_To_Idle")
end
EndScript
End

AnimationState = PASSENGER
Animation = grabbed
AnimationName = RURohrm_SKL.RURohrm_GBDA
AnimationMode = LOOP
End
End

; --- stunned anims
AnimationState = FREEFALL
Animation = free fall
AnimationName = RURohrm_SKL.RURohrm_FLYB
AnimationMode = LOOP
AnimationBlendTime = 10
End
End

AnimationState = STUNNED_FLAILING
Animation = JustDie
AnimationName = RURohrm_SKL.RURohrm_FLYC
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

; This is the no-spawn-horse type of death
AnimationState = DYING DEATH_1 SPLATTED
Animation = splatted
AnimationName = RURohrm_SKL.RURohrm_LNDA
AnimationMode = ONCE
AnimationBlendTime = 2
End
FXEvent = Frame:2 Name:FX_SplatDust
End



AnimationState = DYING DEATH_1
Animation = JustDie
AnimationName = RURohrm_SKL.RURohrm_DIEA
AnimationMode = ONCE
End
End

AnimationState = DYING DEATH_2
Animation = FadeOut
AnimationName = RURohrm_SKL.RURohrm_IDLB
AnimationMode = ONCE
End
End

AnimationState = STUNNED_STANDING_UP
Animation = StandUp
AnimationName = RURohrm_SKL.RURohrm_GTPA
AnimationMode = ONCE
AnimationSpeedFactorRange = 1.5 1.5
End
End

AnimationState = STUNNED
Animation = Land
AnimationName = RURohrm_SKL.RURohrm_LNDA
AnimationMode = ONCE
End
End



AnimationState = BURNINGDEATH
Animation
AnimationName = RURohrm_SKL.RURohrm_MFDA
AnimationMode = LOOP
Distance = 100
End
End

AnimationState = PARALYZED
Animation
AnimationName = RURohrm_SKL.RURohrm_IDLB
AnimationMode = LOOP
End
End

AnimationState = MOVING FIRING_OR_PREATTACK_A
ShareAnimation = Yes
Animation = TrotAndFire
AnimationName = RURohrm_SKL.RURohrm_ATRB
AnimationMode = LOOP
Distance = 70; 35
End
Flags = RANDOMSTART
End

;;======= BACKING UP

AnimationState = MOVING BACKING_UP
Animation = BACKING UP
AnimationName = RURohrm_SKL.RURohrm_BAKA
AnimationMode = LOOP
End
End

AnimationState = TURN_LEFT_HIGH_SPEED
Animation = TurnLeft
AnimationName = RURohrm_SKL.RURohrm_TNL1
AnimationMode = LOOP
AnimationBlendTime = 20
End
End

AnimationState = TURN_RIGHT_HIGH_SPEED
Animation = TurnRight
AnimationName = RURohrm_SKL.RURohrm_TNR1
AnimationMode = LOOP
AnimationBlendTime = 20
End
End

AnimationState = MOVING WANDER
Animation = WLKA
AnimationName = RURohrm_SKL.RURohrm_WLKA
AnimationMode = LOOP
End
End

AnimationState = MOVING TURN_LEFT
Animation = TurnLeft
AnimationName = RURohrm_SKL.RURohrm_TRNL
AnimationMode = LOOP
End
End

AnimationState = MOVING TURN_RIGHT
Animation = TurnRight
AnimationName = RURohrm_SKL.RURohrm_TRNR
AnimationMode = LOOP
End
End

AnimationState = MOVING ENGAGED
Animation = Moving_Engaged
AnimationName = RURohrm_SKL.RURohrm_RUNC
AnimationMode = LOOP
End
Flags = RANDOMSTART
End

; AnimationState = MOVING WALKING
; Animation = Walk1
; AnimationName = RURohrm_SKL.RURohrm_WLKB
; AnimationMode = LOOP
; Distance = 25
; End
; End

AnimationState = MOVING ACCELERATE
Animation = Accelerate
AnimationName = RURohrm_SKL.RURohrm_ACCL
AnimationMode = ONCE ; was LOOP
End
End

AnimationState = DECELERATE
Animation = Decelerate
AnimationName = RURohrm_SKL.RURohrm_DECL
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.55 0.55
End
End

AnimationState = MOVING
Animation = RunA
AnimationName = RURohrm_SKL.RURohrm_RUNA
AnimationMode = LOOP
Distance = 40
End
Flags = RANDOMSTART
End

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

; Standard attack with spear.
AnimationState = FIRING_OR_PREATTACK_A
Animation = AttackA1
AnimationName = RURohrm_SKL.RURohrm_ATKA
AnimationMode = ONCE
End
End
;---------------------------------------------------------------------------------------------------------


;;--------------------- EMOTIONS ----------------------------------------------------------------------------------
;;===== TERROR
AnimationState = MOVING EMOTION_TERROR EMOTION_LOOK_TO_SKY
Animation = TerrorFromTheSky
AnimationName = RURohrm_SKL.RURohrm_RUNB
AnimationMode = LOOP
End
End

AnimationState = MOVING EMOTION_TERROR
Animation = TerrorFromTheSky
AnimationName = RURohrm_SKL.RURohrm_RUNB
AnimationMode = LOOP
End
End

;;======= APPREHENSIVE

AnimationState = EMOTION_ALERT EMOTION_AFRAID
Animation = Apprehensive
AnimationName = RURohrm_SKL.RURohrm_APPA
AnimationMode = LOOP ;Change this to ONCE if adding additional anims
End
End

;;======= AFRAID

AnimationState = EMOTION_AFRAID
Animation = FERA
AnimationName = RURohrm_SKL.RURohrm_FERA
AnimationMode = LOOP
End
;Animation = FERB
; AnimationName = RURohrm_SKL.RURohrm_FERB
; AnimationMode = LOOP
;End
End

;;======= CELEBRATING

AnimationState = EMOTION_CELEBRATING
Animation = CheerA
AnimationName = RURohrm_SKL.RURohrm_CHRA
AnimationMode = ONCE
End
Animation = CheerB
AnimationName = RURohrm_SKL.RURohrm_CHRB
AnimationMode = ONCE
End
Animation = CheerC
AnimationName = RURohrm_SKL.RURohrm_CHRC
AnimationMode = ONCE
End
Animation = CheerD
AnimationName = RURohrm_SKL.RURohrm_CHRD
AnimationMode = ONCE
End
Animation = Salute
AnimationName = RURohrm_SKL.RURohrm_SLTA
AnimationMode = ONCE
End
Flags = RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
End

;;======= TAUNTING

AnimationState = EMOTION_TAUNTING
Animation = Taunting
AnimationName = RURohrm_SKL.RURohrm_TNTA
AnimationMode = ONCE
End
Animation = Taunting2
AnimationName = RURohrm_SKL.RURohrm_TNTB
AnimationMode = ONCE
End
Flags = RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
End

;;======= POINTING

AnimationState = EMOTION_POINTING
Animation = Pointing1
AnimationName = RURohrm_SKL.RURohrm_PNTA
AnimationMode = LOOP
End
End

;;======== ALERT

AnimationState = EMOTION_ALERT
Animation = IDLA
AnimationName = RURohrm_SKL.RURohrm_IDLA
AnimationMode = LOOP
End
End

AnimationState = RAISING_FLAG
Animation = CheerA
AnimationName = RURohrm_SKL.RURohrm_CHRA
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation = CheerB
AnimationName = RURohrm_SKL.RURohrm_CHRB
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation = CheerC
AnimationName = RURohrm_SKL.RURohrm_CHRC
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation = CheerD
AnimationName = RURohrm_SKL.RURohrm_CHRD
AnimationMode = ONCE
AnimationSpeedFactorRange = 0.9 1.1
End
Animation = Salute
AnimationName = RURohrm_SKL.RURohrm_SLTA
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE
End

;;-------------------- SELECTED ---------------------------------------------------------------

AnimationState = SELECTED
StateName = State_Selected
; SimilarRestart = Yes
Animation = AtAttention
AnimationName = RURohrm_SKL.RURohrm_IDLA
AnimationMode = LOOP
End
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "Idle" then
CurDrawableSetTransitionAnimState("TRANS_Idle_To_Selected")
elseif Prev == "State_PuttingBowAway" then
CurDrawableSetTransitionAnimState("TRANS_BowAway_To_Selected")
end
EndScript
End


TransitionState = TRANS_Idle_to_Selected
Animation = ATNA
AnimationName = RURohrm_SKL.RURohrm_ATNA
AnimationMode = ONCE
AnimationSpeedFactorRange = 1.0 1.0
End
End

TransitionState = TRANS_BowAway_To_Selected
Animation
AnimationName = RURohrm_SKL.RURohrm_WPNB
AnimationMode = ONCE
End
End

TransitionState = TRANS_Selected_to_Idle
Animation = ATNC
AnimationName = RURohrm_SKL.RURohrm_ATNA
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 0.6 1.0
End
Flags = START_FRAME_LAST
End

TransitionState = TRANS_BowAway_To_Idle
Animation
AnimationName = RURohrm_SKL.RURohrm_WPNB
AnimationMode = ONCE
End
End

End

Draw = W3DScriptedModelDraw DustEffects
DefaultModelConditionState
Model = None
End
IdleAnimationState
End
AnimationState = MOVING WADING
ParticleSysBone = None FootstepSlash
End
AnimationState = MOVING ACCELERATE
ParticleSysBone = None GenericSiegeTrailDust
End
AnimationState = MOVING DECELERATE
ParticleSysBone = None GenericSiegeTrailDust
End
AnimationState = MOVING
End
End

; NOTE, PLEASE: If you are changing this unit in any way, you should consider changing
; GondorCavalryRiderless in FactionSubObject.ini

#include "..\..\..\includes\StunDrawModuleMedium.inc"

; ***DESIGN parameters ***
Side = Men
EditorSorting = UNIT
ThreatLevel = 2.0
TransportSlotCount = TRANSPORTSLOTCOUNT_UNIT

; Weapon Sets
WeaponSet
Conditions = None
Weapon = PRIMARY MenEliteKnightSword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End

ArmorSet
Conditions = None
Armor = MenEliteKnightArmor
DamageFX = NormalDamageFX
End
ArmorSet
Conditions = ALTERNATE_FORMATION
Armor = MenEliteKnightArmor
DamageFX = NormalDamageFX
End

BountyValue = MEN_ELITE_KNIGHT_BOUNTY_VALUE
VisionRange = MEN_ELITE_KNIGHT_VISION_RANGE
VisionSide = 35%
VisionRear = 25%

MaxVisionBonusPercent = 300%
VisionBonusTestRadius = 200
VisionBonusPercentPerFoot = 2.0%
ShroudClearingRange = SHROUD_CLEAR_STANDARD

DisplayName = OBJECT:Oathbreaker
CrushableLevel = 4 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
;CrusherLevel = 0
;CrushableLevel = 3 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 1
CrushWeapon = KnightCrush

MinCrushVelocityPercent = 62 ; ;40 ; Has to be moving at at least 35% of full speed.
CrushDecelerationPercent = 10 ; ;20 ; Lose 20 percent of max velocity when crushing.

CrushKnockback = 40;
CrushZFactor = 1.0;

CommandSet = MenEliteKnightCommandSet
CommandPoints = 10

; *** AUDIO Parameters ***;

VoiceAttack = OathbreakerVoxSelect
; VoiceCreated = OathbreakerVoxSelect
; VoiceFullyCreated = OathbreakerVoxSelect
VoiceMove = OathbreakerVoxSelect
VoicePriority = 16
VoiceSelect = OathbreakerVoxSelect
;VoiceSelect2 = RohirrimAttention

SoundCrushing = RohirrimCrushing ; Sound made when crushing another unit underhoof
SoundImpact = ImpactHorse
SoundMoveStart = GondorHorseMoveStart

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

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

; 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
ThingClass = CAVALRY_UNIT
KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS CAVALRY SCORE GRAB_AND_DROP

Body = ActiveBody ModuleTag_02
CheerRadius = EMOTION_CHEER_RADIUS ;
MaxHealth = MEN_ELITE_KNIGHT_HEALTH
MaxHealthDamaged = MEN_ELITE_KNIGHT_DAMAGED
RecoveryTime = MEN_ELITE_KNIGHT_HEALTH_RECOVERY_TIME
BurningDeathBehavior = Yes
BurningDeathFX = FX_CavalryBurningFlame
DodgePercent = 40 ; ;
End

#include "..\..\..\includes\CaptureBuilding.inc"

Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
AILuaEventsList = RohirrimFunctions
AttackPriority = AttackPriority_Cavalry
Turret
TurretTurnRate = 360 ; turn rate, in degrees per sec
ControlledWeaponSlots = SECONDARY
End
BurningDeathTime = BURNINGDEATH_DURATION_CAVALRY
End

LocomotorSet
Locomotor = NormalHorseHordeMemberLocomotor
Condition = SET_NORMAL
Speed = NORMAL_CAVALRY_FAST_MEMBER_SPEED
End

LocomotorSet
Locomotor = NormalHorseHordeMemberLocomotor
Condition = SET_COMBO
Speed = NORMAL_GOOD_INFANTRY_MEMBER_SPEED
End

LocomotorSet
Locomotor = BurningDeathLocomotorCavalry
Condition = SET_BURNINGDEATH
Speed = BURNINGDEATH_WANDERSPEED_CAVALRY
End

Behavior = PhysicsBehavior ModuleTag_04
GravityMult = 1.0
ShockStandingTime = 2533 ;msec
End

Behavior = SquishCollide ModuleTag_06
;nothing
End

; RohanRohirrim
Behavior = HordeMemberCollide ModuleTag_HMC
;nothing
End

Behavior = SlowDeathBehavior ModuleTag_08
DeathTypes = ALL -FADED
SinkDelay = 3000
SinkRate = 1.0 ; in Dist/Sec
DestructionDelay = 15000
;ProbabilityModifier = 33
DeathFlags = DEATH_1 ; Tell model which death animation to play. Sets BOTH model condition and object status bits.
;Sound = INITIAL RohirrimVoiceDie
End

Behavior = SlowDeathBehavior ModuleTag_FadeDeath
DeathTypes = NONE +FADED
FadeDelay = 0
FadeTime = 4000
DestructionDelay = 4000

DeathFlags = DEATH_2
FX = INITIAL FX_RohirrimAlliesUnsummon
End

; Tie into LargeGroupAudio system
;Behavior = LargeGroupAudioUpdate ModuleTag_LGAU
; Key = Humanoid_Male Man Man_Male Unit Cavalry Rohirrim_Lancer
;End


Geometry = CYLINDER
GeometryMajorRadius = 8
GeometryMinorRadius = 8
GeometryHeight = 20.0
GeometryIsSmall = No
Shadow = SHADOW_DECAL
ShadowSizeX = 30;
ShadowSizeY = 21;
ShadowTexture = ShadowI;

End


Этот файл нужно добавить в INI.BIG.
На верхней панели нажимаем:
Edit > Add File > ищем файл-блокнот наш > Saved with filename: > в строке пишем: data\ini\object\goodfaction\units\men\oathcavalry.ini > OK.

Юнит создан, но нужно ещё создать и отряд. Открываем data\ini\object\goodfaction\hordes\men\menhordes.ini. Ищем Object RohanRohirrimHorde.
После объекта (всего блока) или самом внизу вставляем следующее*:

//------------------------------------------------------------------------------
Object MenOathbreakersCavalryHorde

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

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

Side = Men
EditorSorting = UNIT
EmotionRange = 240
DisplayName = OBJECT:HordeOathBreakers
;DisplayNameStrategic = CONTROLBAR:LW_Unit_RohanRohirrimHorde
;DescriptionStrategic = CONTROLBAR:LW_ToolTip_RohanRohirrimHorde

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

// *** AUDIO Parameters ***//
// Note: Don't put voice parameters here -- they will be ignored. Voice play requests
// are always passed through to members
#include "..\..\..\includes\StandardHordeEvaEvents.inc"

BuildCost = MEN_ELITE_KNIGHT_BUILDCOST
BuildTime = MEN_ELITE_KNIGHT_BUILDTIME
VisionRange = MEN_ELITE_KNIGHT_HORDE_VISION_RANGE
ShroudClearingRange = MEN_ELITE_KNIGHT_HORDE_SHROUD_RANGE
VisionSide = 50%
VisionRear = 25%
MaxVisionBonusPercent = 300%
VisionBonusTestRadius = 200
VisionBonusPercentPerFoot = 1.0%
CommandPoints = 100

FormationWidth = 2 // Width it occupies in formations. Current choices are 1 or 2.
FormationDepth = 1 // Depth it occupies in formations. Current choices are 1 or 2.

CrushableLevel = 2 //What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 1
MinCrushVelocityPercent = 62% ; ;50% // Has to be moving at at least 25% of full speed.
CrushDecelerationPercent = 15% ; ;30% // Lose 10 percent (100/5 horde members) of max velocity when crushing.
CrushKnockback = 40 // how hard we knock back crushed units.
CrushZFactor = 1.0 // How much we knock upwards.

TransportSlotCount = TRANSPORTSLOTCOUNT_SMALL_HORDE
KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAVALRY HORDE MELEE_HORDE ARMY_SUMMARY LARGE_RECTANGLE_PATHFIND//UNATTACKABLE
CommandSet = MenEliteKnightHordeCommandSet

Body = ImmortalBody ModuleTag_ImmortalBody
MaxHealth = 1
End

ThreatLevel = ROHAN_ROHIRRIM_HORDE_THREAT
ThreatBreakdown RohanRohirrimHorde_DetailedThreat
AIKindOf = CAVALRY
End

Behavior = StancesBehavior ModuleTag_StancesBehavior
StanceTemplate = CavalryHorde
End

Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate = 500
MaxCowerTime = 5000
MinCowerTime = 3000
AILuaEventsList = CavalryFunctions
AttackPriority = AttackPriority_Cavalry
End

Behavior = HorseHordeContain ModuleTag_HordeContain

FrontAngle = 270
FlankedDelay = 2000
ObjectStatusOfContained =
InitialPayload = MenOathbreakersCavalry GOOD_RIDER_LARGE_HORDE_SIZE
Slots = 10
PassengerFilter = NONE +CAVALRY +MenOathbreakersCavalry
ShowPips = No
ThisFormationIsTheMainFormation = Yes //Used to determine which armorset to use (and anything else we want!)
RandomOffset=X:0 Y:0
MeleeBehavior = Amoeba
End

// Banner Carrier info
;BannerCarriersAllowed = RohanBanner // types of units that are allowed as banner carriers
;BannerCarrierPosition = UnitType:RohanRohirrim Pos:X:70.0 Y:0.0 // (DEFAULT) position of banner carrier for archer horde

RankInfo = RankNumber:1 UnitType:MenOathbreakersCavalry Position:X:40 Y:0 Position:X:40 Y:15 Position:X:40 Y:-15 Position:X:40 Y:30 Position:X:40 Y:-30
RankInfo = RankNumber:2 UnitType:MenOathbreakersCavalry Position:X:10 Y:0 Leader 1 0 Position:X:10 Y:15 Leader 1 1 Position:X:10 Y:-15 Leader 1 2 Position:X:10 Y:30 Leader 1 3 Position:X:10 Y:-30 Leader 1 4

RanksToReleaseWhenAttacking = 1 2

MeleeAttackLeashDistance = 1 //How far the hordes can move from the center of the horde when melee attacking.
BackUpMinDelayTime = 1 //The minimum amount of time to delay before backing up
BackUpMaxDelayTime = 3000 //The maximum amount of time to delay before backing up
BackUpMinDistance = 1 //The minimum number of cells to backup
BackUpMaxDistance = 3 //The maximum number of cells to backup
BackupPercentage = 80% //The amount of chance that a unit will back up.
End

Behavior = PhysicsBehavior ModuleTag_PhysicsBehavior
GravityMult = 1.0
End

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

Behavior = EmotionTrackerUpdate Module_EmotionTracker
TauntAndPointDistance = INFANTRY_TAUNT_POINT_RADIUS // max distance to taunted/pointed objet
TauntAndPointUpdateDelay = 1000 // how often scan (milliseconds)
TauntAndPointExcluded = NONE
AfraidOf = EMOTION_AFRAIDOF_OBJECTFILTER
AlwaysAfraidOf = EMOTION_ALWAYS_AFRAIDOF_OBJECTFILTER
PointAt = EMOTION_POINTAT_OBJECTFILTER
HeroScanDistance = 150
FearScanDistance = CAVALRY_FEAR_SCAN_RADIUS

AddEmotion = Terror_Base
AddEmotion = Doom_Base
AddEmotion = BraceForBeingCrushed_Base
AddEmotion = UncontrollableFear_Base
AddEmotion = FearIdle_Base
AddEmotion = FearBusy_Base
AddEmotion = Point_Base
AddEmotion = Taunt_Base
AddEmotion = CheerIdle_Base
AddEmotion = CheerBusy_Base
AddEmotion = HeroCheerIdle_Base
AddEmotion = HeroCheerBusy_Base
AddEmotion = Alert_Base
AddEmotion = CheerForAboutToCrush_Base

End

LocomotorSet
Locomotor = NormalCavalryHordeLocomotor
Condition = SET_NORMAL
Speed = NORMAL_CAVALRY_FAST_HORDE_SPEED
End

Behavior = ProductionUpdate ProductionUpdateModuleTag
GiveNoXP = Yes
End

Behavior = PickupStuffUpdate ModuleTag_PickupStuffUpdate
SkirmishAIOnly = Yes
StuffToPickUp = NONE +CRATE
ScanRange = 200
ScanIntervalSeconds = 0.5
End

#include "..\..\..\includes\CaptureBuilding.inc"

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

Behavior = AISpecialPowerUpdate MenRohirrimHordeCaptureBuildingAI
CommandButtonName = Command_CaptureBuilding
SpecialPowerAIType = AI_SPECIAL_POWER_CAPTURE_BUILDING
End

Geometry = BOX
GeometryMajorRadius = 30.0
GeometryMinorRadius = 40.0
GeometryHeight = 20.0
GeometryIsSmall = No
End


Теперь сделаем броню и оружие нашим всадникам.

Броня (data\ini\armor.ini):

;------------------------------------------------------------------------------
Armor MenEliteKnightArmor
Armor = DEFAULT 10%
Armor = SLASH 10%
Armor = PIERCE 10%
Armor = SPECIALIST 120%
Armor = CRUSH 10%
Armor = SIEGE 10%
Armor = FLAME 100%
Armor = MAGIC 1000%
Armor = HERO 85%
Armor = HERO_RANGED 60%
Armor = STRUCTURAL 10%
FlankedPenalty = 10%
End


Оружие (data\ini\weapon.ini):

;------------------------------------------------------------------------------
Weapon MenEliteKnightSword ; BALANCE
RadiusDamageAffects = ENEMIES NEUTRALS
LeechRangeWeapon = Yes
AttackRange = 15.0
MeleeWeapon = Yes
FireFX = FX_GondorSwordHit
DelayBetweenShots = MEN_ELITE_KNIGHT_DELAYBETWEENSHOTS ; time between shots, msec
PreAttackDelay = MEN_ELITE_KNIGHT_PREATTACKDELAY ; 400 is sword swing delay time before contact with target.
FiringDuration = MEN_ELITE_KNIGHT_FIRINGDURATION ; Duration of the sword swing
PreAttackType = PER_SHOT ; Do the delay each time we attack a new target

DamageNugget
Damage = MEN_ELITE_KNIGHT_DAMAGE
Radius = 10.0
DelayTime = 0
DamageType = MAGIC
DamageFXType = SWORD_SLASH
DeathType = NORMAL
End
End


И пропишем параметры в data\ini\gamedata.ini:

;------------------------ELITE_KNIGHT-------------
#define MEN_ELITE_KNIGHT_BUILDCOST 5000
#define MEN_ELITE_KNIGHT_BUILDTIME 60
#define MEN_ELITE_KNIGHT_HEALTH 1000
#define MEN_ELITE_KNIGHT_DAMAGED 300
#define MEN_ELITE_KNIGHT_HEALTH_RECOVERY_TIME 10000
#define MEN_ELITE_KNIGHT_VISION_RANGE 375
#define MEN_ELITE_KNIGHT_HORDE_VISION_RANGE 375
#define MEN_ELITE_KNIGHT_HORDE_SHROUD_RANGE 300

#define MEN_ELITE_KNIGHT_DAMAGE 400
#define MEN_ELITE_KNIGHT_PREATTACKDELAY 500
#define MEN_ELITE_KNIGHT_DELAYBETWEENSHOTS 1000
#define MEN_ELITE_KNIGHT_FIRINGDURATION 1000
#define MEN_ELITE_KNIGHT_BOUNTY_VALUE 150


Фактически всё. Осталось добавить их в найм Людям.
Для этого заходим в commandbutton.ini и вставляем туда это:

CommandButton Command_ConstructMenOathbreakersCavalryHorde
Command = UNIT_BUILD
Object = MenOathbreakersCavalryHorde
Options = NEED_UPGRADE CANCELABLE
NeededUpgrade = Upgrade_GondorStableLevel3
NeededUpgradeAny = Yes
TextLabel = CONTROLBAR:ConstructGondorCavalryHorde
ButtonImage = UCOathbreaker_OathTimer
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGondorCavalryHorde
Radial = Yes
InPalantir = Yes
ShowProductionCount = Yes
LacksPrerequisiteLabel = TOOLTIP:LackLevel3Stables
End


И последнее - commandset.ini. Там прописываем покупку на всех трёх уровнях постройки (заменить имеющиеся) и сами сеты юна и отряда (добавить):

CommandSet GondorStablesCommandSet
1 = Command_ConstructGondorKnightHorde
2 = Command_ConstructRohanRohirrimHorde
3 = Command_ConstructMenOathbreakersCavalryHorde
4 = Command_PurchaseUpgradeGondorStableLevel2
6 = Command_Sell
End

CommandSet GondorStablesCommandSetLevel2
1 = Command_ConstructGondorKnightHorde
2 = Command_ConstructRohanRohirrimHorde
3 = Command_ConstructMenOathbreakersCavalryHorde
4 = Command_PurchaseUpgradeGondorStableLevel3
6 = Command_Sell
End

CommandSet GondorStablesCommandSetLevel3
1 = Command_ConstructGondorKnightHorde
2 = Command_ConstructRohanRohirrimHorde
3 = Command_ConstructMenOathbreakersCavalryHorde
6 = Command_Sell
End

CommandSet MenEliteKnightCommandSet
1 = Command_ToggleStance
13 = Command_AttackMove
14 = Command_Stop
End

CommandSet MenEliteKnightHordeCommandSet
1 = Command_ToggleStance
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
End



На этом конец. Спасибо за внимание! =)
Проверял, у меня работает (бфме 2 версия 1.06).

*Внимание! Подробно я не расписывал, но если вам захочется узнать принцип, по которому сделаны сии иники юнита и отряда, то лишь сравнив их с иниками роханских всадников (data\ini\object\goodfaction\units\men\rohanrohirrim.ini и data\ini\object\goodfaction\hordes\men\menhordes.ini) вы всё поймёте.
Также в туторе не описано добавление иконок, портретов, текста к данным юнитам (взяты с армии мёртвых), ибо статьи про это здесь есть.


Tutorial by Mitrandir & Akrahil.
Копировать запрещено!



Оценить:
Просмотров: 3011 | Комментарии: 3 | Рейтинг: 4.2/5
Категория: Коддинг | Добавил: Akrahil (20.01.2013)
Теги: Кавалерия мёртвых
ПОХОЖИЕ МАТЕРИАЛЫ

Всего комментариев: 3
avatar
3 Akrahil • 18:02, 25.01.2013
Усе, исправил.
avatar
2 Mitrandir • 22:18, 24.01.2013
Акхо, ты бы постеснялся писать Tutorial by Akrahil.
Это мой тутор, почти слово в слово, лежал на ВоА.
avatar
1 Akrahil • 17:24, 25.01.2013
Мить, ты сам говорил, чтоб я написал свой вариант, тем более, что ВоА уже нет.=) И у тебя там вообще по-другому. Чайлд ты делал с дохлых, а всадники исчезали всё равно. Но всё же спасибо, за помощь в моддинге.)
avatar