Difference between revisions of "Replays (GTA SA)"

From GTAMods Wiki
Jump to navigation Jump to search
m (Introduction)
m (Format Details)
Line 3: Line 3:
  
 
==Format Details==
 
==Format Details==
Each .rep file consists of header and variable amount of 'scenes'. Scene is a copy of important game information at given moment of time (actors, vehicles positions, weather, clothes, etc). Following one after another, the scenes create an illusion of a movie when played.
+
Each .rep file consists of header and variable amount of 'scenes' (or 'frames'). Scene is a copy of important game information at given moment of time (actors, vehicles positions, weather, clothes, etc). Following one after another, the scenes create an illusion of a movie when played.
  
The .rep file itself consist of up to 8 parts, size of each one is 100,000 bytes, depending on the replay length. The maximum size of replay file is 800,000 bytes. If the replay length is that it does not match 100,000 bytes boundary being less, the rest of the block is filled with useless data (commonly the previous replay data).
+
The .rep file itself consist of up to 8 parts, size of each one is 100,000 bytes, depending on the replay length. The maximum size of a replay file is 800,000 bytes. If the replay length is that it does not match 100,000 bytes boundary being less, the rest of the block is filled with useless data (commonly the previous replay data).
  
 
===Data Blocks===
 
===Data Blocks===

Revision as of 12:55, 20 July 2008

Introduction

GTA SA replays are the sequence of the scenes and actions recorded and stored in the replay.rep file. This file is located in the GTA San Andreas User Files directory.

Format Details

Each .rep file consists of header and variable amount of 'scenes' (or 'frames'). Scene is a copy of important game information at given moment of time (actors, vehicles positions, weather, clothes, etc). Following one after another, the scenes create an illusion of a movie when played.

The .rep file itself consist of up to 8 parts, size of each one is 100,000 bytes, depending on the replay length. The maximum size of a replay file is 800,000 bytes. If the replay length is that it does not match 100,000 bytes boundary being less, the rest of the block is filled with useless data (commonly the previous replay data).

Data Blocks

Each block consists of a byte denoting its type and some data as described below.

Block 0: End of file

This block denote the end of replay data. It consists only of a data type byte (0x00).

OFFSET  TYPE      DESCRIPTION
0x00    byte      type
0x01              (end)

Block 1: Vehicle1

size 52 bytes

Block 2: Vehicle2

size 56 bytes

Block 3: Player data

size 8 bytes

Block 4: Ped

size 52 bytes

Block 5: Camera

size 88 bytes

Block 6: Day time

size 4 bytes

Block 7: Weather

size 8 bytes

Block 8: End scene

size 4 bytes

Block 9: Scene timing

size 8 bytes

Block 10: Unknown

size 28 bytes

Block 11: Unknown

size 20 bytes

Block 12: Unknown

size 16 bytes

Block 13: Unknown

size 4 bytes; same as Block 8?

Block 14: Unknown

size 4 bytes; same as Block 8?

Block 15: Unknown vehicle

size 56 bytes; same as Block 2?

Block 16: Unknown vehicle

size 56 bytes; same as Block 2?

Block 17: Unknown vehicle

size 60 bytes

Block 18: Unknown

size 76 bytes

Block 19: Clothes

size 120 bytes

Tools

There is a template for 010 Editor, made by Seemann. It allows to edit different replay data in hex editor. http://sannybuilder.com/dev/Replay.rar