Difference between revisions of "Replay file"

From Worms Knowledge Base

Jump to: navigation, search
m
Line 14: Line 14:
 
The map data follows, its length being the 2nd DWORD in the file (see above).  
 
The map data follows, its length being the 2nd DWORD in the file (see above).  
  
Following the map data is a DWORD containing the chunk length (0x0000000C), then a null byte, then the game's starting time in [[w:Unix time|time_t]] format. After that, there are 7 bytes which may have something to do with the scheme format. After that is the scheme. Following it are the players, the teams, and after some null padding are the message sequences (user input) which is piped to the game engine to play back the replay.
+
Following the map data is a DWORD containing the chunk length (0x0000000C), then a null byte, then the game's starting time in [[w:Unix time|time_t]] format. After that, there are 7 bytes which may have something to do with the scheme format. After that is the scheme data. Following it are the players, the teams, and after some null padding are the message sequences (user input) which is piped to the game engine to play back the replay.
  
 
== Security ==
 
== Security ==

Revision as of 21:13, 6 July 2006

Replay (.WAgame) files were introduced to Worms Armageddon with Deadcode's 3.6.19.15 beta update, which was released on 20 February, 2004. The files represent self-contained recordings of games, which can be played on any computer with the corresponding software updates installed.

Recordings of all games played (including offline, mission and training games) are saved automatically to the User\Games folder. File names consist of a date/time stamp, the game type, and the participating players.

The files contain all the information needed to play the replay flawlessly. This includes the game version which was emulated during the game, the map and the scheme, the participating teams (including the custom flags and graves), and the random seed used for random in-game events (such as random initial placement of worms and objects).

File format

The rest of this article needs to be reviewed by an expert who has more experience in this domain.

The file starts with two signature bytes ("WA"), after which follows a word with the file version. W:A 3.6.26.5 saves replays in the version 12 format (0x000C).

After this, two DWORDs follow. The first represends the map data length, and the second - the map type. The map type can be 1 for Monochrome map (.bit), 2 for Seed-generated monochrome map, or 3 for Colour map. The map data follows, its length being the 2nd DWORD in the file (see above).

Following the map data is a DWORD containing the chunk length (0x0000000C), then a null byte, then the game's starting time in time_t format. After that, there are 7 bytes which may have something to do with the scheme format. After that is the scheme data. Following it are the players, the teams, and after some null padding are the message sequences (user input) which is piped to the game engine to play back the replay.

Security

The format incorporates periodic checksums, embedded into specific actions. This allows to detect modifications to the replay, causing warning messages during playback.

The tool-assisted versions of W:A save replays in an encrypted format, which is playable only with the tool-assisted version. Only Deadcode can decrypt them, thus making them playable with normal versions of W:A.

Personal tools