GRW ScriptHook 0.11.0
Plugin API for Ghost Recon Wildlands
Loading...
Searching...
No Matches
Vehicles

A spec per vehicle and a spawner the manager owns. More...

Data Structures

struct  ShVehicle

Typedefs

typedef void(*) ShFrameFn_t(void *user)
 A per frame hook on the game thread.

Functions

SH_API int ShVehicleCount (void)
 The catalogue, named one spawn at a time by eye.
SH_API const ShVehicle * ShVehicleAt (int index)
SH_API const char * ShVehicleName (uint32_t vehicleId)
SH_API uint64_t ShSpawnVehicle (uint32_t vehicleId, const ShVec3 *pos)
 Spawn a vehicle and return its ENTITY, or 0 on failure.
SH_API void ShSpawnInvalidate (void)
SH_API int ShReadBytes (uint64_t addr, void *out, uint32_t len)
 Guarded reads, for anything walking engine memory.
SH_API uint64_t ShReadU64 (uint64_t addr, int *ok)
SH_API float ShReadF32 (uint64_t addr, int *ok)
SH_API int ShRegisterFrameCallback (ShFrameFn_t fn, void *user)
SH_API void ShUnregisterFrameCallback (ShFrameFn_t fn)

Detailed Description

A spec per vehicle and a spawner the manager owns.

Typedef Documentation

◆ ShFrameFn_t

typedef void(*) ShFrameFn_t(void *user)

A per frame hook on the game thread.

Keep it fast: the frame waits for it. Registration fails past 16 slots.

Function Documentation

◆ ShVehicleCount()

SH_API int ShVehicleCount ( void )

The catalogue, named one spawn at a time by eye.

Ids are stable across sessions, addresses are not.

◆ ShVehicleAt()

SH_API const ShVehicle * ShVehicleAt ( int index)

◆ ShVehicleName()

SH_API const char * ShVehicleName ( uint32_t vehicleId)

◆ ShSpawnVehicle()

SH_API uint64_t ShSpawnVehicle ( uint32_t vehicleId,
const ShVec3 * pos )

Spawn a vehicle and return its ENTITY, or 0 on failure.

Blocks until it exists, usually a frame or two. Two entries FREEZE the game if entered: the alpaca 0x40081214 and the unused monster 0x40BA6E9D.

◆ ShSpawnInvalidate()

SH_API void ShSpawnInvalidate ( void )

◆ ShReadBytes()

SH_API int ShReadBytes ( uint64_t addr,
void * out,
uint32_t len )

Guarded reads, for anything walking engine memory.

They go through the kernel, so a freed page fails instead of killing the game.

◆ ShReadU64()

SH_API uint64_t ShReadU64 ( uint64_t addr,
int * ok )

◆ ShReadF32()

SH_API float ShReadF32 ( uint64_t addr,
int * ok )

◆ ShRegisterFrameCallback()

SH_API int ShRegisterFrameCallback ( ShFrameFn_t fn,
void * user )

◆ ShUnregisterFrameCallback()

SH_API void ShUnregisterFrameCallback ( ShFrameFn_t fn)