s2protocol icon indicating copy to clipboard operation
s2protocol copied to clipboard

recognizing co-op games

Open StoicLoofah opened this issue 7 years ago • 1 comments

I ran this replay through s2protocol https://lotv.spawningtool.com/35674/download/ with --initdata and got the following result (some stuff removed just to get to the important snippet)

{
    "m_syncLobbyState": {
        "m_gameDescription": {
            "m_maxRaces": 6, 
            "m_maxTeams": 4, 
            "m_hasExtensionMod": false, 
            "m_maxColors": 16, 
            "m_isBlizzardMap": true, 
            "m_gameOptions": {
                "m_competitive": false, 
                "m_practice": false, 
                "m_lockTeams": true, 
                "m_amm": true, 
                "m_battleNet": true, 
                "m_fog": 0, 
                "m_noVictoryOrDefeat": false, 
                "m_heroDuplicatesAllowed": true, 
                "m_buildCoachEnabled": false, 
                "m_advancedSharedControl": false, 
                "m_cooperative": false, 
                "m_clientDebugFlags": 265, 
                "m_observers": 0, 
                "m_teamsTogether": false, 
                "m_randomRaces": false, 
                "m_userDifficulty": 1
            }, 
            "m_defaultDifficulty": 2, 
            "m_isCoopMode": false, 
            "m_mapFileName": "", 
            "m_defaultAIBuild": 0, 
            "m_gameType": 0, 
            "m_hasNonBlizzardExtensionMod": false, 
            "m_randomValue": 3559572045, 
            "m_maxObservers": 12, 
            "m_isRealtimeMode": false, 
            "m_maxUsers": 2, 
            "m_modFileSyncChecksum": 2822893348, 
            "m_mapSizeX": 208, 
            "m_maxPlayers": 4, 
        }
    }
}

Note that although, this game was a coop game, it has both

["m_syncLobbyState"]["m_gameDescription"]["m_gameOptions"]["m_cooperative"] === false
["m_syncLobbyState"]["m_gameDescription"]["m_isCoopMode"] === false

I'm not sure how those would have been read incorrectly from the replay, which would indicate that it's in the replay file itself. Am I misinterpreting what those field are meant for, or were those incorrectly encoded on the replays?

StoicLoofah avatar Mar 25 '18 18:03 StoicLoofah

For what it is worth how I determine if a replay is coop or not is to actually look for a coop commander m_syncLobbyState->m_lobbyState->m_slots[0]->m_commander.

amartin916 avatar Mar 25 '18 18:03 amartin916