MtgTwitchAPI
A centalized api to streamline twitch interaction.
模組介紹 作者原文
A simple api that allows mods to read chat messages from twitch, as well as a poll system.
If youre a streamer, make sure that you set your channel name by typing "tapi:setchannel " (you only need to do this once) before enabling twitch mode by typing in the console "tapi:start"(you need to do this every time you start up the game)
once tapi has been started, it can be toggled on and off with the command "tapi:toggle"
note that while tapi tries to disable functionality when the toggle is off, it is partially up to the developer of individual mod to implement the behavior. Unexpected results can occur.
if youre a modder, set the dll as a refrence in your mod and then subscribe a method to "GlobalChatDelegate". you can check if twitch integration is currently enabled via the "integrationEnabled" variable. While twitch mode is enabled, every time a chat message is sent in the channel, the event will go off, allowing you to react to messages/usernames and do in-game events.
additionally, it is recommended you subscribe to "GlobalToggleStatusNotification" event, which lets you know whenever tapi has been enabled or disabled.
as for polls, example code and explanation for the system should be in the gitbook or source for this mod.
big thank to kyle who wrote basically all the twitch stuff, this is practically a port of his twitch integration mod
big thanks to nevernamed who made the mod icon.
what did i do you ask? good question.
1.1.2
-removed a certain debug command
1.1.0
-added polls
-switched command prefix from "twitchapi" to "tapi"
-fixed not being able to toggle twitch mode on after toggling it off
-did not add explanation on how to use polls
1.1.5
-fixed some poll functionality
-added poll functionality
-mod barely works, now
-made example code to showcase polls
1.1.6
-some behavior fixes
1.1.7
-fixed polls only allowing 3 vote options, instead of 4
-fixed ui alignment issue if poll had a title
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: