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

The engine's own method tables, callable by name. More...

Data Structures

struct  ShMethod
 An object is [vtable, methodTable, ...]; the table is 32 byte entries of crc32(name), index and function. More...

Macros

#define SH_HASH_ENTER   0x78B1EF6Au
 crc32 of the method names the scene calls rely on.
#define SH_HASH_EXIT   0x343B2B30u
#define SH_HASH_INIT   0x66464B4Au
#define SH_HASH_SHUTDOWN   0x6CD4BC94u
#define SH_HASH_GAMEOVER   0xCA671D0Au
 GameFlow, reason.
#define SH_FLOW_GAMEOVER_SCENE   9
 Its sub objects, slots 0 to 16.
#define SH_FLOW_ALT_SCENE   11

Functions

SH_API int ShReflectMethod (uint64_t obj, uint32_t nameHash, uint64_t *outFn)
 The function behind a method name, 0 when absent.
SH_API int ShReflectMethods (uint64_t obj, ShMethod *out, int max)
 Every method of the object's class, in table order.
SH_API uint32_t ShReflectClassHash (uint64_t obj)
 The class hash, through the descriptor getter.
SH_API int ShReflectCall (uint64_t obj, uint32_t nameHash, uint64_t a1, uint64_t a2, uint64_t a3, uint64_t *outRet)
 Call a method by name on the game thread and wait.
SH_API int ShSceneEnter (uint64_t obj)
 A scene is any reflected object with Enter and Exit.
SH_API int ShSceneExit (uint64_t obj)
SH_API uint64_t ShGameFlow (void)
 The GR_GameFlow machine, identity checked.
SH_API uint64_t ShGameFlowObject (int slot)
SH_API uint64_t ShHybridMenu (void)
 The HybridMenu, the shell every menu page lives in.
SH_API int ShTriggerGameOver (int reason)
 The real thing: death, card and checkpoint reload.

Detailed Description

The engine's own method tables, callable by name.

Macro Definition Documentation

◆ SH_HASH_ENTER

#define SH_HASH_ENTER   0x78B1EF6Au

crc32 of the method names the scene calls rely on.

◆ SH_HASH_EXIT

#define SH_HASH_EXIT   0x343B2B30u

◆ SH_HASH_INIT

#define SH_HASH_INIT   0x66464B4Au

◆ SH_HASH_SHUTDOWN

#define SH_HASH_SHUTDOWN   0x6CD4BC94u

◆ SH_HASH_GAMEOVER

#define SH_HASH_GAMEOVER   0xCA671D0Au

GameFlow, reason.

◆ SH_FLOW_GAMEOVER_SCENE

#define SH_FLOW_GAMEOVER_SCENE   9

Its sub objects, slots 0 to 16.

Slot 9 is the game over sequence: Enter plays the death with no reload, Exit restores. Verified in game.

◆ SH_FLOW_ALT_SCENE

#define SH_FLOW_ALT_SCENE   11

Function Documentation

◆ ShReflectMethod()

SH_API int ShReflectMethod ( uint64_t obj,
uint32_t nameHash,
uint64_t * outFn )

The function behind a method name, 0 when absent.

◆ ShReflectMethods()

SH_API int ShReflectMethods ( uint64_t obj,
ShMethod * out,
int max )

Every method of the object's class, in table order.

◆ ShReflectClassHash()

SH_API uint32_t ShReflectClassHash ( uint64_t obj)

The class hash, through the descriptor getter.

◆ ShReflectCall()

SH_API int ShReflectCall ( uint64_t obj,
uint32_t nameHash,
uint64_t a1,
uint64_t a2,
uint64_t a3,
uint64_t * outRet )

Call a method by name on the game thread and wait.

obj is this; up to three more integer arguments.

◆ ShSceneEnter()

SH_API int ShSceneEnter ( uint64_t obj)

A scene is any reflected object with Enter and Exit.

Enter refuses objects without Exit, so it can be undone.

◆ ShSceneExit()

SH_API int ShSceneExit ( uint64_t obj)

◆ ShGameFlow()

SH_API uint64_t ShGameFlow ( void )

The GR_GameFlow machine, identity checked.

◆ ShGameFlowObject()

SH_API uint64_t ShGameFlowObject ( int slot)

◆ ShHybridMenu()

SH_API uint64_t ShHybridMenu ( void )

The HybridMenu, the shell every menu page lives in.

◆ ShTriggerGameOver()

SH_API int ShTriggerGameOver ( int reason)

The real thing: death, card and checkpoint reload.

Reason 1 is the one verified in game.