Skip to content

Commit 86795ce

Browse files
Add files via upload
1 parent b3cd535 commit 86795ce

5 files changed

Lines changed: 40 additions & 15 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ A module for integrating Twitch chat from streams into Foundry Virtual Tabletop.
66
# General #
77
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. </p>
88

9-
<img align="right" src="https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/blob/main/img/Screen%20Shot%202021-01-19%20at%2022.22.52.png">
9+
<img align="right" src="https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/blob/main/img/Screen%20Shot%202021-01-19%20at%2022.22.52.png"><p>
10+
## Recommended but not required ##
11+
I highly recommend Tabbed Chatlog by cswendrowski! https://github.com/cswendrowski/FoundryVTT-Tabbed-Chatlog
12+
This module adds tabs to the regular Foundry chat and because Foundry Stream Module recieves chats and displays them as OOC (out of character) chat messages
13+
new messages will appear in the OOC tab. While not it's own Twitch tab, this is a huge benefit to keeping the chatlog readable and organized! </p>
1014

1115
<a href="https://youtu.be/g6h1_mgtr4U"><img align="center" height="25%" width ="25%" src="https://img.youtube.com/vi/g6h1_mgtr4U/0.jpg"> YouTube: Introducing Foundry Stream Module</a>
1216

@@ -46,6 +50,7 @@ For manual installation:
4650

4751
### Future Goals
4852
- `Clean Up Rolls` - Clean up the roll output to Twitch. As is, depending on the system and various mods being used, rolls can get quite complicated looking. In the meantime, for the next release I may look into separating chat from rolls in the output. There's a lot of different game systems out there so I wont say no to some help if anyone is interested in contributing! :)
53+
- `Breakout Window` - Possibly? Not sure that it really needs to be added now with the Tabbed Chatlog module. Still, a configurable breakout window for incoming chats that would be viewable by all players might happen in the future. Customizable for theme, color, opacity, etc.
4954
- `Set Dressing` - Be able to add floating, resizeable, placeable graphics such as a "stream tag" for all clients, branding for the stream.
5055
- `RTMP Pipe Dream` - With Jitsi/WebRTC it's now possible to stream a window or browser tab directly to YouTube and other RTMP servers. A long term goal is to incorporate this functionality into Foundry Stream Module along with controls to make a slim streaming client that is essentially WYSIWYG for the user, foregoing the use of other software such as OBS or Streamlabs.
5156

@@ -57,4 +62,4 @@ Many thanks go out to the entire FoundryVTT community especially Atropos for cre
5762
- This work is licensed under the [Foundry Virtual Tabletop EULA - Limited License Agreement for Module Development](https://foundryvtt.com/article/license/).
5863

5964
### Bugs
60-
- View current known bugs in the [Issue Tracker Backlog](https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/issues)
65+
- View current known bugs in the [Issue Tracker Backlog](https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/issues)

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## Release 0.2.3
2+
- Fixed url in modules.json
3+
- Quick fix for language modification. You can now edit the language file for custom roll messages. Be sure to still include the trigger '!gm' and the variables
4+
'${who}' for the viewer name and '${dice}' for the dice to request. This is an advance method and should only be done by people familiar and comfortable with
5+
editing .json files as any error in the formatting of this file will not allow the module to load. I highly recommend making a backup of the original first! In
6+
the future, when I have the time to re-work the configuration of the module, I will make this editable from within Foundry itself. This is just a short term
7+
fix per user requests. PS, if you're editing the language .json in a language other than English that is currently supported byt Foundry, please share it on
8+
my github or Discord server so I can consider including it in future versions!
9+
110
## Release 0.2.2u
211
- Minor update to emotes. Emotes were being sent to chat cards even when Receive from Twitch was disabled.
312

lang/en.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,11 @@
5353
"fsMod.settings.chatType.hint" : "How the incoming messages from the stream should be assigned. Depending on the modules you may be running it might be desirable to change how the chat card is assigned so it appears where you want it. Default is Out of Character which is designed to work with the inline tabbed chat feature.",
5454

5555
"fsMod.tabs.foundry": "Foundry",
56-
"fsMod.tabs.fsm": "Twitch"
56+
"fsMod.tabs.fsm": "Twitch",
57+
58+
"fsMod.settings.viewerRoll.req": "The GM is requesting ${who} to roll! [Type !gm ${dice} to roll]",
59+
60+
"fsMod.settings.reqRoll.req": "The GM is requesting a viewer to roll! [Type !gm ${dice} to roll]",
61+
62+
"fsMod.settings.thankRoll.req": "Thank you for the roll,"
5763
}

