Jak utworzyć jednostkę spieszoną

Tłumaczenie z twcenter (nie ja napisałem tego tutoriala i w żadnym wypadku nie roszczę sobie do niego praw, a że autor narobił strasznej sieczki językowej to spróbowałem to jakoś wygładzić i poskracać co się da jako że obszerne wstawki kodu nam zaserwowano):

Tutorial napisany przez Zorgrath, oryginał znajdziecie http://www.twcenter.net/forums/showthread.php?t=78236

Zorgrath podaje jako przykład Dismounted Norse War Clerics. Jego gotową pracę możecie znaleźć tu: http://www.box.net/public/bjdeyskm7g


"Dobra, zacznijmy od utworzenia folderu pod dowolną nazwą, w moim przypadku nawałem katalog: "dismounted norse war clerics". Teraz wchodzimy do środka naszego katalogu, tam tworzymy następny folder i nazywamy go "data". Następnie znów wchodzimy do utworzonego katalogu (dismounted norse war clerics\data) i tworzymy cztery dalsze podkatalogi nazywając je odpowiednio

text
ui
unit_models
unit_sprites
Po pierwsze musisz mieć rozpakowane pliki z gry (Unpacker dostępny jest w patchu 1.1)
Po rozpakowaniu w katalogu Medieval II Total War\data pojawi się znacznie więcej plików niż było do tej pory. Teraz odszukaj dwa pliki tekstowe (znajdują się w katalogu data gry)


export_descr_buildings.txt
export_descr_unit.txt
a następnie skopiuj je do utworzonego katalogu dismounted norse war clerics\data.

Teraz w oryginalnym folderze data (Medieval II Total War\data) odszukujemy katalog nazwany unit_models, wewnątrz powinieneś znaleźć plik battle_models.modeldb, skopiuj ten plik do nowo utworzonego katalogu dismounted norse war clerics\data\unit_models. Następnie w swoim folderze unit_models utwórz następny katalog i nazwij go _units, poczym wejdź do niego i utwórz następny katalog pod nazwą en_pplate_plate (ścieżka powinna wyglądać tak: dismounted norse war clerics\data\unit_models\_units\en_pplate_plate). Dalej, w oryginalnym folderze gry Medieval II Total War\data\unit_models\_units\en_pplate_plate odszukaj te pliki

armored_clergy_lod0.mesh
armored_clergy_lod1.mesh
armored_clergy_lod2.mesh
armored_clergy_ug_lod.mesh
armored_clergy_ug1_lod1.mesh
armored_clergy_ug1_lod2.mesh
i przekopiuj je do odpowiedniego katalogu swojego moda (dismounted norse war clerics\data\unit_models\_units\en_pplate_plate). Teraz zmień nazwę każdego z tych plików przez dodanie im wyrażenia dismounted_ przed nazwą, np: dismounted_armored_clergy_lod2.mesh

Następnie oryginalnym folderze gry data\unit_sprites odszukaj pliki

denmark_armored_clergy_sprite.spr
denmark_armored_clergy_ug1_sprite.spr
i przekopiuj je do odpowiedniego katalogu swojego moda (dismounted norse war clerics\data\unit_sprites), po czym dodaj do nazwy wyraz _dismounted pomiędzy wyrazy denmark
a _armored. Powinno to wyglądać tak:


denmark_dismounted_armored_clergy_sprite.spr
denmark_dismounted_armored_clergy_ug1_sprite.spr
Teraz przejdź do folderu ui w swoim modzie (dismounted norse war clerics\data\ui), tam utwórz dwa następne podkatalogi

unit_info
units


W obydwu utworzonych podkatalogach utwórz następny folder i nazwij go denmark. W oryginalnym katalogu gry Medieval II Total War\data\ui\unit_info\denmark odszukaj a następnie skopiuj do odpowiedniego katalogu moda, plik

armored_clergy_info.tga
i zmień jego nazwę na

dismounted_armored_clergy_info.tga
Teraz w oryginalnym folderze gry data\ui\unit_info\denmark odszukaj i skopiuj do odpowiedniego katalogu moda plik

