In light of recent events, regarding Streamlabs, we will suspend further development of the script until a satisfying solution has been found. Technical support will still be provided via our Discord or GitHub.
Initially created for the Twitch-Streamer AnEternalEnigma to keep track of new and gifted subscriptions to his channel. This is the public version of the same exact script, with some minor changes to make it a little more generic.
TwitchStreaker is compatible with Twitch and YouTube. For YouTube, only the regular Subscription options apply.
- TwitchStreaker for Streamlabs Chatbot
We are not responsible for the misuse of this script! It is up to YOU to apply the scripts functionality according to your platforms Terms of Service. For example, Twitch does NOT allow you to give away Subscriptions for Bits (see Bits Acceptable Use Policy). Please make sure that you use the Script in a way that does not violate any Terms of the platform that you are using.
- Download the latest release.
- Extract the downloaded archive into the
Chatbot > Services > Scripts
directory. - In the Chatbot, open the Scripts Tab and click the
Reload Scripts
button. - Right click on the
TwitchStreaker
script and clickInsert API Key
. - Enter your
SocketToken
and the amount of subs required per streak. See here - Add the Overlay as a Browser Source to your scene in your preferred streaming software.
- Overlay.html the "Classic" Overlay.
- Recommended Browser Source width:
800px
- You can use the text files contained within the
Text
folder as an alternative
- Recommended Browser Source width:
- BarOverlay.html the "new" Progressbar.
- The size is defined by the Browser Source properties
- These Overlays has separate settings within the bot, i.e. you can use both Overlay if you want to
- Overlay.html the "Classic" Overlay.
Remember to Backup your customized files!
- Download the latest release.
- Check the Changelog for additional instructions
- Extract the downloaded archive and overwrite existing files.
- Reapply your customization's.
- Reload the script and overlay.
- Click the
Reload Script
button on the Chatbot. - De-select and then re-select the script, to update the UI.
- Click the
Save Settings
and then theReset Session
button, to makes sure that the most recent changes are applied. - Reload the Overlay within your Streaming software.
- Click the
With version 3.0.0 we added a progressbar that runs separate to the classic overlay, with separate settings and sounds. The classic Overlay is still the same exact things, but has some additional element options (see HTML Elements).
- Make a Backup of the entire folder.
- Extract the 3.x archive and overwrite existing files.
- Delete
Settings.js
,Settings.json
,Session.json
andTwitchStreaker.log
from the folder. - Enter your
SocketToken
, See here. - Reapply your Settings and Customizations
- Customizations to the Script should be redone, since quite a few things have changed under the hood and there are additional options for you to explore.
- Save the Settings and reset the Session
- Navigate to Streamlabs API Settings
- Click on
API Tokens
- Click the
Copy
Button next to theYour Socket API Token
field - Insert the Token under
Streamlabs > Socket Token
in the Script Settings
In most cases it is as simple as reconnecting your Accounts to the bot.
- Go to connections 👤
- Generate new Tokens for both the
Twitch Bot
andTwitch Streamer
- Reload the script and reset the session
Another common issue is a problem with the Python 2.7.x installation.
- Make sure python 2.7.13 x86 is installed. Don't use newer versions of python or x64
- Make sure the lib folder path found in
scripts tab
->settings
⚙️ leads to the lib folder located inside the python folder that was created when installing python. By default this would look like THIS - Make sure you installed python 2.7.13 x86 and NOT python 3.X
Some rare cases involve a corrupted Session, or a corrupted Settings file.
- Delete
Session.json
from the script folder. - Reload the Script and continue with step 3 if the issue persists.
- Delete
Settings.json
andSettings.js
from the script folder. - Redo your settings, incl. the Socket Token.
- Reload the Script.
If all that fails, then there is Discord, where we can help you resolve the issue you're having.
TwitchStreaker has a lot of Options to give you as much control as possible on how the script works for you. For example you can make your Goal
increase over time, or allow Donations to be counted as Points
when they exceed a specified amount.
Option | Description |
---|---|
Goal | The amount of Points required for the next Streak. |
Goal Min | Minimum value of the Goal option (Defaults to the value of Goal when above the Goal ) |
Goal Max | Maximum value of the Goal option (Defaults to the value of Goal when below the Goal ) |
Increment Goal By | Value by which the Goal will be increased when completing a Streak (Leave at 0 to disable this mechanic) |
Allow Resubs | Allows Resubs to be counted as well as regular Subs. |
Option | Description |
---|---|
Bits Amount | Minimum amount of Bits required for it to be counted. |
Bits Point Value | Amount of Points awarded. |
Allow Bits | Enables Bits to be counted as Points if they exceed the Bits Amount . |
Count Bits Once | Counts Bits only once, even if they exceed the Bits Amount . |
Cumulative Bits | Allows Bits below the Bits Amount to pile up and add Points if the exceed the Bits Amount . |
Option | Description |
---|---|
Donation Amount | Minimum Donation required for it to be counted. |
Donation Point Value | Amount of Points awarded. |
Allow Donations | Enables Donations to be counted as Points if they exceed the Donation Amount value. |
Only Count Once | Counts a Donation only once, if it exceeds the Donation Amount |
Cumulative Donations | Allows for Donations below the Donation Amount to pile up and add Points if they exceed the Donation Amount . |
Option | Description |
---|---|
Follows Required | Amount of Follows required for it to be counted. |
Follow Point Values | Amount of Points awarded. |
Allow Follows | Enables Follows to be counted as Points if the exceed the Follows Required amount. |
Option | Description |
---|---|
Goal | Amount of Points required to fill the bar. |
Segment Count | Amount of segments within the bar. (0 = disabled) |
Enable Bits | Enable Bits to be displayed on the bar. |
Enable Donations | Enable Donations to be displayed on the bar. |
Enable Follows | Enable Follows to be displayed on the bar. |
Enable Subs | Enable Subscriptions to be displayed on the bar. |
Enable Sound | Enable the Sound System |
Completion Sound | Filename, incl. the file-extension, for the Bar Completion sound within the Sounds folder. (Plays when the bar is completely filled) |
Completion Sound Delay | Delay for the Completion Sound. |
Segment Sound | Filename, incl. the file-extension, for the Segment Completion sound within the Sounds folder. (Plays when a Segment is filled.) |
Segment Sound Delay | Delay for the Segment Completion Sound. |
Under each Tier, you'll find the following options. Prime Subscriptions (Twitch) have the same value as Tier 1 Subscriptions and will be handled as such by the Script.
Option | Description |
---|---|
Sub | Points rewarded for a Subs |
Resub | Points rewarded for a Resubs |
Gifted Sub | Points rewarded for a gifted Sub |
Gifted Resub | Points awarded for a gifted Resub |
Option | Description |
---|---|
Socket Token | Token required for the script to function. See here |
You can use the following Parameters in your Commands and Timers:
Parameter | Description |
---|---|
$tsBarGoal | Amount of Points needed to fill the Progressbar |
$tsBarPointsLeft | Amount of Points needed to fill the Progressbar |
$tsBarSegmentsCompleted | Amount of Segments that are completely filled |
$tsBarSegmentPointsLeft | Amount of Points needed to fill the current Segment on the Progressbar |
$tsBitsLeft | Amount of Bits needed to get the next Point |
$tsBitPoints | Amount of Points acquired via Bits |
$tsDonationPoints | Amount of Points acquired via Donations |
$tsFollowsLeft | Amount of Follows needed to get the next Point |
$tsFollowPoints | Amount of Points acquired vie Follows |
$tsGoal | Amount of Points needed per Streak |
$tsPoints | Current amount of Points in the current Streak |
$tsPointsLeft | Amount of Points needed to complete the current Streak |
$tsStreak | Current Streak |
$tsSubPoints | Amount of Points acquired via Subscriptions |
$tsTotalBits | Amount of Bits accumulated in the current Session |
$tsTotalDonations | Donation amount accumulated in the current Session |
$tsTotalFollows | Amount of Follows accumulated in the current Session |
$tsTotalSubs | Amount of total Subs (not Points ) accumulated in the current Session |
All these examples assume that a Subscription is worth one Point!
We are currently working on Streak #$tsStreak and need $tsPointsLeft additional Subs.
We are currently working on Streak #5 and need 6 additional Subs.
We reached $tsTotalSubs subs so far!
We reached 42 Subs so far!
The Progressbar is not yet finalized, customization documentation will come as soon as it is finalized
Making your own designs for the TwitchStreaker Overlay is straight forward and only require a few things to keep in mind. The single most important thing is to load the required JavaScript files in the correct order.
<html>
<head>
<!-- OtherStuff -->
<script src="API_Key.js"></script>
<script src="overlay/main.js" defer></script>
<!-- OtherScripts -->
</head>
<body>
<!-- Content -->
</body>
</html>
In case you're using a custom script, it has to be loaded after the main.js
and should be deferred via the defer
keyword as well, to prevent issues later on.
The following element ID's are available for use in your design:
ID | Description |
---|---|
BitsLeft | Amount of Bits needed to get the next Point |
BitPoints | Amount of Points acquired via Bits |
DonationPoints | Amount of Points acquired via Donations |
FollowPoints | Amount of Points acquired via Follows |
Goal | Amount of Points needed per Streak |
Points | Current amount of Points in the current Streak |
PointsLeft | Amount of Points needed to complete the current Streak |
Streak | Current Streaks |
SubPoints | Amount of Points acquired via Subscriptions |
TotalBits | Amount of Bits accumulated in the current Session |
TotalDonations | Donation amount accumulated in the current Session |
TotalFollows | Amount of total Follows accumulated in the current Session |
TotalSubs | Amount of total Subs (not Points ) accumulated in the current Session |
None of those ID's are actually required and can be placed anywhere in the document, in case of the default design we're only using Points
, Streak
and Goal
. Here a few examples:
<div>
<span id="PointsLeft">2</span> Subs left until Wheel #<span id="Streak">1</span>
</div>
<div>
<span id="Points">2</span> of <span id="Goal">7</span> Subs, then we spin Wheel #<span id="Streak">1</span>
</div>
Though you could just modify the main.js in the Overlay
folder. There is a more elegant way that keeps things simple and clean.
The Overlay object has an additional field with an anonymous function that is called on every refresh of the overlay and can be used for your custom code to be triggered at the same time with the most recent values.
The Progressbar is not final at the moment and will not yet be documented!
Overlay.Text.UserRefresh = function() {
// Your stuff here
}
It is important that this always evaluates as a function, since it is called from within the EventBus in main.js. Anything else will result in a bunch of error and probably unwanted side-effects.
The following variables are available for your custom script.
Variable | Description |
---|---|
Overlay.BitsLeft | Amount of Bits needed to get the next Point |
Overlay.BitPoints | Amount of Points acquired via Bits |
Overlay.DonationPoints | Amount of Points acquired via Donations |
Overlay.FollowPoints | Amount of Points acquired via Follows |
Overlay.Goal | Amount of Points needed to complete a Streak (min: 1) |
Overlay.Streak | Current amount Streaks (min: 1) |
Overlay.SubPoints | Amount of Points acquired via Subscriptions |
Overlay.Points | Current amount of Points in the Streak (min: 0) |
Overlay.PointsLeft | Amount of Points left to the next Streak |
Overlay.TotalBits | Amount of total Bits accumulated in the current Session |
Overlay.TotalDonations | Donation amount accumulated in the current Session |
Overlay.TotalFollows | Follow amount accumulated in the current Session |
Overlay.TotalSubs | Amount of total Subs (not Points ) accumulated in the current Session |
If something can go wrong, it will most like go wrong at some point. That's why the script has some overwrite functions built in to account for missed subs, streaks, and outright crashes.
Changes made will not display instantly, the update happens on a 5 second interval.
Button | Functionality |
---|---|
+ Sub | Adds a Sub, Streaks will increment if conditions are met. |
- Sub | Removes a Sub, until 0 (zero) is reached. |
+ Streak | Adds a Streak. |
- Streak | Removes a Streak, until 1 (one) is reached. |
+ Goal | Increments the Goal by one. |
- Goal | Decrements the Goal by one, until 1 (one) is reached. |
Refresh Overlay | Refreshes the Overlay without loosing the current values. |
Reset Tracker | Resets everything to their initial values. |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
BrainInBlack - Programming
AnEternalEnigma - Initial Concept
TheLevelUpShow - Progressbar Concept and Debugging
The topic of compensating me for my work came up quite a few times. While I appreciate the idea, I do this for fun and don't need any type of monetary compensation. If you still feel like compensating me for my work, then there is my GoG.com Wishlist with a mix of games in most price classes.
In case you decide to gift me something from said wishlist, thank you and use braininblack@gmail.com as the recipient. However, a simple "thank you!" goes a long way and is more than welcome.