Skip to content

Instantly share code, notes, and snippets.

@user-grinch
Created December 5, 2021 22:15
Show Gist options
  • Save user-grinch/af59e87707e91fd9371d04d52dc85aeb to your computer and use it in GitHub Desktop.
Save user-grinch/af59e87707e91fd9371d04d52dc85aeb to your computer and use it in GitHub Desktop.

GUN™ Modding

Logo

GUN™ is a western shooter game developed by Neversoft and published by Activision. Read more about it on the wiki

Directory Structure

data\..
data\movies\.. - Bink movie files. Can be played using MPlayer
texs\ - Texture directory. All of them are .png textures renamed as .dat
ds.dat & ncm.dat - dds files renamed as dat?
MouseCursor.png - Mouse cursor icon
igct.bnx - Text translation file

Player Class

// player = *(base + 0x2C965C)

class CPlayer
{
public:
	char pad_0000[48]; 
	float m_fHealth; 
	float m_fHealth2; 
	char pad_0038[248]; 
	uint32_t m_nPistolMag; 
	char pad_0134[8]; 
	uint32_t m_nAmmo; 
	char pad_0140[20]; 
	uint32_t m_nRifleMag; 
	char pad_0158[4]; 
	uint32_t m_nSniperMag; 
	uint32_t m_nBowMag; 
	uint32_t m_nDynamyteMag; 
}; 

XBX Structure

4 Byte - File Identifier (common to all files)
4 Byte - File offset?
4 Byte - unknown
4 Byte - unknown
4 Byte - File Type? 

// File Type 1: C30D986F
4 Byte - unknown, checksums?
4 Byte - unknown
4 Byte - unknown
90 Bytes - External file path

// File Type 2: 45CD5D74
4 Byte - unknown
4 Byte - unknown
4 Byte - unknown
4 Byte - File Type 1 again? (C30D986F)
4 Byte - Null
4 Byte - Null
4 Byte - Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment