Documentation

Race
in package

Provides methods to map race IDs to basic race properties.

Table of Contents

Constants

RACE_NAMES  = [RACE_NEUTRAL => 'Neutral', RACE_ALSKANT => 'Alskant', RACE_CREONTI => 'Creonti', RACE_HUMAN => 'Human', RACE_IKTHORNE => 'Ik\'Thorne', RACE_SALVENE => 'Salvene', RACE_THEVIAN => 'Thevian', RACE_WQHUMAN => 'WQ Human', RACE_NIJARIN => 'Nijarin']

Methods

getAllIDs()  : array<string|int, int>
All possible race IDs.
getAllNames()  : array<int, string>
Maps all possible race IDs to race names.
getHeadImage()  : string
Relative path to racial image file (portrait version).
getImage()  : string
Relative path to racial image file.
getName()  : string
getPlayableIDs()  : array<string|int, int>
Race IDs for playable races only. Practically speaking, this is the same as `getAllIDs` with the Neutral race excluded.
getPlayableNames()  : array<int, string>
Maps race IDs to race names for playable races. Practically speaking, this is the same as `getAllNames` with the Neutral race excluded.

Constants

RACE_NAMES

private mixed RACE_NAMES = [RACE_NEUTRAL => 'Neutral', RACE_ALSKANT => 'Alskant', RACE_CREONTI => 'Creonti', RACE_HUMAN => 'Human', RACE_IKTHORNE => 'Ik\'Thorne', RACE_SALVENE => 'Salvene', RACE_THEVIAN => 'Thevian', RACE_WQHUMAN => 'WQ Human', RACE_NIJARIN => 'Nijarin']

Methods

getAllIDs()

All possible race IDs.

public static getAllIDs() : array<string|int, int>
Return values
array<string|int, int>

getAllNames()

Maps all possible race IDs to race names.

public static getAllNames() : array<int, string>
Return values
array<int, string>

getHeadImage()

Relative path to racial image file (portrait version).

public static getHeadImage(int $raceID) : string
Parameters
$raceID : int
Return values
string

getImage()

Relative path to racial image file.

public static getImage(int $raceID) : string
Parameters
$raceID : int
Return values
string

getName()

public static getName(int $raceID) : string
Parameters
$raceID : int
Return values
string

getPlayableIDs()

Race IDs for playable races only. Practically speaking, this is the same as `getAllIDs` with the Neutral race excluded.

public static getPlayableIDs() : array<string|int, int>

Note: Some playable races may be excluded on a game-by-game basis by omitting racial HQ locations. See Game::getPlayableRaceIDs.

Return values
array<string|int, int>

getPlayableNames()

Maps race IDs to race names for playable races. Practically speaking, this is the same as `getAllNames` with the Neutral race excluded.

public static getPlayableNames() : array<int, string>

Note: Some playable races may be excluded on a game-by-game basis by omitting racial HQ locations. See Game::getPlayableRaceIDs.

Return values
array<int, string>

        
On this page

Search results