高级玩家

- 贡献度
- 7
- 金元
- 3215
- 积分
- 350
- 精华
- 0
- 注册时间
- 2017-6-3
|
# Hellforged Demo - BepInEx 魔改版(开发环境)
## 这是什么
为《Hellforged Demo》(Unity 6000.5.8f1 / IL2CPP,Steam AppID 4692610)适配好的
BepInEx 6.0.0-be.788(IL2CPP)开发环境。
**不含任何 MOD**,plugins 目录为空,可直接用于开发自己的 MOD。
## 相对原版 BepInEx 的改动
1. **替换了 Il2CppInterop.Runtime.dll**(1.5.3.0 自编译 release 版)
- 原版自带的 1.5.3.0+dbda1cb dev 构建与 Unity 6000 新版 IL2CPP 不适配
- 不替换的话 MOD 运行时 interop 调用会出错
2. **BepInEx.cfg 配置**:
- `[IL2CPP] UpdateInteropAssemblies = false`(防止启动时覆盖我们替换的 runtime)
- `[Logging] UnityLogListening = false`(关闭 Unity 日志转发,避免日志刷屏)
3. **interop/ 下 213 个游戏 API 互操作 DLL 已生成**(Solus.Game.dll 等),
编译 MOD 时直接引用即可,无需自己跑 Il2CppDumper
## 安装方法
把本文件夹内的**全部内容**(`BepInEx/`、`winhttp.dll`、`doorstop_config.ini`、
`.doorstop_version`)复制到游戏根目录:
```
F:\Steam\steamapps\common\Hellforged Demo\
```
覆盖已有同名文件即可。然后从 Steam 正常启动游戏。
## 开发 MOD 快速开始
1. 在游戏根目录 `BepInEx\plugins\` 下放入你的 MOD DLL
2. 参考现有项目(X4Mod / RarityMod 源码位于
`游戏根目录\API_Docs_work\`),csproj 直接引用:
- `BepInEx\core\BepInEx.Core.dll`
- `BepInEx\core\BepInEx.Unity.IL2CPP.dll`
- `BepInEx\core\Il2CppInterop.Runtime.dll`
- `BepInEx\core\0Harmony.dll`
- `BepInEx\interop\Solus.Game.dll` 等游戏 API
- `BepInEx\unity-libs\UnityEngine.CoreModule.dll`(注意:要引 interop 版)
3. MOD 结构:
```csharp
[BepInPlugin("你的.GUID", "名字", "1.0.0")]
public class MyMod : BasePlugin
{
public override void Load()
{
var harmony = new Harmony("你的.GUID");
harmony.PatchAll(typeof(MyMod).Assembly);
}
}
```
## 日志位置
- MOD 日志:`BepInEx\LogOutput.log`
- 异常日志:`BepInEx\ErrorLog.log`
## 注意
- 游戏经 Steam 启动(带 DRM),直接跑 exe 会启动早期退出
- `BepInEx\interop\assembly-hash.txt` 与 interop DLL 配套,不要单独删
通过网盘分享的文件:BepInEx魔改版.zip
--来自百度网盘超级会员v9的分享
另外这是一个在这个环境可用的4倍金钱与经验收益的MOD 供测试
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
评分
-
1
查看全部评分
-
|