中世纪2MOD之间兵种移植教程
本帖最后由 alewthia 于 2013-6-27 11:34 编辑以将女兵国MOD中的黛安娜长弓中队移入汉之殇曹操势力为例
首先安装中世纪2的女兵国MOD,所有文件均在MundusInvictus文件夹下
1、模型建立
打开MundusInvictus\data\unit_models下的battle_models.modeldb
搜索gongmm找到以下字段
6 gongmm
1
4
38 unit_models/_Units/xf/gongmm_lod0.mesh 121
38 unit_models/_Units/xf/gongmm_lod0.mesh 900
38 unit_models/_Units/xf/gongmm_lod0.mesh 2500
38 unit_models/_Units/xf/gongmm_lod0.mesh 6400
1
4 merc
45 unit_models/_Units/xf/textures/gongmm.texture
52 unit_models/_Units/xf/textures/gongmm_normal.texture
42 unit_sprites/france_Scots_Guard_sprite.spr
1
4 merc
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
16 MTW2_Fast_Bowman
14 MTW2_Swordsman 2
19 MTW2_Bowman_Primary
14 fs_test_shield 2
18 MTW2_Sword_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
8 gongmmup
1
4
40 unit_models/_Units/xf/gongmmup_lod0.mesh 121
40 unit_models/_Units/xf/gongmmup_lod0.mesh 900
40 unit_models/_Units/xf/gongmmup_lod0.mesh 2500
40 unit_models/_Units/xf/gongmmup_lod0.mesh 6400
1
4 merc
47 unit_models/_Units/xf/textures/gongmmup.texture
54 unit_models/_Units/xf/textures/gongmmup_normal.texture
42 unit_sprites/france_Scots_Guard_sprite.spr
1
4 merc
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
16 MTW2_Fast_Bowman
14 MTW2_Swordsman 1
19 MTW2_Bowman_Primary
2
18 MTW2_Sword_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
10 gongmmupsv
1
4
40 unit_models/_Units/xf/gongmmup_lod0.mesh 121
40 unit_models/_Units/xf/gongmmup_lod0.mesh 900
40 unit_models/_Units/xf/gongmmup_lod0.mesh 2500
40 unit_models/_Units/xf/gongmmup_lod0.mesh 6400
1
4 merc
50 unit_models/_Units/xf/textures/gongmmup_sv.texture
57 unit_models/_Units/xf/textures/gongmmup_sv_normal.texture
42 unit_sprites/france_Scots_Guard_sprite.spr
1
4 merc
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
16 MTW2_Fast_Bowman
14 MTW2_Swordsman 1
19 MTW2_Bowman_Primary
2
18 MTW2_Sword_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
10 gongmmupwh
1
4
40 unit_models/_Units/xf/gongmmup_lod0.mesh 121
40 unit_models/_Units/xf/gongmmup_lod0.mesh 900
40 unit_models/_Units/xf/gongmmup_lod0.mesh 2500
40 unit_models/_Units/xf/gongmmup_lod0.mesh 6400
1
4 merc
50 unit_models/_Units/xf/textures/gongmmup_wh.texture
57 unit_models/_Units/xf/textures/gongmmup_wh_normal.texture
42 unit_sprites/france_Scots_Guard_sprite.spr
1
4 merc
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
16 MTW2_Fast_Bowman
14 MTW2_Swordsman 1
19 MTW2_Bowman_Primary
2
18 MTW2_Sword_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
复制并修改到汉之殇的对应目录下的battle_models.modeldb
6 gongmm
1
4
38 unit_models/_Units/xf/gongmm_lod0.mesh 121
38 unit_models/_Units/xf/gongmm_lod0.mesh 900
38 unit_models/_Units/xf/gongmm_lod0.mesh 2500
38 unit_models/_Units/xf/gongmm_lod0.mesh 6400
1
6 france(france=曹操势力)
45 unit_models/_Units/xf/textures/gongmm.texture
52 unit_models/_Units/xf/textures/gongmm_normal.texture
42 unit_sprites/france_scots_guard_sprite.spr
1
6 france
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
11 MTW2_Bowman
9 MTW2_Mace 2
19 MTW2_Bowman_Primary
14 fs_test_shield 2
17 MTW2_Mace_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
8 gongmmup
1
4
40 unit_models/_Units/xf/gongmmup_lod0.mesh 121
40 unit_models/_Units/xf/gongmmup_lod0.mesh 900
40 unit_models/_Units/xf/gongmmup_lod0.mesh 2500
40 unit_models/_Units/xf/gongmmup_lod0.mesh 6400
1
6 france
47 unit_models/_Units/xf/textures/gongmmup.texture
54 unit_models/_Units/xf/textures/gongmmup_normal.texture
42 unit_sprites/france_Scots_Guard_sprite.spr
1
6 france
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
11 MTW2_Bowman
9 MTW2_Mace 2
19 MTW2_Bowman_Primary
14 fs_test_shield 2
17 MTW2_Mace_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
10 gongmmupsv
1
4
40 unit_models/_Units/xf/gongmmup_lod0.mesh 121
40 unit_models/_Units/xf/gongmmup_lod0.mesh 900
40 unit_models/_Units/xf/gongmmup_lod0.mesh 2500
40 unit_models/_Units/xf/gongmmup_lod0.mesh 6400
1
6 france
50 unit_models/_Units/xf/textures/gongmmup_sv.texture
57 unit_models/_Units/xf/textures/gongmmup_sv_normal.texture
42 unit_sprites/france_Scots_Guard_sprite.spr
1
6 france
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
11 MTW2_Bowman
9 MTW2_Mace 2
19 MTW2_Bowman_Primary
14 fs_test_shield 2
17 MTW2_Mace_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
10 gongmmupwh
1
4
40 unit_models/_Units/xf/gongmmup_lod0.mesh 121
40 unit_models/_Units/xf/gongmmup_lod0.mesh 900
40 unit_models/_Units/xf/gongmmup_lod0.mesh 2500
40 unit_models/_Units/xf/gongmmup_lod0.mesh 6400
1
6 france
50 unit_models/_Units/xf/textures/gongmmup_wh.texture
57 unit_models/_Units/xf/textures/gongmmup_wh_normal.texture
42 unit_sprites/france_Scots_Guard_sprite.spr
1
6 france
70 unit_models/AttachmentSets/Final European Archer_gongmmup_diff.texture
70 unit_models/AttachmentSets/Final European Archer_gongmmup_norm.texture 0
1
4 None
11 MTW2_Bowman
9 MTW2_Mace 2
19 MTW2_Bowman_Primary
14 fs_test_shield 2
17 MTW2_Mace_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
然后将文件第一行的
22 serialization::archive 3 0 0 0 0 255 0 0
修改为
22 serialization::archive 3 0 0 0 0 259 0 0(意思为,模型总数量259,共增加4个,有3个模型为升级模型)
复制及修改时切忌注意空格、字符,必须完全一致,否则导致跳出!
同时将对应的模型文件、骨骼、皮肤及动作文件复制到汉之殇对应目录(就是后缀名为mesh、spr、texture的文件)
2、兵种建立
打开MundusInvictus\data下的export_descr_unit.txt,搜索gongmm,找到以下字段
type gongmm
dictionary gongmm ; Scots Guard
category infantry
class missile
voice_type Light
banner faction main_missile
banner holy crusade
soldier gongmm, 48, 0, 1
attributes sea_faring, hide_forest, hardy, can_withdraw, mercenary_unit
formation 1.2, 1.2, 2.4, 2.4, 2, square
stat_health 1, 0
stat_pri 9, 3, arrow, 160, 30, missile, missile_mechanical, piercing, none, -25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap, bp,area
stat_sec 12, 3, no, 0, 0, melee, melee_blade, piercing, sword, -25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr ap
stat_pri_armour0, 3, 6, flesh
;stat_armour_ex 0, 4, 5, 7, 3, 6, 6, flesh
stat_sec_armour0, 0, flesh
stat_heat 2
stat_ground 1, -2, 3, 2
stat_mental 5, normal, untrained
stat_charge_dist 40
stat_fire_delay0
stat_food 60, 300
stat_cost 1, 480, 155, 85, 65, 480, 4, 120
armour_ug_levels 0, 1, 2, 3
armour_ug_models gongmm, gongmmupwh, gongmmupsv, gongmmup
ownership northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european
era 0 northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european
era 1 northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european
era 2 northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european
;unit_info 16, 13, 18
复制并修改为
type gongmm
dictionary gongmm ; Scots Guard
category infantry
class missile
voice_type Light
banner faction main_missile
banner holy crusade
soldier gongmm, 48, 0, 1
attributes sea_faring, hide_anywhere, very_hardy, can_withdraw, stakes(添加木桩啊)
formation 1.2, 1.2, 2.4, 2.4, 2, square
stat_health 1, 0
stat_pri 9, 3, arrow, 160, 30, missile, missile_mechanical, piercing, none, -25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr no
stat_sec 12, 3, no, 0, 0, melee, melee_blade, piercing, sword, -25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour6, 3, 0, flesh
;stat_armour_ex 0, 4, 5, 7, 3, 6, 6, flesh
stat_sec_armour0, 0, flesh
stat_heat 2
stat_ground 1, -2, 3, 2
stat_mental 15, disciplined, highly_trained
stat_charge_dist 40
stat_fire_delay0
stat_food 60, 300
stat_cost 1, 1200, 650, 85, 65, 480, 4, 120
armour_ug_levels 0, 1, 2, 3
armour_ug_models gongmm, gongmmupwh, gongmmupsv, gongmmup
ownership france
era 0 france
era 1 france
era 2 france
;unit_info 16, 13, 18
同样注意字符及空格!
3、兵牌建立
将MundusInvictus\data\ui\unit_info\merc下的gongmm_info.tga复制到汉之殇data\ui\unit_info\france下
将MundusInvictus\data\ui\unit\merc下的#gongmm.tga复制到汉之殇data\ui\unit\france下
4、兵种说明
打开i汉之殇\data\text的export_units.txt,在最后添加
{gongmm}妖姬
{gongmm_descr}妖姬
{gongmm_descr_short}妖姬
5、添加生产兵种的建筑
打开汉之殇data下的export_descr_buildings.txt,搜索到以下字符
;弓兵营(一级)
building missiles
{
levels bowyer practice_range archery_range marksmans_range
{
bowyer requires factions { middle_eastern, egypt, cumans, mongols, }
{
capability
{
recruit_pool "yijungong"1 0.50 30requires factions { england, france, hre, spain, hungary, denmark, poland, venice, milan, sicily, scotland, byzantium, russia,portugal, turks,papal_states, aragon, norway, kievan_rus, } and event_counter taofadongzhuo 1
recruit_pool "SYsheshou"1 0.50 20requires factions { cumans, }
recruit_pool "Mongol Foot Archers"1 0.25 40requires factions { mongols, }
recruit_pool "Nanmangongshou"1 0.25 40requires factions { egypt, }
}
material wooden
construction1
cost500
settlement_min town
upgrades
{
practice_range
}
}
修改为
;弓兵营(一级)
building missiles
{
levels bowyer practice_range archery_range marksmans_range
{
bowyer requires factions { middle_eastern, egypt, cumans, mongols, }
{
capability
{
recruit_pool "yijungong"1 0.50 30requires factions { england, france, hre, spain, hungary, denmark, poland, venice, milan, sicily, scotland, byzantium, russia,portugal, turks,papal_states, aragon, norway, kievan_rus, } and event_counter taofadongzhuo 1
recruit_pool "SYsheshou"1 0.50 20requires factions { cumans, }
recruit_pool "Mongol Foot Archers"1 0.25 40requires factions { mongols, }
recruit_pool "Nanmangongshou"1 0.25 40requires factions { egypt, }
recruit_pool "gongmm"1 1 40requires factions { france, }
}
material wooden
construction1
cost500
settlement_min town
upgrades
{
practice_range
}
}
同样二、三、四级弓兵营修改为
practice_range requires factions { middle_eastern, egypt, cumans, mongols, }
{
capability
{
recruit_pool "yijungong"1 0.50 31requires factions { england, france, hre, spain, hungary, denmark, poland, venice, milan, sicily, scotland, byzantium, russia,portugal, turks,papal_states, aragon, norway, kievan_rus, } and event_counter taofadongzhuo 1
recruit_pool "ZYgongbing"1 0.50 40requires factions { france, hungary, scotland, turks, poland, }
recruit_pool "BSgongbing"1 0.50 40requires factions { spain, milan, byzantium, }
recruit_pool "JDgongbing"1 0.50 40requires factions { england, sicily, }
recruit_pool "HBgongbing"1 0.50 40requires factions { hre, russia, aragon, norway, }
recruit_pool "XLgongbing"1 0.50 40requires factions { denmark, kievan_rus, jerusalem, }
recruit_pool "JZgongbing"1 0.50 40requires factions { venice, portugal, }
recruit_pool "Mongol Foot Archers"1 0.50 40requires factions { mongols, }
recruit_pool "Dismounted Archers"1 0.25 30requires factions { mongols, }
recruit_pool "SYsheshou"1 0.50 40requires factions { cumans, }
recruit_pool "SYnu"1 0.50 40requires factions { cumans, }
recruit_pool "SYgongfu"1 0.50 40requires factions { cumans, }
recruit_pool "Nanmangongshou"1 0.50 41requires factions { egypt, }
recruit_pool "YuLin_GongShou"1 0.25 20requires factions { papal_states, }
recruit_pool "YuLin_nubing"1 0.25 20requires factions { papal_states, }
recruit_pool "gongmm"1 1 41requires factions { france, }
}
material wooden
construction1
cost1000
settlement_min large_town
upgrades
{
archery_range
}
}
archery_range requires factions { middle_eastern, egypt, cumans, mongols, }
{
capability
{
recruit_pool "yijungong"1 0.50 32requires factions { england, france, hre, spain, hungary, denmark, poland, venice, milan, sicily, scotland, byzantium, russia,portugal, turks,papal_states, aragon, norway, kievan_rus, } and event_counter taofadongzhuo 1
recruit_pool "ZYgongbing"1 0.50 41requires factions { france, hungary, scotland, turks, poland, }
recruit_pool "BSgongbing"1 0.50 41requires factions { spain, milan, byzantium, }
recruit_pool "JDgongbing"1 0.50 41requires factions { england, sicily, }
recruit_pool "HBgongbing"1 0.50 41requires factions { hre, russia, aragon, norway, }
recruit_pool "XLgongbing"1 0.50 41requires factions { denmark, kievan_rus, jerusalem, }
recruit_pool "JZgongbing"1 0.50 41requires factions { venice, portugal, }
recruit_pool "ZYnubing"1 0.50 40requires factions { france, hungary, scotland, turks, poland, }
recruit_pool "BSnubing"1 0.50 40requires factions { spain, milan, byzantium, }
recruit_pool "JDnubing"1 0.50 40requires factions { england, sicily, }
recruit_pool "HBnubing"1 0.50 40requires factions { hre, russia, aragon,norway, }
recruit_pool "XLnubing"1 0.50 40requires factions { denmark, kievan_rus, jerusalem, }
recruit_pool "JZnubing"1 0.50 40requires factions { venice, portugal, }
recruit_pool "Mongol Foot Archers"1 0.50 42requires factions { mongols, }
recruit_pool "Dismounted Archers"1 0.50 41requires factions { mongols, }
recruit_pool "Dismounted Heavy Archers"1 0.25 30requires factions { mongols, }
recruit_pool "SYsheshou"1 0.50 41requires factions { cumans, }
recruit_pool "SYgongfu"1 0.50 41requires factions { cumans, }
recruit_pool "SYjingrugong"1 0.25 40requires factions { cumans, }
recruit_pool "SYzhongnu"1 0.25 40requires factions { cumans, }
recruit_pool "Nanmangongshou"1 0.50 42requires factions { egypt, }
recruit_pool "YuLin_GongShou"1 0.50 41requires factions { papal_states, }
recruit_pool "YuLin_nubing"1 0.50 41requires factions { papal_states, }
recruit_pool "gongmm"1 1.5 62requires factions { france, }
}
material wooden
construction1
cost2000
settlement_min city
upgrades
{
marksmans_range
}
}
marksmans_range requires factions { middle_eastern, egypt, cumans, mongols, }
{
capability
{
recruit_pool "yijungong"1 0.50 33requires factions { england, france, hre, spain, hungary, denmark, poland, venice, milan, sicily, scotland, byzantium, russia,portugal, turks,papal_states, aragon, norway, kievan_rus, } and event_counter taofadongzhuo 1
recruit_pool "ZYgongbing"1 0.50 42requires factions { france, hungary, scotland, turks, poland, }
recruit_pool "BSgongbing"1 0.50 42requires factions { spain, milan, byzantium, }
recruit_pool "JDgongbing"1 0.50 42requires factions { england, sicily, }
recruit_pool "HBgongbing"1 0.50 42requires factions { hre, russia, aragon, norway, }
recruit_pool "XLgongbing"1 0.50 42requires factions { denmark, kievan_rus, jerusalem, }
recruit_pool "JZgongbing"1 0.50 42requires factions { venice, portugal, }
recruit_pool "ZYnubing"1 0.50 41requires factions { france, hungary, scotland, turks, poland, }
recruit_pool "BSnubing"1 0.50 41requires factions { spain, milan, byzantium, }
recruit_pool "JDnubing"1 0.50 41requires factions { england, sicily, }
recruit_pool "HBnubing"1 0.50 41requires factions { hre, russia, aragon, norway, }
recruit_pool "XLnubing"1 0.50 41requires factions { denmark, kievan_rus, jerusalem, }
recruit_pool "JZnubing"1 0.50 41requires factions { venice, portugal, }
recruit_pool "ZYzhongnu"1 0.25 40requires factions { france, hungary, scotland, turks, poland, }
recruit_pool "BSzhongnu"1 0.25 40requires factions { spain, milan, byzantium, }
recruit_pool "JDzhongnu"1 0.25 40requires factions { england, sicily, }
recruit_pool "HBzhongnu"1 0.25 40requires factions { hre, russia, aragon, norway, }
recruit_pool "XLzhongnu"1 0.25 40requires factions { denmark, kievan_rus, jerusalem, }
recruit_pool "JZzhongnu"1 0.25 40requires factions { venice, portugal, }
recruit_pool "Hengjiangsheshou"1 0.25 20requires factions { england, }
recruit_pool "JingRuiGongShou"1 0.25 20requires factions { venice, portugal, }
recruit_pool "Zhugelu"1 0.25 20requires factions { spain, }
recruit_pool "Mongol Foot Archers"1 0.50 43requires factions { mongols, }
recruit_pool "Dismounted Archers"1 0.50 42requires factions { mongols, }
recruit_pool "Dismounted Heavy Archers"1 0.5 41requires factions { mongols, }
recruit_pool "SYsheshou"1 0.50 42requires factions { cumans, }
recruit_pool "SYgongfu"1 0.50 42requires factions { cumans, }
recruit_pool "SYjingrugong"1 0.50 41requires factions { cumans, }
recruit_pool "SYzhongnu"1 0.50 41requires factions { cumans, }
recruit_pool "Nanmangongshou"1 0.50 43requires factions { egypt, }
recruit_pool "YuLin_GongShou"1 0.50 42requires factions { papal_states, }
recruit_pool "YuLin_nubing"1 0.50 42requires factions { papal_states, }
recruit_pool "gongmm"1 2 83requires factions { france, }
}
material stone
construction1
cost4000
settlement_min large_city
upgrades
{
}
}
}
plugins
{
}
}
至此,进入游戏吧,汉之殇女兵,欢乐无限~YY~
這要制做模具阿..好難懂
可以幫我用一份劉備的嗎 顶顶更健康。。。。。。。。。。 好复杂,不明白······ 楼主,非常的不错呀。{:5_108:} {:5_106:}{:5_106:}看看 感觉特别喜欢ysl shooters 这个兵种,准备给他改成步兵,弓兵,骑兵都有{:5_106:} 学习学习 顶一个。 路过看看 移mesh,spr,texture文件的时候卡壳了,望LZ详解!!{:5_152:}{:5_152:} 同楼上。。。。。。。。。 本帖最后由 alewthia 于 2013-6-27 11:26 编辑
、捻怀_、_、 发表于 2013-6-26 08:36 http://www.1mod.org/static/image/common/back.gif
移mesh,spr,texture文件的时候卡壳了,望LZ详解!!
比如原模型文件gongmm_lod0.mesh在\MundusInvictus\data\unit_models\_units\xf文件夹中
现在移植到汉之殇
那么就复制到
\mods\sanguo\data\unit_models\_units\xf文件夹下
文件放置的位置必须与battle_models.modeldb里,提取模型的路径一致~
比如你把gongmm_lod0.mesh直接放到\mods\sanguo\data\unit_models\_units里也可以,相应的battle_models.modeldb里的模型提取路径也要发生变化
即
36 unit_models/_Units/gongmm_lod0.mesh 121
36 unit_models/_Units/gongmm_lod0.mesh 900
36 unit_models/_Units/gongmm_lod0.mesh 2500
36 unit_models/_Units/gongmm_lod0.mesh 6400
排序,一级排序,一级 {:5_112:}{:5_112:}好多啊 支持支持谢谢 支持支持谢谢 好好好..................................... 学习中学习中学习中 学习中学习中学习中学习中