研究了一整天先說說最簡單的方法
前提是要有module system
打開module_troops.py
搜尋馬德尼marnid
會找到以下文字(npc技能跟裝備我修改過了,僅供參考)
["borcha","Borcha","Borcha",tf_hero, 0, reserved, fac_commoners,[itm_plate_armor,itm_iron_greaves,itm_scale_gauntlets,itm_knife,itm_magyar_helmet_a,itm_wooden_stick,itm_tutorial_sword],str_6|agi_6|int_30|cha_30|level(28),wp(50),knows_pathfinding_2|knows_tactics_8|knows_trainer_9|knows_spotting_2,0x000000000010918a01f248377289467d],
["marnid","Marnid","Marnid", tf_hero, 0,reserved, fac_commoners,[itm_mail_with_surcoat,itm_hide_boots,itm_short_sword,itm_turret_hat_green,itm_flintlock_pistol],str_3|agi_12|int_26|cha_3|level(28),wp(50)|wp_firearm(200),knows_trade_10|knows_inventory_management_5|knows_engineer_10,0x00000000000c600301c2510211a5b292],
["ymira","Ymira","Ymira",tf_female|tf_hero, 0, reserved, fac_commoners,[itm_court_dress,itm_morningstar],def_attrib|level(28),wp(90),knows_wound_treatment_8|knows_first_aid_7|knows_surgery_7,0x000000000000000201c152351bab4558],
["rolf","Rolf","Rolf",tf_hero, 0, reserved, fac_commoners,[itm_leather_jerkin,itm_nomad_boots, itm_sword],def_attrib|level(1),wp(20),knows_common,0x00000000000c840001f8c0a4ab8ad50a],
這裡就是放著npc加入的代碼,0.894跟0.808的加入代碼是不通的,
作者是利用slot的方式來處理加入npc,我搞不太懂,不過要加入新npc是很簡單的,只要複製上面任何一個人,
貼到下方,把前三個名字改掉,例如:"rolf","Rolf","Rolf"改成"jack","Jack","Jack"
應該會隨機在酒店出現新的npc,不過沒測試過,我是把出現位置放到禪達酒館,
其他檔案都不用管,除非你想製作個別的加入劇情
經過測試沒有問題
["jack","Jack","Jack", tf_hero, scn_the_happy_boar|entry(4),reserved, fac_commoners,[itm_pilgrim_disguise,itm_hide_boots,itm_knife,itm_tutorial_throwing_daggers,itm_pilgrim_hood],str_12|agi_30|int_6|cha_3|level(28),wp(50)|wp_throwing(240),knows_spotting_8|knows_pathfinding_8|knows_athletics_10|knows_power_throw_6|knows_tracking_8,0x00000000000c200401e7b86b3bb0d063],
["sandra","Sandra","Sandra",tf_female|tf_hero, scn_the_happy_boar|entry(6), reserved, fac_commoners,[itm_brigandine_a,itm_double_axe,itm_polehammer,itm_steel_shield,itm_wrapping_boots],str_30|agi_3|int_6|cha_12|level(28),wp(50)|wp_two_handed(250),knows_ironflesh_7|knows_power_strike_7|knows_shield_4|knows_trainer_5|knows_weapon_master_10,0x000000000008300101d8ad93708e4694],
提供我的範例給你們試,貼上之後應該就是
["borcha","Borcha","Borcha",tf_hero, 0, reserved, fac_commoners,[itm_plate_armor,itm_iron_greaves,itm_scale_gauntlets,itm_knife,itm_magyar_helmet_a,itm_wooden_stick,itm_tutorial_sword],str_6|agi_6|int_30|cha_30|level(28),wp(50),knows_pathfinding_2|knows_tactics_8|knows_trainer_9|knows_spotting_2,0x000000000010918a01f248377289467d],
["marnid","Marnid","Marnid", tf_hero, 0,reserved, fac_commoners,[itm_mail_with_surcoat,itm_hide_boots,itm_short_sword,itm_turret_hat_green,itm_flintlock_pistol],str_3|agi_12|int_26|cha_3|level(28),wp(50)|wp_firearm(200),knows_trade_10|knows_inventory_management_5|knows_engineer_10,0x00000000000c600301c2510211a5b292],
["ymira","Ymira","Ymira",tf_female|tf_hero, 0, reserved, fac_commoners,[itm_court_dress,itm_morningstar],def_attrib|level(28),wp(90),knows_wound_treatment_8|knows_first_aid_7|knows_surgery_7,0x000000000000000201c152351bab4558],
["rolf","Rolf","Rolf",tf_hero, 0, reserved, fac_commoners,[itm_leather_jerkin,itm_nomad_boots, itm_sword],def_attrib|level(1),wp(20),knows_common,0x00000000000c840001f8c0a4ab8ad50a],
["jack","Jack","Jack", tf_hero, scn_the_happy_boar|entry(4),reserved, fac_commoners,[itm_pilgrim_disguise,itm_hide_boots,itm_knife,itm_tutorial_throwing_daggers,itm_pilgrim_hood],str_12|agi_30|int_6|cha_3|level(28),wp(50)|wp_throwing(240),knows_spotting_8|knows_pathfinding_8|knows_athletics_10|knows_power_throw_6|knows_tracking_8,0x00000000000c200401e7b86b3bb0d063],
["sandra","Sandra","Sandra",tf_female|tf_hero, scn_the_happy_boar|entry(6), reserved, fac_commoners,[itm_brigandine_a,itm_double_axe,itm_polehammer,itm_steel_shield,itm_wrapping_boots],str_30|agi_3|int_6|cha_12|level(28),wp(50)|wp_two_handed(250),knows_ironflesh_7|knows_power_strike_7|knows_shield_4|knows_trainer_5|knows_weapon_master_10,0x000000000008300101d8ad93708e4694],
或許不算什麼大發現,可能許多高手都會,不過我研究了許久,而且論壇沒有0.894的教學,
就在此獻醜了,還有可以製作對話的加入方法,已經可以成功加入了,不過我還沒完全搞清楚指令
下次在發,或是有高手可以指點一二,附上成功的加入對話代碼
[trp_jack,"start",[(is_between, "$g_talk_troop", companions_begin, companions_end),
(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, 0)],
"jack talk 1", "jack_introduce_1",[]],
[trp_jack|plyr,"jack_introduce_1",[],"jack talk 2", "jack_introduce_2",[]],
[trp_jack,"jack_introduce_2",[],"jack talk 3","jack_introduce_3",[]],
[trp_jack|plyr,"jack_introduce_3", [], "jack talk 5", "jack_introduce_4",[]],
[trp_jack,"jack_introduce_4", [], "jack talk 6", "jack_introduce_4",[]],
[trp_jack|plyr,"jack_introduce_4", [], "jack talk 7", "jack_introduce_5",[]],
[trp_jack,"jack_introduce_5", [], "jack talk 8", "close_window",
[(call_script, "script_recruit_troop_as_companion", "$g_talk_troop")]],
[trp_jack|plyr,"jack_introduce_3", [], "jack talk 4", "close_window",[]],
相关内容请关注:骑马与砍杀:战团专区