Nuclide
Software Development Kit for id Technology
Mod Server

Remotely available modifications, addons control/install functions. More...

Detailed Description

Remotely available modifications, addons control/install functions.

The ModServer API manages the retrieval of custom game info (usually modifications) into the Game Library.

This is kept separate, in case where connections to remote sources is disallowed.

Functions

void ModServer_Refresh (void)
 Call this to initiate a lengthy process of updating the list of mods we can install in the custom game menu. More...
 
void ModServer_ParseList (string data)
 Function that interprets a mod-list. More...
 
void ModServer_ParseItem (string data)
 Function that interprets a mod-item entry. More...
 
void URI_Get_Callback (float id, float code, string data, int resourcebytes)
 Called as an eventual result of the uri_get builtin. More...
 

Macros

#define MODSERVER_REQ_LIST   100
 uri_get callback id for mod-list retrieval More...
 
#define MODSERVER_REQ_ITEM   101
 uri_get callback id for mod-item retrieval More...
 
#define MODSERVER_REQ_PKGNAMES   102
 uri_get callback id for mod package name retrieval More...
 
#define ModServer_URI_Callback   URI_Get_Callback
 

Variables

var int g_iModServerLoading
 
var int g_iModServerReqCount
 

Function Documentation

◆ ModServer_ParseItem()

void ModServer_ParseItem ( string  data)

Function that interprets a mod-item entry.

ModServer_URI_Callback calls this when retrieving a MODSERVER_REQ_ITEM description. We then allocate a new mod entry in our mod-list and fill it with the data supplied.

Parameters
dataThe data string that will fill up a newly allocated entry.

◆ ModServer_ParseList()

void ModServer_ParseList ( string  data)

Function that interprets a mod-list.

ModServer_URI_Callback calls this when retrieving a MODSERVER_REQ_ITEM description. Will in return call uri_get with code MODSERVER_REQ_ITEM on every game dir we don't have installed locally. Thus filling the mod list with entries we can install.

Parameters
dataWhite-space separated list of unique mod game directory names.

◆ ModServer_Refresh()

void ModServer_Refresh ( void  )

Call this to initiate a lengthy process of updating the list of mods we can install in the custom game menu.

◆ URI_Get_Callback()

void URI_Get_Callback ( float  id,
float  code,
string  data,
int  resourcebytes 
)

Called as an eventual result of the uri_get builtin.

Macro Definition Documentation

◆ MODSERVER_REQ_ITEM

#define MODSERVER_REQ_ITEM   101

uri_get callback id for mod-item retrieval

◆ MODSERVER_REQ_LIST

#define MODSERVER_REQ_LIST   100

uri_get callback id for mod-list retrieval

◆ MODSERVER_REQ_PKGNAMES

#define MODSERVER_REQ_PKGNAMES   102

uri_get callback id for mod package name retrieval

◆ ModServer_URI_Callback

#define ModServer_URI_Callback   URI_Get_Callback

Variable Documentation

◆ g_iModServerLoading

var int g_iModServerLoading

◆ g_iModServerReqCount

var int g_iModServerReqCount