Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Twitch Starcraft 2 Commercial Runner
This application is built to help casters and players monetize their Twitch streams with less effort required. It's designed for streams casting live matches, as it automates commercial playing by simply reading saved replays. The longer the game, the longer the commercials.
This is still very much a work in progress. Help contribute by adding instructions for the other users!
- Simple - Simply login to begin. Reasonable default rules to get you started.
- Customizable - Design your own rules, whether you're a caster or a player.
- Detects Copying Replays - If you're copying more than 1 replay to your replay directory, no need to pause. We'll detect this automatically.
- Stays Hidden - Minimizes to your notification tray. All manual actions can even be performed from the tray icon.
- Timer Overlay - Shows how long till your commercials end. Even stays hidden from screen capture (with layered capture disabled).
To begin, simply log in to Twitch within the application. The log-in button is in the upper right.
Once you're logged in, you're done! You can use the default settings and it should immediately start playing commercials when a replay is created/saved. If you'd like to customize further, read on.
The settings panel can be accessed by clicking the gear in the upper right corner of the application.
Start Delay: Defines how long to wait after the end of your game before the first commercial plays. The default value is 15 seconds.
Why 15 seconds? Any viewers watching at a lower quality are watching at a delay. This delay averages between 10-15 seconds. To ensure that no one misses the end of the match, a minimum 15 second delay is recommended.
Commercial Frequency: Cycles through a series of rules, with an increasing number of average commercials per hour. This can be customized further in the advanced setup.
Minimum Game Time: Minimum length of a game required to play a commercial. In many tournaments, if a player immediately drops, the game will quickly be recreated and restarted, so it's often a good idea to skip commercials in these cases.
The main screen and the notify icon's right-click menu have several actions a broadcaster can manually use.
Play a commercial: Immediately plays a commercial. No delay is applied.
Play a commercial with delay: Plays a commercial, but first waits for the delay period specified in the settings.
Pause Replay Monitor: Stops watching for new replays until the monitor resumes. No commercials will be automatically triggered during this period.
Why pause? If you're copying a single replay into your replay directory, it looks the same as if you played a game. You should pause before copying replays as to not accidentally trigger commercials upon your viewers.
Feature! If you are copying multiple replays into your replay directories, the commercial runner will detect this! If more than 1 replay is copied within 5 seconds, you're likely copying a replay pack. The replays won't be read, and no commercials will be read for that group.
Stats display in the bottom left corner of the main application window. They should be fairly straight forward.
Total Commercials Played: Total number of commercials that have been played since the application was opened.
Time Since Last Commercial: The time since last commercial counter on the Twitch dashboard only counts if you're pushing the commercial button on the Twitch dashboard manually. This counts the amount of time, in minutes, since any commercial (automatic or manual) was played by the runner.
Average Commercials Per Hour The average number of commercials that are playing per hour, since the application was opened. While this number will be high at first, it becomes more accurate over time. Use this to judge whether you should adjust your commercial settings.
Clicking the advanced setup button in settings will bring you to the application's data folder. Here, you can open the settings XML file in your favorite browser.
Important! If you make changes here, be sure to select "Cancel" in the settings window, so your custom settings are not overwritten. This file will then be reloaded anytime the settings window closes.
Delay: The delay applied before commercials are played, in seconds.
Note: A 5 second delay will ALWAYS be applied. This allows multiple replay copying to be detected, and allows Starcraft 2 to release the replay from memory before reading. Thus, setting this value to anything below 5 will effectively create a 5 second delay.
InitialCommercials: The number of commercials that are always played, regardless of game length. Any extra commercials calculated are added to this.
GameMinutesPerExtra: The number of minutes required in a game to trigger an extra commercial. For example, if 15, a 20 minute replay will trigger 1 extra commercial, and a 30 minute replay will trigger 2 extra commercials.
MinimumGameMinutes: The minimum number of minutes in a game required. If the game in a replay is less than this value, no (0) commercials will be triggered.
ReplayDirectory: The replay directory to monitor, including all sub-directories. Only files with the extension .sc2replay will trigger commercials.
This value is auto-detected, and typically hidden from the user. If you have any problems where no commercials are triggering, you may want to verify this is correct. The default (:User\Documents\Starcraft II\Accounts) is designed to track all Starcraft 2 accounts used on the computer. A more specific directory can be specified in desired.
ShowOverlay: True or False. Indicates whether to show the commercial timer overlay when a commercial is playing. This can be disabled if it either causes performance issues, or your stream is using screen capture with "Captured Layered Windows" enabled.
When I log in, it forwards me to AscendTV.com and doesn't actually log in.
This is an issue with systems running Internet Explorer 8. Update IE to IE9 and it should work again. Hopefully will be fixed in a future build.
I screwed up my Settings.xml file!
Simply delete the settings file and restart the application. The default settings will be regenerated automatically.
No commercials are playing.
Verify your replay directory is correct in the advanced setup. Also ensure you're logged in to the correct Twitch account.
I got an error saying the replay failed to read the replay for some reason.
This likely happens after a new Starcraft 2 patch. If a newer version of the SC2 Commercial Runner is available, download it to fix the issue.
Nothing happens when I start the application.
This typically means .NET 4.0 Client Profile failed to install. Check that .NET 4.0 Client Profile (or Full) is installed in the Control Panel. Otherwise, check Google for methods to repair .NET. I've also heard a single cases where a corrupt Java install caused .NET to become corrupt. Your results may vary.
YOUR REPLAY DIRECTORY IS INVALID!
This message will appear if the replay path specified under the advanced setup doesn't exist. Find where your replays are stored and fix this.