目前该模组仍处于活跃开发阶段,且版本为 Alpha 测试版,如发现任何错误,请向我们报告!
通过 OBS WebSocket 插件将 Minecraft 直接连接到 OBS Studio。允许使用命令方块、数据包和插件来触发 OBS Studio 中的各种操作。
该模组的工作原理是监听特定格式的可翻译聊天消息,对其进行解码并执行相应操作。你可以使用 /obscraft 命令生成 tellraw 命令。
演示视频
功能
- 在游戏中切换当前场景!
- 更新文本源的文本内容。
- 在指定场景中设置源的可见性。
- 设置源上滤镜的可见状态。(同样适用于 Move 等插件滤镜)
上述每个选项都支持输入字面名称以及从记分板目标(scoreboard objective)中查找名称。你可以搜索具有特定分数的第一个玩家,也可以查询特定玩家的分数。(同时适用于虚拟目标和“真实”记分板)
注意:要使客户端能够“看到”用于此模组的记分板目标,该记分板必须附加到某个显示位置。可以是任何显示位置,即使对玩家不可见,例如其他队伍的侧边栏。
命令
/obscraft listConnections - 列出所有 OBS 连接及其 ID。提供每个连接的当前状态。
/obscraft reconnect <id> - 根据 ID 重新连接到指定的 OBS 连接。
- 还有更多用于生成
tellraw 命令和保存操作的命令,但游戏内的文档会在你输入时动态展示所有这些命令。
安装设置
OBS Studio
首先,我们需要确保启用了 WebSocket 服务器。
在 OBS 中,进入 工具 -> WebSocket 服务器设置。
请确认以下设置:
- 勾选
启用 WebSocket 服务器。
- 勾选
启用身份验证。
- 记下
服务器端口 和 服务器密码。点击 显示连接信息 以查看这些内容。
Minecraft
注意:本模组需要安装 Architectury API 才能加载。
首次启动游戏以生成配置文件,它应位于你的其他模组配置文件中。
配置文件内容应如下所示:
{
"connections": [
{
"ID": "default",
"host": "127.0.0.1",
"port": 4455,
"password": "password"
}
],
"savedActions": {},
"savedActionKeys": {}
}
ID 是连接的唯一标识符。你可以建立与不同 OBS 实例的多个连接。
host 是运行 OBS 的计算机的 IP 地址。如果 OBS 在同一台计算机上运行,请使用 127.0.0.1。
port 是 OBS WebSocket 设置中的端口号。
password 是 OBS WebSocket 设置中的密码。
对于简单设置,只需确保端口和密码与 OBS 设置匹配即可。
之后重启游戏,即可完成设置!运行 /obscraft listConnections 以确保一切连接正常,Available Connections(可用连接)下应显示 default。
Right now this is in active development and still in alpha, please report any bugs you find!
Connect Minecraft directly to OBS Studio using the OBS WebSocket plugin. Allows using command blocks, datapacks, and plugins to trigger various actions in OBS Studio.
This works by listening for a specially formatted translatable chat message, which is decoded then acted upon. You can generate a tellraw command using the /obscraft command.
Demo Video
Features
- Set the active scene from in-game!
- Update a Text source's text.
- Set a source's visibility in a given scene.
- Set the visible status of a filter on a source. (Also works with plugin filters such as the Move plugin)
Each of these options support both typing literal names as well as looking up names from a scoreboard objective. You can either search for the first player with a specific score or search for the score of a specific player. (Works with both dummy objectives and "real" scoreboards)
NOTE: To have the client "see" a scoreboard objective for use in this mod, the scoreboard must be attached to a display. It can be any display, even if it's not visible to the player, like a different teams's sidebar.
Commands
/obscraft listConnections - List all OBS connections by ID. Gives connection status for each one.
/obscraft reconnect <id> - Reconnect to an OBS connection by ID.
- There are more commands to generate tellraw commands and save actions, but the in-game documentation is setup to show them all as you type.
Setup
OBS Studio
First, we need to make sure the websocket server is enabled.
In OBS go to Tools -> WebSocket Server Settings.
Make sure of the following:
Enable WebSocket Server is checked.
Enable Authentification is checked.
- Note down the
Server Port and Server Password Press Show Connect Info to see it.
Minecraft
Note: The mod required the Architectury API installed to load.
Launch the game once to generate the config file, it should be with other configuration files for you mods.
It should look like this:
{
"connections": [
{
"ID": "default",
"host": "127.0.0.1",
"port": 4455,
"password": "password"
}
],
"savedActions": {},
"savedActionKeys": {}
}
ID is a unique identifier for the connection. You can have multiple connections to different OBS instances.
host is the IP address of the computer running OBS. If it's on the same computer, use 127.0.0.1
port is the port number from the OBS WebSocket settings.
password is the password from the OBS WebSocket settings.
For a simple setup just make sure port and password match the OBS settings.
After that restart the game and you should be good to go! Make sure everything is connected by running /obscraft listConnections and default should show up under Available Connections.
评论 0
登录后参与评分
还没有评论,来抢沙发吧