<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gtamods.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yukani</id>
	<title>GTAMods Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://gtamods.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yukani"/>
	<link rel="alternate" type="text/html" href="https://gtamods.com/wiki/Special:Contributions/Yukani"/>
	<updated>2026-04-17T16:11:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Replays_(GTA_SA)&amp;diff=19321</id>
		<title>Replays (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Replays_(GTA_SA)&amp;diff=19321"/>
		<updated>2022-12-20T22:42:07Z</updated>

		<summary type="html">&lt;p&gt;Yukani: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Research}}&lt;br /&gt;
{{TocRight}}&lt;br /&gt;
&lt;br /&gt;
'''Replays''' are the sequence of the scenes and actions recorded and stored in the &amp;lt;code&amp;gt;replay.rep&amp;lt;/code&amp;gt; file. This file is located in the [[GTA San Andreas]] User Files directory.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
Each .rep file consists of a header string and variable amount of 'scenes' (or 'frames'). A 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 most of scenes contains a same set of blocks and ends with [[#Block 8: End of scene| Block 8]].&lt;br /&gt;
&lt;br /&gt;
The .rep file itself consist of a header string which is simply the text '''GtaSA29''' and up to 8 parts, size of each one is 100,000 bytes, depending on the replay length. So, the maximum size of a replay file is 800,008 bytes (including 8 bytes of the header string). If the replay length is that it does not match 100,000 bytes boundary being less, the rest of the file is filled with useless data (commonly the previous replay data).&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
&lt;br /&gt;
Each block consists of a byte denoting its type and some data as described below. A number in a block name is the data type stored in the first byte of the block. Reading this byte, the game detects what block follows.&lt;br /&gt;
&lt;br /&gt;
====Block 0: End of file====&lt;br /&gt;
This block denotes the end of replay data. It consists only of a data type. After this block the game stops reading the replay file.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      data type (0x00)&lt;br /&gt;
 0x01    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 1: Vehicle====&lt;br /&gt;
size 52 bytes&lt;br /&gt;
&lt;br /&gt;
====Block 2: Bike====&lt;br /&gt;
Special bike information, first 52 bytes are from [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle block]].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    BLOCK     [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle]] (type= 0x2)&lt;br /&gt;
 0x34    byte      animLean&lt;br /&gt;
 0x35    byte      steerAngle&lt;br /&gt;
 0x36    byte[2]   (align)&lt;br /&gt;
 0x38    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Ped Header====&lt;br /&gt;
Common information about a ped to be created. If the said ped is the player, a clothes block will&lt;br /&gt;
follow after.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      data type (0x03)&lt;br /&gt;
 0x01    byte      index (handle?)&lt;br /&gt;
 0x02    WORD      modelID&lt;br /&gt;
 0x04    byte      [[ped type]]&lt;br /&gt;
 0x05    byte[3]   (align)&lt;br /&gt;
 0x08    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Ped Update====&lt;br /&gt;
Update information of a ped already existed.&lt;br /&gt;
size 52 bytes&lt;br /&gt;
&lt;br /&gt;
====Block 5: Camera====&lt;br /&gt;
This block contains information about game camera. Also called 'general'&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      data type (0x05)&lt;br /&gt;
 0x01    byte      isUsingRemoteVehicle&lt;br /&gt;
 0x02    byte[2]   (align)&lt;br /&gt;
 0x04    CMatrix   matrix&lt;br /&gt;
 0x4C    CVector   firstFocus&lt;br /&gt;
 0x58    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 6: Day time====&lt;br /&gt;
This block contains information about current day time during a scene.&lt;br /&gt;
 &lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      data type (0x06)&lt;br /&gt;
 0x01    byte      currentHour&lt;br /&gt;
 0x02    byte      currentMinute&lt;br /&gt;
 0x03    byte      (align)&lt;br /&gt;
 0x04    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 7: Weather====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      data type (0x07)&lt;br /&gt;
 0x01    byte      oldWeather&lt;br /&gt;
 0x02    byte      newWeather&lt;br /&gt;
 0x03    byte      (align)&lt;br /&gt;
 0x04    float     interpValue&lt;br /&gt;
 0x08    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 8: End of scene====&lt;br /&gt;
This block denotes the end of the current scene (frame). It consists only of a data type. &lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      data type (0x08)&lt;br /&gt;
 0x01    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 9: Scene timing====&lt;br /&gt;
This block contains value of the global game timer. The replay play length could be found by using this  block.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      data type (0x09)&lt;br /&gt;
 0x01    byte[3]   (align)&lt;br /&gt;
 0x04    DWORD     timer&lt;br /&gt;
 0x08              (end)&lt;br /&gt;
&lt;br /&gt;
====Block 10: Bullet Traces====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      type (0xA)&lt;br /&gt;
 0x01    byte[2]   (align)&lt;br /&gt;
 0x03    byte      index&lt;br /&gt;
 0x04    CVector   start&lt;br /&gt;
 0x10    CVector   end&lt;br /&gt;
 0x1C    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Particles====&lt;br /&gt;
Unused, size 20 bytes.&lt;br /&gt;
&lt;br /&gt;
====Block 12: Misc====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      type (0xC)&lt;br /&gt;
 0x01    byte[3]   (align)&lt;br /&gt;
 0x04    DWORD     camShakeStart&lt;br /&gt;
 0x08    float     camShakeForce&lt;br /&gt;
 0x0C    byte      currArea&lt;br /&gt;
 0x0D    byte      cameraFX (bit 1: video, bit 2: lift)&lt;br /&gt;
 0x0E    byte[2]   (align)&lt;br /&gt;
 0x10    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 13: Deleted Vehicle====&lt;br /&gt;
Used for reporting a vehicle needs to be removed from the world.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      type (0xD)&lt;br /&gt;
 0x01    byte      (align)&lt;br /&gt;
 0x02    WORD      handle&lt;br /&gt;
 0x04    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 14: Deleted Ped====&lt;br /&gt;
Used for reporting a ped needs to be removed from the ped.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      type (0xE)&lt;br /&gt;
 0x01    byte      (align)&lt;br /&gt;
 0x02    WORD      handle&lt;br /&gt;
 0x04    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 15: BMX====&lt;br /&gt;
Special BMX information, first 52 bytes are from [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle block]]. Exactly the same with the [[Replays_(GTA_SA)#Block_2 Bike|bike block]].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    BLOCK     [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle]] (type= 0xF)&lt;br /&gt;
 0x34    byte      animLean&lt;br /&gt;
 0x35    byte      steerAngle&lt;br /&gt;
 0x36    byte[2]   (align)&lt;br /&gt;
 0x38    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 16: Heli====&lt;br /&gt;
Special helicopter information, first 52 bytes are from [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle block]]&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    BLOCK     [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle]] (type= 0x10)&lt;br /&gt;
 0x34    float     rotorSpeed&lt;br /&gt;
 0x38    (end)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Block 17: Plane====&lt;br /&gt;
Special plane information, first 52 bytes are from [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle block]]&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    BLOCK     [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle]] (type= 0x11)&lt;br /&gt;
 0x34    float     propSpeed&lt;br /&gt;
 0x38    float     field_0x9c8&lt;br /&gt;
 0x3C    (end)&lt;br /&gt;
&lt;br /&gt;
====Block 18: Train====&lt;br /&gt;
Special train information, first 52 bytes are from [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle block]]&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    BLOCK     [[Replays_(GTA_SA)#Block_1: Vehicle|vehicle]] (type= 0x12)&lt;br /&gt;
 0x34    float     speed&lt;br /&gt;
 0x38    float     currentRailDistance&lt;br /&gt;
 0x3C    float     length&lt;br /&gt;
 0x40    DWORD     prevCarriageHandle&lt;br /&gt;
 0x44    DWORD     nextCarriageHandle&lt;br /&gt;
 0x48    byte      trackId&lt;br /&gt;
 0x49    byte[3]   (align)&lt;br /&gt;
 0x4C    (end)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
====Block 19: Clothes====&lt;br /&gt;
This block contains information on the current clothes of the player. The block structure is identical to [[GTA_SA_Saves#Block_2:_Players_.26_Objects|the one in the Player structure]] in a save file.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x00    byte      type (0x13)&lt;br /&gt;
 0x01    byte[3]   (align)&lt;br /&gt;
 0x04    DWORD[10] modelCRCs&lt;br /&gt;
 0x2C    DWORD[18] textureCRCs&lt;br /&gt;
 0x74    WORD      Fat&lt;br /&gt;
 0x76    WORD      Muscle;&lt;br /&gt;
 0x78    (end)&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
* http://sannybuilder.com/dev/Replay.rar - a template for [http://www.sweetscape.com/010editor/ 010 Editor], made by {{U|Seemann}}. It allows to edit different replay data.&lt;br /&gt;
&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
&lt;br /&gt;
[[Category:File_Formats]]&lt;/div&gt;</summary>
		<author><name>Yukani</name></author>
		
	</entry>
</feed>