#armored_clergy.tga
oraz zmień nazwę na

#dismounted_armored_clergy.tga
Teraz przejdźmy do obróbki zawartości plików. Żeby cokolwiek zdziałać musisz przekonwertować pliki ".txt.strings.bin" żeby to zrobić musisz pobrać .strings.bin converter
stąd!!!!!!!!!!
(dopisek tłumacza: żeby bawić się tym konwerterem musicie mieć zainstalowanego Pythona 2.5 http://www.python.org/download. Po zainstalowaniu Pythona kopiujecie zawartość archiwum strings_bin_converter 0.72.rar do katalogu data\text w katalogu Medievala i uderzacie convert_all.bat)

W folderze text znajdziesz teraz nowy plik export_units.txt. Skopiuj ten plik to folderu text swojego moda (dismounted norse war clerics\data\text). Teraz możemy rozpocząć edycję:
Zacznijmy od pliku export_descr_unit.txt, a oto co będziemy zmieniać:


type Armored Clergy
dictionary Armored_Clergy ; Norse War Clerics
category cavalry
class heavy
voice_type Heavy
banner faction main_cavalry
banner holy crusade_cavalry
soldier Armored_Clergy, 32, 0, 1
mount mailed horse
mount_effect elephant -4, camel -4
attributes sea_faring, hide_forest, can_withdraw, can_formed_charge, knight
formation 2, 4.4, 3, 6, 2, square, wedge
stat_health 1, 0
stat_pri 10, 4, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 8, 7, 4, metal
;stat_armour_ex 8, 9, 0, 0, 7, 4, 4, metal
stat_sec_armour 0, 0, flesh
stat_heat 6
stat_ground 0, -2, -4, 0
stat_mental 9, normal, trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 750, 250, 120, 95, 750, 4, 180
armour_ug_levels 4, 5
armour_ug_models Armored_Clergy, Armored_Clergy_ug1
ownership denmark
era 2 denmark
;unit_info 10, 0, 19

UWAGA!!: na niebiesko oznaczam to co będzie modyfikowane, na czerwono to co zostało zmienione (dodane), a nawiasy ;( ); oznaczają uwagi.


type Armored Clergy
dictionary Armored_Clergy ; Norse War Clerics
category cavalry

class heavy
voice_type Heavy
banner faction main_cavalry
banner holy crusade_cavalry
soldier Armored_Clergy;(to tutaj przełącza animację jednostek, nie ja to sprawdzałem));, 32, 0, 1
mount mailed horse ;(ten wpis zostanie usunięty jako że robimy jednostkę spieszoną);
mount_effect elephant -4, camel -4;(ten wpis zostanie usunięty jako że robimy jednostkę spieszoną);

attributes sea_faring, hide_forest, can_withdraw, can_formed_charge, knight
formation 2, 4.4, 3, 6, 2, square, wedge;(ten wpis kontroluje "grubość" formacji oraz jej kształt);
stat_health 1, 0
stat_pri 10, 4, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 8, 7, 4, metal
;stat_armour_ex 8, 9, 0, 0, 7, 4, 4, metal
stat_sec_armour 0, 0, flesh
stat_heat 6
stat_ground 0, -2, -4, 0
stat_mental 9, normal, trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 750, 250, 120, 95, 750, 4, 180
armour_ug_levels 4, 5
armour_ug_models Armored_Clergy, Armored_Clergy_ug1;(ten wpis kontroluje siatkę (szkielet) opancerzenia i jego upgrade);ownership denmark
era 2 denmark
;unit_info 10, 0, 19
A tak powinno to wyglądać po edycji, od razu z uwzględnieniem statystyk jednostek ect ect

