<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gw1wiki.ezgame.cc/index.php?action=history&amp;feed=atom&amp;title=Gw.dat_file_format</id>
	<title>Gw.dat file format - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://gw1wiki.ezgame.cc/index.php?action=history&amp;feed=atom&amp;title=Gw.dat_file_format"/>
	<link rel="alternate" type="text/html" href="https://gw1wiki.ezgame.cc/index.php?title=Gw.dat_file_format&amp;action=history"/>
	<updated>2026-10-19T10:33:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://gw1wiki.ezgame.cc/index.php?title=Gw.dat_file_format&amp;diff=77063&amp;oldid=prev</id>
		<title>185.150.28.13 at 12:23, 27 July 2026</title>
		<link rel="alternate" type="text/html" href="https://gw1wiki.ezgame.cc/index.php?title=Gw.dat_file_format&amp;diff=77063&amp;oldid=prev"/>
		<updated>2026-07-27T12:23:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{warning|Directly modifying the Guild Wars program files through any third party tools is completely unsupported by ArenaNet and NC Corporation. If anything breaks, do ''not'' contact support for help; there's nothing they can do about it. Also, third party programs not supported by ArenaNet '''might''' contain '''trojans''', '''spyware''', '''adware''' and other harmful programs.}}&lt;br /&gt;
{{TOCright}}&lt;br /&gt;
Research of the format of the [[Gw.dat]] file was done at [https://web.archive.org/web/20230812123748/http://wiki.xentax.com/index.php/Guild_Wars_DAT XentaxWiki] and its related discussion pages and forums. For more detailed information see the pages there.&lt;br /&gt;
&lt;br /&gt;
This page gives a general idea of the file format, however all information given here are not confirmed by [[ArenaNet]].&lt;br /&gt;
&lt;br /&gt;
== Overall Format ==&lt;br /&gt;
The Gw.dat metafile is series of 512-byte blocks. Internal files take up one or more consecutive blocks. When files are updated they can either be overwritten in place or, if too large, added to the end or perhaps another larger free area.&lt;br /&gt;
&lt;br /&gt;
There is a root block at the beginning of Gw.dat that identifies the file type and links to the ''Main File Table'' (Mft). When accessing the dat file, the Mft is used to look up file information based on the file number. All values are Little Endian.&lt;br /&gt;
&lt;br /&gt;
== Root Block ==&lt;br /&gt;
All access starts with the root block.&lt;br /&gt;
&lt;br /&gt;
=== Contents ===&lt;br /&gt;
* 4 bytes, file type and version (always &amp;lt;code&amp;gt;0x1A&amp;lt;/code&amp;gt;)&lt;br /&gt;
* 4 bytes, header size (always &amp;lt;code&amp;gt;32&amp;lt;/code&amp;gt;)&lt;br /&gt;
* 4 bytes, block size (always &amp;lt;code&amp;gt;512&amp;lt;/code&amp;gt;)&lt;br /&gt;
* 4 bytes, [[w:CRC|CRC]] of the first bytes (always &amp;lt;code&amp;gt;0x70adcb4c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* 8 bytes, offset of the Mft&lt;br /&gt;
* 4 bytes, size of the Mft&lt;br /&gt;
* 4 bytes, unknown (always &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== Main File Table (Mft) ==&lt;br /&gt;
Mft is an array of 24 byte entries, the first 16 are reserved, and the &lt;br /&gt;
first four are as follows:&lt;br /&gt;
&lt;br /&gt;
=== Mft Entry 0 ===&lt;br /&gt;
* 4 bytes (always 'Mft' 0x1a) - File type&lt;br /&gt;
* 64 bit - Unknown (Free block pointer or counter?)&lt;br /&gt;
* 32 bit - Entries in Mft table&lt;br /&gt;
* 32 bit (always 0) - Unknown&lt;br /&gt;
* 32 bit (always 0) - unused CRC&lt;br /&gt;
&lt;br /&gt;
=== Mft Entry 1 ===&lt;br /&gt;
May be a reflection of the root block&lt;br /&gt;
&lt;br /&gt;
* 64 bit (always 0)&lt;br /&gt;
* 32 bit (always 32) - size of root block?&lt;br /&gt;
* 16 bit (always 0, uncompressed) - Compression&lt;br /&gt;
* 8 bit (always 3, data) - Content &lt;br /&gt;
* 8 bit (always 0) - Content Type&lt;br /&gt;
* 32 bit (always 0) - Unknown&lt;br /&gt;
* 32 bit (always 0) - unused CRC &lt;br /&gt;
&lt;br /&gt;
=== Mft Entry 2 ===&lt;br /&gt;
Unknown what this entry points at&lt;br /&gt;
&lt;br /&gt;
* 64 bit - offset to data&lt;br /&gt;
* 32 bit - size of data&lt;br /&gt;
* 16 bit (always 0, uncompressed) - Compression&lt;br /&gt;
* 8 bit (always 3, data) - Content&lt;br /&gt;
* 8 bit (always 0) - Content Type&lt;br /&gt;
* 32 bit (always 0?) - Unknown&lt;br /&gt;
* 32 bit - CRC&lt;br /&gt;
&lt;br /&gt;
=== Mft Entry 3 ===&lt;br /&gt;
Self reference to this Mft&lt;br /&gt;
&lt;br /&gt;
* 64 bit - offset to data&lt;br /&gt;
* 32 bit - size of data&lt;br /&gt;
* 16 bit (always 0, uncompressed) - Compression&lt;br /&gt;
* 8 bit (always 3, data) - Content&lt;br /&gt;
* 8 bit (always 0) - Content Type&lt;br /&gt;
* 32 bit (always 0?) - Unknown&lt;br /&gt;
* 32 bit - CRC&lt;br /&gt;
&lt;br /&gt;
=== Other Mft Entries ===&lt;br /&gt;
* 64 bit - offset to file&lt;br /&gt;
* 32 bit - size of file&lt;br /&gt;
* 16 bit - compression type &lt;br /&gt;
** 0 uncompressed&lt;br /&gt;
** 8 compressed&lt;br /&gt;
* 8 bit - content&lt;br /&gt;
** 1 - empty block?&lt;br /&gt;
** 3 - has content&lt;br /&gt;
* 8 bit - content type &lt;br /&gt;
** 0&lt;br /&gt;
** 1&lt;br /&gt;
** 2 - FFNA file&lt;br /&gt;
** 11&lt;br /&gt;
** 12&lt;br /&gt;
** 255&lt;br /&gt;
* 32 bit - Unknown&lt;br /&gt;
* 32 bit - CRC&lt;br /&gt;
&lt;br /&gt;
== FFNA files ==&lt;br /&gt;
Files that start with 'ffna'&lt;br /&gt;
&lt;br /&gt;
* 4 bytes ('ffna') //little-endian Magic header &amp;quot;ArenaNetFileFormat&amp;quot;&lt;br /&gt;
* 1 byte - file sub-type //&amp;quot;ArenaNetFileType&amp;quot;&lt;br /&gt;
** 0 - None (denote nonexistence)&lt;br /&gt;
** 1 - Unused (Doesn't appear in .dat, appears to be a valid map type.)&lt;br /&gt;
** 2 - Model&lt;br /&gt;
** 3 - Map&lt;br /&gt;
** 4 - Unknown (only 1 instance exists in .dat, and only 1 reference in client.)&lt;br /&gt;
** 5 - Unused and unknown (also not found in .dat, partially processed like Model)&lt;br /&gt;
** 8 - Likely 2d sprites, and/or UI, though unconfirmed.&lt;br /&gt;
&lt;br /&gt;
* 2 bytes - size (size of data / 2 &amp;quot;counting the 2 bytes for size&amp;quot;). note this value is only for types 2, and 8. types 3, and 4 do not have this value.&lt;br /&gt;
* additional data - unknown format&lt;br /&gt;
**Content of this data after processing by client may include the following.&lt;br /&gt;
** ('cryp','file','comp','mdl ','amus','asnd','grtx','grgm','grdv','grlz','grmd','grmt','ovrl','sctx','sdec','grmp','grfo'(Font),'cmd','grlt') non-exhaustive list.&lt;br /&gt;
&lt;br /&gt;
[[Category:Data formats]]&lt;/div&gt;</summary>
		<author><name>185.150.28.13</name></author>
	</entry>
</feed>