<?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=X-Seti</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=X-Seti"/>
	<link rel="alternate" type="text/html" href="https://gtamods.com/wiki/Special:Contributions/X-Seti"/>
	<updated>2026-04-08T21:34:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=RenderWare_binary_stream_file&amp;diff=11865</id>
		<title>RenderWare binary stream file</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=RenderWare_binary_stream_file&amp;diff=11865"/>
		<updated>2014-10-16T13:29:48Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Common RW Version IDs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{File-stub}}&lt;br /&gt;
{{TocRight}}&lt;br /&gt;
'''RenderWare binary stream files''' are hierarchically structured binary data files used by the [[Wikipedia:RenderWare|RenderWare]] 3.x graphics engine utilized by [[Wikipedia:Rockstar North|Rockstar North]] for their GTA III trilogy (only on PC, [[Wikipedia:PS2|PS2]] and [[Wikipedia:XBOX|XBOX]], not [[Wikipedia:PSP|PSP]]!) and related games (Manhunt, Bully).&lt;br /&gt;
&lt;br /&gt;
GTA's [[model file]]s use the [[Wikipedia:file extension|file extension]] &amp;lt;code&amp;gt;.dff&amp;lt;/code&amp;gt; and [[texture archive]]s use &amp;lt;code&amp;gt;.txd&amp;lt;/code&amp;gt;. Other possible extensions, not used by the GTA games, are &amp;lt;code&amp;gt;.rws&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.bsp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.dma&amp;lt;/code&amp;gt;. GTA3 does use &amp;lt;code&amp;gt;.anm&amp;lt;/code&amp;gt; for some of its cutscene animations, but it is the only GTA to do so.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
RW streams are split up into sections. Each section has a 12 byte header and can either be empty, contain data or more child sections. Section content, especially of data sections, is determined by an ID in the header.&lt;br /&gt;
&lt;br /&gt;
There is only one data structure common to all RW streams - the '''section header''':&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD - section identifier&lt;br /&gt;
 4 byte - DWORD - section size, including child sections and/or data&lt;br /&gt;
 4 byte - DWORD - RW version ID&lt;br /&gt;
&lt;br /&gt;
The RW version ID varies depending on the RW engine version used for exporting the files. It must be the same for all headers within one file. Backwards compatibility is very limited.&lt;br /&gt;
&lt;br /&gt;
===Valid RW Section IDs===&lt;br /&gt;
&lt;br /&gt;
See the [[list of RW section IDs]].&lt;br /&gt;
&lt;br /&gt;
===Rockstar's Custom Section IDs===&lt;br /&gt;
&lt;br /&gt;
Rockstar added several vendor specific RW plugins, which have their own ID range (0x0253F2F*).&lt;br /&gt;
&lt;br /&gt;
* [[Pipeline Set (RW Section)|Pipeline Set]] ''(0x0253F2F3)''&lt;br /&gt;
* [[Specular Material (RW Section)|Specular Material]] ''(0x0253F2F6)''&lt;br /&gt;
* [[2dfx (RW Section)|2dfx]] ''(0x0253F2F8)''&lt;br /&gt;
* [[Night Vertex Colors (RW Section)|Night Vertex Colors]] ''(0x0253F2F9)''&lt;br /&gt;
* [[Collision Model (RW Section)|Collision Model]] ''(0x0253F2FA)''&lt;br /&gt;
* [[Reflection Material (RW Section)|Reflection Material]] ''(0x0253F2FC)''&lt;br /&gt;
* [[Mesh Extension (RW Section)|Mesh Extension]] ''(0x0253F2FD)''&lt;br /&gt;
* [[Frame (RW Section)|Frame]] ''(0x0253F2FE)''&lt;br /&gt;
&lt;br /&gt;
===Common RW Version IDs===&lt;br /&gt;
&lt;br /&gt;
The following is an (incomplete) list of plain text RW versions commonly used in GTA and their encoded equivalent:&lt;br /&gt;
&lt;br /&gt;
 3.0.0.0 - 0x00000310 - GTA III multi-dff and generics.&lt;br /&gt;
 3.0.0.0 - 0x00000310 - Android / OSX GTA III multi-dff and generics.&lt;br /&gt;
 3.1.0.0 - 0x0400FFFF - GTA III &lt;br /&gt;
 3.2.0.0 - 0x0800FFFF - PS2 &amp;amp; PC GTA: III.&lt;br /&gt;
 3.3.0.2 - 0x0C02FFFF - GTA: VC. &lt;br /&gt;
 3.4.0.2 - 0x1003FFFF - Android GTA: III vehicles.&lt;br /&gt;
 3.4.0.2 - 0x1003FFFF - Android / OSX GTA VC multi-dff, generic and vehicles.&lt;br /&gt;
 3.4.0.3 - 0x1003FFFF - X-BOX GTA III, GTA VC &amp;amp; GTA SA.&lt;br /&gt;
 3.5.0.0 - 0x1400FFFF - Android / OSX GTA SA multi-dff.&lt;br /&gt;
 3.6.0.3 - 0x1803FFFF - GTA SA &amp;amp; Manhunt.&lt;br /&gt;
 3.7.0.0 - 0x1C000000 - GTA SA Cuts.&lt;br /&gt;