type Armored Clergy
dictionary Armored_Clergy ; Norse War Clerics
category cavalry
class heavy
voice_type Heavy
banner faction main_cavalry
banner holy crusade_cavalry
soldier Armored_Clergy, 32, 0, 1
mount mailed horse
mount_effect elephant -4, camel -4
attributes sea_faring, hide_forest, can_withdraw, can_formed_charge, knight
formation 2, 4.4, 3, 6, 2, square, wedge
stat_health 1, 0
stat_pri 10, 4, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 8, 7, 4, metal
;stat_armour_ex 8, 9, 0, 0, 7, 4, 4, metal
stat_sec_armour 0, 0, flesh
stat_heat 6
stat_ground 0, -2, -4, 0
stat_mental 9, normal, trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 750, 250, 120, 95, 750, 4, 180
armour_ug_levels 4, 5
armour_ug_models Armored_Clergy, Armored_Clergy_ug1
ownership denmark
era 2 denmark
;unit_info 10, 0, 19
type Dismounted Armored Clergy
dictionary Dismounted_Armored_Clergy ; Dismounted Norse War Clerics
category infantry
class heavy
voice_type Heavy
banner faction main_cavalry
banner holy crusade_cavalry
soldier Dismounted_Huscarls, 46, 0, 1
attributes sea_faring, hide_forest, can_withdraw
formation 1.2, 1.2, 2.4, 2.4, 6, square
stat_health 1, 0
stat_pri 10, 4, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 8, 7, 4, metal
;stat_armour_ex 8, 9, 0, 0, 7, 4, 4, metal
stat_sec_armour 0, 0, flesh
stat_heat 6
stat_ground 0, -2, -4, 0
stat_mental 9, normal, trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 750, 250, 120, 95, 750, 4, 180
armour_ug_levels 4, 5
armour_ug_models Dismounted_Armored_Clergy, Dismounted_Armored_Clergy_ug1
ownership denmark
era 2 denmark
;unit_info 10, 0, 19
i to by było na tyle jeśli chodzi o plik export_descr_unit.txt

Teraz przejdźmy do export_descr_buildings.txt, to mamy w oryginale:

abbey city requires factions { normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain,

sicily, milan, }
{
capability
{
agent priest 0 requires factions { normans, denmark, scotland, hre, france, england, }
agent priest 0 requires factions { hungary, poland, }
agent priest 0 requires factions { papal_states, portugal, spain, sicily, milan, venice, }
recruit_pool "Armored Clergy" 1 0.2 2 0 requires factions { denmark, }
happiness_bonus bonus 2
religion_level bonus 3
agent_limit priest 2
pope_disapproval 1
}
material wooden
construction 3
cost 3200
settlement_min city
upgrades
{
cathedral
}
}
a tak to powinno wyglądać po edycji

abbey city requires factions { normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain,

sicily, milan, }
{
capability
{
agent priest 0 requires factions { normans, denmark, scotland, hre, france, england, }
agent priest 0 requires factions { hungary, poland, }
agent priest 0 requires factions { papal_states, portugal, spain, sicily, milan, venice, }
recruit_pool "Armored Clergy" 1 0.2 2 0 requires factions { denmark, }
recruit_pool "Dismounted Armored Clergy" 1 0.2 2 0 requires factions { denmark, }
happiness_bonus bonus 2
religion_level bonus 3
agent_limit priest 2
pope_disapproval 1
}
material wooden
construction 3
cost 3200
settlement_min city
upgrades
{
cathedral
}
}
Teraz przechodzimy do pliku export_units.txt, zauważ że wpisy w tym pliku są w kolejności alfabetycznej, więc wpis dismounted_armored_clergy powinien znaleźć się pomiędzy Dismounted_Archers a Dismounted_Boyar_Sons.
Tu zaczynamy:


{Armored_Clergy}Norse War Clerics
{Armored_Clergy_descr}Scandinavian Bishops are not your average men of the cloth. These clerics when roused to righteous anger would ritually place upon their altar their cassock and mitre and gird themselves with the accoutrements of war. Leading a retinue to rival a king, these clerics are outlawed in Sweden but still deliver holy chastisement to the foes of Denmark
{Armored_Clergy_descr_short}Heavily armoured Bishop and cavalry retinue. Encased in plate armour and wielding foe-crushing maces
a to otrzymujemy po edycji:

