Guildrun Demo 玩家自製 MOD 框架的核心模組。
- 🧩 模組載入器:自動載入
BepInEx/plugins/Guildrun.Modules/資料夾內所有 .dll - 🔌 共用 API:提供
IModule介面與ModuleBase基礎類別 - 📋 生命週期管理:統一管理模組 Init / Update / OnGUI / Dispose
Guildrun Demo/
└── BepInEx/
├── plugins/
│ ├── Guildrun.MOD.Core.dll ← 本核心(必須)
│ └── Guildrun.Modules/ ← 其他模組放這
│ ├── Guildrun.MOD.TraditionalChinese.dll
│ ├── Guildrun.MOD.Tools.dll
│ └── Your.Module.dll
└── core/
└── ...BepInEx 核心 DLL
- 安裝 BepInEx 6 IL2CPP 到
Guildrun Demo/根目錄 - 下載本倉庫
build/plugins/Guildrun.MOD.Core.dll - 放到
Guildrun Demo/BepInEx/plugins/Guildrun.MOD.Core.dll - 啟動遊戲,看到
=== Guildrun MOD Core 已載入 ===表示成功
實作 IModule:
using GuildrunMODCore;
using BepInEx.Logging;
public class MyModule : ModuleBase
{
public override string Name => "My Module";
public override string Version => "0.1.0";
public override string Description => "我的第一個模組";
protected override void OnInitialize()
{
Log("初始化完成");
}
public override void OnUpdate()
{
// 每幀呼叫
}
public override void OnGUI()
{
// 渲染 UI
}
}編譯時引用 Guildrun.MOD.Core.dll,然後把產出物放到 Guildrun.Modules/ 資料夾即可。
Guildrun Demo 玩家自製 MOD 生態系:
| 倉庫 | 用途 | 必需 |
|---|---|---|
| Guildrun-MOD-Core ← 本倉庫 | 模組核心 | ✅ |
| Guildrun-MOD-TraditionalChinese | 繁體中文化補強 | 選用 |
| Guildrun-MOD-Tools | 遊戲內控制台 + 一鍵動作 | 選用 |
| Guildrun-SaveEditor | Python 存檔編輯器(已可用!) | 獨立工具 |
MIT