Random Commander From File
Loads a player with a randomly selected commander from a specified file.
* This function reads a file ('User/commander/commander.txt') that contains a list of potential commander IDs or names.
* It selects one randomly to be used as the player's commander. If the file doesn't exist, or no valid commanders are found, a default commander ID (670972) is used.
* Can read the commander name and a multiverseID
* Lines that start with '#' are ignored
This commit is contained in:
@@ -18,6 +18,7 @@ typedef enum
|
||||
GAME_TYPE_RANDOM3,
|
||||
GAME_TYPE_RANDOM5,
|
||||
GAME_TYPE_RANDOMCOMMANDER,
|
||||
GAME_TYPE_RANDOMCOMMANDERFROMFILE,
|
||||
GAME_TYPE_HORDE,
|
||||
GAME_TYPE_SET_LIMITED,
|
||||
GAME_TYPE_STORY,
|
||||
|
||||
@@ -45,6 +45,7 @@ protected:
|
||||
Player * loadPlayerRandomThree(GameObserver* observer, int isAI);
|
||||
Player * loadPlayerRandomFive(GameObserver* observer, int isAI);
|
||||
Player * loadPlayerRandomCommander(GameObserver* observer, int isAI);
|
||||
Player * loadPlayerRandomCommanderFromFile(GameObserver* observer, int isAI);
|
||||
Player * loadPlayerHorde(GameObserver* observer, int isAI);
|
||||
Player * loadRandomSetLimited(GameObserver* observer, int isAI);
|
||||
Player * initPlayer(GameObserver *observer, int playerId);
|
||||
|
||||
Reference in New Issue
Block a user