Skip to content

.mtgr: Magic: The Gathering game records ​

.mtgr is a plain-text format for recording games of Magic: The Gathering, modelled on chess's PGN. Any tool can write a game record, and any tool can read, replay, and check one.

mtgr
[Mtgr "0.3.0"]
[Event "?"]
[Site "MTGO"]
...
[Perspective "PlayerA"]

...
1:52     #2 "Sowing Mycospawn" cast from hand
1:52     #2 "Sowing Mycospawn" choose cost "kicker"
1:52     "PlayerA" pay {G}{C}{C}{C}{C}{C} by cost:#2
1:53     new ability #33 triggered of #2 "Sowing Mycospawn" "When you cast this spell, search your library for a land card, put it onto the battlefield, then shuffle." controller "PlayerA" in stack
1:56     new ability #34 triggered of #2 "Sowing Mycospawn" "When you cast this spell, if it was kicked, exile target land." controller "PlayerA" in stack
1:56     #34 target #17 "Urza's Tower"
...
2:02     #34 resolve
2:02     #17 "Urza's Tower" move battlefield -> exile by #34
...
1-0

A record says what happened and why: every event has a cause, every choice and cost is recorded, every object has an ID (even cards the recording player cannot see), and the full game state is written at the start of every turn so a viewer can jump straight to it.

Status: pre-1.0 and changing. Breaking changes are still allowed.

Where to start ​

Documentation site ​

The documentation is built with VitePress:

sh
npm install
npm run docs:dev

Sources and readers ​

The first writer records from MTGO. Readers include the replay package used by mtgreplay.app and MyMTGO. The format itself is not tied to any client: client-specific data is prefixed (for example MTGO_Version) and every file is meaningful without it.

References ​