本帖最后由 ggfgfgf 于 2022-12-29 21:15 编辑
rt,emmm,一个无聊的功能源码
module_mission_templates.py:
玩家欢呼:
player_yell = (
0, 0, 3, [(key_clicked, key_v)],
[
(get_player_agent_no,":p"),
(agent_is_alive, ":p"),
(troop_get_type,":sexual","trp_player"),
(try_begin),
(eq,":sexual",0),
(agent_play_sound,":p","snd_man_victory"),
(else_try),
(eq,":sexual",1),
(agent_play_sound,":p","snd_woman_yell"),
(try_end),
(agent_set_animation, ":p", "anim_cheer",1),
])
添加在开头pilgrim_disguise = [itm_pilgrim_hood,itm_pilgrim_disguise,itm_practice_staff, itm_throwing_daggers]
af_castle_lord = af_override_horse | af_override_weapons| af_require_civilian
后另起一行
是定义触发器
在你需要的mt任务中添加
player_yell,
比如自定义战场中:
quick_battle_battle
"quick_battle_battle",mtf_battle_mode,-1,
"You lead your men to battle.",
[
(0,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(1,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(2,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
......
(ti_before_mission_start, 0, 0, [],
[
(scene_set_day_time, 15),
]),
common_battle_init_banner,
common_battle_blood_spray,
player_yell,
野战战场
"lead_charge",mtf_battle_mode|mtf_synch_inventory,charge,
"You lead your men to battle.",
[
(1,mtef_defenders|mtef_team_0,0,aif_start_alarmed,12,[]),
同上
---------------------------------------------------------------------------------------
module_dialogs.py:
观看真剑比赛(按tab键放弃战斗退出p.s.浪费15第纳尔,笑):
搜索anyone,"arena_master_melee_pretalk", [], "There will be a fight
将
[anyone,"arena_master_melee_pretalk", [], "There will be a fight here soon. You can go and jump in if you like. ", "arena_master_melee_talk",[]],
整个替换为
#gf
[anyone,"arena_master_melee_pretalk", [], "There will be a fight here soon. You can go and jump in if you like. Or pay a ticket for watching it, er...15 denars.", "arena_master_melee_talk",[]],
[anyone|plyr,"arena_master_melee_talk", [(store_troop_gold,reg(0)),(ge,reg(0),15)], "Here the money, so I am willing to enjoying it.", "watch_fight",[]],
[anyone,"watch_fight", [], "That is it.", "close_window",
[
(troop_remove_gold, "trp_player",15),
(assign, "$g_mt_mode", abm_training),
(store_current_hours,"$training_fight_time"),
(set_jump_mission, "mt_arena_melee_fight"),
(party_get_slot, ":arena_scene", "$current_town", slot_town_arena),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 43, "trp_veteran_fighter"),
(set_visitor, 44, "trp_hired_blade"),
(set_jump_entry, 51),
(set_visitor, 51, "trp_player"),
(jump_to_scene, ":arena_scene"),
# (party_get_slot, ":scene", "$current_town", slot_town_arena),
# (assign, "$g_mt_mode", abm_training),
# (party_get_slot, ":scene","$current_town",slot_town_arena),
# (modify_visitors_at_site,":scene"),
# (reset_visitors),
# (set_jump_mission,"mt_arena_melee_fight"),
# (jump_to_scene, ":scene"),
]],
#gf
汉化
打开模组目录,(native为例) module\native\language\cns\dialogs.cvs
搜索dlga_arena_master_melee_pretalk:arena_master_melee_talk|很 快 就 要 有 比 赛 了,
整个替换为
dlga_arena_master_melee_pretalk:arena_master_melee_talk|很 快 就 要 有 比 赛 了 。 你 可 以 参 加 或 买 张 票 看 , 呃 ... 15 第 纳 尔 。
dlga_arena_master_melee_talk:watch_fight|给 ,我 想 我 能 够 很 好 地 享 受 这 场 。
dlga_watch_fight:close_window|确 实 。
完成。
代码注释
player_yell = (
0, 0, 3, [(key_clicked, key_v)], #3秒检测一次,按v键触发
[
(get_player_agent_no,":p"),#获取玩家战场者编号
(agent_is_alive, ":p"),#玩家是活的
(troop_get_type,":sexual","trp_player"),#获取玩家skin类型
(try_begin),#skin类型是0(是男性)
(eq,":sexual",0),
(agent_play_sound,":p","snd_man_victory"),#播放男性欢呼声
(else_try),#skin类型是1(是女性)
(eq,":sexual",1),
(agent_play_sound,":p","snd_woman_yell"),#播放女性欢呼声
(try_end),
(agent_set_animation, ":p", "anim_cheer",1),#玩家播放动画:举手欢呼,1即为上半身动画
])
#gf
[anyone,"watch_fight", [], "That is it.", "close_window",
[
(troop_remove_gold, "trp_player",15),#移除玩家15第纳尔
(assign, "$g_mt_mode", abm_training),#设置任务模式为训练
(store_current_hours,"$training_fight_time"),#跳过比赛时间
(set_jump_mission, "mt_arena_melee_fight"),#进入任务:真剑决斗
(party_get_slot, ":arena_scene", "$current_town", slot_town_arena),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors), #重载场景人物
(set_visitor, 43, "trp_veteran_fighter"), #进入点43添加一位初级斗士
(set_visitor, 44, "trp_hired_blade"), #进入点44添加一位竞技场骑枪兵
(set_jump_entry, 51), #设置玩家进入点为51
(set_visitor, 51, "trp_player"), #进入点51生成一位玩家
(jump_to_scene, ":arena_scene"), #跳转场景
|