All Projects → stefan-kolb → aoc-mgx-format

stefan-kolb / aoc-mgx-format

Licence: GPL-3.0 License
Age of Empires: The Conquerors - Savegame File Format

Programming Languages

HTML
75241 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to aoc-mgx-format

recanalyst
Analyzes Age of Empires 2 recorded game files.
Stars: ✭ 74 (+32.14%)
Mutual labels:  savegame, age-of-empires, rts
matroska-specification
Matroska specification.
Stars: ✭ 98 (+75%)
Mutual labels:  specification, file-format
Gfa Spec
Graphical Fragment Assembly (GFA) Format Specification
Stars: ✭ 117 (+108.93%)
Mutual labels:  specification, file-format
hr-time
High Resolution Time
Stars: ✭ 43 (-23.21%)
Mutual labels:  specification
box-openapi
OpenAPI 3.0 Specification for the Box APIs
Stars: ✭ 71 (+26.79%)
Mutual labels:  specification
aoe2-de-rating-charts
Rating distribution visualization for Age of Empires 2: Definitive Edition
Stars: ✭ 25 (-55.36%)
Mutual labels:  age-of-empires
symphony-of-empires
Symphony of the Empires is a RTS strategy game and map game.
Stars: ✭ 67 (+19.64%)
Mutual labels:  rts
TinyMAT
C/C++ library to handle writing simple Matlab(r) MAT file
Stars: ✭ 22 (-60.71%)
Mutual labels:  file-format
ehn-dcc-valuesets
EU eHealthNetwork value sets as referenced by the EU Digital COVID Certificate (DCC) JSON Schema
Stars: ✭ 26 (-53.57%)
Mutual labels:  specification
spec
Spezifikation für eine offene Schnittstelle für Ratsinformationssysteme
Stars: ✭ 56 (+0%)
Mutual labels:  specification
hPDB
PDB parser in Haskell
Stars: ✭ 20 (-64.29%)
Mutual labels:  file-format
naf
Nucleotide Archival Format - Compressed file format for DNA/RNA/protein sequences
Stars: ✭ 35 (-37.5%)
Mutual labels:  file-format
IsoRTS
Isometric RTS game with procedural generated maps.
Stars: ✭ 14 (-75%)
Mutual labels:  rts
Crypto-API-Rules
This repository contains all CrySL rules currently used in the crypto assistant CogniCrypt.
Stars: ✭ 16 (-71.43%)
Mutual labels:  specification
vscode-tlaplus
TLA+ language support for Visual Studio Code
Stars: ✭ 213 (+280.36%)
Mutual labels:  specification
shared-row
This is an open data specification for describing the right-of-way (ROW) for street centerline networks. It is intended to establish a common set of attributes (schema) to describe how space is allocated along a streets right of way from sidewalk edge to sidewalk edge.
Stars: ✭ 16 (-71.43%)
Mutual labels:  specification
keeperfx
Open source remake and Fan Expansion of Dungeon Keeper.
Stars: ✭ 128 (+128.57%)
Mutual labels:  rts
folia
FoLiA: Format for Linguistic Annotation - FoLiA is a rich XML-based annotation format for the representation of language resources (including corpora) with linguistic annotations. A wide variety of linguistic annotations are supported, making FoLiA a useful format for NLP tasks and data interchange. Note that the actual Python library for proces…
Stars: ✭ 56 (+0%)
Mutual labels:  file-format
Save-Game-Copier
Copy Sega Saturn save game files
Stars: ✭ 34 (-39.29%)
Mutual labels:  savegame
EDGE
EDGE Source Code
Stars: ✭ 55 (-1.79%)
Mutual labels:  rts

Age of Empires 2: The Conquerors — Savegame File Format Specification

Table of Contents

Structure Definitions

The structure definitions kind of follow the BinData Ruby Gem declarations. They should be as readable as pseudo code though. More information on BinData can be found here.

Synchronization

Tag Description Validated
SYNCH

Messaging

Tag Description Validated
0x000001F4 GAMESTART
0xFFFFFFFF CHAT +

Gameplay Actions

Tag Description Validated
0x00 ATTACK +
0x01 STOP +
0x02 AI_PRIMARY +
0x03 MOVE +
0x0a AI_MOVE
0x0b RESIGN +
0x10 WAYPOINT +
0x12 STANCE +
0x13 GUARD +
0x14 FOLLOW +
0x15 PATROL +
0x17 FORMATION +
0x1b SAVE & EXIT
0x1f AI_COORD +
0x64 AI_TRAIN +
0x65 TECH +
0x66 BUILD +
0x67 MULTIPURPOSE
0x69 WALL +
0x6a DELETE +
0x6b ATTACKGROUND +
0x6c TRIBUTE +
0x6e REPAIR +
0x6f UNGARRISON +
0x72 GATE +
0x73 FLARE +
0x75 GARRISON +
0x77 TRAIN +
0x78 RALLY +
0x7a SELL +
0x7b BUY +
0x7e RELIC +
0x7f TOWNBELL +
0x80 BACKTOWORK +
0xFF GAMESTATS UP only

FAQ

  1. What actions are not saved but only calculated on replay simulation?

    • Only actions that are actively taken by players are stored
    • Any other actions are either simulated during replay (map reveal) or determined by the random number generator (Gaia movement)
    • Pause is not saved, that is why chat messages that were sent during the pause are displayed nearly at once when replayed.
  2. What actions are only saved for certain players, i.e., the owner of the recorded game?

    • Viewpoints (for lock view) are only saved for the owner of the recorded game, together with the sychronization info.
  3. How does AoE2 create an .mgx file?

    • Singleplayer games are recorded by getting actions from the input buffer and writing them into the .mgx file.
    • During multiplayer games, actions are distributed to all players (even messages). The input buffer is transferred over the network to the other players.
  4. Why are there so many zeros in the actions?

    • Most of the zeros are caused by memory alignment. Because networking and recording directly work on the input buffer, the data is aligned to 3the size of (menory) words (4 bytes). Example:
    struct example {
      uint8_t player_id;
      uint32_t unit_id;
    };

    Here the first variable player_id will take up 1 out of 4 bytes of the first word. The next variable, unit_id, doesn't fit into the first word anymore, so it will use a second word instead. The remaining 3 bytes in the first word remain uninitialized and therefore have zero values in them.

  5. Why are they doing this weird memory stuff? It sounds stupid

    • Because it is fast. Data can be put to use directly and does not have to be parsed.
  6. What are the various IDs used for?

    • Players have an ID and a number. This is necessary because of an undocumented cooperative mode in AoE2, where players can have the same player number.
    • Unit IDs reference a type of unit/building or object in the game files.
    • Object IDs reference a specific object during a game. Every building, unit or resource gets an ID. For new units, the IDs are incremented.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].