Console

The Console represents the engine running the game.

This can be Dolphin (Slippi’s Ishiiruka) or an SLP file. The Console object is your method to start and stop Dolphin, set configs, and get the latest GameState.

class melee.console.Console(path=None, is_dolphin=True, dolphin_home_path=None, tmp_home_directory=True, slippi_address='127.0.0.1', slippi_port=51441, online_delay=2, blocking_input=False, polling_mode=False, allow_old_version=False, logger=None)

The console object that represents your Dolphin / Wii / SLP file

connect()

Connects to the Slippi server (dolphin or wii).

Returns:True is successful, False otherwise
get_dolphin_pipes_path(port)

Get the path of the named pipe input file for the given controller port

nick = None

The nickname the console has given itself.

Type:(str)
run(iso_path=None, dolphin_user_path=None, environment_vars=None)

Run the Dolphin emulator.

This starts the Dolphin process, so don’t run this if you’re connecting to an already running Dolphin instance.

Parameters:
  • iso_path (str, optional) – Path to Melee ISO for dolphin to read
  • dolphin_user_path (str, optional) – Alternative user path for dolphin if not using the default
  • environment_vars (dict, optional) – Dict (string->string) of environment variables to set
setup_dolphin_controller(port, controllertype=<ControllerType.STANDARD: '6'>)

Setup the necessary files for dolphin to recognize the player at the given controller port and type

slippi_address = None

IP address of the Dolphin / Wii to connect to.

Type:(str)
slippi_port = None

UDP port of slippi server. Default 51441

Type:(int)
slp_version = None

The SLP version this stream/file currently is.

Type:(str)
step()

‘step’ to the next state of the game and flushes all controllers

Returns:GameState object that represents new current state of the game
stop()

Stop the console.

For Dolphin instances, this will kill the dolphin process. For Wiis and SLP files, it just shuts down our connection

version = None

The Slippi version of the console

Type:(str)
exception melee.console.InvalidDolphinPath(message)

Raised when given path to Dolphin is invalid

exception melee.console.SlippiVersionTooLow(message)

Raised when the Slippi version is not recent enough