Theme
ScriptHook API reference
This reference is generated from the public header of the WildM client framework, forks/gamexueren/scripthook.h — the GRW ScriptHook fork by GameXueRen (GPL-3.0), patched for WildM. Every function a plugin can call is an SH_API export of dinput8.dll.
Framework version (SH_VERSION) | 1.0-beta7-wildm1 |
Plugin API version (SH_API_VERSION) | 2 |
| Exports documented | 443 in 36 groups |
| Header last modified | 2026-11-14 09:59 UTC |
| Header sha256 (first 12) | 23113cc5466e |
Conventions
Every int function returns 1 on success and 0 on failure; on failure ShLastError() carries an ShError code (see Core). Positions are ShVec3 in metres: x east, y north, z up. In WildM, paths such as plugins\, logs\ and scripthook.ini are resolved next to the framework DLL (ShFrameworkDir), not next to GRW.exe (ShGameDir).
Groups
| Group | Exports | Description |
|---|---|---|
| Core | 3 | Errors, versioning and the shared types. |
| Play mode selection | 10 | Which PvP mode this session is in, read from the game's own mode manager. |
| Plugin mode blacklist | 10 | Which play modes a plugin must not run in, and what the framework does about it. |
| Game state | 10 | The engine's GameFlow machine, tracked by the hook. |
| Ground | 5 | Height through engine physics, near the player. |
| Player | 13 | The local player, via the engine's own component. |
| Entities | 9 | Enumeration by kind, via the net identity component. |
| Engine calls | 3 | Queue your own finds onto the game thread. |
| Vehicles | 13 | A spec per vehicle and a spawner the manager owns. |
| World and entity calls from Domino | 10 | Recovered from the mission script operators; see the map-domino files in scripthook/spawnmaps. |
| NPCs | 18 | Standalone NPCs by archetype, built like the engine's spawn director does (FINDINGS "NPC SPAWN WORKS"). |
| Physics rays | 6 | Every cast the engine makes passes through the hook. |
| Combat events | 17 | Shots and impacts from the projectile hook. |
| Visibility | 6 | Render node visible bits, applied on the game thread. |
| Menu | 17 | One root owned by the API; every plugin adds a submenu. |
| Plugin drawing | 35 | A plugin's own window inside the game's overlay, drawn by the plugin's own code. |
| HUD | 12 | Drawn by the engine's own UI; slots pack per corner. |
| Camera | 25 | Per field ownership, so plugins compose. |
| Motion | 8 | Push things rather than teleporting them. |
| Havok diagnostics | 4 | For debugging the mapping rather than for mods. |
| Input | 2 | Blocked at the game's own import slots, since it polls. |
| Other exports | 2 | Exports declared outside any @defgroup block. |
| Loaded archives | 3 | What this session read, not what is on disk. |
| Crash reports | 5 | Faults land in logs/scripthook_crash.log, annotated. |
| Field of view | 2 | The engine computes the fov from the active camera behaviour and writes it into the camera manager every frame, so an override is a value the engine keeps being handed rather than a field written once. |
| First person, the engine's own way | 11 | The eye is the engine's own head position. |
| Processor scheduling | 5 | The processor set and the process priority the framework holds for each stage of the game's start up, the efficiency mode, and the read-only queries a plugin can use to see them. |
| File interception | 8 | One owner for the file APIs, and rules instead of hooks. |
| Shared hooks | 9 | The one MinHook state and the one-hook-per-target rule, owned by the framework, so no plugin carries MinHook of its own. |
| Stats and ammo | 29 | Health, resources, skill points, stealth and ammo. |
| Weather and time | 8 | The environment object, via the engine's transition. |
| Reflected objects | 10 | The engine's own method tables, callable by name. |
| Native UI | 62 | Engine widgets in scenes of our own; see docs/ui.md. |
| The engine's widget tree | 18 | Every widget the engine has, ours and the game's own, by its engine handle. |
| Config and paths | 21 | The on-disk layout: the main scripthook.ini, one folder per plugin, and a single logs directory. |
| Localization | 14 | Every piece of text a player can read goes through one lookup. |
Regenerating
sh
cd docs-site
npm run gen:api # or: node scripts/gen-scripthook-api.mjs path/to/scripthook.hnpm run docs:build and npm run docs:dev run the generator first, so the published reference always matches the header that was present at build time.