Recent content by OGSuperSand

  1. OGSuperSand

    Breaking Up the BattleStream

    I'm trying to break up the main BattleStream (from the simulator) using getPlayerStreams() to split it into p1, p2, p3, p4, spectator, and omniscient streams. I want to do that so I can hook up a RandomPlayerAI to p2. However, I still want all the data from the original BattleStream, like the...
  2. OGSuperSand

    Programming Running the Battle Simulator and reading output constantly

    I am not good with networking obviously, for anyone curious, the solution is to use a websocket instead of just an http server to keep a constant persistent connection. We've written up a js server that uses socket.io to open a websocket connection and feed input on an event handler to the sim...
  3. OGSuperSand

    Programming Running the Battle Simulator and reading output constantly

    I am trying to develop a Unity project that makes use of the Battle Simulator, but am running into a number of problems. I stumbled into another thread which recommends running the simulator as a sub process within C#, and feeding commands in through stdin and reading from the process's...
  4. OGSuperSand

    Other Where to find more information on running the battle simulator from within a non-node.js language?

    Actually, seems to be working with: const readline = require('readline'); const Sim = require('pokemon-showdown'); stream = new Sim.BattleStream(); (async () => { for await (const output of stream) { console.log(output); } })(); stream.write(`>start...
  5. OGSuperSand

    Other Where to find more information on running the battle simulator from within a non-node.js language?

    Did you develop your app further? I have the simulator running on a separate thread right now but cannot for the life of me figure out reading the output, since it's going to stdout it seems like I can only read from there once. I'd like to be able to leave the simulator open and send commands...
Top