• The moderator of this forum is jetou.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

Programming Twitch Plays Pokemon Showdown Bot

HiZo

not a game dev
is a Programmeris a Top Community Contributoris a Top Metagame Resource Contributoris a Tiering Contributoris a Battle Simulator Staff Alumnus
https://github.com/HisuianZoroark/TwitchPlaysPS

I originally wanted to build this about a year ago as a way to learn how websockets work and understand protocols. I didn't. However, thanks to PartMan's PS-Client package and HoeenHero's patience I was still able to put this together.

Here is how it works: upon every request (where you need to submit a move, switch a pokemon etc.) the bot converts the request into possible commands for the viewers to submit as votes, then when the voting time is up it quickly uses the most voted command and runs the command in the battle.

It is still a bit temperamental and only works on most current gen singles formats currently, but it is in a state where it can be used by anyone for a stream or etc.

Instructions and commands are in the repository's readme if you want to use it, enjoy!

(ty Isaiah, Imperial and others for helping me either debug or quickly grab client messages mid development for testing)
 
Hi I totally didn't forget I made this and only started working on it again after it was brought to my attention.

Anyways I did a slight revamp including:
  • Adding more settings for extra stuff, including being given extra time at team preview/turn 1 of a match
  • Support for extracting teams from randbats games and putting them into a pokepaste .
  • Aliases for commands so people dont have to type as much to vote/access information
  • improved the readme and maybe a few things here 'n' there
Also I want to include some other stuff like an alternative vote (rng pick mode (anarchy)) as well as actual doubles support when I tackle reviewing my initial implementation, as well as support for past gen gimmicks like z moves and mega evolutions.

ty for reading
 
Back
Top