TwitchIntegrationAPI

版本 v1.0.0·更新於 2023-12-05

Adding twitch integration to the game! By its own doesn't do much, but now you can add this to your own mod to handle the twitch!

截圖 共 6 張

模組介紹 作者原文

TWITCH INTEGRATION API

This API only purpose to connect the specified twitch chat to the game and let

the mod developers the power to create their own commands and execution methods to

do something in the game!

Installation

  • Download the BepInEx and install it
  • Let the game run once to generate all the important files and folders
  • Download this mod and place the TwitchIntegrationAPI.dll into the plugins folder
  • Let the game run once more to generate the config files.
  • Navigate to the config folder and open the twitch-integration-api.cfg file
  • Read the descriptions and override the necessary datas to connect it to your twitch chat!
  • Thats it. Enjoy.:)

How to use

By itself this mod doesn't do too much, but if you want to test if its working, after you installed it

run the game and open your twitch chat and write!ping into the chat.

If you see a response in your game console liek this " EXECUTING PING..." then your all done and the plugin is working!:)

For the developers

How to integrate into your mod

To use this plugin as an API, first import the TwitchIntegrationAPI.dll file into your project as reference (just like the Assembly),

then write the following line before your BaseUnityPlugin class\

After that, create a variable to store the API for later use like this\

In the Awake function get the instance of the Base plugin and give it to the already created variable\

Thats it, now your mod depends on the TwitchIntegrationAPI

Creating new commands

To create a new command and register it into the twitch api, first you have to create a new class and inherit it from the Command class like this\

After that the class requires you to create a constructor like the in the picture and an override method Execute method.\

If you don't want to specify a name later on when you create a new instance of this class, then you could change the constructor to look like this\

The command name is not key sensitive!\

You could write your own processing method inside the Execute method!\

The args here contains any other parameters then the command name itself (for example:!HELLO szaki\

In this case the command name is hello the parameters are szaki)\

To register your command go back to your BaseUnityPlugin where in this example we specified the api and add the following line\

Thats it, now you can register as many command as you want and my API handles the rest.:)

About me

If you have any suggestion or question about it, heres my discord: szkristof97 (SZAKI)

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

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

BepInEx-BepInExPack

檔案與校驗

檔案名稱
TwitchIntegrationAPI-1.0.0.zip
檔案大小
53.9 KiB