SAEncyclopedia

SAEncyclopedia

An engine-level reference for Grand Theft Auto: San Andreas, in 55 chapters.

SAEncyclopedia is a reference book for Grand Theft Auto: San Andreas on PC, version 1.0 US. It covers every file format, data structure, class and subsystem in the game, from the RenderWare stream beneath every model up to the running game observed frame by frame, so that someone with a hex editor, a disassembler and patience can understand it the way its authors did. With it you can swap a texture, rebuild collision, retune handling, edit the SCM script, or trace a value from the HUD down to the float it reads out of a data file.

Everything in it comes from the retail PC data and the shipped executable. It is written format first: byte layouts, the algorithms that read and write them, the runtime classes that consume them, worked examples, and the reasoning behind why each thing is built the way it is.

Grounded in the binary

Every claim carries one of four labels, so you always know how much weight it bears. Verified means confirmed by a Capstone disassembly sweep of the executable and traced to its call sites. Structural means a well-supported inference from the surrounding layout. External means a figure taken from the existing modding community, kept labelled so its weaker evidence is visible at a glance. Open marks where knowledge stops, stated plainly rather than papered over. No field is asserted without a tier, and no address is cited without a call-site derivation.

Across the book that comes to 297 verified struct schemas, 2,003 fields recovered by disassembly, and 72,719 call sites analysed. Two findings stand out. ms_fTimeStep, at 0xB7CB5C, is the most-referenced global in the whole executable, read at 984 sites. And CHandlingData is really 0xE0 bytes, not the 0xD4 that the community has assumed for years, a difference proven by the stride of the array indexing code.

What it covers

The complete data/ folder has a home, every one of the 13 entity pools is mapped, and the render, physics, streaming, scripting, audio and AI systems are followed down to the RenderWare layer beneath them.

AreaCovers
Executable and memoryBinary identity, the game loop and timers, the memory and pool architecture, the limits reference
StreamingThe streaming system, CStreaming, the model stores, the slot tables
World and entitiesCWorld, the entity pools, the gameplay object pools and managers
RenderWareThe RenderWare stream, geometry, materials and textures, collision, a RenderWare reference
Map dataIDE and IPL, 2D effects, the path network, map zones, surfaces, a full data-folder sweep
VehiclesVehicle data, physics and dynamics, and vehicle recording
Peds, AI and weaponsPeds and weapons, the ped tables, AI tasks and the wanted system, damage, CJ customisation
Rendering and world stateThe timecycle, popcycle and water, sky and clouds, the render pipeline, shaders, the camera
Animation, audio, effectsIFP animation, audio, particles, conversations
Scripting and textThe SCM script format, the running-script object, script brains, GXT text
Interface, input, multiplayerFonts and the HUD, the front-end menu, input devices, and the SA-MP multiplayer layer
CataloguesThe function and class catalogues, attributing the unnamed, and how the catalogue is verified

The companion SDK

The book's verified struct tables are the same source that SA-SDK generates its database from, so the book and the SDK never disagree about an offset. If you want to read those layouts as production C++ headers with static_assert-checked sizes, or parse the game's archives offline, start there.