{Armored_Clergy}Norse War Clerics
{Armored_Clergy_descr}Scandinavian Bishops are not your average men of the cloth. These clerics when roused to righteous anger would ritually place upon their altar their cassock and mitre and gird themselves with the accoutrements of war. Leading a retinue to rival a king, these clerics are outlawed in Sweden but still deliver holy chastisement to the foes of Denmark
{Armored_Clergy_descr_short}Heavily armoured Bishop and cavalry retinue. Encased in plate armour and wielding foe-crushing maces
{Dismounted_Armored_Clergy}Dismounted Norse War Clerics
{Dismounted_Armored_Clergy_descr}Scandinavian Bishops are not your average men of the cloth. These clerics when roused to righteous anger would ritually place upon their altar their cassock and mitre and gird themselves with the accoutrements of war. Leading a retinue to rival a king, these clerics are outlawed in Sweden but still deliver holy chastisement to the foes of Denmark
{Dismounted_Armored_Clergy_descr_short}Heavily armoured Bishop and infantry retinue. Encased in plate armour and wielding foe-crushing maces
Teraz przechodzimy do pliku battle_models.modeldb UWAGA!!!: __ oznacza 2 spacje.
tak zaczynamy:


14 armored_clergy
1 3
59 unit_models/_Units/EN_Pplate_Plate/armored_clergy_lod0.mesh 121
59 unit_models/_Units/EN_Pplate_Plate/armored_clergy_lod1.mesh 1225
59 unit_models/_Units/EN_Pplate_Plate/armored_clergy_lod2.mesh 6400
1 7 denmark
74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture 73
unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 46
unit_sprites/denmark_Armored_Clergy_sprite.spr
1 7 denmark
66 unit_models/AttachmentSets/Final Priest Heads_denmark_diff.texture
66 unit_models/AttachmentSets/Final Priest Heads_denmark_norm.texture
0__1 5 Horse
12 MTW2_HR_Mace
0__2 17 MTW2_Mace_Primary
14 fs_test_shield
0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
18 armored_clergy_ug1
1 3
63 unit_models/_Units/EN_Pplate_Plate/armored_clergy_ug1_lod0.mesh 121
63 unit_models/_Units/EN_Pplate_Plate/armored_clergy_ug1_lod1.mesh 1225
63 unit_models/_Units/EN_Pplate_Plate/armored_clergy_ug1_lod2.mesh 6400
1 7 denmark
74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture 73
unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
50 unit_sprites/denmark_Armored_Clergy_ug1_sprite.spr 1 7 denmark
66 unit_models/AttachmentSets/Final Priest Heads_denmark_diff.texture
66 unit_models/AttachmentSets/Final Priest Heads_denmark_norm.texture
0__1 5 Horse
12 MTW2_HR_Mace
0__2 17 MTW2_Mace_Primary
14 fs_test_shield
0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
a tak kończymy:

