Banner and Crosspost

Twitch integration

Twitch integration

This is my project bringing Twitch.tv integration into StarCraft II maps, specifically my arcade co-op mod. Viewers on twitch streams 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 communicates through one such bank – letting the data flow between the game and the twitch chat. 

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.

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 or characters; Arg: bank name)
  • -spawnlimit X (in-game) → changes unit spawn limit per command (default is 30)
  • -spawnlimit X heroic (in-game) → changes unit spawn limit per command for heroic units (default is 5)

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)
  • .....


Some recent improvements are spellcheck for unit IDs and mutator names directly in chat, and suggest possible corrections for typos. 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

links

The best way how to use the bot is to get my StarCraft Co-op overlay. This provide a lot more functionality and doesn't require difficult set-up.


Older version of the bot.


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

Copyright

© 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