Banner and Crosspost


Home    Overlay   Discord   Mutators   Maps   Integration   Links   About

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:

  • !gm → changes which commands are active: none, all or not game affecting (Arg: stop/full/-)
  • !cooldown → sets cooldown for game-affecting viewer commands (Arg: number of seconds)
  • -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:

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


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
  • (Deprecated) Image recognition to identify mutators and calculate corresponding Brutal+ difficulty
  • (Moved to overlay) 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

Copyright

Powered by Blogger

Main post