Skip to content

About

Romestead-GUI-bridging所需的DLL开源仓库

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

RomesteadLiveBridge

RomesteadLiveBridge.dll 的源码。

这是一个托管 C# 桥接 DLL。它在游戏进程内启动一个命名管道服务器,用于接收外部工具发送的实时命令。

当前支持的命令:

  • ping
  • get_inventory
  • add_item
  • remove_slot

构建

在 Windows PowerShell 中运行:

powershell -NoProfile -ExecutionPolicy Bypass -File .\build_live_bridge.ps1

构建后会生成:

RomesteadLiveBridge.dll

源码只引用:

  • System.dll
  • System.Core.dll

游戏相关类型全部通过反射按名称查找,所以构建时不需要附带游戏 DLL。

加载方式

它需要由外部补丁或其他加载方式注入/加载到游戏进程中。方式是给游戏目录中的 Romestead.dll 打一个小补丁,让游戏运行后加载 RomesteadLiveBridge.dll。

协议

命名管道名称:

RomesteadLiveBridge

每条消息是一个 UTF-8 文本帧:

  1. 4 字节 little-endian 长度
  2. UTF-8 payload

payload 使用 tab 分隔字段,例如:

ping
get_inventory
add_item<TAB>material:wood_plank<TAB>10<TAB>
remove_slot<TAB>inventory<TAB>0<TAB>1<TAB>expected-item-instance-guid

响应格式:

OK<TAB>message
ERR<TAB>message

get_inventory 的 message 是 JSON。

About

Romestead-GUI-bridging所需的DLL开源仓库

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages