User files

From GTAModding
Jump to: navigation, search

User files is a directory created by each GTA PC game. It usually it the location of setting files, replays and savegames.

GTA III, Vice City and San Andreas

The user files directory usually is located inside the My Documents directory of the Microsoft Windows operating system:

  • GTA III My Documents/GTA 3 User Files
  • Vice City My Documents/GTA Vice City User Files
  • San Andreas My Documents/GTA San Andreas User Files

San Andreas specific

Beside savegames, settings and replays San Andreas does also store user track information and ingame screenshots there. Also the stats.html file gets exported to this location. The user tracks themselves can be stored as shortcuts, files or subdirectories inside the directory My Documents/GTA San Andreas User Files/User Tracks.

After the directory got scanned by the game the file sa-ufiles.dat gets created. It holds an list of unterminated strings where each represents a absolute file path of an audio file. The following C++ code snippet demonstrates an easy way to parse this file:

// parse sa-ufiles.dat
void parseFile(std::string &fileName)
	// open the file with reading rights and search the end of the file
	std::fstream stream(fileName.c_str(), std::ios::in | std::ios::ate);
	// allocate an array of characters to read the whole file content
	int size = static_cast<int>(stream->tellg());
	char* buffer = new char[size];
	// search the start of the file and read it's content
	stream->read(buffer, size);
	// parse the content, return value is an vector of strings containing the file names
	std::string str(buffer);
	// delete the memory for buffering and close the stream
	delete[] buffer;
// parse the content of a sa-ufiles.dat file
std::vector<std::string> parseContent(std::string& buffer)
	// vector for the file names
	std::vector<std::string> fileNames;
	// search for the partition letter until there is no one left
	std::size_t found;
	while ((found = (buffer.find_last_of(":") - 1)) != npos)
		// push file name to the vector
		// erase this file name from the file.
	return fileNames;

Also there is an file called sa-utrax.dat, but it appears to be unused.

The player is able to create screenshots from the game using an camera. Those screenshots get stored as jpeg compressed images inside the directory My Documents/GTA San Andreas User Files/Gallery.

v · d · e
San Andreas Grand Theft Auto: San Andreas
File Formats.b.col.cfg.cut.dff.dat.fxp.gxt.ide.ifp.img.iplnodes*.dat.ped.rep.rrr.scm.set.txd
DocumentationAudioCryptographyCutscenesGame memoryHandling.cfgMap ListingMission PacksOpcodesPathsReplaysSavesScriptsSound EffectsStatisticsVehicles
ToolsCLEOCollision File Editor IIENBSeriesG-ToolsIMG ToolLimit AdjusterMap EditorMod LoaderSan Andreas Audio ToolkitSanny BuilderTXD Workshop
TutorialsSan Andreas v2.0 ModdingHow to create a missionHow to create a threadHow to use Map EditorVehicle Mod Installation
ModificationsDesign Your Own MissionGostown ParadiseGTA: UnitedMyriad Islands
MultiplayergtaTournamentMulti Theft AutoSan Andreas Multiplayer(more...)
Useful linksCommunity portalDiscussion forumsMods on GTAGarage.comOpcodes database
v · d · e
Vice City Grand Theft Auto: Vice City
File Formats.adf.b.col.cfg.dff.dat.gxt.ide.ifp.img/.dir.ipl.raw/.sdt.rep.scm.txd
DocumentationAudioHandlingMap ListingOpcodesScript PathsSavesSound EffectsStatisticsVehicles
ToolsCLEOCollision File Editor IIG-ToolsGXT EditorIMG ToolLimit AdjusterKEd (map editor)Sanny BuilderTXD Workshop
TutorialsHow to create a missionHow to create a threadVehicle Mod Installation
MultiplayerGTA:LC MultiplayergtaTournamentMulti Theft AutoState Of Liberty OnlineVice City MultiplayerVice City Online
Useful linksCommunity portalDiscussion forumsMods on GTAGarage.comModding VC Mobile versionOpcodes database
v · d · e
GTA III Grand Theft Auto III
File Formats.b.col.cfg.dff.dat.gxt.ide.ifp.img.ipl.raw/.sdt.scm.txd
DocumentationAudioHandling.cfgMap ListingOpcodesPathsSavesSound EffectsStatisticsVehicles
ToolsCLEOCollision File Editor IIG-ToolsIMG ToolMap EditorSanny BuilderTXD WorkshopWater Editor
TutorialsHow to create a missionHow to create a threadHow to use Map EditorVehicle Mod Installation
MultiplayerLiberty UnleashedMulti Theft AutoMore...
Useful linksCommunity portalDiscussion forumsMods on GTAGarage.comModding GTA 3 Mobile versionOpcodes database