Garry's Mod Addon

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m
m (made the format look prettier)
 
Line 9: Line 9:
  
 
==Format==
 
==Format==
:char[4] ident ("GMAD")
+
<pre>
:uint8 version
+
char[4] ident ("GMAD")
:uint64 steam_id (unused)
+
uint8 version
:uint64 timestamp
+
uint64 steam_id (unused)
:uint8 zero (0)
+
uint64 timestamp
:char addon_name (null terminated string of variable size)
+
uint8 zero (0)
:char addon_description (null terminated string of variable size)
+
char addon_name (null terminated string of variable size)
:char addon_author (null terminated string of variable size) ("Author Name")
+
char addon_description (null terminated string of variable size)
:uint32 addon_version
+
char addon_author (null terminated string of variable size) ("Author Name")
 +
uint32 addon_version
  
:'''struct file_table'''
+
struct file_table[]
::uint32 file_number
+
  uint32 file_number
::char file_path (null terminated string of variable size)
+
  char file_path (null terminated string of variable size)
::uint64 file_size
+
  uint64 file_size
::uint32 file_crc
+
  uint32 file_crc
  
:uint32 zero (0)
+
uint32 zero (0)
  
:'''struct files'''
+
struct files[]
::byte file (file data based on information from the file table)
+
  byte file (file data based on information from the file table)
  
:uint32 addon_crc
+
uint32 addon_crc
 +
</pre>
  
 
==Links==
 
==Links==
 
*[https://facepunch.com/showthread.php?t=1242185 How to create and extract gma files]
 
*[https://facepunch.com/showthread.php?t=1242185 How to create and extract gma files]
 
*[https://github.com/garrynewman/gmad Source code for gmad to create and extract gma files]
 
*[https://github.com/garrynewman/gmad Source code for gmad to create and extract gma files]

Latest revision as of 19:21, 27 September 2016

File Format
Name Garry's Mod Addon
Ontology
Extension(s) .gma
Released 2010

Garry's Mod Addon files are used in the PC game Garry's Mod for storing downloadable game content. They store game files in a hierarchy of folders, so gma files can be created from a folder, or extracted into a hierarchy of folders.

[edit] Format

char[4] ident ("GMAD")
uint8 version
uint64 steam_id (unused)
uint64 timestamp
uint8 zero (0)
char addon_name (null terminated string of variable size)
char addon_description (null terminated string of variable size)
char addon_author (null terminated string of variable size) ("Author Name")
uint32 addon_version

struct file_table[]
  uint32 file_number
  char file_path (null terminated string of variable size)
  uint64 file_size
  uint32 file_crc

uint32 zero (0)

struct files[]
  byte file (file data based on information from the file table)

uint32 addon_crc

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox