Banner and Crosspost

Twitch integration

Twitch integration

This is my project bringing integration into StarCraft II maps, specifically my arcade co-op mod. Viewers on twitch stream can directly affect the game with various commands, and the streamer has different options how to customize this experience.

Everything is done through StarCraft II's bank system. Twitch bot written in Python works closely with functionality built into my StarCraft mod on Co-op maps in arcade.

Direct effect on the game makes the viewing experience more engaging, especially the !join command that lets viewers join the battlefield as a unit. This doesn't affect the game itself, but it's good to see you as a part of the army. Viewer kills are tracked for the unit, for each game and for all games in total.

** I'll add here some good video of a game played with twitch integration **

Current commands

For streamers:

  • !cooldown → sets cooldown for game-affecting viewer commands (arg: number of seconds)
  • !gm → changes which commands are active (arg: stop/default/full)
  • !bank → changes bank (for different server/characters; arg: bank name)
  • -spawnlimit (in-game) → changes unit spawn limit per command (arg: number, default 30)

For viewers:

  • !message → sends message in-game (args: message)
  • !join → joins either player 1 or 2's army (args: player)
  • !spawn → spawn specified unit (args: unit_type, amount, player, camera target: cam1/cam2)
  • !mutators → enables or disables mutators (args: mutator name, disable)
  • !resources → gives or takes resources from a player (args: minerals amount, vespene amount, player)
  • !memes → enables or disables memes
  • !wave → spawns enemy attack wave (args: size, tech, camera target: cam1/cam2/rand)
  • .....

Custom commands can be added via a config file. New commands can be added in the config file as well, but game affecting commands need to be supported by the mod.

Some recent improvements are spellcheck for unit IDs and mutator names directly in chat, and suggestions for possible misspelling. Full list of unit names and their corresponding IDs can be found here.

~  ~  ~

Other bot functions:   

  • Customizable basic bot commands
  • Image recognition to identify mutators and calculate corresponding Brutal+ difficulty
  • Automatic post-game replay analysis


The bot is easy to set up, and all information and downloads are here:

Twitch integration functions on my arcade co-op maps:

Joining the army from the twitch chat

Activating mutators from the twitch chat
Spawning units from the twitch chat
Posting messages from the twitch chat
Viewer army in action

Recent posts

Recent posts


© Blizzard Entertainment, Inc. All rights reserved. Wings of Liberty, Heart of the Swarm, Legacy of the Void, and StarCraft are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.
Powered by Blogger