TwitchIntegrationAPI
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!
Screenshots 6 screenshots
About this mod Author’s original text
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)
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: