Skip to content

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 documented443 in 36 groups
Header last modified2026-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 ​

GroupExportsDescription
Core3Errors, versioning and the shared types.
Play mode selection10Which PvP mode this session is in, read from the game's own mode manager.
Plugin mode blacklist10Which play modes a plugin must not run in, and what the framework does about it.
Game state10The engine's GameFlow machine, tracked by the hook.
Ground5Height through engine physics, near the player.
Player13The local player, via the engine's own component.
Entities9Enumeration by kind, via the net identity component.
Engine calls3Queue your own finds onto the game thread.
Vehicles13A spec per vehicle and a spawner the manager owns.
World and entity calls from Domino10Recovered from the mission script operators; see the map-domino files in scripthook/spawnmaps.
NPCs18Standalone NPCs by archetype, built like the engine's spawn director does (FINDINGS "NPC SPAWN WORKS").
Physics rays6Every cast the engine makes passes through the hook.
Combat events17Shots and impacts from the projectile hook.
Visibility6Render node visible bits, applied on the game thread.
Menu17One root owned by the API; every plugin adds a submenu.
Plugin drawing35A plugin's own window inside the game's overlay, drawn by the plugin's own code.
HUD12Drawn by the engine's own UI; slots pack per corner.
Camera25Per field ownership, so plugins compose.
Motion8Push things rather than teleporting them.
Havok diagnostics4For debugging the mapping rather than for mods.
Input2Blocked at the game's own import slots, since it polls.
Other exports2Exports declared outside any @defgroup block.
Loaded archives3What this session read, not what is on disk.
Crash reports5Faults land in logs/scripthook_crash.log, annotated.
Field of view2The 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 way11The eye is the engine's own head position.
Processor scheduling5The 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 interception8One owner for the file APIs, and rules instead of hooks.
Shared hooks9The one MinHook state and the one-hook-per-target rule, owned by the framework, so no plugin carries MinHook of its own.
Stats and ammo29Health, resources, skill points, stealth and ammo.
Weather and time8The environment object, via the engine's transition.
Reflected objects10The engine's own method tables, callable by name.
Native UI62Engine widgets in scenes of our own; see docs/ui.md.
The engine's widget tree18Every widget the engine has, ours and the game's own, by its engine handle.
Config and paths21The on-disk layout: the main scripthook.ini, one folder per plugin, and a single logs directory.
Localization14Every 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.h

npm 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.

WildM is an independent community project. It is not affiliated with or endorsed by Ubisoft. Ghost Recon Wildlands is a trademark of Ubisoft Entertainment.