Giter VIP home page Giter VIP logo

tabletopsandanvils / foundry-stream-module Goto Github PK

View Code? Open in Web Editor NEW
14.0 5.0 9.0 3.4 MB

Implements two-way communication between Foundry VTT and Twitch, allowing for two-way chat plus adds dice rolling requests, a tabbed chat window, a separate dice engine for just for viewers, event handling and several moderation commands directly into Foundry itself, bringing your streamed game to the next level of interactivity!

Home Page: https://www.patreon.com/tabletopsandanvils

JavaScript 99.90% CSS 0.10%
foundry-vtt foundry foundryvtt rpg dnd pathfinder twitch virtual-tabletop gaming streaming

foundry-stream-module's Introduction

Foundry Stream Module

A module for integrating Twitch chat from streams into Foundry Virtual Tabletop. Foundry Stream Module sends player chats, rolls, interactions to the Twitch stream chat and allows viewers in the Twitch chat to send messages to the players as an out of character message. GM's or another configurable user role can also moderate the Twitch chat via canvas control buttons for actions such as Request Roll, Emote, Clear, Timeout, Ban, Slow and Raid. Check out our current list of streamers! Current Streamers List If you would like your stream added to the list, drop at message to me over at Discord

General

This is my first time programming anything in about 27 years, as such, there may be a few glitches here and there. Just understand that I've been a professional blacksmith and bladesmith for more than two and a half decades and programming is a lot different than swinging a hammer! I love the community around Foundry VTT and wanted to give a little back, so here it is, this is my hobby project - what I do to relax - although there's been a few tense moments just to get this first release out! If you find it useful, great! I hope that you like it! As my programming skills grow I hope this module grows with them.

YouTube: Introducing Foundry Stream Module

Change Log

The most recent changelog.md

Configuration

  • Twitch Channel - This is your Twitch stream name.
  • User Name - For your Twitch username or registered bot name, to be used in the future for sending messages back to Twitch. Capitalization may affect echoing. If you're not receiving messages from Twitch but messages are going out, try all lowercase for the user name.
  • Twitch OAuth Token - OAuth token for the user above. Without it you will only be able to receive messages but rolls, chat etc will not be sent to Twitch. If you do not have a OAuth token for your Twitch stream, simply log in to Twitch with your browser, open a tab and go to https://twitchapps.com/tmi/ - follow the prompts and your OAuth token will be generated. This will be obfuscated on saving for added security.
  • /t Twitch Chat Command - Messages to Twitch should use /t command in chat window, messages without will be ignored and only sent to other clients in Foundry. Please note, this setting requires all connected clients to refresh on change.
  • Out to Twitch - Check to send Foundry chat messages to Twitch channel.
  • Receive Twitch - Enable to receive messages from your configured Twitch channel.
  • Moderation Access Level - Every once in a while a GM may need help with moderating a Twitch channel. Select user role to allow access to the module moderation controls.
  • Chat Type - How incoming messages from Twitch should be assigned. Depending on different modules being used, it may be desirable to change how a chat card is created. Options are OOC, IC, Emote, Roll and Other. Default setting is OOC.
  • Quiet Mode - Filters rolls such as attacks, checks and spells from being sent to Twitch, only allows OOC, IC, Emote and Other to be passed along to the stream.
  • Send Connect Message - Turn on/off announcement message when connecting to a Twitch channel chat.

  • Announcements - These are announcements to be broadcast to your channel every x seconds.
  • Chat Dice - Turn on/off the dice roller in Twitch Chat.

Features

  • Chat - Two way communication between Foundry and Twitch.
  • GM Moderation - On the side controls there are buttons to Clear Twitch chat, Timeout or Ban viewers and a Raid button. Please note, in order for the Raid function to work you must be signed in through a browser as well in order to click on confirmation dialog.
  • Roll Request - GM/Moderator can request a roll from a Twitch viewer. If DSN is enabled the dice will roll within the Foundry canvas, if not the result will just be sent to the chat card.

Links

Acknowledgements

Many thanks go out to the entire FoundryVTT community especially Atropos for creating it, just about everyone over in the #module-development channel on the FVTT Discord, League of Extraordinary FoundryVTT Developers, cwendrowski for creating Tabbed Chatlog, Melbz who wrote his own Twitch-bot for Foundry (https://bitbucket.org/Melbz/foundryvtt-twitch-bot/src/master/) that pointed me in the right direction for starting this module and Pint and Pie (https://github.com/thomasmckay) who is doing things with Twitch and Foundry that are absolutely mind-numbingly insane. His play through chat module lit the spark of inspiration for Foundry Stream Module many, many months ago!

License

Bugs

foundry-stream-module's People

Contributors

cswendrowski avatar tabletopsandanvils avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

foundry-stream-module's Issues

Module UI & Incoming Chat

Modules control button is missing from left control canvas.
Outgoing messages to Twitch are received, incoming messages are detected but not written to chat window. The module is definitely reading messages from Twitch as can be proven by doing a simple '!r 1d20' request to roll dice.

Local echo

Need to fix a local echo issue. I believe I know what the issue is, but I'm running a few tests before committing an update.

No Communication with token

Guru Meditation: Error #00000004.0000AC0 - Message not sent to Twitch because you used the /t command without having it enabled in your FSM config.

I will get this if I type in /t hello twitch in the twitch tab of foundry.

What is the FSM config?

Update to 0.8.X?

Hello, the sidebar button doesn't work anymore, and the chat is scrambled between the tabs after the update. Is there any news regarding an update?

Incoming twitch chat does work

Love the mod, and the new version looks the best, but incoming twitch chat does not work. Everything else does including dice rolls, dice roll requests, outgoing twitch chat using /t, and DSN support. Even on a fresh world, it won't take incoming chat but everything else works. Here's the error that's popping up in Chrome in case it helps!

Thanks for the mod!

Screenshot 2021-04-22 003821

invalid media link

Hi, I noticed you have a space preceding your media link in the manifest file, making it invalid

      "link":" https://raw.githubusercontent.com/TabletopsAndAnvils/Foundry-Stream-Module/main/img/fsm-cover.png"

should be

      "link": "https://raw.githubusercontent.com/TabletopsAndAnvils/Foundry-Stream-Module/main/img/fsm-cover.png"

Unable to click button

I keep clicking but the menu isn't coming up at all. I disabled everything but this in 8.6 it isn't allowing me to click it.

!roll works but no messages from Twitch show up in chat

I can verify that the bot works by typing !roll in chat, but the messages aren't showing up in foundry's chat. Receive from Twitch is enabled, but is there anything else that is needed for the messages to be passed through?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.