Nuclide
Software Development Kit for id Tech
gamelibrary.qc File Reference

Functions

void GameLibrary_InitCustom (void)
 Called when you want to initialize custom games/mods. More...
 
void GameLibrary_Init (void)
 Called when initializing the current game. More...
 
bool GameLibrary_IsInstalling (void)
 Returns true/false depending on if a Game installation is in progress. More...
 
float GameLibrary_InstallProgress (void)
 Returns a 0-100% value of game install progress, tracking across multiple packages. More...
 
void GameLibrary_Install (int gameID)
 Install the specified game. More...
 
void GameLibrary_Activate (int gameID)
 Activate the specified game. More...
 
void GameLibrary_Deactivate (void)
 Deactivate the currently running mod. More...
 
int GameLibrary_GetCurrentGame (void)
 Return the ID for the currently active game. More...
 
int GameLibrary_GetGameCount (void)
 Returns the total amount of games currently available. More...
 
__variant GameLibrary_GetInfo (gameInfo_t infoType)
 Retrieves fields for the currently running game. More...
 
__variant GameLibrary_GetGameInfo (int gameID, gameInfo_t infoType)
 Retrieves fields for a given game. More...
 
void GameLibrary_DebugList (void)
 Prints debug info about the currently cached games to the console. More...
 

Variables

int g_iModInstallCache
 
string g_strModInstallCache
 
var int gameinfo_current = -1
 

Function Documentation

◆ GameLibrary_Activate()

void GameLibrary_Activate ( int  gameID)

Activate the specified game.

◆ GameLibrary_Deactivate()

void GameLibrary_Deactivate ( void  )

Deactivate the currently running mod.

Switching back to the base game.

◆ GameLibrary_DebugList()

void GameLibrary_DebugList ( void  )

Prints debug info about the currently cached games to the console.

◆ GameLibrary_GetCurrentGame()

int GameLibrary_GetCurrentGame ( void  )

Return the ID for the currently active game.

◆ GameLibrary_GetGameCount()

int GameLibrary_GetGameCount ( void  )

Returns the total amount of games currently available.

◆ GameLibrary_GetGameInfo()

__variant GameLibrary_GetGameInfo ( int  gameID,
gameInfo_t  infoType 
)

Retrieves fields for a given game.

See gameInfo_t for a list of fields you can query.

◆ GameLibrary_GetInfo()

__variant GameLibrary_GetInfo ( gameInfo_t  infoType)

Retrieves fields for the currently running game.

See gameInfo_t for a list of fields you can query.

◆ GameLibrary_Init()

void GameLibrary_Init ( void  )

Called when initializing the current game.

Does not cache custom game/mod info.

◆ GameLibrary_InitCustom()

void GameLibrary_InitCustom ( void  )

Called when you want to initialize custom games/mods.

Might want to call this later if the amount of locally installed mods is overwhelming.

◆ GameLibrary_Install()

void GameLibrary_Install ( int  gameID)

Install the specified game.

◆ GameLibrary_InstallProgress()

float GameLibrary_InstallProgress ( void  )

Returns a 0-100% value of game install progress, tracking across multiple packages.

◆ GameLibrary_IsInstalling()

bool GameLibrary_IsInstalling ( void  )

Returns true/false depending on if a Game installation is in progress.

Variable Documentation

◆ g_iModInstallCache

int g_iModInstallCache

◆ g_strModInstallCache

string g_strModInstallCache

◆ gameinfo_current

var int gameinfo_current = -1