module.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"patreon": "TabletopsAndAnvils"
1313
}
1414
],
15-
"version": "0.2.2u",
15+
"version": "0.2.3",
1616
"minimumCoreVersion": "0.7.5",
1717
"compatibleCoreVersion": "0.7.9",
1818

@@ -48,16 +48,12 @@
4848
"media":[
4949
{
5050
"type":"cover",
51-
"link":"https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/blob/main/img/fsm-cover.png"
52-
},
53-
{
54-
"type":"screenshot",
55-
"link":"https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/blob/main/img/Screen%20Shot%202021-01-19%20at%2022.03.50.png"
51+
"link":" https://raw.githubusercontent.com/TabletopsAndAnvils/Foundry-Stream-Module/main/img/fsm-cover.png"
5652
}
5753
],
5854
"bugs": "https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/issues",
5955
"url": "https://github.com/TabletopsAndAnvils/Foundry-Stream-Module",
6056

6157
"manifest": "https://raw.githubusercontent.com/TabletopsAndAnvils/Foundry-Stream-Module/main/module.json",
62-
"download": "https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/archive/0.2.2u.zip"
58+
"download": "https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/archive/0.2.3.zip"
6359
}

scripts/fsmcore.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { fsMod } from "./streamTwitch.js";
44
import { levelCheck } from './streamTwitch.js';
55
import { DiceRoller } from 'https://cdn.jsdelivr.net/npm/rpg-dice-roller@4.5.2/lib/esm/bundle.min.js';
6+
import {localize} from "./utils.js";
67

78
const roller = new DiceRoller();
89

@@ -387,10 +388,16 @@ export function twitchRoll() { // A S K F O R R O L L
387388
console.log(who);
388389
var dice = html.find('[name="rollDice"]').val();
389390
if (who != "") {
390-
fsMod.client.say(myChannel, `The GM is requesting ${who} to roll! [Type !gm ${dice} to roll]`);
391+
let viewerRoll = (localize('settings.viewerRoll.req'));
392+
let v1 = viewerRoll.replace('${who}', who);
393+
let vFin = v1.replace('${dice}', dice);
394+
fsMod.client.say(myChannel, vFin); //`The GM is requesting ${who} to roll! [Type !gm ${dice} to roll]`);
391395
diceWait(dice, who); }
392396
else {
393-
fsMod.client.say(myChannel, "The GM is requesting a viewer to roll! [Type !gm " + dice + " to roll]");
397+
let reqRoll = (localize('settings.reqRoll.req'));
398+
let v1 = reqRoll.replace('${who}', who);
399+
let vFin = v1.replace('${dice}', dice);
400+
fsMod.client.say(myChannel, vFin); //"The GM is requesting a viewer to roll! [Type !gm " + dice + " to roll]");
394401
diceWaitAll(dice);
395402
}
396403
}
@@ -461,11 +468,12 @@ export function diceWait(dice, who) { // G M R E Q U E S T R O L L
461468
let myChannel = (game.settings.get("streamMod", "streamChannel"));
462469
let res = message.slice(3);
463470
var whoIs = who.toLowerCase();
464-
var idCheck = tags["display-name"].toLowerCase();
471+
var idCheck = tags["display-name"].toLowerCase();
472+
let thankRoll = (localize('settings.thankRoll.req'));
465473
if (whoIs != idCheck) {return diceWait(dice, who);}
466474
if (whoIs == idCheck) {
467475
new Roll(res).roll().toMessage({speaker : {alias : `${tags["display-name"]}`}});
468-
fsMod.client.say(myChannel, `Thank you for the roll, ${tags["display-name"]}!`);
476+
fsMod.client.say(myChannel, thankRoll + ` ${tags["display-name"]}!`);
469477
return;
470478
}
471479
} return diceWait(dice, who);
@@ -484,8 +492,9 @@ export function diceWaitAll(dice) { // G M R E Q U E S T R O L L - A L L
484492
if (message.includes("!gm") && message.includes(dice) ) {
485493
let myChannel = (game.settings.get("streamMod", "streamChannel"));
486494
let res = message.slice(3);
495+
let thankRoll = (localize('settings.thankRoll.req'));
487496
new Roll(res).roll().toMessage({speaker : {alias : `${tags["display-name"]}`}});
488-
fsMod.client.say(myChannel, `Thank you for the roll, ${tags["display-name"]}!`);
497+
fsMod.client.say(myChannel, thankRoll + ` ${tags["display-name"]}!`);
489498
return;
490499
}
491500
else return diceWaitAll(dice);

0 commit comments

Comments
 (0)