LuaModLoader¶
A Lua mod loader for the 2020 Steam re-release of GTA IV, the "Complete Edition", build 1.2.0.59, x86.
The classic ASI Loader and ScriptHookIV do not work on this build. LuaModLoader
is the modern alternative: write mods in Lua, call the game's natives directly,
and never touch raw memory or C++. It also brings the ASI loader back, so
existing .asi plugins run on Complete Edition again.
It installs as four files in the GTA IV folder and starts with the game. There is no launcher, and nothing to click.
-- Keep the player's health and armor topped up, once a second
Thread.Create(function()
while true do
local ped = GetPlayerChar(GetPlayerId())
SetCharHealth(ped, 200)
AddArmourToChar(ped, 100)
Thread.Wait(1000)
end
end)
What you get¶
- 3,158 natives as PascalCase globals.
SetCharHealth(ped, 200)uses the same names as ScriptHookDotNet scripts and classic trainers, so ported code needs no renaming. The canonicalSNAKE_CASEform stays reachable through thenativestable andNative.Call. - A namespaced API. Everything the loader itself provides lives under
Thread,Console,Log,Draw,Color,Input,Gamepad,Native,Memory,VehicleandScript. No bare global can collide with a native. - A coroutine scheduler.
Thread.Createand a blockingThread.Wait(ms)that suspends your code without freezing the game. - Your own natives.
Native.Registerputs a Lua function into the game's native table, where any other mod can call it by hash, whatever language it is written in. - A live code editor. Write, run and reload Lua without restarting GTA IV.
- Rendering and input. Draw text and rectangles over the game, read the keyboard and the gamepad, and isolate the game's inputs while your menu is open.
- An ASI loader, so
.asiplugins load again on this build.
Documentation¶
-
The current release, what is in the archive, and how to upgrade.
-
Four files in the game folder, plus log files and troubleshooting.
-
A three-minute guide from empty folder to running mod.
-
manifest.lua, multi-file mods,MOD_DIR, autostart. -
Thread,Draw,Input,Native,Memory,Vehicle,Script. -
Thread.Create(),onUnload(),Input.IsKeyDown()and the VK code table. -
Health, vehicles, weapons, AI and weather, with copy-paste examples.
-
Weapon, vehicle and weather IDs, ready to paste.
-
All 3,158 natives: search, filter by category, one-click Lua copy.
-
Ready-to-use scripts with explanations.
-
What changed in each version, newest first.
Compatible mods¶
- ProTrainer-IV is a complete trainer menu, opened with F4.
- The script examples cover a HUD speedometer with nitro, a god-mode toggle, a never-wanted script, and more.
This site documents the engine
The repository holds the native engine, meaning the loader and its C++ API. Complete mods built on that API live in their own repositories.