14 armored_clergy
1 3
59 unit_models/_Units/EN_Pplate_Plate/armored_clergy_lod0.mesh 121
59 unit_models/_Units/EN_Pplate_Plate/armored_clergy_lod1.mesh 1225
59 unit_models/_Units/EN_Pplate_Plate/armored_clergy_lod2.mesh 6400
1 7 denmark
74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture 73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 46 unit_sprites/denmark_Armored_Clergy_sprite.spr
1 7 denmark
66 unit_models/AttachmentSets/Final Priest Heads_denmark_diff.texture
66 unit_models/AttachmentSets/Final Priest Heads_denmark_norm.texture
0__1 5 Horse
12 MTW2_HR_Mace
0__2 17 MTW2_Mace_Primary
14 fs_test_shield
0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
18 armored_clergy_ug1
1 3
63 unit_models/_Units/EN_Pplate_Plate/armored_clergy_ug1_lod0.mesh 121
63 unit_models/_Units/EN_Pplate_Plate/armored_clergy_ug1_lod1.mesh 1225 63 unit_models/_Units/EN_Pplate_Plate/armored_clergy_ug1_lod2.mesh 6400
1 7 denmark
74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture 73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 50 unit_sprites/denmark_Armored_Clergy_ug1_sprite.spr
1 7 denmark
66 unit_models/AttachmentSets/Final Priest Heads_denmark_diff.texture
66 unit_models/AttachmentSets/Final Priest Heads_denmark_norm.texture
0__1 5 Horse
12 MTW2_HR_Mace
0__2 17 MTW2_Mace_Primary
14 fs_test_shield
0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
25 dismounted_armored_clergy
1 3
70unit_models/_Units/EN_Pplate_Plate/dismounted_armored_clergy_lod0.mesh 121
70 unit_models/_Units/EN_Pplate_Plate/dismounted_armored_clergy_lod1.mesh 1225
70 unit_models/_Units/EN_Pplate_Plate/dismounted_armored_clergy_lod2.mesh 6400
1 7 denmark
74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture
73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
57 unit_sprites/denmark_dismounted_Armored_Clergy_sprite.spr 1 7 denmark
66 unit_models/AttachmentSets/Final Priest Heads_denmark_diff.texture
66 unit_models/AttachmentSets/Final Priest Heads_denmark_norm.texture
0__1 4 none
12 MTW2_HR_Mace
0__2 17 MTW2_Mace_Primary
14 fs_test_shield
0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
29 dismounted_armored_clergy_ug1
1 3
74 unit_models/_Units/EN_Pplate_Plate/dismounted_armored_clergy_ug1_lod0.mesh 121
74 unit_models/_Units/EN_Pplate_Plate/dismounted_armored_clergy_ug1_lod1.mesh 1225
74 unit_models/_Units/EN_Pplate_Plate/dismounted_armored_clergy_ug1_lod2.mesh 6400
1 7 denmark
74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture
73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
61 unit_sprites/denmark_dismounted_Armored_Clergy_ug1_sprite.spr
1 7 denmark
66 unit_models/AttachmentSets/Final Priest Heads_denmark_diff.texture
66 unit_models/AttachmentSets/Final Priest Heads_denmark_norm.texture
0__1 4 none
12 MTW2_HR_Mace
0__2 17 MTW2_Mace_Primary
14 fs_test_shield
0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Iiiiii ostatnia rzecz, katalog UI!!!!!
Zacznijmy od znalezienia w oryginalnym folderze Medievala katalogu data\ui\units\denmark i zlokalizowaniu pliku #armored_clergy.tga, skopiujmy go do odpowiedniego folderu naszego moda dismounted norse war clerics\data\ui\units\denmark a następnie zmieniamy nazwę na #dismounted_armored_clergy.tga.
Następnie edytujemy plik np: Photoshopem, (gotowe ikony zrobione przez autora tego tutoriala można złapać http://img181.imageshack.us/img181/788/ ... rgyno7.jpg (trzeba oczywiście najpierw przekonwertować plik na format .tga np przy pomocy IrfanView)

Teraz przechodzimy do katalogu Medievala data\ui\unit_info\denmark i kopiujemy oryginalny plik armored_clergy_info.tga do katalogu moda dismounted norse war clerics\data\ui\unit_info\denmark zmieniając nazwę na dismounted_armored_clergy_info.tga
i ponownie edytujemy plik przy użyciu np: Photoshopa, jeśli natomiast nie znasz się na tyle na tym programie żeby ręcznie przerobić rysunek, możesz to zrobić tak: uruchom grę ze świeżo utworzoną jednostką, ustaw detale na maksymalne, wejdź w tryb rozgrywki Custom Battle i wybierz nową jednostkę na mapie z grubsza przypominającą okolicę pochodzenia żołnierzy, zrób ładnego zooma kamerą i cyknij screenshota (klawisz Print Screen). Następnie przy pomocy dowolnego programu graficznego wklejamy go w ramkę i konwertujemy na format .tga

Słowo końcowe: PAMIĘTAJ!!! żeby uruchomić grę z nową jednostką musisz użyć io albo mod switch POWODZENIA !!

Posłowie:
mam nadzieję że to tłumaczenie wam pomoże i wyjaśni parę spraw, jak każdy inny przekład ten też jest jak kobieta, wierny nie jest piękny, a piękny nie jest wierny.


Autor: me99