InterfacePlugin

版本 v1.0.0·更新於 2024-06-27

Provides websocket based access to Talespire. Ideal for browser extensions or Symbiotes.

模組介紹 作者原文

Interface Plugin

This unofficial TaleSpire add a remote websocket interface to manipulate Talespire from an external application.

This can be a web browser extension (typically to integrate content from other VTTs such as Dnd Beyond, Roll20,

Foundary), it can be a Talespire Symbiote (typically to perform some task that is not normally available via the

Symbiote API), or it could be a standalone application running outside of Talespire.

Lord Ashes' Talespire Plugins are always available for free. Lord Ashes does not have a Patreon but if you really want

to make a donation to the chocolate fund to keep the work going, you can do so using the Donate link above.

Change Log

1.0.0: Initial release

Install

Use R2ModMan or similar installer to install this plugin.

This plugin is needed by any player whose Talespire is going to be affected by the remote source.

Usage

This plugin is a dependency plugin which remote sources (such as Browser Extensions, Symbiotes or Standalone Applications)

can use to manipulate Talespire from an external source (i.e. outside of Talespire).

Players making use of such remote sources do not need to do anything with this plugin to make it work. However, they will

likely have to do stuff at the source but that has nothing to do with the plugin. See the source documentation for how to

use the source browser extension, Symbiote or application.

Making Remote Command Requests

The Interface Plugin impelments a Websocket interface through which remote sources can make requests into Talespire.

Webscokets are easy to implement in Javascript (i.e. Browser Extensions or Symbiotes) and most languages have libraries for

implementing Webscokets if you are writing a standalone application or script.

A sample Javascript file is provided which can be run by double clicking it. This will open it in a browser without needing

to host it. This sample code is intended to show an example of how the interface is used and a potential Javascript solution

to make command requests.

Unlike the Symbiote API which is well documented but somewhat limited in what it can do, the Interface Plugin is very geenric

allowing you to access most of Talespires methods and objects. However, this also means there is no detailed documentation

for all it can do because it is a generic implementation that just provides access into the Talespire code. This means you

will likely need to use a software like dnSpy to figure out what method you want to call and with what parameters.

Request Message

Requests are made my sending a Request message over the websocket and optionally listening for a response. The Request message

has the following format:

{

"command": "INVOKE",

"source": "Bouncyrock.TaleSpire.Runtime+ChatManager",

"method": "SendChatMessageToBoard",

"paramJson": [ "Hello Everyone!", "NGuid", null, "false" ]

}

Not all requests use all of these parameters. It should also be noted that in the Javascript example, there is one additional

parameter called "delay". This is not used by the Interface Plugin itself, it is only used by the Javascript client to determine

the timing of messages.

The `command` parameter is requires and it determines what kinds of an operation is being done. Possible options are "FIND",

"READ", "REF", "WRITE", "INVOKE" and "REMOVE".

The `source` parameter is used to determine on who or what the operation is happening.

The `method` parameter is used as a further selection depending on the command.

The `paramsJson` parameter is a list of parameters typically Json encoded unless simple specific to the command.

FIND

The find command is used to locate a specific asset, gameobject, instance, type, or component. The results of the find are

stored under a given name to be used with future commands. For example, if you want to set the Hp of a asset, you first find

the asset and store that under a speciifed name and then you can use that name in the Invoke command to perfor

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

bbepisTaleSpire-BepInExPackbrcoding-SetInjectionFlagPluginLordAshes-FileAccessPluginLordAshes-LoggingPlugin

檔案與校驗

檔案名稱
InterfacePlugin-1.0.0.zip
檔案大小
35.5 KiB