About this mod
C# mod加载器,允许使用C# 编写 mod,调用游戏内部的C#接口。
C# mod loader, allow you to run mod with C#, call inner C# api.
- Requirements
- Permissions and credits
- Donations
这个mod加载器可以加载c#写的mod。C# mod可以调用USharp端提供的api,包括游戏内部的和C#包装的UE引擎的接口,也可以往游戏内部的事件和委托增加回调。
Wukong use USharp as script engine, many logic implements in charp. Some api can only access in C#, not in UE c++.
This mod loader allow you to load mods written in C#. C# mods can call csharp api from b1-managed and Unreal Engine.
更新记录
0.1.0:
- 重新提前了初始化时间,并避免出现错误,方便一些mod提前hook
- 0.0.8提前了初始化时机,此版本把等待时间加回来,避免一些现有的mod初始化失败
- 支持C# Patch/Hook,请注意说明
- 支持手柄按键(暂不支持PS和Switch手柄),也可以直接hook OnAnyKeyTriggerEvent
- 兼容其他使用version.dll的插件(放到CSharpLoader/Plugins目录中)
- 尝试支持游戏中文路径
Change log
0.1.0:
- The initialization time has been moved up again, and errors are avoided. Let mods can hook in early time.
- Version 0.0.8 bring the initialization timing forward. This version brings back the waiting time to avoid some existing mods from failing to initialize.
- Supports C# Patch/Hook, please note the Attention.
- Supports gamepad buttons (does not support PS and Switch controllers currently), can also directly hook OnAnyKeyTriggerEvent.
- Compatible with other plugins that use version.dll (place them in the CSharpLoader/Plugins directory).
- Attempts to support Chinese game paths.
使用说明 / Usage
解压到游戏目录
Extra to game folder.
BlackMythWukong/b1/Binaries/Win64/
CSharpLoader/
Data/
Mods/
Plugins/
0Harmony.dll
CSharpManager.bin
CSharpModBase.dll
Mono.Cecil.dll
Mono.Cecil.Pdb.dll
Mono.Cecil.Rocks.dll
b1cs.ini
version.dll
mod的dll需要放在mod dll should be Mod dll should be placed in
CSharpLoader/Mods/<ModName>/<ModName>.dll
例如 for example
CSharpLoader/Mods/CSharpExample/CSharpExample.dll
如果你安装后游戏打不开,请尝试把hid.dll改名成version.dll (新版默认使用version.dll)
If you can't open the game after installation, try rename hid.dll to version.dll
配置文件 CSharpLoader/b1cs.ini
Develop: 开启开发模式,可以按ctrl+f5重新加载C# mods
Console: 显示控制台窗口,打印log
EnableJit: 开启jit模式,请看下面的注意
Config File CSharpLoader/b1cs.ini
Develop: press ctrl+f5 reload C# mods
Console: show console window to print log
EnableJit: see Attention below
注意
C# loader 0.0.7之后的版本为了支持C# patch/hook,把游戏的mono运行时的运行模式从默认的解释执行模式,改成了jit(运行时编译执行)模式。jit一定程度上可能会带来一些性能提升,但可能并未经过游戏开发商的充分测试,可能会对游戏的稳定性带来一些影响。同时由于修改了游戏的底层执行代码,目前与一些修改器不兼容,包括风灵月影在内的一些修改器会失效,请根据你使用的mod的说明,决定是否使用支持hook的C# loader。
Attention
Start with version 0.0.7 of the C# loader, to enable C# patch/hook, the game's Mono runtime execution mode has been changed from the default interpreter mode to the JIT (Just-In-Time) mode. JIT can potentially bring some performance improvements, but it may not have been thoroughly tested by the game developers, which could impact the game's stability. Additionally, it is currently incompatible with some trainer, including flingtrainer, which may become ineffective. Please decide whether to use the C# loader that supports hooks based on the instructions of the mods you are using.
与其他插件的兼容
version.dll是常用的插件名字,如果你使用了其他有名称冲突的插件,可以把这些插件的dll,改成除version.dll外的其他名字(后缀得是.dll),放到CSharpLoader/Plugins/目录里,C# loader会一起加载这些插件
Compatibility with Other Plugins
"version.dll" is a commonly used plugin name. If you are using other plugins with naming conflicts, you can rename their DLLs to any name other than "version.dll" (the suffix must be ".dll") and place them in the "CSharpLoader/Plugins/" directory. The C# loader will load these plugins together.
如果你想了解如何用C# 开发黑神话悟空的mod,可以看这里:
If you are interested in develop C# mod.
https://github.com/czastack/B1CSharpLoader/
感谢禽兽-云轩等mod作者的使用和反馈,帮助完善了这个C# loader,期待他们做出的优秀mod.
也感谢之前我修改器的用户们的使用和赞助,C# loader最开始在修改器上实验,并逐渐完善。
Thanks for the use and feedback of mod authors such as 禽兽-云轩, to help improve this C# loader, looking forward to the excellent mod they make.
Thanks also to the use and sponsorship of the users of my trainer, C# loader began to experiment on the trainer, and gradually improved.
作者:chenstack