&lt;br /&gt;
==Common File Structures==&lt;br /&gt;
&lt;br /&gt;
===Model Files (DFF)===&lt;br /&gt;
&lt;br /&gt;
* [[Clump (RW Section)|Clump]]&lt;br /&gt;
** [[Struct (RW Section)#Clump|Struct]]&lt;br /&gt;
** [[Frame List (RW Section)|Frame List]]&lt;br /&gt;
*** [[Struct (RW Section)#Frame_List|Struct]]&lt;br /&gt;
*** [[Extension (RW Section)|Extension]] *&lt;br /&gt;
**** [[Frame (RW Section)|Frame]]&lt;br /&gt;
**** [[HAnim PLG (RW Section)|HAnim PLG]]&lt;br /&gt;
** [[Geometry List (RW Section)|Geometry List]]&lt;br /&gt;
*** [[Struct (RW Section)#Geometry_List|Struct]]&lt;br /&gt;
*** [[Geometry (RW Section)|Geometry]] *&lt;br /&gt;
**** [[Struct (RW Section)#Geometry|Struct]]&lt;br /&gt;
**** [[Material List (RW Section)|Material List]]&lt;br /&gt;
***** [[Struct (RW Section)#Material_List|Struct]]&lt;br /&gt;
***** [[Material (RW Section)|Material]] *&lt;br /&gt;
****** [[Struct (RW Section)#Material|Struct]]&lt;br /&gt;
****** [[Texture (RW Section)|Texture]] - optional&lt;br /&gt;
******* [[Struct (RW Section)#Texture|Struct]]&lt;br /&gt;
******* [[String (RW Section)|String]] - diffuse texture name&lt;br /&gt;
******* [[String (RW Section)|String]] - alpha texture name&lt;br /&gt;
******* [[Extension (RW Section)|Extension]]&lt;br /&gt;
******** [[Sky Mipmap Val (RW Section)|Sky Mipmap Val]] **&lt;br /&gt;
****** [[Extension (RW Section)|Extension]]&lt;br /&gt;
******* [[Material Effects PLG (RW Section)|Material Effects PLG]] - optional&lt;br /&gt;
******** [[Texture (RW Section)|Texture]] - optional ''(See [[Material Effects PLG (RW Section)|Material Effects PLG]] for more information)''&lt;br /&gt;
********* [[Struct (RW Section)#Texture|Struct]]&lt;br /&gt;
********* [[String (RW Section)|String]] - environment map name&lt;br /&gt;
********* [[String (RW Section)|String]] - alpha texture name&lt;br /&gt;
********* [[Extension (RW Section)|Extension]]&lt;br /&gt;
********** [[Sky Mipmap Val (RW Section)|Sky Mipmap Val]] **&lt;br /&gt;
******* [[Reflection Material (RW Section)|Reflection Material]] - optional&lt;br /&gt;
******* [[Specular Material (RW Section)|Specular Material]] - optional&lt;br /&gt;
******* [[UV Animation PLG (RW Section)|UV Animation PLG]] - optional&lt;br /&gt;
**** [[Extension (RW Section)|Extension]]&lt;br /&gt;
***** [[Bin Mesh PLG (RW Section)|Bin Mesh PLG]]&lt;br /&gt;
***** [[Native Data PLG (RW Section)|Native Data PLG]] (on Xbox and PS2)&lt;br /&gt;
***** [[Skin PLG (RW Section)|Skin PLG]]&lt;br /&gt;
***** [[Mesh Extension (RW Section)|Mesh Extension]] - optional&lt;br /&gt;
***** [[Night Vertex Colors (RW Section)|Night Vertex Colors]] - optional (static objects only)&lt;br /&gt;
***** [[Morph PLG (RW Section)|Morph PLG]]&lt;br /&gt;
***** [[2dfx (RW Section)|2dfx]] - optional&lt;br /&gt;
** [[Atomic (RW Section)|Atomic]] *&lt;br /&gt;
*** [[Struct (RW Section)#Atomic|Struct]]&lt;br /&gt;
*** [[Extension (RW Section)|Extension]]&lt;br /&gt;
**** [[Right To Render (RW Section)|Right To Render]] - optional&lt;br /&gt;
**** [[Particles PLG (RW Section)|Particles PLG]] - optional&lt;br /&gt;
**** [[Material Effects PLG (RW Section)|Material Effects PLG]] - optional&lt;br /&gt;
**** [[Pipeline Set (RW Section)|Pipeline Set]] - optional&lt;br /&gt;
** [[Extension (RW Section)|Extension]]&lt;br /&gt;
*** [[Collision Model (RW Section)|Collision Model]] - vehicles only&lt;br /&gt;
&lt;br /&gt;
===Texture Archives (TXD)===&lt;br /&gt;
&lt;br /&gt;
* [[Texture Dictionary (RW Section)|Texture Dictionary]]&lt;br /&gt;
** [[Struct (RW Section)#Texture_Dictionary|Struct]] - 4 byte, 2x word, first one is the texture count&lt;br /&gt;
** [[Texture Native (RW Section)|Texture Native]] *&lt;br /&gt;
*** [[Struct (RW Section)#Texture_Native|Struct]] - header and actual image data&lt;br /&gt;
*** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
&lt;br /&gt;
===Texture Archives PS2 (TXD)===&lt;br /&gt;
* [[Texture Dictionary (RW Section)|Texture Dictionary]]&lt;br /&gt;
** [[Struct (RW Section)#Texture_Dictionary|Struct]] - 4b - Texture count&lt;br /&gt;
** [[Texture Native (RW Section)|Texture Native]] *&lt;br /&gt;
*** [[Struct (RW Section)#Texture_Native|Struct]] - 4b - Platform, 4b- Filter Flags&lt;br /&gt;
*** [[String (RW Section)|String]] - Texture name&lt;br /&gt;
*** [[String (RW Section)|String]] - Alpha name&lt;br /&gt;
*** [[Struct (RW Section)|Struct]]&lt;br /&gt;
**** [[Struct (RW Section)|Struct]] - 4b- Width, 4b - Height, 4b - Bits per pixel, 4b - Raster flags, unknown&lt;br /&gt;
**** [[Struct (RW Section)|Struct]] - 80 bytes unknown, pixels/indices (80 bytes unknown, palette)&lt;br /&gt;
*** [[Extension (RW Section)|Extension]]&lt;br /&gt;
**** [[Sky Mipmap Val (RW Section)]] - 4 bytes unknown&lt;br /&gt;
** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
&lt;br /&gt;
''* These sections (and their child sections) can appear multiple times.&lt;br /&gt;
&lt;br /&gt;
''** Not always present, effect also unknown.&lt;br /&gt;
&lt;br /&gt;
''*** Require [[Pipeline Set (RW Section)|Pipeline Set]] to work for static objects, by default only for vehicles.&lt;br /&gt;
&lt;br /&gt;
A byte may contain two indices, if bpp == 4.&lt;br /&gt;
&lt;br /&gt;
16 bit images are in 1555 ARGB format or 565 (used by VC only on ancient hardware such as Riva TNT2 when you choose 16 bit color mode and game builds non-dxt version of txd files on disk).&lt;br /&gt;
&lt;br /&gt;
The indices are swizzled and saved in a PS2 friendly format (CLUT).&lt;br /&gt;
&lt;br /&gt;
Note: There are slight differences between GTA: III and VC formats concerning the raster/image format.&lt;br /&gt;
&lt;br /&gt;
==Tools &amp;amp; Scripts==&lt;br /&gt;
&lt;br /&gt;
* [http://www.steve-m.com/downloads/tools/rwanalyze/ RW Analyze] &amp;amp;ndash; by {{U|steve-m}}&lt;br /&gt;
* various [[model file]] and [[texture archive]] related tools&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* {{GTAF|128451|RW Analyze discussion thread}}&lt;br /&gt;
* [http://www.chronetal.co.uk/gta/index.php?page=dff Original DFF format description] by KCow&lt;br /&gt;
* [http://www.renderware.com Official RenderWare Site]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=TXD MultimediaWiki TXD]&lt;br /&gt;
&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
[[Category:3D File Formats]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=RenderWare_binary_stream_file&amp;diff=11421</id>
		<title>RenderWare binary stream file</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=RenderWare_binary_stream_file&amp;diff=11421"/>
		<updated>2014-08-18T14:08:19Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Common RW Version IDs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{File-stub}}&lt;br /&gt;
{{TocRight}}&lt;br /&gt;
'''RenderWare binary stream files''' are hierarchically structured binary data files used by the [[Wikipedia:RenderWare|RenderWare]] 3.x graphics engine utilized by [[Wikipedia:Rockstar North|Rockstar North]] for their GTA III trilogy (only on PC, [[Wikipedia:PS2|PS2]] and [[Wikipedia:XBOX|XBOX]], not [[Wikipedia:PSP|PSP]]!) and related games (Manhunt, Bully).&lt;br /&gt;
&lt;br /&gt;
GTA's [[model file]]s use the [[Wikipedia:file extension|file extension]] &amp;lt;code&amp;gt;.dff&amp;lt;/code&amp;gt; and [[texture archive]]s use &amp;lt;code&amp;gt;.txd&amp;lt;/code&amp;gt;. Other possible extensions, not used by the GTA games, are &amp;lt;code&amp;gt;.rws&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.bsp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.dma&amp;lt;/code&amp;gt;. GTA3 does use &amp;lt;code&amp;gt;.anm&amp;lt;/code&amp;gt; for some of its cutscene animations, but it is the only GTA to do so.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
RW streams are split up into sections. Each section has a 12 byte header and can either be empty, contain data or more child sections. Section content, especially of data sections, is determined by an ID in the header.&lt;br /&gt;
&lt;br /&gt;
There is only one data structure common to all RW streams - the '''section header''':&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD - section identifier&lt;br /&gt;
 4 byte - DWORD - section size, including child sections and/or data&lt;br /&gt;
 4 byte - DWORD - RW version ID&lt;br /&gt;
&lt;br /&gt;
The RW version ID varies depending on the RW engine version used for exporting the files. It must be the same for all headers within one file. Backwards compatibility is very limited.&lt;br /&gt;
&lt;br /&gt;
===Valid RW Section IDs===&lt;br /&gt;
&lt;br /&gt;
See the [[list of RW section IDs]].&lt;br /&gt;
&lt;br /&gt;
===Rockstar's Custom Section IDs===&lt;br /&gt;
&lt;br /&gt;
Rockstar added several vendor specific RW plugins, which have their own ID range (0x0253F2F*).&lt;br /&gt;
&lt;br /&gt;
* [[Pipeline Set (RW Section)|Pipeline Set]] ''(0x0253F2F3)''&lt;br /&gt;
* [[Specular Material (RW Section)|Specular Material]] ''(0x0253F2F6)''&lt;br /&gt;
* [[2dfx (RW Section)|2dfx]] ''(0x0253F2F8)''&lt;br /&gt;
* [[Night Vertex Colors (RW Section)|Night Vertex Colors]] ''(0x0253F2F9)''&lt;br /&gt;
* [[Collision Model (RW Section)|Collision Model]] ''(0x0253F2FA)''&lt;br /&gt;
* [[Reflection Material (RW Section)|Reflection Material]] ''(0x0253F2FC)''&lt;br /&gt;
* [[Mesh Extension (RW Section)|Mesh Extension]] ''(0x0253F2FD)''&lt;br /&gt;
* [[Frame (RW Section)|Frame]] ''(0x0253F2FE)''&lt;br /&gt;
&lt;br /&gt;
===Common RW Version IDs===&lt;br /&gt;
&lt;br /&gt;
The following is an (incomplete) list of plain text RW versions commonly used in GTA and their encoded equivalent:&lt;br /&gt;
&lt;br /&gt;
 3.0.0.0 - 0x00000310 - GTA III multi-dff and generics.&lt;br /&gt;
 3.0.0.0 - 0x00000310 - Android / OSX GTA III multi-dff and generics.&lt;br /&gt;
 3.2.0.0 - 0x0800FFFF - PS2 &amp;amp; PC GTA: III.&lt;br /&gt;
 3.3.0.2 - 0x0C02FFFF - GTA: VC. &lt;br /&gt;
 3.4.0.2 - 0x1003FFFF - Android GTA: III vehicles.&lt;br /&gt;
 3.4.0.2 - 0x1003FFFF - Android / OSX GTA VC multi-dff, generic and vehicles.&lt;br /&gt;
 3.4.0.3 - 0x1003FFFF - X-BOX GTA III &amp;amp; GTA VC.&lt;br /&gt;
 3.5.0.0 - 0x1400FFFF - Android / OSX GTA SA multi-dff.&lt;br /&gt;
 3.6.0.3 - 0x1803FFFF - GTA SA &amp;amp; Manhunt.&lt;br /&gt;
 3.7.0.0 - 0x1C000000 - GTA SA Cuts.&lt;br /&gt;
&lt;br /&gt;
==Common File Structures==&lt;br /&gt;
&lt;br /&gt;
===Model Files (DFF)===&lt;br /&gt;
&lt;br /&gt;
* [[Clump (RW Section)|Clump]]&lt;br /&gt;
** [[Struct (RW Section)#Clump|Struct]]&lt;br /&gt;
** [[Frame List (RW Section)|Frame List]]&lt;br /&gt;
*** [[Struct (RW Section)#Frame_List|Struct]]&lt;br /&gt;
*** [[Extension (RW Section)|Extension]] *&lt;br /&gt;
**** [[Frame (RW Section)|Frame]]&lt;br /&gt;
**** [[HAnim PLG (RW Section)|HAnim PLG]]&lt;br /&gt;
** [[Geometry List (RW Section)|Geometry List]]&lt;br /&gt;
*** [[Struct (RW Section)#Geometry_List|Struct]]&lt;br /&gt;
*** [[Geometry (RW Section)|Geometry]] *&lt;br /&gt;
**** [[Struct (RW Section)#Geometry|Struct]]&lt;br /&gt;
**** [[Material List (RW Section)|Material List]]&lt;br /&gt;
***** [[Struct (RW Section)#Material_List|Struct]]&lt;br /&gt;
***** [[Material (RW Section)|Material]] *&lt;br /&gt;
****** [[Struct (RW Section)#Material|Struct]]&lt;br /&gt;
****** [[Texture (RW Section)|Texture]] - optional&lt;br /&gt;
******* [[Struct (RW Section)#Texture|Struct]]&lt;br /&gt;
******* [[String (RW Section)|String]] - diffuse texture name&lt;br /&gt;
******* [[String (RW Section)|String]] - alpha texture name&lt;br /&gt;
******* [[Extension (RW Section)|Extension]]&lt;br /&gt;
******** [[Sky Mipmap Val (RW Section)|Sky Mipmap Val]] **&lt;br /&gt;
****** [[Extension (RW Section)|Extension]]&lt;br /&gt;
******* [[Material Effects PLG (RW Section)|Material Effects PLG]] - optional&lt;br /&gt;
******** [[Texture (RW Section)|Texture]] - optional ''(See [[Material Effects PLG (RW Section)|Material Effects PLG]] for more information)''&lt;br /&gt;
********* [[Struct (RW Section)#Texture|Struct]]&lt;br /&gt;
********* [[String (RW Section)|String]] - environment map name&lt;br /&gt;
********* [[String (RW Section)|String]] - alpha texture name&lt;br /&gt;
********* [[Extension (RW Section)|Extension]]&lt;br /&gt;
********** [[Sky Mipmap Val (RW Section)|Sky Mipmap Val]] **&lt;br /&gt;
******* [[Reflection Material (RW Section)|Reflection Material]] - optional&lt;br /&gt;
******* [[Specular Material (RW Section)|Specular Material]] - optional&lt;br /&gt;
******* [[UV Animation PLG (RW Section)|UV Animation PLG]] - optional&lt;br /&gt;
**** [[Extension (RW Section)|Extension]]&lt;br /&gt;
***** [[Bin Mesh PLG (RW Section)|Bin Mesh PLG]]&lt;br /&gt;
***** [[Native Data PLG (RW Section)|Native Data PLG]] (on Xbox and PS2)&lt;br /&gt;
***** [[Skin PLG (RW Section)|Skin PLG]]&lt;br /&gt;
***** [[Mesh Extension (RW Section)|Mesh Extension]] - optional&lt;br /&gt;
***** [[Night Vertex Colors (RW Section)|Night Vertex Colors]] - optional (static objects only)&lt;br /&gt;
***** [[Morph PLG (RW Section)|Morph PLG]]&lt;br /&gt;
***** [[2dfx (RW Section)|2dfx]] - optional&lt;br /&gt;
** [[Atomic (RW Section)|Atomic]] *&lt;br /&gt;
*** [[Struct (RW Section)#Atomic|Struct]]&lt;br /&gt;
*** [[Extension (RW Section)|Extension]]&lt;br /&gt;
**** [[Right To Render (RW Section)|Right To Render]] - optional&lt;br /&gt;
**** [[Particles PLG (RW Section)|Particles PLG]] - optional&lt;br /&gt;
**** [[Material Effects PLG (RW Section)|Material Effects PLG]] - optional&lt;br /&gt;
**** [[Pipeline Set (RW Section)|Pipeline Set]] - optional&lt;br /&gt;
** [[Extension (RW Section)|Extension]]&lt;br /&gt;
*** [[Collision Model (RW Section)|Collision Model]] - vehicles only&lt;br /&gt;
&lt;br /&gt;
===Texture Archives (TXD)===&lt;br /&gt;
&lt;br /&gt;
* [[Texture Dictionary (RW Section)|Texture Dictionary]]&lt;br /&gt;
** [[Struct (RW Section)#Texture_Dictionary|Struct]] - 4 byte, 2x word, first one is the texture count&lt;br /&gt;
** [[Texture Native (RW Section)|Texture Native]] *&lt;br /&gt;
*** [[Struct (RW Section)#Texture_Native|Struct]] - header and actual image data&lt;br /&gt;
*** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
&lt;br /&gt;
===Texture Archives PS2 (TXD)===&lt;br /&gt;
* [[Texture Dictionary (RW Section)|Texture Dictionary]]&lt;br /&gt;
** [[Struct (RW Section)#Texture_Dictionary|Struct]] - 4b - Texture count&lt;br /&gt;
** [[Texture Native (RW Section)|Texture Native]] *&lt;br /&gt;
*** [[Struct (RW Section)#Texture_Native|Struct]] - 4b - Platform, 4b- Filter Flags&lt;br /&gt;
*** [[String (RW Section)|String]] - Texture name&lt;br /&gt;
*** [[String (RW Section)|String]] - Alpha name&lt;br /&gt;
*** [[Struct (RW Section)|Struct]]&lt;br /&gt;
**** [[Struct (RW Section)|Struct]] - 4b- Width, 4b - Height, 4b - Bits per pixel, 4b - Raster flags, unknown&lt;br /&gt;
**** [[Struct (RW Section)|Struct]] - 80 bytes unknown, pixels/indices (80 bytes unknown, palette)&lt;br /&gt;
*** [[Extension (RW Section)|Extension]]&lt;br /&gt;
**** [[Sky Mipmap Val (RW Section)]] - 4 bytes unknown&lt;br /&gt;
** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
&lt;br /&gt;
''* These sections (and their child sections) can appear multiple times.&lt;br /&gt;
&lt;br /&gt;
''** Not always present, effect also unknown.&lt;br /&gt;
&lt;br /&gt;
''*** Require [[Pipeline Set (RW Section)|Pipeline Set]] to work for static objects, by default only for vehicles.&lt;br /&gt;
&lt;br /&gt;
A byte may contain two indices, if bpp == 4.&lt;br /&gt;
&lt;br /&gt;
16 bit images are in 1555 ARGB format or 565 (used by VC only on ancient hardware such as Riva TNT2 when you choose 16 bit color mode and game builds non-dxt version of txd files on disk).&lt;br /&gt;
&lt;br /&gt;
The indices are swizzled and saved in a PS2 friendly format (CLUT).&lt;br /&gt;
&lt;br /&gt;
Note: There are slight differences between GTA: III and VC formats concerning the raster/image format.&lt;br /&gt;
&lt;br /&gt;
==Tools &amp;amp; Scripts==&lt;br /&gt;
&lt;br /&gt;
* [http://www.steve-m.com/downloads/tools/rwanalyze/ RW Analyze] &amp;amp;ndash; by {{U|steve-m}}&lt;br /&gt;
* various [[model file]] and [[texture archive]] related tools&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* {{GTAF|128451|RW Analyze discussion thread}}&lt;br /&gt;
* [http://www.chronetal.co.uk/gta/index.php?page=dff Original DFF format description] by KCow&lt;br /&gt;
* [http://www.renderware.com Official RenderWare Site]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=TXD MultimediaWiki TXD]&lt;br /&gt;
&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
[[Category:3D File Formats]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=RenderWare_binary_stream_file&amp;diff=11420</id>
		<title>RenderWare binary stream file</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=RenderWare_binary_stream_file&amp;diff=11420"/>
		<updated>2014-08-18T14:06:48Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Common RW Version IDs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{File-stub}}&lt;br /&gt;
{{TocRight}}&lt;br /&gt;
'''RenderWare binary stream files''' are hierarchically structured binary data files used by the [[Wikipedia:RenderWare|RenderWare]] 3.x graphics engine utilized by [[Wikipedia:Rockstar North|Rockstar North]] for their GTA III trilogy (only on PC, [[Wikipedia:PS2|PS2]] and [[Wikipedia:XBOX|XBOX]], not [[Wikipedia:PSP|PSP]]!) and related games (Manhunt, Bully).&lt;br /&gt;
&lt;br /&gt;
GTA's [[model file]]s use the [[Wikipedia:file extension|file extension]] &amp;lt;code&amp;gt;.dff&amp;lt;/code&amp;gt; and [[texture archive]]s use &amp;lt;code&amp;gt;.txd&amp;lt;/code&amp;gt;. Other possible extensions, not used by the GTA games, are &amp;lt;code&amp;gt;.rws&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.bsp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.dma&amp;lt;/code&amp;gt;. GTA3 does use &amp;lt;code&amp;gt;.anm&amp;lt;/code&amp;gt; for some of its cutscene animations, but it is the only GTA to do so.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
RW streams are split up into sections. Each section has a 12 byte header and can either be empty, contain data or more child sections. Section content, especially of data sections, is determined by an ID in the header.&lt;br /&gt;
&lt;br /&gt;
There is only one data structure common to all RW streams - the '''section header''':&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD - section identifier&lt;br /&gt;
 4 byte - DWORD - section size, including child sections and/or data&lt;br /&gt;
 4 byte - DWORD - RW version ID&lt;br /&gt;
&lt;br /&gt;
The RW version ID varies depending on the RW engine version used for exporting the files. It must be the same for all headers within one file. Backwards compatibility is very limited.&lt;br /&gt;
&lt;br /&gt;
===Valid RW Section IDs===&lt;br /&gt;
&lt;br /&gt;
See the [[list of RW section IDs]].&lt;br /&gt;
&lt;br /&gt;
===Rockstar's Custom Section IDs===&lt;br /&gt;
&lt;br /&gt;
Rockstar added several vendor specific RW plugins, which have their own ID range (0x0253F2F*).&lt;br /&gt;
&lt;br /&gt;
* [[Pipeline Set (RW Section)|Pipeline Set]] ''(0x0253F2F3)''&lt;br /&gt;
* [[Specular Material (RW Section)|Specular Material]] ''(0x0253F2F6)''&lt;br /&gt;
* [[2dfx (RW Section)|2dfx]] ''(0x0253F2F8)''&lt;br /&gt;
* [[Night Vertex Colors (RW Section)|Night Vertex Colors]] ''(0x0253F2F9)''&lt;br /&gt;
* [[Collision Model (RW Section)|Collision Model]] ''(0x0253F2FA)''&lt;br /&gt;
* [[Reflection Material (RW Section)|Reflection Material]] ''(0x0253F2FC)''&lt;br /&gt;
* [[Mesh Extension (RW Section)|Mesh Extension]] ''(0x0253F2FD)''&lt;br /&gt;
* [[Frame (RW Section)|Frame]] ''(0x0253F2FE)''&lt;br /&gt;
&lt;br /&gt;
===Common RW Version IDs===&lt;br /&gt;
&lt;br /&gt;
The following is an (incomplete) list of plain text RW versions commonly used in GTA and their encoded equivalent:&lt;br /&gt;
&lt;br /&gt;
 3.0.0.0 - 0x00000310 - GTA III multi-dff and generics.&lt;br /&gt;
 3.0.0.0 - 0x00000310 - Android / OSX GTA III multi-dff and generics.&lt;br /&gt;
 3.2.0.0 - 0x0800FFFF - PS2 &amp;amp; PC GTA: III&lt;br /&gt;
 3.3.0.2 - 0x0C02FFFF - GTA: VC &lt;br /&gt;
 3.4.0.2 - 0x1003FFFF - Android GTA: III vehicles.&lt;br /&gt;
 3.4.0.2 - 0x1003FFFF - Android /OSX GTA VC multi-dff, generic and vehicles.&lt;br /&gt;
 3.4.0.3 - 0x1003FFFF - X-BOX GTA III &amp;amp; GTA: VC .&lt;br /&gt;
 3.5.0.0 - 0x1400FFFF - Android /OSX GTA SA multi-dff.&lt;br /&gt;
 3.6.0.3 - 0x1803FFFF - GTA SA &amp;amp; Manhunt.&lt;br /&gt;
 3.7.0.0 - 0x1C000000 - GTA SA Cuts.&lt;br /&gt;
&lt;br /&gt;
==Common File Structures==&lt;br /&gt;
&lt;br /&gt;
===Model Files (DFF)===&lt;br /&gt;
&lt;br /&gt;
* [[Clump (RW Section)|Clump]]&lt;br /&gt;
** [[Struct (RW Section)#Clump|Struct]]&lt;br /&gt;
** [[Frame List (RW Section)|Frame List]]&lt;br /&gt;
*** [[Struct (RW Section)#Frame_List|Struct]]&lt;br /&gt;
*** [[Extension (RW Section)|Extension]] *&lt;br /&gt;
**** [[Frame (RW Section)|Frame]]&lt;br /&gt;
**** [[HAnim PLG (RW Section)|HAnim PLG]]&lt;br /&gt;
** [[Geometry List (RW Section)|Geometry List]]&lt;br /&gt;
*** [[Struct (RW Section)#Geometry_List|Struct]]&lt;br /&gt;
*** [[Geometry (RW Section)|Geometry]] *&lt;br /&gt;
**** [[Struct (RW Section)#Geometry|Struct]]&lt;br /&gt;
**** [[Material List (RW Section)|Material List]]&lt;br /&gt;
***** [[Struct (RW Section)#Material_List|Struct]]&lt;br /&gt;
***** [[Material (RW Section)|Material]] *&lt;br /&gt;
****** [[Struct (RW Section)#Material|Struct]]&lt;br /&gt;
****** [[Texture (RW Section)|Texture]] - optional&lt;br /&gt;
******* [[Struct (RW Section)#Texture|Struct]]&lt;br /&gt;
******* [[String (RW Section)|String]] - diffuse texture name&lt;br /&gt;
******* [[String (RW Section)|String]] - alpha texture name&lt;br /&gt;
******* [[Extension (RW Section)|Extension]]&lt;br /&gt;
******** [[Sky Mipmap Val (RW Section)|Sky Mipmap Val]] **&lt;br /&gt;
****** [[Extension (RW Section)|Extension]]&lt;br /&gt;
******* [[Material Effects PLG (RW Section)|Material Effects PLG]] - optional&lt;br /&gt;
******** [[Texture (RW Section)|Texture]] - optional ''(See [[Material Effects PLG (RW Section)|Material Effects PLG]] for more information)''&lt;br /&gt;
********* [[Struct (RW Section)#Texture|Struct]]&lt;br /&gt;
********* [[String (RW Section)|String]] - environment map name&lt;br /&gt;
********* [[String (RW Section)|String]] - alpha texture name&lt;br /&gt;
********* [[Extension (RW Section)|Extension]]&lt;br /&gt;
********** [[Sky Mipmap Val (RW Section)|Sky Mipmap Val]] **&lt;br /&gt;
******* [[Reflection Material (RW Section)|Reflection Material]] - optional&lt;br /&gt;
******* [[Specular Material (RW Section)|Specular Material]] - optional&lt;br /&gt;
******* [[UV Animation PLG (RW Section)|UV Animation PLG]] - optional&lt;br /&gt;
**** [[Extension (RW Section)|Extension]]&lt;br /&gt;
***** [[Bin Mesh PLG (RW Section)|Bin Mesh PLG]]&lt;br /&gt;
***** [[Native Data PLG (RW Section)|Native Data PLG]] (on Xbox and PS2)&lt;br /&gt;
***** [[Skin PLG (RW Section)|Skin PLG]]&lt;br /&gt;
***** [[Mesh Extension (RW Section)|Mesh Extension]] - optional&lt;br /&gt;
***** [[Night Vertex Colors (RW Section)|Night Vertex Colors]] - optional (static objects only)&lt;br /&gt;
***** [[Morph PLG (RW Section)|Morph PLG]]&lt;br /&gt;
***** [[2dfx (RW Section)|2dfx]] - optional&lt;br /&gt;
** [[Atomic (RW Section)|Atomic]] *&lt;br /&gt;
*** [[Struct (RW Section)#Atomic|Struct]]&lt;br /&gt;
*** [[Extension (RW Section)|Extension]]&lt;br /&gt;
**** [[Right To Render (RW Section)|Right To Render]] - optional&lt;br /&gt;
**** [[Particles PLG (RW Section)|Particles PLG]] - optional&lt;br /&gt;
**** [[Material Effects PLG (RW Section)|Material Effects PLG]] - optional&lt;br /&gt;
**** [[Pipeline Set (RW Section)|Pipeline Set]] - optional&lt;br /&gt;
** [[Extension (RW Section)|Extension]]&lt;br /&gt;
*** [[Collision Model (RW Section)|Collision Model]] - vehicles only&lt;br /&gt;
&lt;br /&gt;
===Texture Archives (TXD)===&lt;br /&gt;
&lt;br /&gt;
* [[Texture Dictionary (RW Section)|Texture Dictionary]]&lt;br /&gt;
** [[Struct (RW Section)#Texture_Dictionary|Struct]] - 4 byte, 2x word, first one is the texture count&lt;br /&gt;
** [[Texture Native (RW Section)|Texture Native]] *&lt;br /&gt;
*** [[Struct (RW Section)#Texture_Native|Struct]] - header and actual image data&lt;br /&gt;
*** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
&lt;br /&gt;
===Texture Archives PS2 (TXD)===&lt;br /&gt;
* [[Texture Dictionary (RW Section)|Texture Dictionary]]&lt;br /&gt;
** [[Struct (RW Section)#Texture_Dictionary|Struct]] - 4b - Texture count&lt;br /&gt;
** [[Texture Native (RW Section)|Texture Native]] *&lt;br /&gt;
*** [[Struct (RW Section)#Texture_Native|Struct]] - 4b - Platform, 4b- Filter Flags&lt;br /&gt;
*** [[String (RW Section)|String]] - Texture name&lt;br /&gt;
*** [[String (RW Section)|String]] - Alpha name&lt;br /&gt;
*** [[Struct (RW Section)|Struct]]&lt;br /&gt;
**** [[Struct (RW Section)|Struct]] - 4b- Width, 4b - Height, 4b - Bits per pixel, 4b - Raster flags, unknown&lt;br /&gt;
**** [[Struct (RW Section)|Struct]] - 80 bytes unknown, pixels/indices (80 bytes unknown, palette)&lt;br /&gt;
*** [[Extension (RW Section)|Extension]]&lt;br /&gt;
**** [[Sky Mipmap Val (RW Section)]] - 4 bytes unknown&lt;br /&gt;
** [[Extension (RW Section)|Extension]] - empty&lt;br /&gt;
&lt;br /&gt;
''* These sections (and their child sections) can appear multiple times.&lt;br /&gt;
&lt;br /&gt;
''** Not always present, effect also unknown.&lt;br /&gt;
&lt;br /&gt;
''*** Require [[Pipeline Set (RW Section)|Pipeline Set]] to work for static objects, by default only for vehicles.&lt;br /&gt;
&lt;br /&gt;
A byte may contain two indices, if bpp == 4.&lt;br /&gt;
&lt;br /&gt;
16 bit images are in 1555 ARGB format or 565 (used by VC only on ancient hardware such as Riva TNT2 when you choose 16 bit color mode and game builds non-dxt version of txd files on disk).&lt;br /&gt;
&lt;br /&gt;
The indices are swizzled and saved in a PS2 friendly format (CLUT).&lt;br /&gt;
&lt;br /&gt;
Note: There are slight differences between GTA: III and VC formats concerning the raster/image format.&lt;br /&gt;
&lt;br /&gt;
==Tools &amp;amp; Scripts==&lt;br /&gt;
&lt;br /&gt;
* [http://www.steve-m.com/downloads/tools/rwanalyze/ RW Analyze] &amp;amp;ndash; by {{U|steve-m}}&lt;br /&gt;
* various [[model file]] and [[texture archive]] related tools&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* {{GTAF|128451|RW Analyze discussion thread}}&lt;br /&gt;
* [http://www.chronetal.co.uk/gta/index.php?page=dff Original DFF format description] by KCow&lt;br /&gt;
* [http://www.renderware.com Official RenderWare Site]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=TXD MultimediaWiki TXD]&lt;br /&gt;
&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
[[Category:3D File Formats]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10653</id>
		<title>State Of Liberty Online</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10653"/>
		<updated>2012-02-24T00:07:01Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Release */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''GTA: State Of Liberty Online''''' ('''''SOL-O''''') is an upcoming multiplayer modification for [[GTA Vice City|GTA: Vice City]]. It is a collaborative merger between the [[Vice City Online]] (VCO) and [[State Of Liberty]] (SOL) projects that adds the three Renderware GTA (III, VC and SA) maps in one in a multiplayer environment. The two projects merged in April 2010, with the public announcement/press release concerning the merger being released on October 31st, 2010.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
===Vice City Online===&lt;br /&gt;
&lt;br /&gt;
Vice City Online is an online mutliplayer modification that allows players from all over the world to play Rockstar's critically acclaimed [[GTA_VC|GTA: Vice City]]. The project was born in 2008 with lead-developer Justin Snyder (ReGeX) and it instigated great anticipation. The first-ever and only public release so far of Vice City Online was version RC1 in March 2009.&lt;br /&gt;
&lt;br /&gt;
With the possibilities of adding a new flair to the project, it was mutually decided to do a closed-door merger with State Of Liberty.&lt;br /&gt;
&lt;br /&gt;
===State Of Liberty===&lt;br /&gt;
&lt;br /&gt;
''For more information read the main article: [[State Of Liberty]]''&lt;br /&gt;
&lt;br /&gt;
State Of Liberty is a modification that combines the three Renderware GTA (III, VC and SA) maps in one using the Vice City engine. Development began by Keith Mc-Kay ({{U|X-Seti}}) in 2005 after the PC release of [[GTA_SA|GTA: San Andreas]], with the aim of creating an all-new single-player game with a storyline and missions.&lt;br /&gt;
&lt;br /&gt;
==Changes from VCO/SOL to SOL-O==&lt;br /&gt;
&lt;br /&gt;
The new re-branding of the project is GTA: State Of Liberty Online (SOL-O). Starting from the ground up after RC1, Vice City Online's next version was integrated with State Of Liberty, and the developers of both projects are hard at work in creating a stable and feature-full modification.&lt;br /&gt;
&lt;br /&gt;
The entire State Of Liberty project is going to consist of three games.&lt;br /&gt;
&lt;br /&gt;
* State Of Liberty single player (Originally thought up by X-Seti)&lt;br /&gt;
* State Of Liberty Online&lt;br /&gt;
* Vice City Online&lt;br /&gt;
&lt;br /&gt;
==Script Language==&lt;br /&gt;
&lt;br /&gt;
The scripting language that will be used for State Of Liberty Online is Lua. More information in regards to functions, etc., will be released in the near future.&lt;br /&gt;
&lt;br /&gt;
==Release==&lt;br /&gt;
&lt;br /&gt;
Without speaking for the single-player portion of the game, it is hoped a release in 2011 will apply to State Of Liberty Online and a new version of Vice City Online.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                                                        UPDATE 2012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately Regex decided he wanted to go his own way, so SOL Online will be GTA State Of Liberty once again.&lt;br /&gt;
&lt;br /&gt;
There have been many issues within the team and outside in our personal lives that built up - after all  life, like other bodily functions, happens. Me with my illness, family, and death of my father last November. Regex with his personal and work life.   Unfortunately that reduced the amount of time we had to put towards the project.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
&lt;br /&gt;
* {{Ui|ReGeX}} (Justin Snyder) - Executive Consultant, Lead Programmer, Webmaster&lt;br /&gt;
* {{Ui|X-Seti}} (Keith Mc-Kay) - Executive Consultant, Lead Mapper/Modeler, Webmaster&lt;br /&gt;
* {{Ui|DECEiFER}} (David O'Neill) - Executive Consultant, Lead Multimedia Coordinator, Webmaster&lt;br /&gt;
* {{Ui|Mex}} (James Baxter) - Executive Consultant, Lead Script Coordinator, Webmaster&lt;br /&gt;
&lt;br /&gt;
==Related Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.gtasolonline.com Official Homepage]&lt;br /&gt;
* [http://forum.gtasolonline.com Official Forum]&lt;br /&gt;
* [http://www.facebook.com/pages/GTA-State-Of-Liberty-Online-SOL-O/114619601915911 Facebook Page]&lt;br /&gt;
* [http://www.youtube.com/user/StateOfLibertyOnline YouTube Channel]&lt;br /&gt;
* [http://team.gtasolonline.com Official Team Roster]&lt;br /&gt;
* [http://www.gtagaming.com/vco Vice City Online]&lt;br /&gt;
* [http://www.gtastateofliberty.com State Of Liberty Homepage]&lt;br /&gt;
&lt;br /&gt;
{{MP-navi}}{{N|VC}}&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10652</id>
		<title>State Of Liberty Online</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10652"/>
		<updated>2012-02-23T23:54:40Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Release */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''GTA: State Of Liberty Online''''' ('''''SOL-O''''') is an upcoming multiplayer modification for [[GTA Vice City|GTA: Vice City]]. It is a collaborative merger between the [[Vice City Online]] (VCO) and [[State Of Liberty]] (SOL) projects that adds the three Renderware GTA (III, VC and SA) maps in one in a multiplayer environment. The two projects merged in April 2010, with the public announcement/press release concerning the merger being released on October 31st, 2010.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
===Vice City Online===&lt;br /&gt;
&lt;br /&gt;
Vice City Online is an online mutliplayer modification that allows players from all over the world to play Rockstar's critically acclaimed [[GTA_VC|GTA: Vice City]]. The project was born in 2008 with lead-developer Justin Snyder (ReGeX) and it instigated great anticipation. The first-ever and only public release so far of Vice City Online was version RC1 in March 2009.&lt;br /&gt;
&lt;br /&gt;
With the possibilities of adding a new flair to the project, it was mutually decided to do a closed-door merger with State Of Liberty.&lt;br /&gt;
&lt;br /&gt;
===State Of Liberty===&lt;br /&gt;
&lt;br /&gt;
''For more information read the main article: [[State Of Liberty]]''&lt;br /&gt;
&lt;br /&gt;
State Of Liberty is a modification that combines the three Renderware GTA (III, VC and SA) maps in one using the Vice City engine. Development began by Keith Mc-Kay ({{U|X-Seti}}) in 2005 after the PC release of [[GTA_SA|GTA: San Andreas]], with the aim of creating an all-new single-player game with a storyline and missions.&lt;br /&gt;
&lt;br /&gt;
==Changes from VCO/SOL to SOL-O==&lt;br /&gt;
&lt;br /&gt;
The new re-branding of the project is GTA: State Of Liberty Online (SOL-O). Starting from the ground up after RC1, Vice City Online's next version was integrated with State Of Liberty, and the developers of both projects are hard at work in creating a stable and feature-full modification.&lt;br /&gt;
&lt;br /&gt;
The entire State Of Liberty project is going to consist of three games.&lt;br /&gt;
&lt;br /&gt;
* State Of Liberty single player (Originally thought up by X-Seti)&lt;br /&gt;
* State Of Liberty Online&lt;br /&gt;
* Vice City Online&lt;br /&gt;
&lt;br /&gt;
==Script Language==&lt;br /&gt;
&lt;br /&gt;
The scripting language that will be used for State Of Liberty Online is Lua. More information in regards to functions, etc., will be released in the near future.&lt;br /&gt;
&lt;br /&gt;
==Release==&lt;br /&gt;
&lt;br /&gt;
Without speaking for the single-player portion of the game, it is hoped a release in 2011 will apply to State Of Liberty Online and a new version of Vice City Online.&lt;br /&gt;
****************************************************************************************************************************************************&lt;br /&gt;
                                                        ==UPDATE 2012==&lt;br /&gt;
&lt;br /&gt;
Unfortunately Regex decided he wanted to go his own way, so SOL Online will be GTA State Of Liberty once again.&lt;br /&gt;
&lt;br /&gt;
There have been many issues within the team and outside in our personal lives that built up - after all  life, like other bodily functions, happens. Me with my illness, family, and death of my father last November. Regex with his personal and work life.   Unfortunately that reduced the amount of time we had to put towards the project.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
&lt;br /&gt;
* {{Ui|ReGeX}} (Justin Snyder) - Executive Consultant, Lead Programmer, Webmaster&lt;br /&gt;
* {{Ui|X-Seti}} (Keith Mc-Kay) - Executive Consultant, Lead Mapper/Modeler, Webmaster&lt;br /&gt;
* {{Ui|DECEiFER}} (David O'Neill) - Executive Consultant, Lead Multimedia Coordinator, Webmaster&lt;br /&gt;
* {{Ui|Mex}} (James Baxter) - Executive Consultant, Lead Script Coordinator, Webmaster&lt;br /&gt;
&lt;br /&gt;
==Related Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.gtasolonline.com Official Homepage]&lt;br /&gt;
* [http://forum.gtasolonline.com Official Forum]&lt;br /&gt;
* [http://www.facebook.com/pages/GTA-State-Of-Liberty-Online-SOL-O/114619601915911 Facebook Page]&lt;br /&gt;
* [http://www.youtube.com/user/StateOfLibertyOnline YouTube Channel]&lt;br /&gt;
* [http://team.gtasolonline.com Official Team Roster]&lt;br /&gt;
* [http://www.gtagaming.com/vco Vice City Online]&lt;br /&gt;
* [http://www.gtastateofliberty.com State Of Liberty Homepage]&lt;br /&gt;
&lt;br /&gt;
{{MP-navi}}{{N|VC}}&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10651</id>
		<title>State Of Liberty Online</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10651"/>
		<updated>2012-02-23T23:17:45Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* State Of Liberty */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''GTA: State Of Liberty Online''''' ('''''SOL-O''''') is an upcoming multiplayer modification for [[GTA Vice City|GTA: Vice City]]. It is a collaborative merger between the [[Vice City Online]] (VCO) and [[State Of Liberty]] (SOL) projects that adds the three Renderware GTA (III, VC and SA) maps in one in a multiplayer environment. The two projects merged in April 2010, with the public announcement/press release concerning the merger being released on October 31st, 2010.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
===Vice City Online===&lt;br /&gt;
&lt;br /&gt;
Vice City Online is an online mutliplayer modification that allows players from all over the world to play Rockstar's critically acclaimed [[GTA_VC|GTA: Vice City]]. The project was born in 2008 with lead-developer Justin Snyder (ReGeX) and it instigated great anticipation. The first-ever and only public release so far of Vice City Online was version RC1 in March 2009.&lt;br /&gt;
&lt;br /&gt;
With the possibilities of adding a new flair to the project, it was mutually decided to do a closed-door merger with State Of Liberty.&lt;br /&gt;
&lt;br /&gt;
===State Of Liberty===&lt;br /&gt;
&lt;br /&gt;
''For more information read the main article: [[State Of Liberty]]''&lt;br /&gt;
&lt;br /&gt;
State Of Liberty is a modification that combines the three Renderware GTA (III, VC and SA) maps in one using the Vice City engine. Development began by Keith Mc-Kay ({{U|X-Seti}}) in 2005 after the PC release of [[GTA_SA|GTA: San Andreas]], with the aim of creating an all-new single-player game with a storyline and missions.&lt;br /&gt;
&lt;br /&gt;
==Changes from VCO/SOL to SOL-O==&lt;br /&gt;
&lt;br /&gt;
The new re-branding of the project is GTA: State Of Liberty Online (SOL-O). Starting from the ground up after RC1, Vice City Online's next version was integrated with State Of Liberty, and the developers of both projects are hard at work in creating a stable and feature-full modification.&lt;br /&gt;
&lt;br /&gt;
The entire State Of Liberty project is going to consist of three games.&lt;br /&gt;
&lt;br /&gt;
* State Of Liberty single player (Originally thought up by X-Seti)&lt;br /&gt;
* State Of Liberty Online&lt;br /&gt;
* Vice City Online&lt;br /&gt;
&lt;br /&gt;
==Script Language==&lt;br /&gt;
&lt;br /&gt;
The scripting language that will be used for State Of Liberty Online is Lua. More information in regards to functions, etc., will be released in the near future.&lt;br /&gt;
&lt;br /&gt;
==Release==&lt;br /&gt;
&lt;br /&gt;
Without speaking for the single-player portion of the game, it is hoped a release in 2011 will apply to State Of Liberty Online and a new version of Vice City Online.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
&lt;br /&gt;
* {{Ui|ReGeX}} (Justin Snyder) - Executive Consultant, Lead Programmer, Webmaster&lt;br /&gt;
* {{Ui|X-Seti}} (Keith Mc-Kay) - Executive Consultant, Lead Mapper/Modeler, Webmaster&lt;br /&gt;
* {{Ui|DECEiFER}} (David O'Neill) - Executive Consultant, Lead Multimedia Coordinator, Webmaster&lt;br /&gt;
* {{Ui|Mex}} (James Baxter) - Executive Consultant, Lead Script Coordinator, Webmaster&lt;br /&gt;
&lt;br /&gt;
==Related Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.gtasolonline.com Official Homepage]&lt;br /&gt;
* [http://forum.gtasolonline.com Official Forum]&lt;br /&gt;
* [http://www.facebook.com/pages/GTA-State-Of-Liberty-Online-SOL-O/114619601915911 Facebook Page]&lt;br /&gt;
* [http://www.youtube.com/user/StateOfLibertyOnline YouTube Channel]&lt;br /&gt;
* [http://team.gtasolonline.com Official Team Roster]&lt;br /&gt;
* [http://www.gtagaming.com/vco Vice City Online]&lt;br /&gt;
* [http://www.gtastateofliberty.com State Of Liberty Homepage]&lt;br /&gt;
&lt;br /&gt;
{{MP-navi}}{{N|VC}}&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10650</id>
		<title>State Of Liberty Online</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10650"/>
		<updated>2012-02-23T23:16:52Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Team */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''GTA: State Of Liberty Online''''' ('''''SOL-O''''') is an upcoming multiplayer modification for [[GTA Vice City|GTA: Vice City]]. It is a collaborative merger between the [[Vice City Online]] (VCO) and [[State Of Liberty]] (SOL) projects that adds the three Renderware GTA (III, VC and SA) maps in one in a multiplayer environment. The two projects merged in April 2010, with the public announcement/press release concerning the merger being released on October 31st, 2010.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
===Vice City Online===&lt;br /&gt;
&lt;br /&gt;
Vice City Online is an online mutliplayer modification that allows players from all over the world to play Rockstar's critically acclaimed [[GTA_VC|GTA: Vice City]]. The project was born in 2008 with lead-developer Justin Snyder (ReGeX) and it instigated great anticipation. The first-ever and only public release so far of Vice City Online was version RC1 in March 2009.&lt;br /&gt;
&lt;br /&gt;
With the possibilities of adding a new flair to the project, it was mutually decided to do a closed-door merger with State Of Liberty.&lt;br /&gt;
&lt;br /&gt;
===State Of Liberty===&lt;br /&gt;
&lt;br /&gt;
''For more information read the main article: [[State Of Liberty]]''&lt;br /&gt;
&lt;br /&gt;
State Of Liberty is a modification that combines the three Renderware GTA (III, VC and SA) maps in one using the Vice City engine. Development began by Keith Capel ({{U|X-Seti}}) in 2005 after the PC release of [[GTA_SA|GTA: San Andreas]], with the aim of creating an all-new single-player game with a storyline and missions.&lt;br /&gt;
&lt;br /&gt;
==Changes from VCO/SOL to SOL-O==&lt;br /&gt;
&lt;br /&gt;
The new re-branding of the project is GTA: State Of Liberty Online (SOL-O). Starting from the ground up after RC1, Vice City Online's next version was integrated with State Of Liberty, and the developers of both projects are hard at work in creating a stable and feature-full modification.&lt;br /&gt;
&lt;br /&gt;
The entire State Of Liberty project is going to consist of three games.&lt;br /&gt;
&lt;br /&gt;
* State Of Liberty single player (Originally thought up by X-Seti)&lt;br /&gt;
* State Of Liberty Online&lt;br /&gt;
* Vice City Online&lt;br /&gt;
&lt;br /&gt;
==Script Language==&lt;br /&gt;
&lt;br /&gt;
The scripting language that will be used for State Of Liberty Online is Lua. More information in regards to functions, etc., will be released in the near future.&lt;br /&gt;
&lt;br /&gt;
==Release==&lt;br /&gt;
&lt;br /&gt;
Without speaking for the single-player portion of the game, it is hoped a release in 2011 will apply to State Of Liberty Online and a new version of Vice City Online.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
&lt;br /&gt;
* {{Ui|ReGeX}} (Justin Snyder) - Executive Consultant, Lead Programmer, Webmaster&lt;br /&gt;
* {{Ui|X-Seti}} (Keith Mc-Kay) - Executive Consultant, Lead Mapper/Modeler, Webmaster&lt;br /&gt;
* {{Ui|DECEiFER}} (David O'Neill) - Executive Consultant, Lead Multimedia Coordinator, Webmaster&lt;br /&gt;
* {{Ui|Mex}} (James Baxter) - Executive Consultant, Lead Script Coordinator, Webmaster&lt;br /&gt;
&lt;br /&gt;
==Related Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.gtasolonline.com Official Homepage]&lt;br /&gt;
* [http://forum.gtasolonline.com Official Forum]&lt;br /&gt;
* [http://www.facebook.com/pages/GTA-State-Of-Liberty-Online-SOL-O/114619601915911 Facebook Page]&lt;br /&gt;
* [http://www.youtube.com/user/StateOfLibertyOnline YouTube Channel]&lt;br /&gt;
* [http://team.gtasolonline.com Official Team Roster]&lt;br /&gt;
* [http://www.gtagaming.com/vco Vice City Online]&lt;br /&gt;
* [http://www.gtastateofliberty.com State Of Liberty Homepage]&lt;br /&gt;
&lt;br /&gt;
{{MP-navi}}{{N|VC}}&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10649</id>
		<title>State Of Liberty Online</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=State_Of_Liberty_Online&amp;diff=10649"/>
		<updated>2012-02-23T23:15:58Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Changes from VCO/SOL to SOL-O */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''GTA: State Of Liberty Online''''' ('''''SOL-O''''') is an upcoming multiplayer modification for [[GTA Vice City|GTA: Vice City]]. It is a collaborative merger between the [[Vice City Online]] (VCO) and [[State Of Liberty]] (SOL) projects that adds the three Renderware GTA (III, VC and SA) maps in one in a multiplayer environment. The two projects merged in April 2010, with the public announcement/press release concerning the merger being released on October 31st, 2010.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
===Vice City Online===&lt;br /&gt;
&lt;br /&gt;
Vice City Online is an online mutliplayer modification that allows players from all over the world to play Rockstar's critically acclaimed [[GTA_VC|GTA: Vice City]]. The project was born in 2008 with lead-developer Justin Snyder (ReGeX) and it instigated great anticipation. The first-ever and only public release so far of Vice City Online was version RC1 in March 2009.&lt;br /&gt;
&lt;br /&gt;
With the possibilities of adding a new flair to the project, it was mutually decided to do a closed-door merger with State Of Liberty.&lt;br /&gt;
&lt;br /&gt;
===State Of Liberty===&lt;br /&gt;
&lt;br /&gt;
''For more information read the main article: [[State Of Liberty]]''&lt;br /&gt;
&lt;br /&gt;
State Of Liberty is a modification that combines the three Renderware GTA (III, VC and SA) maps in one using the Vice City engine. Development began by Keith Capel ({{U|X-Seti}}) in 2005 after the PC release of [[GTA_SA|GTA: San Andreas]], with the aim of creating an all-new single-player game with a storyline and missions.&lt;br /&gt;
&lt;br /&gt;
==Changes from VCO/SOL to SOL-O==&lt;br /&gt;
&lt;br /&gt;
The new re-branding of the project is GTA: State Of Liberty Online (SOL-O). Starting from the ground up after RC1, Vice City Online's next version was integrated with State Of Liberty, and the developers of both projects are hard at work in creating a stable and feature-full modification.&lt;br /&gt;
&lt;br /&gt;
The entire State Of Liberty project is going to consist of three games.&lt;br /&gt;
&lt;br /&gt;
* State Of Liberty single player (Originally thought up by X-Seti)&lt;br /&gt;
* State Of Liberty Online&lt;br /&gt;
* Vice City Online&lt;br /&gt;
&lt;br /&gt;
==Script Language==&lt;br /&gt;
&lt;br /&gt;
The scripting language that will be used for State Of Liberty Online is Lua. More information in regards to functions, etc., will be released in the near future.&lt;br /&gt;
&lt;br /&gt;
==Release==&lt;br /&gt;
&lt;br /&gt;
Without speaking for the single-player portion of the game, it is hoped a release in 2011 will apply to State Of Liberty Online and a new version of Vice City Online.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
&lt;br /&gt;
* {{Ui|ReGeX}} (Justin Snyder) - Executive Consultant, Lead Programmer, Webmaster&lt;br /&gt;
* {{Ui|X-Seti}} (Keith Capel) - Executive Consultant, Lead Mapper/Modeler, Webmaster&lt;br /&gt;
* {{Ui|DECEiFER}} (David O'Neill) - Executive Consultant, Lead Multimedia Coordinator, Webmaster&lt;br /&gt;
* {{Ui|Mex}} (James Baxter) - Executive Consultant, Lead Script Coordinator, Webmaster&lt;br /&gt;
&lt;br /&gt;
==Related Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.gtasolonline.com Official Homepage]&lt;br /&gt;
* [http://forum.gtasolonline.com Official Forum]&lt;br /&gt;
* [http://www.facebook.com/pages/GTA-State-Of-Liberty-Online-SOL-O/114619601915911 Facebook Page]&lt;br /&gt;
* [http://www.youtube.com/user/StateOfLibertyOnline YouTube Channel]&lt;br /&gt;
* [http://team.gtasolonline.com Official Team Roster]&lt;br /&gt;
* [http://www.gtagaming.com/vco Vice City Online]&lt;br /&gt;
* [http://www.gtastateofliberty.com State Of Liberty Homepage]&lt;br /&gt;
&lt;br /&gt;
{{MP-navi}}{{N|VC}}&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10425</id>
		<title>IMG archive</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10425"/>
		<updated>2011-12-16T04:22:53Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GTA's most commonly used [[archive file]]s are known by the extension &amp;lt;code&amp;gt;'''.img'''&amp;lt;/code&amp;gt;. They have a very simple format and currently exist in multiple versions.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
=== Version 1 - GTA III &amp;amp;amp; VC ===&lt;br /&gt;
&lt;br /&gt;
Version 1 archives used in GTA III and Vice City, are actually split up into two files: the content directory (&amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt;) and the actual archive (&amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The directory is a list of files each with name, offset and size of the file. The values for offset and size have to be ''multiplied by 2048'', since files are aligned to 2 KB boundaries. This means that even a file with only 123 byte content will take up 2 KB in the archive. Files are stored (usually) unsorted, uncompressed and linear (no directory tree).&lt;br /&gt;
&lt;br /&gt;
First you have to find out the &amp;lt;strong&amp;gt;number of entries (n)&amp;lt;/strong&amp;gt;.&lt;br /&gt;
Just divide the filesize of the &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; file by 32 and you will get it.&lt;br /&gt;
&lt;br /&gt;
There is no Header, like in V2 (San Andreas) Files!&lt;br /&gt;
&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file itself has no special structure or header, just all the files in 2 KB blocks.&lt;br /&gt;
&lt;br /&gt;
This format was also used in the PC version of ''Bully: Scholarship Edition''.&lt;br /&gt;
&lt;br /&gt;
=== Version 2 - GTA SA ===&lt;br /&gt;
&lt;br /&gt;
Version 2 archives, introduced with GTA San Andreas, combine &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files into one &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file. The directory has the same format as in version 1, but is located at the beginning of the archive. Files are again aligned to 2 KB boundaries. File offsets are relative to the start of the whole archive, not to the end of the file list.&lt;br /&gt;
&lt;br /&gt;
 Header:&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - CHAR[4]   - FourCC, always &amp;quot;VER2&amp;quot;&lt;br /&gt;
  4 byte - DWORD     - number of entries (n)&amp;lt;br&amp;gt;&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
A major drawback of this format is the complicated extendability. If you have to add many files, it might happen that you run out of space for the directory, and have to move the first file(s) to the end.&lt;br /&gt;
&lt;br /&gt;
=== Version 3 - GTA IV ===&lt;br /&gt;
&lt;br /&gt;
GTA IV introduced yet another &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file format. Not only the format is new, also there can be encrypted archive headers (see below). The internal IMG parser of the game works with 2 kb buffers, which means that the 2 kb bounds from earlier versions (blocks) are still present, yet optional.&lt;br /&gt;
&lt;br /&gt;
==== IMG Header ====&lt;br /&gt;
&lt;br /&gt;
The header of an unencrypted file always has a size of '''20 bytes'''.&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Identifier (0xA94E2A52 if the archive is not encrypted)&lt;br /&gt;
 4 byte - DWORD      - Version (always 3, if not the format would be differ)&lt;br /&gt;
 4 byte - DWORD      - Number of Items&lt;br /&gt;
 4 byte - DWORD      - Table Size (in bytes)&lt;br /&gt;
 2 byte - WORD       - Size of Table Items (needs to be always 0x10)&lt;br /&gt;
 2 byte - WORD       - Unknown&lt;br /&gt;
&lt;br /&gt;
==== IMG Table ====&lt;br /&gt;
&lt;br /&gt;
The table holds information about the items. Each item header has a size of '''16 bytes''' .&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Itemsize (in bytes)&lt;br /&gt;
 4 byte - DWORD      - Resource type&lt;br /&gt;
 4 byte - DWORD      - Offset (in blocks)&lt;br /&gt;
 2 byte - WORD       - Used Blocks&lt;br /&gt;
 2 byte - WORD       - Padding&lt;br /&gt;
&lt;br /&gt;
Item Names' length will be calculate as :&lt;br /&gt;
 Table Size - (Number of Items * Item Size)&lt;br /&gt;
Next that string will be split by '\x0'&lt;br /&gt;
&lt;br /&gt;
A [[resource file|resource]] type is identified by the 4b DWORD value:&lt;br /&gt;
* 0x01: Generic&lt;br /&gt;
* 0x08: Texture archive&lt;br /&gt;
* 0x20: Bounds&lt;br /&gt;
* 0x6E: Model file&lt;br /&gt;
* 0x24: xpfl&lt;br /&gt;
&lt;br /&gt;
==== [[Cryptography|Encryption]] ====&lt;br /&gt;
&lt;br /&gt;
The header and directory (table) of IMG archives can be encrypted. This is usually the case if the 4 byte identifier at the start of the file seems invalid. Decryption is done via 16 repetitions of [[Cryptography#AES|AES-128]] in ECB mode.&lt;br /&gt;
&lt;br /&gt;
==== [[More then one img file in GTA3 and VC?]] ====&lt;br /&gt;
&lt;br /&gt;
In [[GTAIII]] or [[Vice City]] you can have more then one [[img]] file by adding the following example to your [[default.dat]] file. &lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|CDIMAGE MODELS\MyMap.img&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Create MyMap.img and MyMap.dir file in the models folder.&lt;br /&gt;
&lt;br /&gt;
Take note that your limited to 10 Img files where you can only hold the main MAP data. The Radar, IPF, COL, Vehicles or Peds files can only be loaded from the gta3.img file.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|3}} {{Icon|VC}}&amp;lt;/center&amp;gt; || [[ImgEd]] &amp;amp;ndash; by Dan Strandberg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAF|354093|IMG Manager}} &amp;amp;ndash; by {{U|xmen}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAG|1503|Spark}} &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[IMG Tool]] &amp;amp;ndash; by {{U|Spooky}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[G-IMG]] &amp;amp;ndash; by {{U|REspawn}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}} {{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || [http://www.dustin.gzwn.net/YAIE.zip Yet Another IMG Editor] &amp;amp;ndash; by {{U|dustcrazy}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || {{GTAF|post|408669|1060569851|GTA Stories IMG Tool}} &amp;amp;ndash; by {{U|HackMan128}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[SparkIV]] &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[OpenIV]] &amp;amp;ndash; by {{U|GooD-NTS}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[Shadow-Mapper]] &amp;amp;ndash; by {{U|Prince-Link}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
====Version 3 only====&lt;br /&gt;
* [[X Archive Poison]]&lt;br /&gt;
&lt;br /&gt;
{{N|4|SA}}&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA LCS]][[Category:GTA VCS]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10424</id>
		<title>IMG archive</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10424"/>
		<updated>2011-12-16T04:20:58Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GTA's most commonly used [[archive file]]s are known by the extension &amp;lt;code&amp;gt;'''.img'''&amp;lt;/code&amp;gt;. They have a very simple format and currently exist in multiple versions.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
=== Version 1 - GTA III &amp;amp;amp; VC ===&lt;br /&gt;
&lt;br /&gt;
Version 1 archives used in GTA III and Vice City, are actually split up into two files: the content directory (&amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt;) and the actual archive (&amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The directory is a list of files each with name, offset and size of the file. The values for offset and size have to be ''multiplied by 2048'', since files are aligned to 2 KB boundaries. This means that even a file with only 123 byte content will take up 2 KB in the archive. Files are stored (usually) unsorted, uncompressed and linear (no directory tree).&lt;br /&gt;
&lt;br /&gt;
First you have to find out the &amp;lt;strong&amp;gt;number of entries (n)&amp;lt;/strong&amp;gt;.&lt;br /&gt;
Just divide the filesize of the &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; file by 32 and you will get it.&lt;br /&gt;
&lt;br /&gt;
There is no Header, like in V2 (San Andreas) Files!&lt;br /&gt;
&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file itself has no special structure or header, just all the files in 2 KB blocks.&lt;br /&gt;
&lt;br /&gt;
This format was also used in the PC version of ''Bully: Scholarship Edition''.&lt;br /&gt;
&lt;br /&gt;
=== Version 2 - GTA SA ===&lt;br /&gt;
&lt;br /&gt;
Version 2 archives, introduced with GTA San Andreas, combine &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files into one &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file. The directory has the same format as in version 1, but is located at the beginning of the archive. Files are again aligned to 2 KB boundaries. File offsets are relative to the start of the whole archive, not to the end of the file list.&lt;br /&gt;
&lt;br /&gt;
 Header:&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - CHAR[4]   - FourCC, always &amp;quot;VER2&amp;quot;&lt;br /&gt;
  4 byte - DWORD     - number of entries (n)&amp;lt;br&amp;gt;&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
A major drawback of this format is the complicated extendability. If you have to add many files, it might happen that you run out of space for the directory, and have to move the first file(s) to the end.&lt;br /&gt;
&lt;br /&gt;
=== Version 3 - GTA IV ===&lt;br /&gt;
&lt;br /&gt;
GTA IV introduced yet another &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file format. Not only the format is new, also there can be encrypted archive headers (see below). The internal IMG parser of the game works with 2 kb buffers, which means that the 2 kb bounds from earlier versions (blocks) are still present, yet optional.&lt;br /&gt;
&lt;br /&gt;
==== IMG Header ====&lt;br /&gt;
&lt;br /&gt;
The header of an unencrypted file always has a size of '''20 bytes'''.&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Identifier (0xA94E2A52 if the archive is not encrypted)&lt;br /&gt;
 4 byte - DWORD      - Version (always 3, if not the format would be differ)&lt;br /&gt;
 4 byte - DWORD      - Number of Items&lt;br /&gt;
 4 byte - DWORD      - Table Size (in bytes)&lt;br /&gt;
 2 byte - WORD       - Size of Table Items (needs to be always 0x10)&lt;br /&gt;
 2 byte - WORD       - Unknown&lt;br /&gt;
&lt;br /&gt;
==== IMG Table ====&lt;br /&gt;
&lt;br /&gt;
The table holds information about the items. Each item header has a size of '''16 bytes''' .&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Itemsize (in bytes)&lt;br /&gt;
 4 byte - DWORD      - Resource type&lt;br /&gt;
 4 byte - DWORD      - Offset (in blocks)&lt;br /&gt;
 2 byte - WORD       - Used Blocks&lt;br /&gt;
 2 byte - WORD       - Padding&lt;br /&gt;
&lt;br /&gt;
Item Names' length will be calculate as :&lt;br /&gt;
 Table Size - (Number of Items * Item Size)&lt;br /&gt;
Next that string will be split by '\x0'&lt;br /&gt;
&lt;br /&gt;
A [[resource file|resource]] type is identified by the 4b DWORD value:&lt;br /&gt;
* 0x01: Generic&lt;br /&gt;
* 0x08: Texture archive&lt;br /&gt;
* 0x20: Bounds&lt;br /&gt;
* 0x6E: Model file&lt;br /&gt;
* 0x24: xpfl&lt;br /&gt;
&lt;br /&gt;
==== [[Cryptography|Encryption]] ====&lt;br /&gt;
&lt;br /&gt;
The header and directory (table) of IMG archives can be encrypted. This is usually the case if the 4 byte identifier at the start of the file seems invalid. Decryption is done via 16 repetitions of [[Cryptography#AES|AES-128]] in ECB mode.&lt;br /&gt;
&lt;br /&gt;
==== [[More then one img file in GTA3 and VC?]] ====&lt;br /&gt;
&lt;br /&gt;
In [[GTAIII]] or [[Vice City]] you can have more then one [[img]] file by adding the following example to your [[default.dat]] file. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CDIMAGE MODELS\MyMap.img&lt;br /&gt;
&lt;br /&gt;
Create MyMap.img and MyMap.dir file in the models folder.&lt;br /&gt;
&lt;br /&gt;
Take note that your limited to 10 Img files where you can only hold the main MAP data. The Radar, IPF, COL, Vehicles or Peds files can only be loaded from the gta3.img file.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|3}} {{Icon|VC}}&amp;lt;/center&amp;gt; || [[ImgEd]] &amp;amp;ndash; by Dan Strandberg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAF|354093|IMG Manager}} &amp;amp;ndash; by {{U|xmen}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAG|1503|Spark}} &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[IMG Tool]] &amp;amp;ndash; by {{U|Spooky}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[G-IMG]] &amp;amp;ndash; by {{U|REspawn}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}} {{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || [http://www.dustin.gzwn.net/YAIE.zip Yet Another IMG Editor] &amp;amp;ndash; by {{U|dustcrazy}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || {{GTAF|post|408669|1060569851|GTA Stories IMG Tool}} &amp;amp;ndash; by {{U|HackMan128}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[SparkIV]] &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[OpenIV]] &amp;amp;ndash; by {{U|GooD-NTS}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[Shadow-Mapper]] &amp;amp;ndash; by {{U|Prince-Link}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
====Version 3 only====&lt;br /&gt;
* [[X Archive Poison]]&lt;br /&gt;
&lt;br /&gt;
{{N|4|SA}}&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA LCS]][[Category:GTA VCS]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10423</id>
		<title>IMG archive</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10423"/>
		<updated>2011-12-16T04:19:12Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* More then one img file in GTA3 and VC? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GTA's most commonly used [[archive file]]s are known by the extension &amp;lt;code&amp;gt;'''.img'''&amp;lt;/code&amp;gt;. They have a very simple format and currently exist in multiple versions.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
=== Version 1 - GTA III &amp;amp;amp; VC ===&lt;br /&gt;
&lt;br /&gt;
Version 1 archives used in GTA III and Vice City, are actually split up into two files: the content directory (&amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt;) and the actual archive (&amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The directory is a list of files each with name, offset and size of the file. The values for offset and size have to be ''multiplied by 2048'', since files are aligned to 2 KB boundaries. This means that even a file with only 123 byte content will take up 2 KB in the archive. Files are stored (usually) unsorted, uncompressed and linear (no directory tree).&lt;br /&gt;
&lt;br /&gt;
First you have to find out the &amp;lt;strong&amp;gt;number of entries (n)&amp;lt;/strong&amp;gt;.&lt;br /&gt;
Just divide the filesize of the &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; file by 32 and you will get it.&lt;br /&gt;
&lt;br /&gt;
There is no Header, like in V2 (San Andreas) Files!&lt;br /&gt;
&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file itself has no special structure or header, just all the files in 2 KB blocks.&lt;br /&gt;
&lt;br /&gt;
This format was also used in the PC version of ''Bully: Scholarship Edition''.&lt;br /&gt;
&lt;br /&gt;
=== Version 2 - GTA SA ===&lt;br /&gt;
&lt;br /&gt;
Version 2 archives, introduced with GTA San Andreas, combine &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files into one &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file. The directory has the same format as in version 1, but is located at the beginning of the archive. Files are again aligned to 2 KB boundaries. File offsets are relative to the start of the whole archive, not to the end of the file list.&lt;br /&gt;
&lt;br /&gt;
 Header:&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - CHAR[4]   - FourCC, always &amp;quot;VER2&amp;quot;&lt;br /&gt;
  4 byte - DWORD     - number of entries (n)&amp;lt;br&amp;gt;&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
A major drawback of this format is the complicated extendability. If you have to add many files, it might happen that you run out of space for the directory, and have to move the first file(s) to the end.&lt;br /&gt;
&lt;br /&gt;
=== Version 3 - GTA IV ===&lt;br /&gt;
&lt;br /&gt;
GTA IV introduced yet another &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file format. Not only the format is new, also there can be encrypted archive headers (see below). The internal IMG parser of the game works with 2 kb buffers, which means that the 2 kb bounds from earlier versions (blocks) are still present, yet optional.&lt;br /&gt;
&lt;br /&gt;
==== IMG Header ====&lt;br /&gt;
&lt;br /&gt;
The header of an unencrypted file always has a size of '''20 bytes'''.&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Identifier (0xA94E2A52 if the archive is not encrypted)&lt;br /&gt;
 4 byte - DWORD      - Version (always 3, if not the format would be differ)&lt;br /&gt;
 4 byte - DWORD      - Number of Items&lt;br /&gt;
 4 byte - DWORD      - Table Size (in bytes)&lt;br /&gt;
 2 byte - WORD       - Size of Table Items (needs to be always 0x10)&lt;br /&gt;
 2 byte - WORD       - Unknown&lt;br /&gt;
&lt;br /&gt;
==== IMG Table ====&lt;br /&gt;
&lt;br /&gt;
The table holds information about the items. Each item header has a size of '''16 bytes''' .&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Itemsize (in bytes)&lt;br /&gt;
 4 byte - DWORD      - Resource type&lt;br /&gt;
 4 byte - DWORD      - Offset (in blocks)&lt;br /&gt;
 2 byte - WORD       - Used Blocks&lt;br /&gt;
 2 byte - WORD       - Padding&lt;br /&gt;
&lt;br /&gt;
Item Names' length will be calculate as :&lt;br /&gt;
 Table Size - (Number of Items * Item Size)&lt;br /&gt;
Next that string will be split by '\x0'&lt;br /&gt;
&lt;br /&gt;
A [[resource file|resource]] type is identified by the 4b DWORD value:&lt;br /&gt;
* 0x01: Generic&lt;br /&gt;
* 0x08: Texture archive&lt;br /&gt;
* 0x20: Bounds&lt;br /&gt;
* 0x6E: Model file&lt;br /&gt;
* 0x24: xpfl&lt;br /&gt;
&lt;br /&gt;
==== [[Cryptography|Encryption]] ====&lt;br /&gt;
&lt;br /&gt;
The header and directory (table) of IMG archives can be encrypted. This is usually the case if the 4 byte identifier at the start of the file seems invalid. Decryption is done via 16 repetitions of [[Cryptography#AES|AES-128]] in ECB mode.&lt;br /&gt;
&lt;br /&gt;
==== [[More then one img file in GTA3 and VC?]] ====&lt;br /&gt;
&lt;br /&gt;
In [[GTAIII]] or [[Vice City]] you can have more then one [[img]] file by adding the following example to your [[default.dat]] file. &lt;br /&gt;
&lt;br /&gt;
CDIMAGE MODELS\MyMap.img&lt;br /&gt;
&lt;br /&gt;
Create MyMap.img and MyMap.dir file in the models folder.&lt;br /&gt;
&lt;br /&gt;
Take note that your limited to 10 Img files where you can only hold the main MAP data. The Radar, IPF, COL, Vehicles or Peds files can only be loaded from the gta3.img file.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|3}} {{Icon|VC}}&amp;lt;/center&amp;gt; || [[ImgEd]] &amp;amp;ndash; by Dan Strandberg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAF|354093|IMG Manager}} &amp;amp;ndash; by {{U|xmen}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAG|1503|Spark}} &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[IMG Tool]] &amp;amp;ndash; by {{U|Spooky}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[G-IMG]] &amp;amp;ndash; by {{U|REspawn}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}} {{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || [http://www.dustin.gzwn.net/YAIE.zip Yet Another IMG Editor] &amp;amp;ndash; by {{U|dustcrazy}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || {{GTAF|post|408669|1060569851|GTA Stories IMG Tool}} &amp;amp;ndash; by {{U|HackMan128}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[SparkIV]] &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[OpenIV]] &amp;amp;ndash; by {{U|GooD-NTS}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[Shadow-Mapper]] &amp;amp;ndash; by {{U|Prince-Link}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
====Version 3 only====&lt;br /&gt;
* [[X Archive Poison]]&lt;br /&gt;
&lt;br /&gt;
{{N|4|SA}}&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA LCS]][[Category:GTA VCS]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10422</id>
		<title>IMG archive</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10422"/>
		<updated>2011-12-16T04:18:54Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GTA's most commonly used [[archive file]]s are known by the extension &amp;lt;code&amp;gt;'''.img'''&amp;lt;/code&amp;gt;. They have a very simple format and currently exist in multiple versions.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
=== Version 1 - GTA III &amp;amp;amp; VC ===&lt;br /&gt;
&lt;br /&gt;
Version 1 archives used in GTA III and Vice City, are actually split up into two files: the content directory (&amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt;) and the actual archive (&amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The directory is a list of files each with name, offset and size of the file. The values for offset and size have to be ''multiplied by 2048'', since files are aligned to 2 KB boundaries. This means that even a file with only 123 byte content will take up 2 KB in the archive. Files are stored (usually) unsorted, uncompressed and linear (no directory tree).&lt;br /&gt;
&lt;br /&gt;
First you have to find out the &amp;lt;strong&amp;gt;number of entries (n)&amp;lt;/strong&amp;gt;.&lt;br /&gt;
Just divide the filesize of the &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; file by 32 and you will get it.&lt;br /&gt;
&lt;br /&gt;
There is no Header, like in V2 (San Andreas) Files!&lt;br /&gt;
&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file itself has no special structure or header, just all the files in 2 KB blocks.&lt;br /&gt;
&lt;br /&gt;
This format was also used in the PC version of ''Bully: Scholarship Edition''.&lt;br /&gt;
&lt;br /&gt;
=== Version 2 - GTA SA ===&lt;br /&gt;
&lt;br /&gt;
Version 2 archives, introduced with GTA San Andreas, combine &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files into one &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file. The directory has the same format as in version 1, but is located at the beginning of the archive. Files are again aligned to 2 KB boundaries. File offsets are relative to the start of the whole archive, not to the end of the file list.&lt;br /&gt;
&lt;br /&gt;
 Header:&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - CHAR[4]   - FourCC, always &amp;quot;VER2&amp;quot;&lt;br /&gt;
  4 byte - DWORD     - number of entries (n)&amp;lt;br&amp;gt;&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
A major drawback of this format is the complicated extendability. If you have to add many files, it might happen that you run out of space for the directory, and have to move the first file(s) to the end.&lt;br /&gt;
&lt;br /&gt;
=== Version 3 - GTA IV ===&lt;br /&gt;
&lt;br /&gt;
GTA IV introduced yet another &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file format. Not only the format is new, also there can be encrypted archive headers (see below). The internal IMG parser of the game works with 2 kb buffers, which means that the 2 kb bounds from earlier versions (blocks) are still present, yet optional.&lt;br /&gt;
&lt;br /&gt;
==== IMG Header ====&lt;br /&gt;
&lt;br /&gt;
The header of an unencrypted file always has a size of '''20 bytes'''.&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Identifier (0xA94E2A52 if the archive is not encrypted)&lt;br /&gt;
 4 byte - DWORD      - Version (always 3, if not the format would be differ)&lt;br /&gt;
 4 byte - DWORD      - Number of Items&lt;br /&gt;
 4 byte - DWORD      - Table Size (in bytes)&lt;br /&gt;
 2 byte - WORD       - Size of Table Items (needs to be always 0x10)&lt;br /&gt;
 2 byte - WORD       - Unknown&lt;br /&gt;
&lt;br /&gt;
==== IMG Table ====&lt;br /&gt;
&lt;br /&gt;
The table holds information about the items. Each item header has a size of '''16 bytes''' .&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Itemsize (in bytes)&lt;br /&gt;
 4 byte - DWORD      - Resource type&lt;br /&gt;
 4 byte - DWORD      - Offset (in blocks)&lt;br /&gt;
 2 byte - WORD       - Used Blocks&lt;br /&gt;
 2 byte - WORD       - Padding&lt;br /&gt;
&lt;br /&gt;
Item Names' length will be calculate as :&lt;br /&gt;
 Table Size - (Number of Items * Item Size)&lt;br /&gt;
Next that string will be split by '\x0'&lt;br /&gt;
&lt;br /&gt;
A [[resource file|resource]] type is identified by the 4b DWORD value:&lt;br /&gt;
* 0x01: Generic&lt;br /&gt;
* 0x08: Texture archive&lt;br /&gt;
* 0x20: Bounds&lt;br /&gt;
* 0x6E: Model file&lt;br /&gt;
* 0x24: xpfl&lt;br /&gt;
&lt;br /&gt;
==== [[Cryptography|Encryption]] ====&lt;br /&gt;
&lt;br /&gt;
The header and directory (table) of IMG archives can be encrypted. This is usually the case if the 4 byte identifier at the start of the file seems invalid. Decryption is done via 16 repetitions of [[Cryptography#AES|AES-128]] in ECB mode.&lt;br /&gt;
&lt;br /&gt;
==== [[More then one img file in GTA3 and VC?]] ====&lt;br /&gt;
&lt;br /&gt;
In [[GTAIII]] or [[Vice City]] you can have more then one [[img]] file by adding the following example to your [[default.dat]] file. &lt;br /&gt;
&lt;br /&gt;
* CDIMAGE MODELS\MyMap.img&lt;br /&gt;
&lt;br /&gt;
Create MyMap.img and MyMap.dir file in the models folder.&lt;br /&gt;
&lt;br /&gt;
Take note that your limited to 10 Img files where you can only hold the main MAP data. The Radar, IPF, COL, Vehicles or Peds files can only be loaded from the gta3.img file. &lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|3}} {{Icon|VC}}&amp;lt;/center&amp;gt; || [[ImgEd]] &amp;amp;ndash; by Dan Strandberg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAF|354093|IMG Manager}} &amp;amp;ndash; by {{U|xmen}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAG|1503|Spark}} &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[IMG Tool]] &amp;amp;ndash; by {{U|Spooky}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[G-IMG]] &amp;amp;ndash; by {{U|REspawn}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}} {{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || [http://www.dustin.gzwn.net/YAIE.zip Yet Another IMG Editor] &amp;amp;ndash; by {{U|dustcrazy}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || {{GTAF|post|408669|1060569851|GTA Stories IMG Tool}} &amp;amp;ndash; by {{U|HackMan128}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[SparkIV]] &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[OpenIV]] &amp;amp;ndash; by {{U|GooD-NTS}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[Shadow-Mapper]] &amp;amp;ndash; by {{U|Prince-Link}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
====Version 3 only====&lt;br /&gt;
* [[X Archive Poison]]&lt;br /&gt;
&lt;br /&gt;
{{N|4|SA}}&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA LCS]][[Category:GTA VCS]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10421</id>
		<title>IMG archive</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=10421"/>
		<updated>2011-12-16T04:12:00Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GTA's most commonly used [[archive file]]s are known by the extension &amp;lt;code&amp;gt;'''.img'''&amp;lt;/code&amp;gt;. They have a very simple format and currently exist in multiple versions.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
=== Version 1 - GTA III &amp;amp;amp; VC ===&lt;br /&gt;
&lt;br /&gt;
Version 1 archives used in GTA III and Vice City, are actually split up into two files: the content directory (&amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt;) and the actual archive (&amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The directory is a list of files each with name, offset and size of the file. The values for offset and size have to be ''multiplied by 2048'', since files are aligned to 2 KB boundaries. This means that even a file with only 123 byte content will take up 2 KB in the archive. Files are stored (usually) unsorted, uncompressed and linear (no directory tree).&lt;br /&gt;
&lt;br /&gt;
First you have to find out the &amp;lt;strong&amp;gt;number of entries (n)&amp;lt;/strong&amp;gt;.&lt;br /&gt;
Just divide the filesize of the &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; file by 32 and you will get it.&lt;br /&gt;
&lt;br /&gt;
There is no Header, like in V2 (San Andreas) Files!&lt;br /&gt;
&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file itself has no special structure or header, just all the files in 2 KB blocks.&lt;br /&gt;
&lt;br /&gt;
This format was also used in the PC version of ''Bully: Scholarship Edition''.&lt;br /&gt;
&lt;br /&gt;
=== Version 2 - GTA SA ===&lt;br /&gt;
&lt;br /&gt;
Version 2 archives, introduced with GTA San Andreas, combine &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files into one &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file. The directory has the same format as in version 1, but is located at the beginning of the archive. Files are again aligned to 2 KB boundaries. File offsets are relative to the start of the whole archive, not to the end of the file list.&lt;br /&gt;
&lt;br /&gt;
 Header:&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - CHAR[4]   - FourCC, always &amp;quot;VER2&amp;quot;&lt;br /&gt;
  4 byte - DWORD     - number of entries (n)&amp;lt;br&amp;gt;&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
A major drawback of this format is the complicated extendability. If you have to add many files, it might happen that you run out of space for the directory, and have to move the first file(s) to the end.&lt;br /&gt;
&lt;br /&gt;
=== Version 3 - GTA IV ===&lt;br /&gt;
&lt;br /&gt;
GTA IV introduced yet another &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file format. Not only the format is new, also there can be encrypted archive headers (see below). The internal IMG parser of the game works with 2 kb buffers, which means that the 2 kb bounds from earlier versions (blocks) are still present, yet optional.&lt;br /&gt;
&lt;br /&gt;
==== IMG Header ====&lt;br /&gt;
&lt;br /&gt;
The header of an unencrypted file always has a size of '''20 bytes'''.&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Identifier (0xA94E2A52 if the archive is not encrypted)&lt;br /&gt;
 4 byte - DWORD      - Version (always 3, if not the format would be differ)&lt;br /&gt;
 4 byte - DWORD      - Number of Items&lt;br /&gt;
 4 byte - DWORD      - Table Size (in bytes)&lt;br /&gt;
 2 byte - WORD       - Size of Table Items (needs to be always 0x10)&lt;br /&gt;
 2 byte - WORD       - Unknown&lt;br /&gt;
&lt;br /&gt;
==== IMG Table ====&lt;br /&gt;
&lt;br /&gt;
The table holds information about the items. Each item header has a size of '''16 bytes''' .&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Itemsize (in bytes)&lt;br /&gt;
 4 byte - DWORD      - Resource type&lt;br /&gt;
 4 byte - DWORD      - Offset (in blocks)&lt;br /&gt;
 2 byte - WORD       - Used Blocks&lt;br /&gt;
 2 byte - WORD       - Padding&lt;br /&gt;
&lt;br /&gt;
Item Names' length will be calculate as :&lt;br /&gt;
 Table Size - (Number of Items * Item Size)&lt;br /&gt;
Next that string will be split by '\x0'&lt;br /&gt;
&lt;br /&gt;
A [[resource file|resource]] type is identified by the 4b DWORD value:&lt;br /&gt;
* 0x01: Generic&lt;br /&gt;
* 0x08: Texture archive&lt;br /&gt;
* 0x20: Bounds&lt;br /&gt;
* 0x6E: Model file&lt;br /&gt;
* 0x24: xpfl&lt;br /&gt;
&lt;br /&gt;
==== [[Cryptography|Encryption]] ====&lt;br /&gt;
&lt;br /&gt;
The header and directory (table) of IMG archives can be encrypted. This is usually the case if the 4 byte identifier at the start of the file seems invalid. Decryption is done via 16 repetitions of [[Cryptography#AES|AES-128]] in ECB mode.&lt;br /&gt;
&lt;br /&gt;
==== [[More then one img file in GTA3 and VC?]] ====&lt;br /&gt;
&lt;br /&gt;
In [[GTAIII]] or [[Vice City]] you can have more then one [[img]] file by adding the following example to your [[default.dat]] file. &lt;br /&gt;
&lt;br /&gt;
CDIMAGE MODELS\MyMap.img&lt;br /&gt;
&lt;br /&gt;
Create a new MyMap.img and MyMap.dir in the models folder where the limit is 10 only or the game might crash.&lt;br /&gt;
&lt;br /&gt;
Take note that these new img files can only hold the main MAP data and not the Radar, IPF, COL, Vehicles or Peds files. &lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|3}} {{Icon|VC}}&amp;lt;/center&amp;gt; || [[ImgEd]] &amp;amp;ndash; by Dan Strandberg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAF|354093|IMG Manager}} &amp;amp;ndash; by {{U|xmen}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|SA}}&amp;lt;/center&amp;gt; || {{GTAG|1503|Spark}} &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[IMG Tool]] &amp;amp;ndash; by {{U|Spooky}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}}&amp;lt;/center&amp;gt; || [[G-IMG]] &amp;amp;ndash; by {{U|REspawn}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|trilogy}} {{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || [http://www.dustin.gzwn.net/YAIE.zip Yet Another IMG Editor] &amp;amp;ndash; by {{U|dustcrazy}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|LCS}} {{Icon|VCS}}&amp;lt;/center&amp;gt; || {{GTAF|post|408669|1060569851|GTA Stories IMG Tool}} &amp;amp;ndash; by {{U|HackMan128}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[SparkIV]] &amp;amp;ndash; by {{U|aru}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[OpenIV]] &amp;amp;ndash; by {{U|GooD-NTS}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;{{Icon|4}}&amp;lt;/center&amp;gt; || [[Shadow-Mapper]] &amp;amp;ndash; by {{U|Prince-Link}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
====Version 3 only====&lt;br /&gt;
* [[X Archive Poison]]&lt;br /&gt;
&lt;br /&gt;
{{N|4|SA}}&lt;br /&gt;
&lt;br /&gt;
[[Category:File Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA LCS]][[Category:GTA VCS]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Draw_distance&amp;diff=10420</id>
		<title>Draw distance</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Draw_distance&amp;diff=10420"/>
		<updated>2011-12-16T03:54:41Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An object's '''draw distance''' is declared in the [[Item Definition|IDE]] files. &lt;br /&gt;
&lt;br /&gt;
The draw distance value tells the engine how far away any given object should be rendered relative to the player's position (Line of Sight) or viewpoint. Close range normal objects are rendered for a distance no greater then 299 [[unit]]s however [[LOD]] objects are rendered from 300 to 3000 [[unit]]s.&lt;br /&gt;
&lt;br /&gt;
In [[GTA 3]] and [[Vice City]], [[collision file|collision data]] for an LOD object (draw distance is greater than 300) is ignored by the engine. &lt;br /&gt;
&lt;br /&gt;
In [[San Andreas]]' LOD models can share the same collision with no mesh or collision spare but the same rule applies where every LOD model or Normal model much have a collision. &lt;br /&gt;
&lt;br /&gt;
Same models can have the collision data stored within where you can link the LOD object to another object. As long as the object has an LOD flag which is -1 in the [[IPL]] file the game searches for a collision.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]][[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Draw_distance&amp;diff=10419</id>
		<title>Draw distance</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Draw_distance&amp;diff=10419"/>
		<updated>2011-12-16T03:53:24Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An object's '''draw distance''' is declared in the [[Item Definition|IDE]] files. &lt;br /&gt;
&lt;br /&gt;
The draw distance value tells the engine how far away any given object should be rendered relative to the player's position (Line of Sight) or viewpoint. Close range normal objects are rendered for a distance no greater then 299.9 [[unit]]s however [[LOD]] objects are rendered from 300 to 3000 [[unit]]s.&lt;br /&gt;
&lt;br /&gt;
In [[GTA 3]] and [[Vice City]], [[collision file|collision data]] for an LOD object (draw distance is greater than 300) is ignored by the engine. &lt;br /&gt;
&lt;br /&gt;
In [[San Andreas]]' LOD models can share the same collision with no mesh or collision spare but the same rule applies where every LOD model or Normal model much have a collision. &lt;br /&gt;
&lt;br /&gt;
Same models can have the collision data stored within where you can link the LOD object to another object. As long as the object has an LOD flag which is -1 in the [[IPL]] file the game searches for a collision.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]][[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Draw_distance&amp;diff=10418</id>
		<title>Draw distance</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Draw_distance&amp;diff=10418"/>
		<updated>2011-12-16T03:51:27Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An object's '''draw distance''' is declared in the [[Item Definition|IDE]] files. &lt;br /&gt;
&lt;br /&gt;
The draw distance value tells the engine how far away any given object should be rendered relative to the player's position (Line of Sight) or viewpoint. Close range normal objects are rendered for a distance no greater then 299.9 [[unit]]s however [[LOD]] objects are rendered from 300 to 3000 [[unit]]s.&lt;br /&gt;
&lt;br /&gt;
In [[GTA 3]] and [[Vice City]], [[collision file|collision data]] for an LOD object (draw distance is greater than 300) is ignored by the engine. &lt;br /&gt;
&lt;br /&gt;
In [[San Andreas]]' LOD models can share the same collision with no mesh or collision spare but the same rule applies where every LOD model or Normal model much have a collision. &lt;br /&gt;
&lt;br /&gt;
Same models can have the collision data stored within where you can link the LOD object to another object. As long as the object has an LOD flag which is -1 in the IPL file the game searches for a collision.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]][[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=6889</id>
		<title>IMG archive</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=IMG_archive&amp;diff=6889"/>
		<updated>2009-08-07T22:03:36Z</updated>

		<summary type="html">&lt;p&gt;X-Seti: /* Version 1 - GTA III &amp;amp;amp; VC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GTA's most commonly used [[archive file]]s are known by the extension &amp;lt;code&amp;gt;'''.img'''&amp;lt;/code&amp;gt;. They have a very simple format and currently exist in multiple versions.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
=== Version 1 - GTA III &amp;amp;amp; VC ===&lt;br /&gt;
&lt;br /&gt;
Version 1 archives used in GTA III and Vice City, are actually split up into two files: the content directory (&amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt;) and the actual archive (&amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The directory is a list of files each with name, offset and size of the file. The values for offset and size have to be ''multiplied by 2048'', since files are aligned to 2 KB boundaries. This means that even a file with only 123 byte content will take up 2 KB in the archive. Files are stored (usually) unsorted, uncompressed and linear (no directory tree).&lt;br /&gt;
&lt;br /&gt;
First you have to find out the &amp;lt;strong&amp;gt;number of entries (n)&amp;lt;/strong&amp;gt;.&lt;br /&gt;
Just divide the filesize of the &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; file by 32 and you will get it.&lt;br /&gt;
&lt;br /&gt;
There is no Header, like in V2 (San Andreas) Files!&lt;br /&gt;
&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file itself has no special structure or header, just all the files in 2 KB blocks.&lt;br /&gt;
&lt;br /&gt;
=== Version 2 - GTA SA ===&lt;br /&gt;
&lt;br /&gt;
Version 2 archives, introduced with GTA San Andreas, combine &amp;lt;code&amp;gt;.dir&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files into one &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file. The directory has the same format as in version 1, but is located at the beginning of the archive. Files are again aligned to 2 KB boundaries. File offsets are relative to the start of the whole archive, not to the end of the file list.&lt;br /&gt;
&lt;br /&gt;
 Header:&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - CHAR[4]   - FourCC, always &amp;quot;VER2&amp;quot;&lt;br /&gt;
  4 byte - DWORD     - number of entries (n)&amp;lt;br&amp;gt;&lt;br /&gt;
 Entry: (repeated n times)&amp;lt;br&amp;gt;&lt;br /&gt;
  4 byte - DWORD     - offset of file inside archive (in blocks)&lt;br /&gt;
  4 byte - DWORD     - size of file (in blocks)&lt;br /&gt;
 24 byte - CHAR[24]  - name of file&lt;br /&gt;
&lt;br /&gt;
A major drawback of this format is the complicated extendability. If you have to add many files, it might happen that you run out of space for the directory, and have to move the first file(s) to the end.&lt;br /&gt;
&lt;br /&gt;
=== Version 3 - GTA IV ===&lt;br /&gt;
&lt;br /&gt;
GTA IV introduced yet another &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; file format. Not only the format is new, also there can be encrypted archive headers (see below). The internal IMG parser of the game works with 2 kb buffers, which means that the 2 kb bounds from earlier versions (blocks) are still present, yet optional.&lt;br /&gt;
&lt;br /&gt;
==== IMG Header ====&lt;br /&gt;
&lt;br /&gt;
The header of an unencrypted file always has a size of '''20 bytes'''.&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Identifier (0xA94E2A52 if the archive is not encrypted)&lt;br /&gt;
 4 byte - DWORD      - Version (always 3, if not the format would be differ)&lt;br /&gt;
 4 byte - DWORD      - Number of Items&lt;br /&gt;
 4 byte - DWORD      - Table Size (in bytes)&lt;br /&gt;
 2 byte - WORD       - Size of Table Items (needs to be always 0x10)&lt;br /&gt;
 2 byte - WORD       - Unknown&lt;br /&gt;
&lt;br /&gt;
==== IMG Table ====&lt;br /&gt;
&lt;br /&gt;
The table holds information about the items. Each item header has a size of '''16 bytes''' .&lt;br /&gt;
&lt;br /&gt;
 4 byte - DWORD      - Itemsize (in bytes)&lt;br /&gt;
 4 byte - DWORD      - Resource type&lt;br /&gt;
 4 byte - DWORD      - Offset (in blocks)&lt;br /&gt;
 2 byte - WORD       - Used Blocks&lt;br /&gt;
 2 byte - WORD       - Padding&lt;br /&gt;
&lt;br /&gt;
Item Names' length will be calculate as :&lt;br /&gt;
 Table Size - (Number of Items * Item Size)&lt;br /&gt;
Next that string will be split by '\x0'&lt;br /&gt;
&lt;br /&gt;
A [[resource file|resource]] type is identified by the 4b DWORD value:&lt;br /&gt;
* 0x01: Generic&lt;br /&gt;
* 0x08: Texture archive&lt;br /&gt;
* 0x20: Bounds&lt;br /&gt;
* 0x6E: Model file&lt;br /&gt;
* 0x24: xpfl&lt;br /&gt;
&lt;br /&gt;
==== Encryption ====&lt;br /&gt;
&lt;br /&gt;
The header and directory (table) of IMG archives can be encrypted. This is usually the case if the 4 byte identifier at the start of the file seems invalid. Decryption is done via 16 repetitions of AES-128 in ECB mode, see [[Cryptography#AES]].&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
====Version 1 only====&lt;br /&gt;
* [[ImgEd]]&lt;br /&gt;
====Version 2 only====&lt;br /&gt;
* {{GTAF|354093|IMG Manager}}&lt;br /&gt;
* [[Spark]]&lt;br /&gt;
&lt;br /&gt;
====Versions 1 and 2====&lt;br /&gt;
* [[IMG Tool]]&lt;br /&gt;
* [[G-IMG]]&lt;br /&gt;
====Version 3 only====&lt;br /&gt;
* [[SparkIV]]&lt;br /&gt;
* [[OpenIV]]&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
====Version 3 only====&lt;br /&gt;
* [[X Archive Poison]]&lt;br /&gt;
&lt;br /&gt;
{{GTA4-navi|state=autocollapse}}&lt;br /&gt;
{{SA-navi|state=autocollapse}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Other Formats]][[Category:GTA 3]][[Category:GTA VC]]&lt;/div&gt;</summary>
		<author><name>X-Seti</name></author>
		
	</entry>
</feed>