Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete metadata details #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 55 additions & 6 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,58 @@ The metadata element can be read individually to save processing time with a bit
| consoleNick | string | The name of the console the replay was created on.

#### Players Metadata
| Key | Type | Description |
| --- | --- | --- |
| characters | object | Contains the number of frames for which a character was used. This is mostly useful for Zelda/Sheik
| names | object | Contains the Dolphin netplay name or Slippi Online Display Name depending on which form of netplay was used. Will also contain the connect code for Slippi Online if applicable.

Example: `{'characters': {'18': 5209}, 'names': {'netplay': 'Player', 'code': 'ABCD#0'}}` means the player used Marth (internal character ID `18`) for all `5209` frames of the game and had the Display Name `Player` and Connect Code `ABCD#0`. The netplay name from Dolphin and Display Name from Slippi Online use the same key.
| Key | Type | Description |
|-----|--------|-------------------------------------------------------------------------------------------------------------|
| 0-3 | object | Key is 0-indexed Controller port of the player. Contains the details of the player for the respective port. |

#### Player Metadata
| Key | Type | Description |
|------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| characters | object | Contains the number of frames for which a character was used. This is mostly useful for Zelda/Sheik |
| names | object | Contains the Dolphin netplay name or Slippi Online Display Name depending on which form of netplay was used. Will also contain the connect code for Slippi Online if applicable. |

#### Characters Metadata
| Key | Type | Description |
|------|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0-32 | int32 | Key is the Melee internal character ID. Value is the number of frames that character was played for. May have two of these fields if Zelda/Sheik or Ice-Climbers were played. |

#### Names Metadata
| Key | Type | Description |
|---------|--------|----------------------------------------------------------------------------------------------------------------------|
| netplay | string | Dolphin netplay name, or Slippi display name of the player. Value depends on the environment the game was played in. |
| code | string | The Slippi Online connect code for this player. |

Example (in JSON format):

```json
{
"metadata": {
"startAt": "2018-06-22T07:52:59Z",
"lastFrame": 12345,
"players": {
"0": {
"names": {
"netplay": "I love Slippi!",
"code": "SLIP#123"
},
"characters": {
"15": 12345
}
},
"1": {
"names": {
"netplay": "Some Netplayer",
"code": "ASDF#519"
},
"characters": {
"7": 12300,
"19": 45
}
}
},
"playedOn": "dolphin"
}
}
```
Here, we have two players. The first, in port 1 and named "I love Slippi!", played Jigglypuff (ID 15) for the match.
The second in port two and named "Some Netplayer" played Sheik (ID 7) for 12300 frames and Zelda (ID 19) for 45 frames.