小地图
为《Zero Sievert》添加静态小地图,并用黄色光标显示玩家位置。可用 + 和 - 键调整透明度。需要 GMLoader,并通过 GMLoader.exe 启动游戏。
为其他模组提供动态修改游戏 UI 文件的函数集合,旨在避免破坏模组兼容性。本模组本身不提供独立功能,供其他模组调用;需要 GMLoader。
UiPatchLib 提供一组函数,可动态修改游戏 UI 文件,同时避免破坏模组兼容性。本模组本身不执行独立功能,仅供其他模组使用。
创建模组文件 ZS_vanilla\mods\config\code_patch\New Game Greeting.yaml,并写入以下内容:
gml_Object_obj_logo_screen_Create_0:
- type: append
code: |-
ui_patch_add_replace_all("ZS_vanilla/ui/mm_sidebar_main.ui", "label = \"New Game\"", "label = \"Wheeee New Game!\"");
ui_patch_add_replace_all(ui_file, find, replace, name = "");
对 UI 文件执行简单的字符串替换。
ui_file:UI 文件的相对路径,例如 ZS_vanilla/ui/pda_hunter_skills_select.ui。find:要查找的子字符串。replace:用于替换的字符串。name:可选的补丁名称。示例:
ui_patch_add_replace_all("ZS_vanilla/ui/mm_sidebar_main.ui", "label = \"New Game\"", "label = \"Wheeee\"", "MyFirstPatch");
如果未找到目标字符串,则显示游戏内警告信息。
ui_patch_add_replace_all_verbose(ui_file, find, replace, name = "");
参数含义与 ui_patch_add_replace_all 相同。示例:
ui_patch_add_replace_all_verbose("ZS_vanilla/ui/pda_hunter_skills_select.ui", "find this string", "replace with this string", "MyFirstPatch");
ui_patch_add_set_content(ui_file, ui_file_content, name = "");
ui_file:UI 文件的相对路径。ui_file_content:要写入的目标内容。name:可选的补丁名称。示例:
ui_patch_add_set_content("ZS_vanilla/ui/pda_hunter_skills_select.ui", "this is my content", "MyFirstPatch");
ui_patch_add(ui_file, __Name, __Function, __Args, __ExceptionHandler = "");
ui_file:UI 文件的相对路径。__Name:补丁名称,例如 MyPatch。__Function:用于修改 UI 文件内容的回调函数。调用时接收三个参数:
__Name。__Args。__Args:传递给函数的参数。__ExceptionHandler:可选的异常处理函数;函数至少需要接收一个参数。示例:
ui_patch_add(
"ZS_vanilla/ui/pda_hunter_skills_select.ui",
"MyPatch_To_Replace_Content_Of_pda_hunter_skills_select.ui",
function(_name, _original_content, _args) {
return _args[0];
},
["this is my new content"],
scr_draw_text_with_box
);
作者:kofolamaster。
前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。
<!-- aoe-mods-source:nexusmods:zerosievert:139 -->