Еще один тутор по тонкой настройке юнитов. Если это полезная инфа, можно закрепить здесь.
Сичевые Свитки - Статья - Как сделать конный юнит метателей огня
Начинаем с EDU. Находим нужного юнита. В качестве примера взяты Greek_Firethrowers
type Greek Firethrower
dictionary Greek_Firethrower ; Greek Firethrower
category infantry
class missile
voice_type Heavy
banner faction main_missile
banner holy crusade
soldier Greek_Firethrower, 16, 0, 1
attributes sea_faring, hide_forest, hardy, can_withdraw, cannot_skirmish, mercenary_unit
formation 1.2, 1.2, 2.4, 2.4, 2, square
stat_health 1, 0
stat_pri 18, 3, greek_fire, 30, 2, missile, missile_gunpowder, slashing, none, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap, bp
stat_sec 9, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 3, 4, 0, metal
;stat_armour_ex 3, 5, 0, 0, 4, 5, 3, metal
stat_sec_armour 0, 0, flesh
stat_heat 2
stat_ground 1, 0, 2, -2
stat_mental 11, normal, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 860, 150, 30, 75, 800, 2, 240
armour_ug_levels 2, 3
armour_ug_models Greek_Firethrower, Greek_Firethrower_ug1
ownership byzantium, slave
era 0 byzantium
era 1 byzantium
;unit_info 9, 18, 7
recruit_priority_offset 5
Скопируйте строку и вставьте в нижнюю часть файла, затем делаем правки.
type Mounted Greek Firethrowers
dictionary Mounted_Greek_Firethrowers ; Mounted Greek Firethrowers
category cavalry
class missile
voice_type Heavy
banner faction main_missile
banner holy crusade_cavalry
soldier Mounted_Greek_Firethrowers, 16, 0, 1
mount eastern armoured horse
mount_effect elephant -4, camel -4
attributes sea_faring, hide_forest, hardy, can_withdraw, cannot_skirmish, mercenary_unit
formation 1.2, 1.2, 2.4, 2.4, 2, square
stat_health 1, 0
stat_pri 18, 3, greek_fire, 30, 2, missile, missile_gunpowder, slashing, none, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap, bp
stat_sec 9, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 3, 4, 0, metal
;stat_armour_ex 3, 5, 0, 0, 4, 5, 3, metal
stat_sec_armour 0, 0, flesh
stat_heat 2
stat_ground 1, 0, 2, -2
stat_mental 11, normal, highly_trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 860, 150, 30, 75, 800, 2, 240
armour_ug_levels 2, 3
armour_ug_models Mounted_Greek_Firethrowers, Mounted_Greek_Firethrowers_ug1
ownership byzantium, slave
era 0 byzantium
era 1 byzantium
;unit_info 9, 18, 7
recruit_priority_offset 5
Можно изменить стоимость найма и поддержки.
Сохраните и откройте unit_models/battle_models.db, нам нужно жобвить::архивный номер сверху. Мы добавляем один новый юнит, с однократным апгрйдом брони, так что надо добавить два к выделенному числу.
22 serialization::archive 3 0 0 0 0 897 0 0
Находим наших greek_firethrowers, копируем всю строку и вставляем в нижнюю часть файла.
17 greek_firethrower
1
4
54 unit_models/_Units/ES_Mail/greek_firethrower_lod0.mesh 121
54 unit_models/_Units/ES_Mail/greek_firethrower_lod1.mesh 900
54 unit_models/_Units/ES_Mail/greek_firethrower_lod2.mesh 2500
54 unit_models/_Units/ES_Mail/greek_firethrower_lod3.mesh 6400
2
9 byzantium
66 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_byzantium.texture
63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
51 unit_sprites/byzantium_Greek_Firethrower_sprite.spr
4 merc
66 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_byzantium.texture
63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
51 unit_sprites/byzantium_Greek_Firethrower_sprite.spr
2
9 byzantium
61 unit_models/AttachmentSets/Final Greek_byzantium_diff.texture
61 unit_models/AttachmentSets/Final Greek_byzantium_norm.texture
0
4 merc
56 unit_models/AttachmentSets/Final Greek_merc_diff.texture
56 unit_models/AttachmentSets/Final Greek_merc_norm.texture
0
1
4 None
17 MTW2_Flamethrower
14 MTW2_Swordsman
1
21 MTW2_Arquebus_Primary
1
18 MTW2_Sword_Primary
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
21 greek_firethrower_ug1
1
3
71 unit_models/_Units/ES_Greek_Greek_Heavy/greek_firethrower_ug1_lod0.mesh 121
71 unit_models/_Units/ES_Greek_Greek_Heavy/greek_firethrower_ug1_lod1.mesh 1225
71 unit_models/_Units/ES_Greek_Greek_Heavy/greek_firethrower_ug1_lod2.mesh 6400
2
9 byzantium
80 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_byzantium.texture
77 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture
55 unit_sprites/byzantium_Greek_Firethrower_ug1_sprite.spr
4 merc
80 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_byzantium.texture
77 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture
55 unit_sprites/byzantium_Greek_Firethrower_ug1_sprite.spr
2
9 byzantium
61 unit_models/AttachmentSets/Final Greek_byzantium_diff.texture
61 unit_models/AttachmentSets/Final Greek_byzantium_norm.texture
0
4 merc
56 unit_models/AttachmentSets/Final Greek_merc_diff.texture
56 unit_models/AttachmentSets/Final Greek_merc_norm.texture
0
1
4 None
17 MTW2_Flamethrower
14 MTW2_Swordsman
1
21 MTW2_Arquebus_Primary
1
18 MTW2_Sword_Primary
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Теперь надо связать изменения со сделанными в EDU и сделать юнит конным
26 mounted_greek_firethrowers
1
4
54 unit_models/_Units/ES_Mail/greek_firethrower_lod0.mesh 121
54 unit_models/_Units/ES_Mail/greek_firethrower_lod1.mesh 900
54 unit_models/_Units/ES_Mail/greek_firethrower_lod2.mesh 2500
54 unit_models/_Units/ES_Mail/greek_firethrower_lod3.mesh 6400
2
9 byzantium
66 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_byzantium.texture
63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
51 unit_sprites/byzantium_Byzantine_Cavalry_sprite.spr
4 merc
66 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_byzantium.texture
63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
45 unit_sprites/merc_Albanian_Cavalry_sprite.spr
2
9 byzantium
61 unit_models/AttachmentSets/Final Greek_byzantium_diff.texture
61 unit_models/AttachmentSets/Final Greek_byzantium_norm.texture
0
4 merc
56 unit_models/AttachmentSets/Final Greek_merc_diff.texture
56 unit_models/AttachmentSets/Final Greek_merc_norm.texture
0
1
5 Horse
16 MTW2_HR_Arquebus
18 MTW2_HR_Non_Shield
1
24 MTW2_HR_Arquebus_Primary
1
18 MTW2_Sword_Primary
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
30 mounted_greek_firethrowers_ug1
1
3
71 unit_models/_Units/ES_Greek_Greek_Heavy/greek_firethrower_ug1_lod0.mesh 121
71 unit_models/_Units/ES_Greek_Greek_Heavy/greek_firethrower_ug1_lod1.mesh 1225
71 unit_models/_Units/ES_Greek_Greek_Heavy/greek_firethrower_ug1_lod2.mesh 6400
2
9 byzantium
80 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_byzantium.texture
77 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture
51 unit_sprites/byzantium_Byzantine_Cavalry_sprite.spr
4 merc
80 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_byzantium.texture
77 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture
45 unit_sprites/merc_Albanian_Cavalry_sprite.spr
2
9 byzantium
61 unit_models/AttachmentSets/Final Greek_byzantium_diff.texture
61 unit_models/AttachmentSets/Final Greek_byzantium_norm.texture
0
4 merc
56 unit_models/AttachmentSets/Final Greek_merc_diff.texture
56 unit_models/AttachmentSets/Final Greek_merc_norm.texture
0
1
5 Horse
16 MTW2_HR_Arquebus
18 MTW2_HR_Non_Shield
1
24 MTW2_HR_Arquebus_Primary
1
18 MTW2_Sword_Primary
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Автор использовал MTW2_HR_Arquebus, из-за отсутствия MTW2_HR_Flamethrower. (HR означает наездники на конях). Но это будет работать, так как аркебуза сходна по действию с огнеметом. Однако, будет слышен звук мушкета при выстреле.
Теперь юнит конный, и нам надо изменить спрайт для того, который уже конный. Если выбрать его из той же фракции с теми же цветами, будет нормально. Или можете использовать технику генерации спрайтов, если у вас есть плагин для gimp\photoshop.
Теперь пора протестировать юнита в кастом битве.
Text/export_units
{Mounted_Greek_Firethrowers}Mounted Greek Firethrowers
{Mounted_Greek_Firethrowers_descr} Add or copy a discription{Mounted_Greek_Firethrowers_descr_short}Add or copy short a discription
Если хотите, чтобы юнит нанимался, надо сделать запись в EDB. Автор добавил их только в королевские конюшни
recruit_pool "Mounted Greek Firethrowers" 1 0.3 1 0 requires factions { byzantium, }
1 = количество доступных юнитов в kings stables
0.3 = интервал обновления пула
1 = максимальное количество юнитов в пуле
0 = опыт, с которым юнит нанимается
Остается сделать инфокартинку.
Naffatun
Процесс может быть повторен с любым юнитом, если есть HR эквивалент анимации, который вы можете использовать в descr_skeleton. Рассмотрим запись для боевой модели mounted_naffatun
16 mounted_naffatun
1
3
62 unit_models/_Units/ME_Light_Mail_Heavy_Mail/naffatun_lod0.mesh 121
62 unit_models/_Units/ME_Light_Mail_Heavy_Mail/naffatun_lod1.mesh 1225
62 unit_models/_Units/ME_Light_Mail_Heavy_Mail/naffatun_lod2.mesh 6400
4
5 egypt
85 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_egypt.texture
86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
38 unit_sprites/egypt_Naffatun_sprite.spr
5 turks
85 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_turks.texture
86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
43 unit_sprites/turks_Turkomans_ug2_sprite.spr
7 mongols
87 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_mongols.texture
86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
40 unit_sprites/mongols_Naffatun_sprite.spr
8 timurids
88 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_timurids.
texture
86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
41 unit_sprites/timurids_Naffatun_sprite.spr
4
5 egypt
60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture
60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture
0
5 turks
60 unit_models/AttachmentSets/Final ME Heavy_turks_diff.texture
60 unit_models/AttachmentSets/Final ME Heavy_turks_norm.texture
0
7 mongols
62 unit_models/AttachmentSets/Final ME Heavy_mongols_diff.texture
62 unit_models/AttachmentSets/Final ME Heavy_mongols_norm.texture
0
8 timurids
63 unit_models/AttachmentSets/Final ME Heavy_timurids_diff.texture
63 unit_models/AttachmentSets/Final ME Heavy_timurids_norm.texture
0
1
5 Horse
15 MTW2_HR_Javelin
18 MTW2_HR_Non_Shield
1
23 MTW2_HR_Javelin_primary
1
18 MTW2_Sword_Primary
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
---
Оригинальное Авторство:
Некто Eothese (неизвестно с какого форума - ТВЦ или СиЧь)
История Происхождения:
Локальная копия оригинальной статьи, взятой мной из модоковальни M2TW на форуме СиЧь.