Skip to content

basemmerink/tpp-ti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buy Me a Coffee at ko-fi.com

tpp-ti

tpp-ti is a template for creating a Twitch Integration version of Twitch Plays Pokemon, which can be imported into OBS as a single browser source.
It has support for custom events like follows, subscriptions, channel points and more.

Prerequisites

  • Navigate to your twitch developer dashboard and create a new Application.
    • Write down the client id and client secret for later
    • Enter a new OAuth Redirect URL: example.com/twitch - change example.com with your domain name or external IP
  • Download a rom and save it to the assets folder
  • Set up an SSL certificate, you will need privkey.pem chain.pem cert.pem

Installation

  • Edit .env, this file contains the project configuration
    • Change the value for the webhook secret
    • You can get an oauth token from Twitch TMI
  • Open index.html and edit the variables at the top, especially the rom name
  • Run npm install from bash/cmd

Running the server

  • Run npm run start from bash/cmd
  • If you run it for the first time, you will be prompted to authorize on Twitch.
    • Log in with the account for the channel on which you are going to stream TPP

Adding custom events

Receiving a Twitch event

Use twitchModule.subscribeTwitchEvent to subscribe to Twitch events.

Valid keys are channel.update channel.follow channel.subscribe channel.subscribe.gift channel.subscription.message channel.cheer channel.raid channel.channel_points_custom_reward_redemption.add stream.online stream.offline

Sending to the browser source

Data is sent over websockets.
You can use broadcastSocketMessage('KEY', {data: 5});

For more examples look at app.ts#63

Credits

This is made by baasbase

https://twitch.tv/baasbase
https://twitter.com/baasbase
https://www.youtube.com/channel/UCd5RjtL4EJwoeLJWiofGG3Q
https://ko-fi.com/baasbase

Gameboy color js emulator by Grant Galitz

https://github.com/taisel

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published