脚本加载器

脚本加载器

让模组添加自己的游戏脚本,而不是编辑游戏本身的脚本,这样改变游戏行为的模组就可以一起安装了。

让模组添加自己的游戏脚本,而无需编辑游戏本身的脚本,这样改变游戏行为的模组就可以一起安装。

需要 [url=https://www.nexusmods.com/thelastofuspart2/mods/32]ndmodloader[/url]。

[b]安装[/b]

如果尚未安装,请先安装 ndmodloader:将 [font=Courier New]winmm.dll[/font] 和 [font=Courier New]modloader.asi[/font] 放入游戏文件夹,与 [font=Courier New]tlou-ii.exe[/font] 位于同一目录。

将 [font=Courier New]ScriptLoader.asi[/font] 复制到游戏文件夹,与 [font=Courier New]tlou-ii.exe[/font] 位于同一目录。

需要 Script Loader 的模组与其他模组一样放入 [font=Courier New]mods[/font] 文件夹。

[b]卸载[/b]

从游戏文件夹中删除 [font=Courier New]ScriptLoader.asi[/font]。需要它的模组在没有它的情况下将无法正常工作。

[b]致模组作者[/b]

脚本模组在其 psarc 的 [font=Courier New]bin/dc1/<module>.bin[/font] 处附带其编译后的脚本模块,并在 psarc 根目录附带一个名称以 [font=Courier New]-scripts.txt[/font] 结尾的文本文件,例如 [font=Courier New]MyMod-scripts.txt[/font]:

[code]module ss-my-mod
spawn ss-my-mod[/code]
[font=Courier New]module <name>[/font] 将 [font=Courier New]bin/dc1/<name>.bin[/font] 添加到游戏的模块列表中。该名称不得与游戏已有的模块或另一个模组添加的模块重名。该模块不得导出任何游戏模块已导出的符号。

[font=Courier New]spawn <script>[/font] 在每次关卡加载时在玩家身上启动该状态脚本。该脚本必须由脚本模组添加的模块导出。

添加的模块获得的导入与 [font=Courier New]ss-debug-draw-controller[/font] 相同。

[b]支持我[/b]

[url=https://throne.com/nudemaster64][img]https://files.catbox.moe/w2scdn.png[/img][/url]