### # Example gamereport declaration (excludes most non-critical stats). ### gamereport = { 'playerStates': { 'joshua@lobbydev.wildfiregames.com/0ad': 'defeated', 'josh@lobbydev.wildfiregames.com/0ad': 'won' }, 'civs': { 'joshua@lobbydev.wildfiregames.com/0ad': 'ptol', 'josh@lobbydev.wildfiregames.com/0ad': 'iber' }, 'timeElapsed': '6000', 'teams': { 'joshua@lobbydev.wildfiregames.com/0ad': '-1', 'josh@lobbydev.wildfiregames.com/0ad': '-1' }, } ### # Example gamereport access (tested on lobbydev bot). ### # Get a list of player JIDs to use as indicies. players = list(gamereport['teams'].keys()) # We don't know their actual player number, but we use some for convinience. player1 = players[0] player2 = players[1] player1Team = gamereport['teams'][player1] player2Team = gamereport['teams'][player2] # Print some data. (Might be helpful to note that teams shown in the 0 A.D. GUI are actually one larger. Eg: Team 1 in the GUI is actually team 0) logging.info("Player JID: " + str(player1) + ", Team: " + str(player1Team) + ", Player JID: " + str(player2) + ", Team: " + str(player2Team))