汉之殇无敌修改第一弹--手把手教你如何添加新兵种
本帖最后由 alewthia 于 2013-5-22 17:29 编辑看柱子论坛半年,灌水也灌够了,不过却没发现几个详尽的帖子教你如何添加兵种的帖子,于是起草一篇教程,让喜欢修改的同志一起分享下。废话不说了,入正题!以下以曹操势力添加白马义从为例。第一步:建立兵种,打开安装目录\mods\sanguo\data,寻找export_descr_unit.txt,打开。寻找“baimayicong”于是找到type Baimayicongdictionary Baimayicongcategory cavalryclass missilevoice_type Lightbanner faction main_cavalrybanner holy crusade_cavalrysoldier baimayicong, 32, 0, 1mount zhongxingbaimamount_effect elephant -4, camel -4attributes sea_faring, hide_forest, very_hardy, can_withdraw, horse_archers, cantabrian_circlemove_speed_mod 1.0formation 2, 4.4, 3, 6, 3, squarestat_health 1, 3stat_pri 9, 2, cav_bodkin_arrow, 145, 35, missile, missile_mechanical, piercing, none, 0, 1stat_pri_attr nostat_sec 8, 5, no, 0, 0, melee, melee_blade, piercing, sword, 60, 1 ; light swstat_sec_attr nostat_pri_armour8, 8, 0, fleshstat_sec_armour0, 0, fleshstat_heat 1stat_ground 0, -1, -2, 1stat_mental 18, disciplined, highly_trainedstat_charge_dist 20stat_fire_delay0stat_food 60, 300stat_cost 1, 1500, 750, 200, 200, 555, 1, 100armour_ug_levels 3, 4, 5armour_ug_models baimayicong, baimayicong, baimayicongownership norwayera 0 norwayera 1 norwayera 2 norwayrecruit_priority_offset35以上是白马义从的兵种数据,复制,粘贴在文件最后。修改以下部分,红色字体type gongqishi(名字)dictionary gongqishi(名字)category cavalryclass missilevoice_type Lightbanner faction main_cavalrybanner holy crusade_cavalrysoldier baimayicong, 32, 0, 1mount zhongxingbaimamount_effect elephant -4, camel -4attributes sea_faring, hide_forest, very_hardy, can_withdraw, horse_archers, cantabrian_circlemove_speed_mod 1.0formation 2, 4.4, 3, 6, 3, squarestat_health 1, 3stat_pri 9, 2, cav_bodkin_arrow, 145, 35, missile, missile_mechanical, piercing, none, 0, 1stat_pri_attr nostat_sec 8, 5, no, 0, 0, melee, melee_blade, piercing, sword, 60, 1 ; light swstat_sec_attr nostat_pri_armour8, 8, 0, fleshstat_sec_armour0, 0, fleshstat_heat 1stat_ground 0, -1, -2, 1stat_mental 18, disciplined, highly_trainedstat_charge_dist 20stat_fire_delay0stat_food 60, 300stat_cost 1, 1500, 750, 200, 200, 555, 1, 100armour_ug_levels 3, 4, 5armour_ug_models baimayicong, baimayicong, baimayicongownership france(属国,france=曹操)era 0 franceera 1 franceera 2 francerecruit_priority_offset35保存,第一步完毕。第二步:为兵种命名,打开安装目录\mods\sanguo\data\text,寻找export_units.txt。在结尾处添加{gongqishi}弓骑士(名字){ gongqishi _descr}弓骑士(兵种介绍,可以不写){ gongqishi _descr_short}弓骑士(兵种介绍,可以不写)第三步:添加兵种图片。1、打开安装目录\mods\sanguo\data\ui\unit_info\norwey,有个baimayicong_info.tga,复制到安装目录\mods\sanguo\data\ui\unit_info\france下,图片名字修改为gongqishi_ info.tga。2、打开安装目录\mods\sanguo\data\ui\unit\norwey,有个#baimayicong.tga,复制到安装目录\mods\sanguo\data\ui\unit \france下,图片名字修改为#gongqishi.tga。第四步:将兵种添加至骑兵营。打开安装目录\mods\sanguo\data,寻找export_descr_buildings.txt,寻找骑兵营段落。以下这是一级骑兵营数据;骑兵营building equestrian{levels stables knights_stables barons_stables earls_stables kings_stables{ stables requires factions { middle_eastern, egypt, cumans, mongols, } { capability { recruit_pool "yijunqibing"1 0.25 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 "Mongol Horse Archers"1 0.50 40requires factions { mongols, } recruit_pool "Mongol Light Lancers"1 0.50 40requires factions { mongols, } 修改后为红色字体为增加的building equestrian{levels stables knights_stables barons_stables earls_stables kings_stables{ stables requires factions { middle_eastern, egypt, cumans, mongols, } { capability { recruit_pool "yijunqibing"1 0.25 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 "Mongol Horse Archers"1 0.50 40requires factions { mongols, } recruit_pool "Mongol Light Lancers"1 0.50 40requires factions { mongols, } recruit_pool "gongqishi"2 2 40requires factions { france, }意思是1级骑兵营能够招募弓骑士,每次最大雇佣2个,每回合增加2个,最大雇佣数量4个,经验0。继续往下看,文件中
2级骑兵营material wooden construction2 cost1000 settlement_min town upgrades { knights_stables } } knights_stables requires factions { middle_eastern, egypt, cumans, mongols, } { capability { recruit_pool "yijunqibing"1 0.25 41requires 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 "ZYqibing"1 0.25 30requires factions { france, hungary, scotland, turks, poland, } recruit_pool "BSqibing"1 0.25 30requires factions { spain, milan, byzantium, } recruit_pool "JDqibing"1 0.25 30requires factions { england, sicily, } recruit_pool "HBqibing"1 0.25 30requires factions { hre, russia, aragon,norway, } recruit_pool "XLqibing"1 0.25 30requires factions { denmark, kievan_rus, jerusalem, } recruit_pool "JZqibing"1 0.25 30requires factions { venice, portugal, } recruit_pool "Mongol Horse Archers"1 0.50 41requires factions { mongols, } recruit_pool "Mongol Light Lancers"1 0.50 41requires factions { mongols, } recruit_pool "Mongol Heavy Archers"1 0.5 40requires factions { mongols, } recruit_pool "Mongol Heavy Lancers"1 0.5 40requires factions { mongols, } recruit_pool "SYzhongqibing"1 0.25 30requires factions { cumans, } recruit_pool "Nanmanqibin"1 0.25 40requires factions { egypt, } recruit_pool "Manzunvbing"1 0.25 40requires factions { egypt, } recruit_pool "YuLin_Qi"1 0.50 40requires factions { papal_states, } recruit_pool "gongqishi"2 2 41requires factions { france, }三级骑兵营和四级骑兵营必须都按上述进行添加,否则三四级骑兵营将无法招募弓骑士!
最后一步:编辑模型分配文件。打开安装目录\mods\sanguo\data\unit_models中的battle_models.modeldb文件(记事本打开)
搜索以下字段
11 baimayicong
1 1
40 unit_models/sanguo/baimayicong_lod0.mesh 6400
2
6 norway
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture
42 unit_sprites/norway_baimayicong_sprite.spr
6 aragon
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture
42 unit_sprites/norway_baimayicong_sprite.spr
2
6 norway
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture 0
6 aragon
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture 0
修改为
11 baimayicong
1 1
40 unit_models/sanguo/baimayicong_lod0.mesh 6400
3(3个国家拥有兵模)
6 norway
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture
42 unit_sprites/norway_baimayicong_sprite.spr
6 aragon
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture
42 unit_sprites/norway_baimayicong_sprite.spr
6 france(6个字符,属国france=曹操)
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture
42 unit_sprites/norway_baimayicong_sprite.spr
3
6 norway
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture 0
6 aragon
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture 0
6 france
47 unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture 0
然后,进游戏吧~怎么样,曹操能够招募弓骑士了,爽吧!
参观下
马略 发表于 2013-9-13 10:09 static/image/common/back.gif
一步一步改的大戟士,然后进游戏就跳
这么改就对了,测试正常,谢谢LZ的好东西啊。 最新的1.03也可以哦
作者有个疏忽
6 france(6个字符,属国france=曹操)
47unit_models/sanguo/textures/baimayicong.texture
51 unit_models/sanguo/textures/baimayicong_nor.texture
42 unit_sprites/norway_baimayicong_sprite.spr
这里的6指的不是6个字符,是势力的数字代号,在相同的文本里面你查下你要添加的势力的名字就会知道他的代号了,代号是固定不变的
{:5_112:}{:5_112:}{:5_112:} 没钱买。。。。。。。。 好!灌水!!!!!! {:soso_e179:} 本帖最后由 11979588 于 2013-5-10 14:19 编辑
老总,请教一下。请问这样可以解决战役中模型无贴图的问题吗??
我试过简单的,或者说比较懒的。。。直接把虎贲的所有属性替换到羽林步兵下,id和可用派系没有替换,进入战场就是透明模型无贴图。。
不回答我就天天来顶你。。。顶死你。。。
这个懒方法 可以用来换青州,先登。。。等等所有作为武将卫队使用过的兵种。。。解烦,虎贲,逍遥津,无当什么的就不行··· 看看看看看看看看 速求楼主回答最后一步
11979588 发表于 2013-5-10 14:06 static/image/common/back.gif
老总,请教一下。请问这样可以解决战役中模型无贴图的问题吗??
我试过简单的,或者说比较懒的。。。直接 ...
认真看下第五步,这就是解决无模型的问题的(如果没有第五步,兵种是透明色的)
你必须通过名字,找到相应的模型使用对象并将模型添加到相应的势力。 支持楼主,支持楼主,好贴子啊{:soso_e179:} 顶起,顶起,顶起{:soso_e179:} 标记一下
不错···! 楼主,您说的这个方法行不通啊,我按照您的方法一步步做了。但一进游戏就跳出。我修改的游戏是ss6.4.{:soso_e109:}求沟通,求交流,求指点 路过看一下 太复杂了 有谁会在ss6.4里面添加新兵种啊,求大神们指教啊。现有的这个方法行不通啊{:5_124:} 标记标记 楼主好人~~