Dota 2 practice lobby design

Dota 2 practice lobby design

Dota 2 practice lobby design

lobbyВ¶

Lobby related features

When a lobby invite is received :param message: CSDOTALobbyInvite :type message: proto message

When a lobby invite is no longer valid :param message: CSDOTALobbyInvite :type message: proto message

Entered a lobby, either by creating one or accepting an invite

Parameters: message (proto message) – CSODOTALobby

EVENT_LOBBY_CHANGED = ‘lobby_changed’В¶

Anything changes to the lobby state, players, options, broadcasters…

EVENT_LOBBY_REMOVED = ‘lobby_removed’В¶

The lobby is not valid anymore, quit or kick.

lobby = NoneВ¶ create_practice_lobby ( password=”, options=None ) В¶

Sends a message to the Game Coordinator requesting to create a lobby.

Parameters:
  • password ( str ) – password of lobby
  • options ( dict ) – options to setup the lobby with

create_tournament_lobby ( password=”, tournament_game_ >) В¶

Sends a message to the Game Coordinator requesting to create a tournament lobby.

Parameters:
  • password ( str ) – password of lobby
  • tournament_game_ > int ) – tournament game > int ) – tournament > dict ) – options to setup the lobby with

config_practice_lobby ( options ) В¶

Change settings of the current lobby.

Parameters: options ( dict ) – options to change in the lobby

get_lobby_list ( server_region= , game_mode= ) В¶

Get a lobby list

These are regular lobbies. (e. g. All pick, Captains Mode, etc)

proto message, None

Parameters:
  • server_region ( EServerRegion ) – limit to a specific server region
  • game_mode ( DOTA_GameMode ) – limit to specific game mode, DOTA_GAMEMODE_NONE means any
Returns:
Return type:

get_practice_lobby_list ( tournament_games=False, password=” ) В¶

Get list of practice lobbies

These are private Custom Game lobbies

proto message, None

Parameters:
  • tournament_games ( bool ) – whether to show tournament games only
  • password ( str ) – practice lobbies with this password
Returns:
Return type:

get_friend_practice_lobby_list ( ) В¶

Request a list of friend practice lobbies.

Returns: List of CMsgPracticeLobbyListResponseEntry
Return type: proto message, None

balanced_shuffle_lobby ( ) В¶

Balance shuffle the the lobby.

Flip both teams of the lobby.

Asks to invite a player to your lobby. This creates a new default lobby when you are not already in one.

Parameters: steam_ > int ) – steam_id

practice_lobby_kick ( account_ >) В¶

Kick a player from the lobby.

Parameters: account_ > int ) – 32-bit steam_id of the user to kick from the lobby

practice_lobby_kick_from_team ( account_ >) В¶

Kick a player from the his current lobby team.

Parameters: account_ > int ) – 32-bit steam_id of the user to kick from a team

join_practice_lobby ( >) В¶

Join the target practice lobby.

Result of the join command from the GC

Parameters:
  • > int ) – > str ) – password necessary to join the lobby
Returns:
Return type:
class: DOTAJoinLobbyResult . DOTAJoinLobbyResult. DOTA_JOIN_RESULT_TIMEOUT if timeout

leave_practice_lobby ( ) В¶

Sends a message to the Game Coordinator requesting to leave the current lobby.

Abandon the current game.

Launch the current lobby into a game.

join_practice_lobby_team ( slot=1, team= ) В¶

Join on of the lobby team at the specified slot.

Parameters:
  • slot ( int ) – slot to join into
  • team ( DOTA_GC_TEAM ) – team to join

join_practice_lobby_broadcast_channel ( channel=1 ) В¶

Join a specific channel of the broadcasters.

Parameters: channel ( int ) – channel to join into

add_bot_to_practice_lobby ( slot=1, team= , bot_difficulty= ) В¶

Add a bot in the lobby.

Parameters:
  • slot ( int ) – slot to join into
  • team ( DOTA_GC_TEAM ) – team to join
  • bot_difficulty ( DOTABotDifficulty ) – difficulty of the bot

respond_to_lobby_invite ( lobby_ >) В¶

Answer to a lobby invite.

Parameters:
  • > int ) – lobby_ > bool ) – answer to the lobby invite

destroy_lobby ( ) В¶

Destroy the current lobby (host only)

Returns: job_id for response
Return type: str

© Copyright 2016, Rossen Georgiev Revision 9ad9a5bc .

Dota 2 practice lobby design

Leave a comment