Nuclide
Software Development Kit for id Technology
Achievements

Achievements, unlockables API reference. More...

Detailed Description

Achievements, unlockables API reference.

The Achievements API manages the retrieval, storage and networking of game achievements.

This is a work in progress.

Classes

struct  achievement_t
 Data for an achievement definition. More...
 

Functions

void Achievement_Set (string strName)
 Unlock an achievement. More...
 
void Achievement_Clear (string strName)
 Clear an achievement (development purposes mainly). More...
 
bool Achievement_Get (string strName)
 Returns whether or not an achievement has been achieved. More...
 
string Achievement_GetIcon (string strName)
 Get the icon of an achievement. More...
 
float Achievement_GetPercentage (string strName)
 STUB, returns how many other users achieved this. More...
 
void Achievement_IndicateProgress (string strName, int iCurrent, int iMax)
 Requests an overlay to be drawn. More...
 
bool Achievement_RequestStats (achievement_t *ptr, int count)
 Updates the achievement_t pointer with what's been achieved and what's not been achieved from a remote location. More...
 

Function Documentation

◆ Achievement_Clear()

void Achievement_Clear ( string  strName)

Clear an achievement (development purposes mainly).

Parameters
strNameThe name identifier of the achivement.

◆ Achievement_Get()

bool Achievement_Get ( string  strName)

Returns whether or not an achievement has been achieved.

Parameters
strNameThe name identifier of the achivement.
Returns
true when achieved, false if not.

◆ Achievement_GetIcon()

string Achievement_GetIcon ( string  strName)

Get the icon of an achievement.

Parameters
strNameThe name identifier of the achivement.
Returns
The URL or local file pointing to an image or icon.

◆ Achievement_GetPercentage()

float Achievement_GetPercentage ( string  strName)

STUB, returns how many other users achieved this.

Parameters
strNameThe name identifier of the achivement.
Returns
Normalized value between 0.0 - 1.0 indicating progress.

◆ Achievement_IndicateProgress()

void Achievement_IndicateProgress ( string  strName,
int  iCurrent,
int  iMax 
)

Requests an overlay to be drawn.

It indicates the progression towards a particular achivement.

Parameters
strNameThe name identifier of the achievement.
iCurrentThe current value of progress.
iMaxThe maximum value of progress.

◆ Achievement_RequestStats()

bool Achievement_RequestStats ( achievement_t ptr,
int  count 
)

Updates the achievement_t pointer with what's been achieved and what's not been achieved from a remote location.

Parameters
ptrPointer to an achievement_t array.
Returns
Will return false upon failure.

◆ Achievement_Set()

void Achievement_Set ( string  strName)

Unlock an achievement.

Parameters
strNameThe name identifier of the achivement.