本帖最后由 vegetto 于 2024-3-6 07:58 编辑
前言我们一般大地图进入城市场景都是左键点击进去,作为资深骑砍玩家来说,也发现可以通过右键点击大地图上城村部队等party,显示出一个右键扩展菜单来点击,但是原版的右键扩展菜单选项比较有限,无非是“到xx去”,“显示xxx相关信息”等等,而大地图进行一些政令军事等互动处理,战团mod发展早期采用菜单即menu系统,发展后期开始陆续试验presentation界面系统,但是对于大地图来说,这两种处理方法都有一种弊端,就是必须停滞大地图的运行,然后完全在界面上进行信息选项的处理,对于一些复杂的功能无可厚非,但是有一些简单功能,比如说我现在想在我大地图当前位置建立一个哨塔,你还想先跳转一个定制好的menu或presentation不是很累赘吗,如果我们发展一下右键扩展菜单,这样只需要右键点击一个party,可以是自己可以是其他部队或城市村子也可以是类似虚拟的载体标志物,扩展多级菜单选项,快速实现我们的想法,当扩展菜单选项具体化到一定程度后,再考虑跳转场景构造presentation界面。。。比如我下面的示例中,
我先把右键扩展菜单分成
str_sc100| 军 事 事 件 处 理
str_sc200| 经 济 事 件 处 理
str_sc300| 政 治 事 件 处 理
str_sc400| 外交 事 件 处 理
str_plscreturnall| 返 回 一 级 菜 单
str_plscreturnup| 返 回 上 一 级 菜 单
然后比如点击“军 事 事 件 处 理 ”,菜单变化成:
str_sc110| 部 队 人 员 招 募
str_sc120| 部 队 分 割 编 制
str_sc130| 部 队 临 时 建 造
str_sc140| 部 队 状 态 检 查
str_sc150| 部 队 供 给 措 施
str_plscreturnall| 返 回 一 级 菜 单
str_plscreturnup| 返 回 上 一 级 菜 单
然后比如点击“部 队 临 时 建 造 ”,菜单变化成:
str_sc131| 搭 建 临 时 营 地
str_sc132| 搭 建 防 御 工 事
str_sc133| 搭 建 炮 兵 阵 地
str_sc134| 搭 建 临 时 机 场
str_sc135| 搭 建 信 号 屏 蔽 区
str_sc136| 搭 建 地 雷 区
str_sc137| 搭 建 核 弹 井
str_plscreturnall| 返 回 一 级 菜 单
str_plscreturnup| 返 回 上 一 级 菜 单
假如你这些军事设施只有一个模型,直接默认当前位置建设了,假如你要还原建设场景和更细节过程,可以考虑跳转场景、构造presentation界面或者构造相应部门的人员对话。这样把笼统的具有概括性的菜单选项在大地图实时选好,然后选到细部的操作选项时再使用更高级的处理方法展示。
-------------------------以下是代码主体,没空整理仔细注释,仅参考逻辑即可-------------------------
module_strings里添加的string,主要作为大地图party右键扩展菜单的选项
("plscreturnall", "return the main option"),
("plscreturnup", "return the previous option"),
("sc100", "military handle"),
("sc200", "economic handle"),
("sc300", "political handle"),
("sc400", "foreign handle"),
("sc500", "none handle"),
("sc600", "none handle"),
("sc700", "none handle"),
("sc110", "military recruit"),
("sc120", "military division"),
("sc130", "military building"),
("sc140", "military check"),
("sc150", "military supplement"),
("sc160", "military none"),
("sc170", "military none"),
("sc111", "recruit basical soldiers"),
("sc112", "recruit special soldiers"),
("sc113", "recruit armored vehicle drivers"),
("sc114", "recruit fighter jet pilots"),
("sc115", "recruit none"),
("sc116", "recruit none"),
("sc117", "recruit none"),
("sc121", "military divide out a company level group"),
("sc122", "military divide out a battalion level group"),
("sc123", "military divide out a regiment level group"),
("sc124", "military divide out a division level group"),
("sc125", "military divide out a corp level group"),
("sc126", "military divide out a armored vehicle group"),
("sc127", "military divide out a fighter jet group"),
("sc131", "building a makeshift camp"),
("sc132", "building a fortification"),
("sc133", "building a artillery position"),
("sc134", "building a temporary airport"),
("sc135", "building a signal shielding area"),
("sc136", "building a landmine area"),
("sc137", "building a nuclear silo"),
("sc141", "review subordinate commanders"),
("sc142", "review the staff officers"),
("sc143", "review the communication units"),
("sc144", "review the logistic units"),
("sc145", "review the engineers"),
("sc146", "military none"),
("sc147", "military none"),
("sc151", "detect food"),
("sc152", "detect water"),
("sc153", "detect excavated oil"),
("sc154", "military none"),
("sc155", "military none"),
("sc156", "military none"),
("sc157", "military none"),
("sc161", "military none"),
("sc162", "military none"),
("sc163", "military none"),
("sc164", "military none"),
("sc165", "military none"),
("sc166", "military none"),
("sc167", "military none"),
("sc171", "military none"),
("sc172", "military none"),
("sc173", "military none"),
("sc174", "military none"),
("sc175", "military none"),
("sc176", "military none"),
("sc177", "military none"),
#上面是nsc0-nsc210 party作为政令指挥菜单使用的扩展菜单选项文字,下面是玩家和城市村子使用的扩展菜单选项文字,本示例功能主要关注上面的string设定
("scdecide1", "option 1 to be determined"),
("scdecide2", "option 2 to be determined"),
("scdecide3", "option 3 to be determined"),
("scdecide4", "option 4 to be determined"),
("scdecide5", "option 5 to be determined"),
("scdecide6", "option 6 to be determined"),
("scdecide7", "option 7 to be determined"),
("scdecide8", "military none"),
("scdecide9", "military none"),
("scdecide10", "military none"),
("scdecide11", "military none"),
("scdecide12", "military none"),
("scdecide13", "military none"),
("scdecide14", "military none"),
("scdecide15", "military none"),
("scdecide16", "military none"),
("scdecide17", "military none"),
("scdecide18", "military none"),
("scdecide19", "military none"),
("scdecide20", "military none"),
("scdecide21", "military none"),
("scdecide22", "military none"),
("scdecide23", "military none"),
("scdecide24", "military none"),
("scdecide25", "military none"),
("scdecide26", "military none"),
("scdecide27", "military none"),
("scdecide28", "military none"),
("scdecide29", "military none"),
("scdecide30", "military none"),
("scdecide31", "military none"),
("scdecide32", "military none"),
("scdecide33", "military none"),
("scdecide34", "military none"),
("scdecide35", "military none"),
("scdecide36", "military none"),
("scdecide37", "military none"),
("scdecide38", "military none"),
("scdecide39", "military none"),
("scdecide40", "military none"),
("scdecide41", "military none"),
("scdecide42", "military none"),
("scdecide43", "military none"),
("scdecide44", "military none"),
("scdecide45", "military none"),
("scdecide46", "military none"),
("scdecide47", "military none"),
("scdecide48", "military none"),
("scdecide49", "military none"),
("scdecide50", "military none"),
("scdecide51", "military none"),
("scdecide52", "military none"),
("scdecide53", "military none"),
("scdecide54", "military none"),
("scdecide55", "military none"),
("scdecide56", "military none"),
("scdecide57", "military none"),
("scdecide58", "military none"),
("scdecide59", "military none"),
("scdecide60", "military none"),
("scdecide61", "military none"),
("scdecide62", "military none"),
("scdecide63", "military none"),
("scdecide64", "military none"),
("scdecide65", "military none"),
("scdecide66", "military none"),
("scdecide67", "military none"),
("scdecide68", "military none"),
("scdecide69", "military none"),
("scdecide70", "military none"),
("scdecide71", "military none"),
("scdecide72", "military none"),
("scdecide73", "military none"),
("scdecide74", "military none"),
("scdecide75", "military none"),
("scdecide76", "military none"),
("scdecide77", "military none"),
("scdecide78", "military none"),
("scdecide79", "military none"),
("scdecide80", "military none"),
("scdecide81", "military none"),
("scdecide82", "military none"),
("scdecide83", "military none"),
("scdecide84", "military none"),
("scdecide85", "military none"),
("scdecide86", "military none"),
("scdecide87", "military none"),
("scdecide88", "military none"),
("scdecide89", "military none"),
("scdecide90", "military none"),
("scdecide91", "military none"),
("scdecide92", "military none"),
("scdecide93", "military none"),
("scdecide94", "military none"),
("scdecide95", "military none"),
("scdecide96", "military none"),
("scdecide97", "military none"),
("scdecide98", "military none"),
("scdecide99", "military none"),
("scdecide100", "military none"),
("scdecide101", "military none"),
("scdecide102", "military none"),
("scdecide103", "military none"),
("scdecide104", "military none"),
("scdecide105", "military none"),
("scdecide106", "military none"),
("scdecide107", "military none"),
("scdecide108", "military none"),
("scdecide109", "military none"),
("scdecide110", "military none"),
("scdecide111", "military none"),
("scdecide112", "military none"),
("scdecide113", "military none"),
("scdecide114", "military none"),
("scdecide115", "military none"),
("scdecide116", "military none"),
("scdecide117", "military none"),
("scdecide118", "military none"),
("scdecide119", "military none"),
("scdecide120", "military none"),
("scdecide121", "military none"),
("scdecide122", "military none"),
("scdecide123", "military none"),
("scdecide124", "military none"),
("scdecide125", "military none"),
("scdecide126", "military none"),
("scdecide127", "military none"),
("scdecide128", "military none"),
("scdecide129", "military none"),
("scdecide130", "military none"),
("scdecide131", "military none"),
("scdecide132", "military none"),
("scdecide133", "military none"),
("scdecide134", "military none"),
("scdecide135", "military none"),
("scdecide136", "military none"),
("scdecide137", "military none"),
("scdecide138", "military none"),
("scdecide139", "military none"),
("scdecide140", "military none"),
("scdecide141", "military none"),
("scdecide142", "military none"),
("scdecide143", "military none"),
("scdecide144", "military none"),
("scdecide145", "military none"),
("scdecide146", "military none"),
("scdecide147", "military none"),
("scdecide148", "military none"),
("scdecide149", "military none"),
("scdecide150", "military none"),
("scdecide151", "military none"),
("scdecide152", "military none"),
("scdecide153", "military none"),
("scdecide154", "military none"),
("scdecide155", "military none"),
("scdecide156", "military none"),
("scdecide157", "military none"),
("scdecide158", "military none"),
("scdecide159", "military none"),
("scdecide160", "military none"),
("scdecide161", "military none"),
("scdecide162", "military none"),
("scdecide163", "military none"),
("scdecide164", "military none"),
("scdecide165", "military none"),
("scdecide166", "military none"),
("scdecide167", "military none"),
("scdecide168", "military none"),
("scdecide169", "military none"),
("scdecide170", "military none"),
("scdecide171", "military none"),
("scdecide172", "military none"),
("scdecide173", "military none"),
("scdecide174", "military none"),
("scdecide175", "military none"),
("scdecide176", "military none"),
("scdecide177", "military none"),
("scdecide178", "military none"),
("scdecide179", "military none"),
("scdecide180", "military none"),
("scdecide181", "military none"),
("scdecide182", "military none"),
("scdecide183", "military none"),
("scdecide184", "military none"),
("scdecide185", "military none"),
("scdecide186", "military none"),
("scdecide187", "military none"),
("scdecide188", "military none"),
("scdecide189", "military none"),
("scdecide190", "military none"),
("scdecide191", "military none"),
("scdecide192", "military none"),
("scdecide193", "military none"),
("scdecide194", "military none"),
("scdecide195", "military none"),
("scdecide196", "military none"),
("scdecide197", "military none"),
("scdecide198", "military none"),
("scdecide199", "military none"),
("scdecide200", "military none"),
("scdecide201", "military none"),
("scdecide202", "military none"),
("scdecide203", "military none"),
("scdecide204", "military none"),
("scdecide205", "military none"),
("scdecide206", "military none"),
("scdecide207", "military none"),
("scdecide208", "military none"),
("scdecide209", "military none"),
("scdecide210", "military none"),
("scdecide211", "military none"),
("scdecide212", "military none"),
("scdecide213", "military none"),
("scdecide214", "military none"),
("scdecide215", "military none"),
("scdecide216", "military none"),
("scdecide217", "military none"),
("scdecide218", "military none"),
("scdecide219", "military none"),
("scdecide220", "military none"),
("scdecide221", "military none"),
("scdecide222", "military none"),
("scdecide223", "military none"),
("scdecide224", "military none"),
("scdecide225", "military none"),
("scdecide226", "military none"),
("scdecide227", "military none"),
("scdecide228", "military none"),
("scdecide229", "military none"),
("scdecide230", "military none"),
("scdecide231", "military none"),
("scdecide232", "military none"),
("scdecide233", "military none"),
("scdecide234", "military none"),
("scdecide235", "military none"),
("scdecide236", "military none"),
("scdecide237", "military none"),
("scdecide238", "military none"),
("scdecide239", "military none"),
("scdecide240", "military none"),
("scdecide241", "military none"),
("scdecide242", "military none"),
("scdecide243", "military none"),
("scdecide244", "military none"),
("scdecide245", "military none"),
("scdecide246", "military none"),
("scdecide247", "military none"),
("scdecide248", "military none"),
("scdecide249", "military none"),
("scdecide250", "military none"),
("scdecide251", "military none"),
("scdecide252", "military none"),
("scdecide253", "military none"),
("scdecide254", "military none"),
("scdecide255", "military none"),
("scdecide256", "military none"),
("scdecide257", "military none"),
("scdecide258", "military none"),
("scdecide259", "military none"),
("scdecide260", "military none"),
("scdecide261", "military none"),
("scdecide262", "military none"),
("scdecide263", "military none"),
("scdecide264", "military none"),
("scdecide265", "military none"),
("scdecide266", "military none"),
("scdecide267", "military none"),
("scdecide268", "military none"),
("scdecide269", "military none"),
("scdecide270", "military none"),
("scdecide271", "military none"),
("scdecide272", "military none"),
("scdecide273", "military none"),
("scdecide274", "military none"),
("scdecide275", "military none"),
("scdecide276", "military none"),
("scdecide277", "military none"),
("scdecide278", "military none"),
("scdecide279", "military none"),
("scdecide280", "military none"),
("scdecide281", "military none"),
("scdecide282", "military none"),
("scdecide283", "military none"),
("scdecide284", "military none"),
("scdecide285", "military none"),
("scdecide286", "military none"),
("scdecide287", "military none"),
("scdecide288", "military none"),
("scdecide289", "military none"),
("scdecide290", "military none"),
("scdecide291", "military none"),
("scdecide292", "military none"),
("scdecide293", "military none"),
("scdecide294", "military none"),
("scdecide295", "military none"),
("scdecide296", "military none"),
("scdecide297", "military none"),
("scdecide298", "military none"),
("scdecide299", "military none"),
("scdecide300", "military none"),
("scdecide301", "military none"),
("scdecide302", "military none"),
("scdecide303", "military none"),
("scdecide304", "military none"),
("scdecide305", "military none"),
("scdecide306", "military none"),
("scdecide307", "military none"),
("scdecide308", "military none"),
("scdecide309", "military none"),
("scdecide310", "military none"),
("scdecide311", "military none"),
("scdecide312", "military none"),
("scdecide313", "military none"),
("scdecide314", "military none"),
("scdecide315", "military none"),
("scdecide316", "military none"),
("scdecide317", "military none"),
("scdecide318", "military none"),
("scdecide319", "military none"),
("scdecide320", "military none"),
("scdecide321", "military none"),
("scdecide322", "military none"),
("scdecide323", "military none"),
("scdecide324", "military none"),
("scdecide325", "military none"),
("scdecide326", "military none"),
("scdecide327", "military none"),
("scdecide328", "military none"),
("scdecide329", "military none"),
("scdecide330", "military none"),
("scdecide331", "military none"),
("scdecide332", "military none"),
("scdecide333", "military none"),
("scdecide334", "military none"),
("scdecide335", "military none"),
("scdecide336", "military none"),
("extradecide1", "display game control guide"),
("extradecide2", "close game control guide"),
("extradecide3", "display the advance map choose"),
("extradecide4", "close the advance map choose"),
("extradecide5", "none"),
("extradecide6", "none"),
("extradecide7", "none"),
("extradecide8", "visit residential area"),
("extradecide9", "visit military area"),
("extradecide10", "visit residential leader"),
("extradecide11", "visit military leader"),
("extradecide12", "none"),
("extradecide13", "none"),
("extradecide14", "choose it as object for player some special behavior"),
("extradecide15", "visit military area"),
("extradecide16", "visit military leader"),
("extradecide17", "none"),
("extradecide18", "none"),
("extradecide19", "none"),
("extradecide20", "none"),
("extradecide21", "choose it as object for player some special behavior"),
("extradecide22", "military none"),
("extradecide23", "military none"),
("extradecide24", "military none"),
("extradecide25", "military none"),
("extradecide26", "military none"),
("extradecide27", "military none"),
("extradecide28", "military none"),
("extradecide29", "military none"),
("extradecide30", "military none"),
("extradecide31", "military none"),
("extradecide32", "military none"),
("extradecide33", "military none"),
("extradecide34", "military none"),
("extradecide35", "military none"),
("extradecide36", "military none"),
("extradecide37", "military none"),
("extradecide38", "military none"),
("extradecide39", "military none"),
("extradecide40", "military none"),
("extradecide41", "military none"),
("extradecide42", "military none"),
("extradecide43", "military none"),
("extradecide44", "military none"),
("extradecide45", "military none"),
("extradecide46", "military none"),
("extradecide47", "military none"),
("extradecide48", "military none"),
("extradecide49", "military none"),
("extradecide50", "military none"),
("extradecide51", "military none"),
("extradecide52", "military none"),
("extradecide53", "military none"),
("extradecide54", "military none"),
("extradecide55", "military none"),
("extradecide56", "military none"),
("extradecide57", "military none"),
("extradecide58", "military none"),
("extradecide59", "military none"),
("extradecide60", "military none"),
("extradecide61", "military none"),
("extradecide62", "military none"),
("extradecide63", "military none"),
("extradecide64", "military none"),
("extradecide65", "military none"),
("extradecide66", "military none"),
("extradecide67", "military none"),
("extradecide68", "military none"),
("extradecide69", "military none"),
("extradecide70", "military none"),
("extradecide71", "military none"),
("extradecide72", "military none"),
("extradecide73", "military none"),
("extradecide74", "military none"),
("extradecide75", "military none"),
("extradecide76", "military none"),
("extradecide77", "military none"),
("extradecide78", "military none"),
("extradecide79", "military none"),
("extradecide80", "military none"),
("extradecide81", "military none"),
("extradecide82", "military none"),
("extradecide83", "military none"),
("extradecide84", "military none"),
("extradecide85", "military none"),
("extradecide86", "military none"),
("extradecide87", "military none"),
("extradecide88", "military none"),
("extradecide89", "military none"),
("extradecide90", "military none"),
("extradecide91", "military none"),
("extradecide92", "military none"),
("extradecide93", "military none"),
("extradecide94", "military none"),
("extradecide95", "military none"),
("extradecide96", "military none"),
("extradecide97", "military none"),
("extradecide98", "military none"),
("extradecide99", "military none"),
("extradecide100", "military none"),
("extradecide101", "military none"),
("extradecide102", "military none"),
("extradecide103", "military none"),
("extradecide104", "military none"),
("extradecide105", "military none"),
("extradecide106", "military none"),
("extradecide107", "military none"),
("extradecide108", "military none"),
("extradecide109", "military none"),
("extradecide110", "military none"),
("extradecide111", "military none"),
("extradecide112", "military none"),
("extradecide113", "military none"),
("extradecide114", "military none"),
("extradecide115", "military none"),
("extradecide116", "military none"),
("extradecide117", "military none"),
("extradecide118", "military none"),
("extradecide119", "military none"),
("extradecide120", "military none"),
("extradecide121", "military none"),
("extradecide122", "military none"),
("extradecide123", "military none"),
("extradecide124", "military none"),
("extradecide125", "military none"),
("extradecide126", "military none"),
("extradecide127", "military none"),
("extradecide128", "military none"),
("extradecide129", "military none"),
("extradecide130", "military none"),
("extradecide131", "military none"),
("extradecide132", "military none"),
("extradecide133", "military none"),
("extradecide134", "military none"),
("extradecide135", "military none"),
("extradecide136", "military none"),
("extradecide137", "military none"),
("extradecide138", "military none"),
("extradecide139", "military none"),
("extradecide140", "military none"),
("extradecide141", "military none"),
("extradecide142", "military none"),
("extradecide143", "military none"),
("extradecide144", "military none"),
("extradecide145", "military none"),
("extradecide146", "military none"),
("extradecide147", "military none"),
("extradecide148", "military none"),
("extradecide149", "military none"),
("extradecide150", "military none"),
("extradecide151", "military none"),
("extradecide152", "military none"),
("extradecide153", "military none"),
("extradecide154", "military none"),
("extradecide155", "military none"),
("extradecide156", "military none"),
("extradecide157", "military none"),
("extradecide158", "military none"),
("extradecide159", "military none"),
("extradecide160", "military none"),
("extradecide161", "military none"),
("extradecide162", "military none"),
("extradecide163", "military none"),
("extradecide164", "military none"),
("extradecide165", "military none"),
("extradecide166", "military none"),
("extradecide167", "military none"),
("extradecide168", "military none"),
("extradecide169", "military none"),
("extradecide170", "military none"),
("extradecide171", "military none"),
("extradecide172", "military none"),
("extradecide173", "military none"),
("extradecide174", "military none"),
("extradecide175", "military none"),
("extradecide176", "military none"),
("extradecide177", "military none"),
("extradecide178", "military none"),
("extradecide179", "military none"),
("extradecide180", "military none"),
("extradecide181", "military none"),
("extradecide182", "military none"),
("extradecide183", "military none"),
("extradecide184", "military none"),
("extradecide185", "military none"),
("extradecide186", "military none"),
("extradecide187", "military none"),
("extradecide188", "military none"),
("extradecide189", "military none"),
("extradecide190", "military none"),
("extradecide191", "military none"),
("extradecide192", "military none"),
("extradecide193", "military none"),
("extradecide194", "military none"),
("extradecide195", "military none"),
("extradecide196", "military none"),
("extradecide197", "military none"),
("extradecide198", "military none"),
("extradecide199", "military none"),
("extradecide200", "military none"),
("extradecide201", "military none"),
("extradecide202", "military none"),
("extradecide203", "military none"),
("extradecide204", "military none"),
("extradecide205", "military none"),
("extradecide206", "military none"),
("extradecide207", "military none"),
("extradecide208", "military none"),
("extradecide209", "military none"),
("extradecide210", "military none"),
("extradecide211", "military none"),
("extradecide212", "military none"),
("extradecide213", "military none"),
("extradecide214", "military none"),
("extradecide215", "military none"),
("extradecide216", "military none"),
("extradecide217", "military none"),
("extradecide218", "military none"),
("extradecide219", "military none"),
("extradecide220", "military none"),
("extradecide221", "military none"),
("extradecide222", "military none"),
("extradecide223", "military none"),
("extradecide224", "military none"),
("extradecide225", "military none"),
("extradecide226", "military none"),
("extradecide227", "military none"),
("extradecide228", "military none"),
("extradecide229", "military none"),
("extradecide230", "military none"),
("extradecide231", "military none"),
("extradecide232", "military none"),
("extradecide233", "military none"),
("extradecide234", "military none"),
("extradecide235", "military none"),
("extradecide236", "military none"),
("extradecide237", "military none"),
("extradecide238", "military none"),
("extradecide239", "military none"),
("extradecide240", "military none"),
("extradecide241", "military none"),
("extradecide242", "military none"),
("extradecide243", "military none"),
("extradecide244", "military none"),
("extradecide245", "military none"),
("extradecide246", "military none"),
("extradecide247", "military none"),
("extradecide248", "military none"),
("extradecide249", "military none"),
("extradecide250", "military none"),
("extradecide251", "military none"),
("extradecide252", "military none"),
("extradecide253", "military none"),
("extradecide254", "military none"),
("extradecide255", "military none"),
("extradecide256", "military none"),
("extradecide257", "military none"),
("extradecide258", "military none"),
("extradecide259", "military none"),
("extradecide260", "military none"),
("extradecide261", "military none"),
("extradecide262", "military none"),
("extradecide263", "military none"),
("extradecide264", "military none"),
("extradecide265", "military none"),
("extradecide266", "military none"),
("extradecide267", "military none"),
("extradecide268", "military none"),
("extradecide269", "military none"),
("extradecide270", "military none"),
("extradecide271", "military none"),
("extradecide272", "military none"),
("extradecide273", "military none"),
("extradecide274", "military none"),
("extradecide275", "military none"),
("extradecide276", "military none"),
("extradecide277", "military none"),
("extradecide278", "military none"),
("extradecide279", "military none"),
("extradecide280", "military none"),
("extradecide281", "military none"),
("extradecide282", "military none"),
("extradecide283", "military none"),
("extradecide284", "military none"),
("extradecide285", "military none"),
("extradecide286", "military none"),
("extradecide287", "military none"),
("extradecide288", "military none"),
("extradecide289", "military none"),
("extradecide290", "military none"),
("extradecide291", "military none"),
("extradecide292", "military none"),
("extradecide293", "military none"),
("extradecide294", "military none"),
("extradecide295", "military none"),
("extradecide296", "military none"),
("extradecide297", "military none"),
("extradecide298", "military none"),
("extradecide299", "military none"),
("extradecide300", "military none"),
("extradecide301", "military none"),
("extradecide302", "military none"),
("extradecide303", "military none"),
("extradecide304", "military none"),
("extradecide305", "military none"),
("extradecide306", "military none"),
("extradecide307", "military none"),
("extradecide308", "military none"),
("extradecide309", "military none"),
("extradecide310", "military none"),
("extradecide311", "military none"),
("extradecide312", "military none"),
("extradecide313", "military none"),
("extradecide314", "military none"),
("extradecide315", "military none"),
("extradecide316", "military none"),
("extradecide317", "military none"),
("extradecide318", "military none"),
("extradecide319", "military none"),
("extradecide320", "military none"),
("extradecide321", "military none"),
("extradecide322", "military none"),
("extradecide323", "military none"),
("extradecide324", "military none"),
("extradecide325", "military none"),
("extradecide326", "military none"),
("extradecide327", "military none"),
("extradecide328", "military none"),
("extradecide329", "military none"),
("extradecide330", "military none"),
("extradecide331", "military none"),
("extradecide332", "military none"),
("extradecide333", "military none"),
("extradecide334", "military none"),
("extradecide335", "military none"),
("extradecide336", "military none"),
("extradecide337", "military none"),
("extradecide338", "military none"),
("extradecide339", "military none"),
("extradecide340", "military none"),
("extradecide341", "military none"),
("extradecide342", "military none"),
("extradecide343", "military none"),
|
----------------------------------------------------------
module_strings的汉化内容:
str_plscreturnall| 返 回 一 级 菜 单
str_plscreturnup| 返 回 上 一 级 菜 单
str_sc100| 军 事 事 件 处 理
str_sc200| 经 济 事 件 处 理
str_sc300| 政 治 事 件 处 理
str_sc400| 外交 事 件 处 理
str_sc500| none_handle
str_sc600| none_handle
str_sc700| none_handle
str_sc110| 部 队 人 员 招 募
str_sc120| 部 队 分 割 编 制
str_sc130| 部 队 临 时 建 造
str_sc140| 部 队 状 态 检 查
str_sc150| 部 队 供 给 措 施
str_sc160| military_none
str_sc170| military_none
str_sc111| 招 募 基 础 士 兵
str_sc112| 招 募 特 种 士 兵
str_sc113| 招 募 装 甲 车 驾 驶 员
str_sc114| 招 募 飞 行 器 驾 驶 员
str_sc115| recruit_none
str_sc116| recruit_none
str_sc117| recruit_none
str_sc121| 部 队 分 离 一 个 连 级 单 位
str_sc122| 部 队 分 离 一 个 营 级 单 位
str_sc123| 部 队 分 离 一 个 团 级 单 位
str_sc124| 部 队 分 离 一 个 师 级 单 位
str_sc125| 部 队 分 离 一 个 军 级 单 位
str_sc126| 部 队 分 离 一 个 地 面 装 甲 群
str_sc127| 部 队 分 离 一 个 战 斗 机 群
str_sc131| 搭 建 临 时 营 地
str_sc132| 搭 建 防 御 工 事
str_sc133| 搭 建 炮 兵 阵 地
str_sc134| 搭 建 临 时 机 场
str_sc135| 搭 建 信 号 屏 蔽 区
str_sc136| 搭 建 地 雷 区
str_sc137| 搭 建 核 弹 井
str_sc141| 检 阅 下 级 军 官
str_sc142| 检 阅 参 谋 部
str_sc143| 检 阅 通 信 部 队
str_sc144| 检 阅 后 勤 部 队
str_sc145| 检 阅 工 程 兵
str_sc146| 检 阅
str_sc147| 检 阅
str_sc151| 搜 集 食 物
str_sc152| 搜 集 水 源
str_sc153| 勘 探 石 油
str_sc154| military_none
str_sc155| military_none
str_sc156| military_none
str_sc157| military_none
str_sc161| military_none
str_sc162| military_none
str_sc163| military_none
str_sc164| military_none
str_sc165| military_none
str_sc166| military_none
str_sc167| military_none
str_sc171| military_none
str_sc172| military_none
str_sc173| military_none
str_sc174| military_none
str_sc175| military_none
str_sc176| military_none
str_sc177| military_none
#上面是nsc0-nsc210 party作为政令指挥菜单使用的扩展菜单选项文字,下面是玩家和城市村子使用的扩展菜单选项文字,本示例功能主要关注上面的string设定
str_extradecide1| 显 示 游 戏 操 作 指 导
str_extradecide2| 关 闭 游 戏 操 作 指 导
str_extradecide3| 显 示 大 地 图 高 级 选 项
str_extradecide4| 关 闭 大 地 图 高 级 选 项
str_extradecide5| 待 定
str_extradecide6| 待 定
str_extradecide7| 待 定
str_extradecide8| 访 问 居 民 区
str_extradecide9| 访 问 军 事 区
str_extradecide10| 访 问 地 方 行 政 长 官
str_extradecide11| 访 问 地 方 最 高 指 挥 官
str_extradecide12| 待 定
str_extradecide13| 待 定
str_extradecide14| 选 择 它 作 为 玩 家 特 别 行 动 目 标
str_extradecide15| 访 问 军 事 营 地
str_extradecide16| 访 问 该 部 最 高 指 挥 官
str_extradecide17| 待 定
str_extradecide18| 待 定
str_extradecide19| 待 定
str_extradecide20| 待 定
str_extradecide21| 选 择 它 作 为 玩 家 特 别 行 动 目 标
|
-------------------------------------------------------------
module_parties里party添加,模型我用的是魔兽争霸里的守卫图标,你们自定,注意party均命名为“选择菜单”类似的名称,这样大地图显示部队名称大字告诉玩家这个东西什么用途
("nsc0", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc100", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc200", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc300", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc400", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc500", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc600", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc700", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc110", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc120", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc130", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc140", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc150", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc160", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc170", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
("nsc210", "choose", icon_dotaward|pf_is_static|pf_label_large|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral, aggressiveness_0, ai_bhvr_hold, 0, (-17.600000, 79.699997), [], 170),
###解释下,nsc0这个party相当于下面第一级菜单
str_sc100| 军 事 事 件 处 理
str_sc200| 经 济 事 件 处 理
str_sc300| 政 治 事 件 处 理
str_sc400| 外交 事 件 处 理
。。。预留额外3个同级别空位string。。。。
然后nsc100-700相当于第二级菜单比如军事事件的“分割编制”,然后nsc110-170相当于第三级菜单比如分割编制中“分离一个连级别单位”。
因为我目前mod只做了“军 事 事 件 处 理”的展开,所以比如nsc210后面的nsc210-270是预留给str_sc200| 经 济 事 件 处 理的二级展开,同理nsc310-370是预留给str_sc300| 政 治 事 件 处 理进行二级展开,等等。
-----------------------------------------------------------------------------------
module_simple_triggers添加下面的触发器,意思就是大地图预先创建了nsc0-nsc210这16个party,参考我string的中文翻译,通过script初始对应右键点击party出来的菜单选项文字,分别代表一个总菜单,分支出“政治、经济、军事等等多个大项”,然后每个分项分出7个菜单分支,每个分项的各菜单分支又分出7个选项,再加两个返回上级菜单选项,所以str_plscreturnall——str_sc177这么多string就是为这个准备的。而如下simple_trigger触发就是根据script里响应右键菜单点击事件,进行相应nsc0-nsc210这15个party中特定一个party显示,其他party暂时隐身disable,然后控制这个政令扩展菜单载体的party在使用时可以保持在玩家附近出现,方便找到并点击。。
(0.000000,
[
(store_add, ":var_10", "p_nsc210", 1),
(try_for_range, ":var_11", "p_nsc0", ":var_10"),
(store_distance_to_party_from_party, ":var_12", "p_nsc0", "p_main_party"),
(try_begin),
(party_is_active, ":var_11"),
(neg|is_between, ":var_12", 1, 4),
(party_relocate_near_party, "p_nsc0", "p_main_party", 2),
(try_end), #意思就是让nsc0这个用于右键点出扩展菜单的大地图图标部队,距离不在玩家附近1-4范围,则强制瞬移到距离玩家2范围
(try_begin),
(party_is_active, ":var_11"),
(party_get_position, pos1, "p_nsc0"),
(neg|eq, ":var_11", "p_nsc0"),
(party_set_position, ":var_11", pos1),
(try_end), #凡是正常使用的nsc1-nsc210的party,始终设置位置在nsc0部队位置,也就是nsc0-nsc210一起控制在玩家部队附近位置
(party_get_slot, ":var_13", "p_main_party", 571), #party slot 571代表nsc1-nsc210同一时间该显示哪个,然后nsc1-nsc210具有多级上下级关系,右键扩展菜单具有承上启下关系,通过某party右键扩展菜单影响party显示关闭来跳转其他party右键扩展菜单进行多级扩展。
(try_begin),
(eq, "$redmode", 2),
(disable_party, ":var_11"), #"$redmode"=2是我以前魔兽mod开局多剧本分支的红色警戒遭遇战模式剧本,目前版本已经取消,也就是这个开局剧本模式nsc1-nsc210的party全部隐身,即不启用
(else_try),
(troop_slot_eq, "trp_player", 629, 1),
(disable_party, ":var_11"), #troop slot 629是通过我mod的T键切换值0-1,为1时就是关闭大地图右键扩展政令选项,即nsc1-nsc210的party全部隐身,所以要在其他触发或本触发加一个按什么按键显示这个政令右键扩展party载体的功能。
(else_try),
(neg|ge, ":var_13", 100),
(party_set_slot, "p_main_party", 571, 100),
(enable_party, "p_nsc0"),
(store_add, ":var_10", "p_nsc210", 1),
(try_for_range, ":var_11", "p_nsc100", ":var_10"),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 100, 800),
(store_mod, ":var_14", ":var_13", 100),
(store_mod, ":var_15", ":var_13", 10),
(try_begin),
(eq, ":var_14", 0),
(try_begin),
(eq, ":var_11", "p_nsc0"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(neg|eq, ":var_14", 0),
(is_between, ":var_13", 100, 200),
(try_begin),
(eq, ":var_15", 0),
(try_begin),
(eq, ":var_11", "p_nsc100"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 111, 118),
(try_begin),
(eq, ":var_11", "p_nsc110"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 121, 128),
(try_begin),
(eq, ":var_11", "p_nsc120"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 131, 138),
(try_begin),
(eq, ":var_11", "p_nsc130"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 141, 148),
(try_begin),
(eq, ":var_11", "p_nsc140"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 151, 158),
(try_begin),
(eq, ":var_11", "p_nsc150"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 161, 168),
(try_begin),
(eq, ":var_11", "p_nsc160"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(else_try),
(is_between, ":var_13", 171, 178),
(try_begin),
(eq, ":var_11", "p_nsc170"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(try_end),
(else_try),
(neg|eq, ":var_14", 0),
(is_between, ":var_13", 200, 300),
(try_begin),
(eq, ":var_14", 0),
(try_begin),
(eq, ":var_11", "p_nsc200"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(try_end),
(else_try),
(neg|eq, ":var_14", 0),
(is_between, ":var_13", 300, 400),
(try_begin),
(eq, ":var_14", 0),
(try_begin),
(eq, ":var_11", "p_nsc300"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(try_end),
(else_try),
(neg|eq, ":var_14", 0),
(is_between, ":var_13", 400, 500),
(try_begin),
(eq, ":var_14", 0),
(try_begin),
(eq, ":var_11", "p_nsc400"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(try_end),
(else_try),
(neg|eq, ":var_14", 0),
(is_between, ":var_13", 500, 600),
(try_begin),
(eq, ":var_14", 0),
(try_begin),
(eq, ":var_11", "p_nsc500"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(try_end),
(else_try),
(neg|eq, ":var_14", 0),
(is_between, ":var_13", 600, 700),
(try_begin),
(eq, ":var_14", 0),
(try_begin),
(eq, ":var_11", "p_nsc600"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(try_end),
(else_try),
(neg|eq, ":var_14", 0),
(is_between, ":var_13", 700, 800),
(try_begin),
(eq, ":var_14", 0),
(try_begin),
(eq, ":var_11", "p_nsc700"),
(enable_party, ":var_11"),
(else_try),
(disable_party, ":var_11"),
(try_end),
(try_end),
(try_end),
(try_end),
(try_end),
]),
script原有脚本game_context_menu_get_buttons改写,这个脚本原本是给大地图右键扩展菜单添加菜单选项的,比较单调,一般就是“到这里去”,“查看信息”,这里根据我新加的string,对大地图政令扩展菜单“附身”的nsc0-nsc210这些party依次添加3-7种string即选项,因为时间有限,原计划每个party均有“返回初始菜单选项”“返回上级菜单选项”和7个子项,因为有些分项没想好,所以并不都是2+7,但是考虑到后续增设问题,所以string文件里就是按照2+7为一组、按顺序预留的,没想好的菜单选项就填的none。
("game_context_menu_get_buttons",
[
(store_script_param, ":var_0", 1), #注意:var_0是大地图上的party,就是初始化大地图时,通过这个脚本读取所有party当:var_0,然后下面定义加右键扩展菜单选项。
(try_begin),
(neg|eq, ":var_0", "p_main_party"),
(context_menu_add_item, "@move here", -7),
(try_end),
(try_begin),
(this_or_next|eq, ":var_0", "p_main_party"),
(is_between, ":var_0", "p_nsc0", "p_nsc210"),
(else_try),
(is_between, ":var_0", "p_town_1", "p_salt_mine"),
(context_menu_add_item, "str_extradecide8", 1),
(context_menu_add_item, "str_extradecide9", 2),
(context_menu_add_item, "str_extradecide10", 3),
(context_menu_add_item, "str_extradecide11", 4),
(context_menu_add_item, "str_extradecide14", 7),
(else_try),
(party_get_num_companion_stacks, ":var_1", ":var_0"),
(gt, ":var_1", 0),
(party_stack_get_troop_id, ":var_2", ":var_0", 0),
(is_between, ":var_2", "trp_npc1", "trp_knight_1_1_wife"),
(context_menu_add_item, "str_extradecide15", 1),
(context_menu_add_item, "str_extradecide16", 2),
(context_menu_add_item, "str_extradecide21", 7),
(else_try),
(context_menu_add_item, "str_extradecide15", 1),
(context_menu_add_item, "str_extradecide16", 2),
(context_menu_add_item, "str_extradecide21", 7),
(try_end),
(try_begin),
(neg|eq, ":var_0", "p_main_party"),
(store_faction_of_party, ":var_3", ":var_0"),
(this_or_next|eq, ":var_3", "$players_kingdom"),
(this_or_next|eq, ":var_3", "fac_player_supporters_faction"),
(party_slot_eq, ":var_0", slot_party_type, 11),
(neg|is_between, ":var_0", "p_town_1", "p_salt_mine"),
(context_menu_add_item, "@Accompany", -6),
(try_end),
(try_begin),
(this_or_next|eq, ":var_0", "p_main_party"),
(is_between, ":var_0", "p_nsc0", "p_nsc210"),
(try_begin),
(neg|eq, ":var_0", "p_main_party"),
(neg|eq, ":var_0", "p_nsc0"),
(context_menu_add_item, "str_plscreturnall", 9),
(context_menu_add_item, "str_plscreturnup", 8),
(try_end),
(party_get_slot, ":var_4", ":var_0", 571),
(try_begin),
(eq, ":var_0", "p_main_party"),
(context_menu_add_item, "str_extradecide1", 1),
(context_menu_add_item, "str_extradecide2", 2),
(context_menu_add_item, "str_extradecide3", 3),
(context_menu_add_item, "str_extradecide4", 4),
(else_try),
(eq, ":var_0", "p_nsc0"),
(context_menu_add_item, "str_sc100", 1),
(context_menu_add_item, "str_sc200", 2),
(context_menu_add_item, "str_sc300", 3),
(context_menu_add_item, "str_sc400", 4),
(else_try),
(eq, ":var_0", "p_nsc100"),
(context_menu_add_item, "str_sc110", 1),
(context_menu_add_item, "str_sc120", 2),
(context_menu_add_item, "str_sc130", 3),
(context_menu_add_item, "str_sc140", 4),
(context_menu_add_item, "str_sc150", 5),
(else_try),
(eq, ":var_0", "p_nsc110"),
(context_menu_add_item, "str_sc111", 1),
(context_menu_add_item, "str_sc112", 2),
(context_menu_add_item, "str_sc113", 3),
(context_menu_add_item, "str_sc114", 4),
(else_try),
(eq, ":var_0", "p_nsc120"),
(context_menu_add_item, "str_sc121", 1),
(context_menu_add_item, "str_sc122", 2),
(context_menu_add_item, "str_sc123", 3),
(context_menu_add_item, "str_sc124", 4),
(context_menu_add_item, "str_sc125", 5),
(context_menu_add_item, "str_sc126", 6),
(context_menu_add_item, "str_sc127", 7),
(else_try),
(eq, ":var_0", "p_nsc130"),
(context_menu_add_item, "str_sc131", 1),
(context_menu_add_item, "str_sc132", 2),
(context_menu_add_item, "str_sc133", 3),
(context_menu_add_item, "str_sc134", 4),
(context_menu_add_item, "str_sc135", 5),
(context_menu_add_item, "str_sc136", 6),
(context_menu_add_item, "str_sc137", 7),
(else_try),
(eq, ":var_0", "p_nsc140"),
(context_menu_add_item, "str_sc141", 1),
(context_menu_add_item, "str_sc142", 2),
(context_menu_add_item, "str_sc143", 3),
(context_menu_add_item, "str_sc144", 4),
(context_menu_add_item, "str_sc145", 5),
(else_try),
(eq, ":var_0", "p_nsc150"),
(context_menu_add_item, "str_sc151", 1),
(context_menu_add_item, "str_sc152", 2),
(context_menu_add_item, "str_sc153", 3),
(try_end),
(try_end),
]),
------------------------------
script原有脚本game_event_context_menu_button_clicked改写,原本就是作为大地图右键特定party扩展菜单时,点击菜单选项相应的事件。
("game_event_context_menu_button_clicked",
[
(store_script_param, ":var_0", 1), #注意:var_0是大地图上的party被你右键时的,:var_1是当你点击右键扩展菜单的第几个选项,因为我是7个指令选项+2个返回上级/初级菜单选项,所以下面有的:var_1取值是1-9即该菜单有9个可点击的选项,可点击执行相关事件。
(store_script_param, ":var_1", 2),
(try_begin),
(eq, ":var_0", "p_main_party"),
(try_begin),
(eq, ":var_1", 1),
(tutorial_message_set_background, 1),
(tutorial_message, "str_dotaguide", 0, 100),
(else_try),
(eq, ":var_1", 2),
(tutorial_message_set_background, 1),
(tutorial_message, "str_dotaguideno", 0, 1),
(else_try),
(eq, ":var_1", 3),
(troop_set_slot, "trp_player", 629, 0),
(else_try),
(eq, ":var_1", 4),
(troop_set_slot, "trp_player", 629, 1),
(try_end),
(else_try), #上面是玩家的一些扩展菜单内容,跳过,和其他地方触发联动,主要看nsc系列的政令party
(is_between, ":var_0", "p_town_1", "p_salt_mine"),
#。。。。。。。。。。。省略。。。。。。。。。。。。。。
(else_try), #上面是城市村子等party的一些扩展菜单内容,跳过,和其他地方触发联动,主要看nsc系列的政令party
(eq, ":var_0", "p_nsc0"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 110),
#。。。。。。。。。。。省略——填响应的即时性功能,或因设定某变量值改变而在其他触发执行的长事件,下面类似格式都是填这种。。。。。。。。。。。。。。
(else_try), #party slot571是在我上面module_simple_triggers引用过,作用就是这里script脚本根据扩展菜单点击选项响应的slot值变化,确定是否多级菜单在跳转,然后跳转哪个菜单,就disable其他nsc系列的party,这样就可以只操作当前显示的nsc系列的party
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 210), #注意(eq, ":var_1", xxx), (party_set_slot, "p_main_party", 571, xxx), 这种格式后面都省略了对应右键扩展菜单按钮点击执行的事件,自己根据需求考虑,然后为什么要用枚举法写else情况,因为每个事件不一样
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 310),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 410),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 510),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 610),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 710),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc100"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 111),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 121),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 100),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc110"),
(store_random_in_range, ":var_4", 25, 100),
(store_random_in_range, ":var_5", 4, 20),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 111),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 112),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 113),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 114),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 115),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 116),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 117),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 110),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc120"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 121),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 122),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 123),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 124),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 125),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 126),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 127),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 110),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc130"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 131),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 110),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc140"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 141),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 110),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc150"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 151),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 110),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc160"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 161),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 110),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(else_try),
(eq, ":var_0", "p_nsc170"),
(try_begin),
(eq, ":var_1", 1),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 2),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 3),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 4),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 5),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 6),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 7),
(party_set_slot, "p_main_party", 571, 171),
(else_try),
(eq, ":var_1", 8),
(party_set_slot, "p_main_party", 571, 110),
(else_try),
(eq, ":var_1", 9),
(party_set_slot, "p_main_party", 571, 100),
(try_end),
(try_end),
很久前的演示视频表达下什么意思
|