mặc dù không phải bác VA nhưng mình cũng liều mình hướng dẫn xem sao:
Để mình lấy ví dụ chuyển perioici hoplites của xgm sang vanilla (đối với các mod khác cũng tương tự):
Các file sẽ cần đến là: Data/export_descr_unit(edu), descr_model_battle(dmb), export_descr_unit_enums(edue), export_descr_buildings(edb), text/export_units(eu), export_descr_sounds_units_voice(edsuv) (cái file này ko cần thiết lắm)
B1: vào edu cùa xgm, tìm "greek hoplite spartan perioici", copy toàn bộ phần của nó vào edu của vanilla. Tức là:
type greek hoplite spartan perioici
dictionary greek_hoplite_spartan_perioici ; Spartan Hoplites/Perioici
category infantry
class heavy
voice_type Medium_1
soldier greek_spartan_hoplite, 50, 0, 1.5, 0.3
mount_effect horse +4, camel +4
attributes sea_faring, hide_forest, can_sap, very_hardy, mercenary_unit
formation 1, 1, 2, 2, 5, square, shield_wall
stat_health 1, 0
stat_pri 9, 4, no, 0, 0, melee, blade, piercing, spear, 25 ,1.0 ; Hoplite
stat_pri_attr no
stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1.0 ; no weapon
stat_sec_attr no
stat_pri_armour 6, 6, 5, leather
stat_sec_armour 0, 0, flesh
stat_heat 3
stat_ground -2, 0, -4, 0
stat_mental 14, disciplined, highly_trained
stat_charge_dist 30 ; Foot
stat_fire_delay 0
stat_food 60, 300
stat_cost 2, 1000, 500, 75, 150, 1000
ownership greek_cities, romans_brutii, slave
B2: vào dmb của xgm, tìm phần "soldier" của perioici hoplite trong edu, ở đây sẽ là "greek_spartan_hoplite", tức là tìm "greek_spartan_hoplite" trong dmb đó, copy toàn bộ phần này vào dmb của vanilla. Tức là:
type greek_spartan_hoplite
skeleton fs_s1_hoplite
indiv_range 40
texture greek_cities, xgm/data/models_unit/textures/unit_greek_spartan_hoplite_royal_atg.tga
texture romans_brutii, xgm/data/models_unit/textures/unit_greek_spartan_hoplite_royal_atg.tga
texture merc, xgm/data/models_unit/textures/unit_greek_spartan_hoplite_perioici_atg.tga
model_flexi_m xgm/data/models_unit/unit_greek_spartan_hoplite_high.cas, 15
model_flexi_m xgm/data/models_unit/unit_greek_spartan_hoplite_medium.cas, 30
model_flexi_m xgm/data/models_unit/unit_greek_spartan_hoplite_low.cas, 40
model_flexi xgm/data/models_unit/unit_greek_spartan_hoplite_lowest.cas, max
model_sprite merc, 60.0, xgm/data/sprites/greek_spartan_hoplite_sprite.spr
model_sprite greek_cities, 60.0, xgm/data/sprites/greek_cities_greek_spartan_hoplite_sprite.spr
model_sprite romans_brutii, 60.0, xgm/data/sprites/greek_cities_greek_spartan_hoplite_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
Để đề phòng khi bạn gỡ bỏ mod xgm, bạn hãy xóa hết phần xgm ở trên, sẽ thành như sau:
type greek_spartan_hoplite
skeleton fs_s1_hoplite
indiv_range 40
texture greek_cities, data/models_unit/textures/unit_greek_spartan_hoplite_royal_atg.tga
texture romans_brutii, data/models_unit/textures/unit_greek_spartan_hoplite_royal_atg.tga
texture merc, data/models_unit/textures/unit_greek_spartan_hoplite_perioici_atg.tga
model_flexi_m data/models_unit/unit_greek_spartan_hoplite_high.cas, 15
model_flexi_m data/models_unit/unit_greek_spartan_hoplite_medium.cas, 30
model_flexi_m data/models_unit/unit_greek_spartan_hoplite_low.cas, 40
model_flexi data/models_unit/unit_greek_spartan_hoplite_lowest.cas, max
model_sprite merc, 60.0, data/sprites/greek_spartan_hoplite_sprite.spr
model_sprite greek_cities, 60.0, data/sprites/greek_cities_greek_spartan_hoplite_sprite.spr
model_sprite romans_brutii, 60.0, xgm/data/sprites/greek_cities_greek_spartan_hoplite_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
Sau đó vào file "models_unit" trong Data, copy các file unit_greek_spartan_hoplite_high.cas, unit_greek_spartan_hoplite_medium.cas, data/models_unit/unit_greek_spartan_hoplite_low.cas, unit_greek_spartan_hoplite_lowest.cas, rồi vào texture trong models_unit copy file unit_greek_spartan_hoplite_royal_atg.tga(.dds) vào trong vanilla để hoàn thiện B2 (nếu chưa có file texture thì tạo ra bằng cách làm new folder rồi rename).
B3: Tiếp theo hãy mở file "export_descr_unit_enums" trong vanilla, kéo xuống tận cùng và điền như sau:
greek_hoplite_spartan_perioici
greek_hoplite_spartan_perioici_descr
greek_hoplite_spartan_perioici_descr_short
Tiếp đến là vào "export_unit" trong xgm/Data/text, tìm "greek_hoplite_spartan_perioici", copy toàn bộ phần
{greek_hoplite_spartan_perioici} Perioikoi Hoplites
{greek_hoplite_spartan_perioici_descr}
The Perioikoi are the free men of Lakedaimonia, the lands surrounding Sparta, but not full citizens of Sparta itself. Trained in all the Spartan ways of war, they are among the finest soldiers in mainland Greece, though they are not subject to the harsh educational regime that turns Spartan boys into perfect soldiers. \n\nOver the centuries the numbers of Spartan citizens has dwindled so that the Perioici now make up the bulk of Sparta's heavy infantry. They fight in the traditional style as hoplites, armed with the xyston (a long thrusting spear) and aspis (a large round shield), and in a densely packed phalanx formation.
{greek_hoplite_spartan_perioici_descr_short}
Perioikoi Hoplites are recruited from the free men of Lakedaimonia, the lands surrounding Sparta.
¬----------------
vào export_unit của vanilla và hoàn thành B3.
B4: vào edb của xgm, copy toàn bộ các hàng ngang có liên quan đến "greek hoplite spartan perioici" (ấn Ctrl+F mà tìm cho nhanh) rồi copy các hàng đó vào chỗ tương ứng của edb trong vanilla.
B5: Vào UI của xgm, rồi UNIT_INFO/mercs, copy "GREEK_HOPLITE_SPARTAN_PERIOICI_INFO" và trong UNITS/mercs copy "#GREEK_HOPLITE_SPARTAN_PERIOICI" lần lượt vào trong UI/UNIT_INFO/GREEK_CITIES và UI/UNITS/GREEK_CITIES của vanilla (chưa có thì cũng tạo ra)
B6: Không quan trọng lắm, nhưng để cho lính có thể kêu "men of Sparta" hoặc là "Spartan Hoplites" khi mình click vào, hãy vào edsuv của vanilla, tìm "greek hoplite spartan", đánh dấu phẩy rồi ghi "greek hoplite spartan perioici" vào bên cạnh. sẽ có đến 3,4 cái "greek hoplite spartan", tùy thuộc vào voice_type của lính được ghi trong edu nên bạn hãy ghi tìm và copy hết cho an toàn.
Mình đã cố gắng giải thích cho dễ hiểu và các tên ở unit trong mỗi bước, bác nào thông minh thì sẽ nhận ra được nó ở phần nào trong file edu, và dùng cách này áp dụng với các unit khác. Làm cái này tuy hơi mất thời gian, nhưng mình cũng muốn người Việt mình có những hiểu biết ban đầu về mod RTW, trước khi làm nhớ tạo back ups cho những file ở trên và nhớ tạo show_err cho an toàn. Nhớ feed back nếu có bước nào ko ổn nhé
