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

The engine's GameFlow machine, tracked by the hook. More...

Typedefs

typedef int(*) ShGetGameState_t(void)
typedef int(*) ShIsInGame_t(void)

Enumerations

enum  ShGameState {
  SH_STATE_UNKNOWN = 0 , SH_STATE_MENU , SH_STATE_LOADING , SH_STATE_LOBBY ,
  SH_STATE_INGAME , SH_STATE_RELOADING , SH_STATE_PAUSED , SH_STATE_GAMEOVER ,
  SH_STATE_DRONE , SH_STATE_BINOCULAR , SH_STATE_CINEMATIC
}
enum  ShUiState {
  SH_UI_DRONE = 0x0001 , SH_UI_BINOCULAR = 0x0002 , SH_UI_VEHICLE = 0x0004 , SH_UI_PAUSE = 0x0008 ,
  SH_UI_LOADOUT = 0x0010 , SH_UI_MAP = 0x0020 , SH_UI_SKILLS = 0x0040 , SH_UI_COMWHEEL = 0x0080 ,
  SH_UI_GAMEOVER = 0x0100 , SH_UI_LOADING = 0x0200 , SH_UI_CINEMATIC = 0x0400 , SH_UI_POPUP = 0x0800
}
 What the game's UI is showing, from the scenes it drew last frame. More...

Functions

SH_API uint32_t ShGetUiState (void)
SH_API int ShInDrone (void)
SH_API int ShInLoadout (void)
SH_API int ShInMap (void)
SH_API int ShInBinocular (void)
SH_API int ShInPauseMenu (void)
 The game flow stays in Playing while paused, so this is read off the camera: the pause menu renders through a template pose no steered camera ever holds.
SH_API int ShGetGameState (void)
 Game flow state.
SH_API int ShIsInGame (void)
 Stays true while paused: the world is loaded and every read keeps working, so callers keep their state on Esc.
SH_API int ShGetGameStateName (char *buf, int len)

Detailed Description

The engine's GameFlow machine, tracked by the hook.

Typedef Documentation

◆ ShGetGameState_t

typedef int(*) ShGetGameState_t(void)

◆ ShIsInGame_t

typedef int(*) ShIsInGame_t(void)

Enumeration Type Documentation

◆ ShGameState

Enumerator
SH_STATE_UNKNOWN 
SH_STATE_MENU 
SH_STATE_LOADING 
SH_STATE_LOBBY 
SH_STATE_INGAME 
SH_STATE_RELOADING 
SH_STATE_PAUSED 

In game with the pause menu, loadout, map or skills up.

ShIsInGame stays true: the world is loaded.

SH_STATE_GAMEOVER 

The game over screen is drawn.

SH_STATE_DRONE 

Live play with the engine driving its own camera.

The game is running, so these are NOT paused, and ShIsInGame stays true for all three. A mod that places the camera every frame has to let go here, or it fights the engine for it.

SH_STATE_BINOCULAR 
SH_STATE_CINEMATIC 

◆ ShUiState

enum ShUiState

What the game's UI is showing, from the scenes it drew last frame.

Several can be up at once.

Enumerator
SH_UI_DRONE 

flying the drone

SH_UI_BINOCULAR 
SH_UI_VEHICLE 

vehicle HUD

SH_UI_PAUSE 

the pause menu (tabs)

SH_UI_LOADOUT 
SH_UI_MAP 
SH_UI_SKILLS 
SH_UI_COMWHEEL 
SH_UI_GAMEOVER 
SH_UI_LOADING 
SH_UI_CINEMATIC 
SH_UI_POPUP 

a modal popup

Function Documentation

◆ ShGetUiState()

SH_API uint32_t ShGetUiState ( void )

◆ ShInDrone()

SH_API int ShInDrone ( void )

◆ ShInLoadout()

SH_API int ShInLoadout ( void )

◆ ShInMap()

SH_API int ShInMap ( void )

◆ ShInBinocular()

SH_API int ShInBinocular ( void )

◆ ShInPauseMenu()

SH_API int ShInPauseMenu ( void )

The game flow stays in Playing while paused, so this is read off the camera: the pause menu renders through a template pose no steered camera ever holds.

◆ ShGetGameState()

SH_API int ShGetGameState ( void )

Game flow state.

The hook installs on first use and tracks the engine's own state transitions.

◆ ShIsInGame()

SH_API int ShIsInGame ( void )

Stays true while paused: the world is loaded and every read keeps working, so callers keep their state on Esc.

◆ ShGetGameStateName()

SH_API int ShGetGameStateName ( char * buf,
int len )