saints row iv · systems

Saints Row IV Engine Systems

Every major system in one line each: what it does, how it works, where it lives.

Systems26 rows

Every major part of the engine. 'Key functions' gives the name and address to start from.

SystemWhat it doesHow it worksKey functionsData filesDetail doc
Game flowDecides which 'mode' the game is in.A stack of 10 states (boot, menu, loading, in game, pause...). Changes are queued and applied once per frame.gamestate_register 00865f20, game_frame_tick 00724f4001_architecture.md
Threads & jobsRuns work in parallel.Named threads for rendering, file loading, audio, network, saves; a job scheduler with worker threads; Havok has its own physics threads.thread_create 010c1a10, job_submit 010c105004_core_systems.md
MemoryGives every system a fixed budget.At start-up the game reserves named pools (e.g. 32 MB for Lua, 11 MB for objects). new/delete can be redirected per thread.game_memory_budget_init 0072662004_core_systems.md
Files & packfilesFinds and reads game data.Search order: mods folder first, then packfiles (.vpp_pc), then memory, then loose files. Reads happen on background threads.cf_find_file 010b7b00, cf_open 010baf9004_core_systems.md
StreamingLoads the city around you.The world is split into zones; each is a 'stream2 container' loaded and unloaded as you move.stream2_container_create 010dd670.asm_pc, .str2_pc04_core_systems.md
Data tablesHolds nearly all tuning numbers.282 XML tables (.xtbl) parsed at boot or on demand - weapons, vehicles, AI, cheats, weather...xtbl_load_file 010a6690every .xtbl07_xtbl_loaders.md
Scripting (Lua)Runs missions and UI logic.Two Lua 5.1 engines: 'game play' (missions) and 'interface' (menus/HUD). Scripts call ~1,900 native commands.lua_gameplay_vm_init 00bbd97002_lua_api.md
ObjectsEverything that exists in the world.67 object types in a family tree (player is a human is a physical_object...). Objects find each other by 64-bit handles.handle_table_lookup 004988d0, object_is_a 0069d04006_gameplay.md
Humans & playerPeople, including you.One 'human' class for player, NPCs and homies. Health, team, current vehicle, super power all live in the human object.get_local_player 00b639c0, human_take_damage 00adeb60character.xtbl06_gameplay.md
AIMakes NPCs act.Every NPC checks 20 goals in priority order; for the first goal that applies, it tries that goal's actions in order until one works.ai_select_action 00532300ai_goals, ai_behavior, ai_personalities09_ai.md
VehiclesCars, bikes, boats, aircraft.Driving physics is Havok's vehicle kit (engine, gears, wheels, suspension) fed from vehicles.xtbl. Flying vehicles have their own code.handle_to_vehicle 004eb410vehicles.xtbl06_gameplay.md
Weapons & combatGuns, melee, explosions.Each weapon is a weapon_info record from weapons.xtbl; upgrades patch its stats per level; all damage goes through human_take_damage.weapon_info_parse 00d7cb90, weapon_upgrade_apply_overrides 00d6d5c0weapons, weapon_upgrades13_weapons.md
SuperpowersTelekinesis, stomp, blast, buff, sprint, jump...8 power slots, 21 elements; unlock/select flags live in the player object and are synced in co-op.superpower_select 006c6310super_power_levels06_gameplay.md
AnimationMoves characters.Volition's own animation system (not Havok): data-driven node graphs that blend clips and run state machines.anim_system_init 004903c0anim_*.xtbl10_animation.md
PhysicsCollisions, ragdolls, vehicles.Havok Physics 2011.3 with Volition glue code.01_architecture.md
RenderingDraws the frame.D3D11 renderer using Volition's 'Inferred Lighting' (lights computed in a separate buffer), selectable shadow techniques, HDR, bloom, depth of field, motion blur.render_thread_main 00729ce0dof_situations, refraction_situations11_rendering.md
UIMenus and HUD.'vint' UI system: documents of elements animated by Lua scripts; ~110 screen classes; HUD meters are 'gsi' widgets.vint_doc_parse 0112ccf0.vint_doc12_ui.md
WorldTime of day, weather, crowds, traffic.Game clock drives lighting; weather stages; spawn tables decide who and what appears.game_clock_advance 0085d430weather, spawn_info_*14_world.md
NotorietyPolice heat.One family ('police'), levels 0-5, decays over time; only the co-op host changes it.notoriety_set_level 00766230notoriety*.xtbl06_gameplay.md
CheatsPhone cheat codes.Loaded from cheats.xtbl; activating one flags the save unless the cheat is marked 'don't flag'.cheat_set_active 00857f30cheats.xtbl06_gameplay.md
Co-op networkingTwo-player online.Steam P2P + Steam lobbies; 98 message types; objects are replicated with per-type compressors.net_register_msg 009a85d006_gameplay.md
SavesYour progress.Only in Steam Cloud: numbered save files plus a checksummed directory file.gamesave_cloud_write_file 00d9311006_gameplay.md
AudioSound and music.Audiokinetic Wwise plus an engine audio thread; interactive music reacts to powers and action.audio_thread_main 005a9560interactive_music.xtbl06_gameplay.md
Missions & scriptsStory missions and activities.Missions come from _objectives.xtbl; their logic is Lua run as threads resumed once per frame; only the co-op host ends a mission.mission_end 00849760, script_system_frame 011497b0_objectives, mission_checkpoints, activity_types16_missions.md
CustomizationYour look, your gang, your cars.Slot/item/tattoo-layer/morph tables; the skin texture is rebuilt on the GPU; co-op sends your look to the partner.player+0x27DC, pcr_*/pcu_* commandscustomization_*.xtbl17_customization.md
Online servicesAccounts and extras.Koch Media DSU/Silverlink account services, Steam achievements/cloud, OpenSSL + libcurl for HTTPS.silverlink_thread_main 00ba7a8000_overview.md

Built from SR4_Game_Explained.xlsx (650 KB), if you'd rather filter it in Excel. SaintsRowIV.exe v1.0.6.1 (Steam). Names are ours unless they're Volition's own Lua or C++ class names.