Player.h
From OPU Wiki
| Class member: | Description: |
| _Player(int) | (Do not use) |
| class _Player & operator=(class _Player const &) | (Do not use) |
| void AllyWith(int playerId) | Make player an ally. By default every player is an enemy |
| void CaptureRLV(int) | Captures this player's RLV, used in Plymouth campaign mission 12. (Not sure exactly how this function works) |
| void CenterViewOn(int tileX, int tileY) | Centers the player's view on these Map_Coordinates |
| int Difficulty( ) const | Returns the game difficulty setting (0=easy, 1=normal, 2=hard) |
| int FoodStored( ) const | Returns Tons of food stored (not counting food in trucks) |
| enum FoodStatus FoodSupply( ) const | Returns an enum showing if food supply is growing or not |
| class ScGroup GetDefaultGroup( ) | returns the default Group for this player. All units captured by spiders will go to this group: give it a SetRect to have captured units move towards a rect |
| int GetPlayerStrength(struct MAP_RECT &) | |
| int GetRLVCount( ) | Returns the number of RLV's this player has |
| int GetTotalPlayerStrength( ) | |
| void GoAI( ) | Creates a new set of rules specificly for AI players, which includes unlimited food and steady morale |
| void GoHuman( ) | Removes AI settings (if existing), and resets this player to human-player rules |
| void GoEden( ) | Use to make this an Eden player. Do not use in mid-game |
| void GoPlymouth( ) | Use to make this a Plymouth player. Do not use in mid-game |
| int HasTechnology(int techID) const | Use to check if this player has researched a certain tech already |
| int IsEden( ) | Returns 1 if this player is Eden, 0 if it is Plymouth |
| int IsHuman( ) | Returns 1 if this player is a Human-player, 0 if it has AI-Rules |
| int Kids( ) const | Returns number of children for this player |
| void MarkResearchComplete(int techID) | Use to set a research to completed. Can be used in InitProc, or mid-game to give a player a certain technology |
| enum MoraleLevels MoraleLevel( ) const | |
| int Ore( ) const | Returns Tons of common metals stored (not counting common ore/metals in trucks) |
| int RareOre( ) const | Returns Tons of rare metals stored (not counting rare ore/metals in trucks) |
| int Scientists( ) const | Returns number of scientists for this player |
| void SetColorNumber(int colorId) | Sets the color for this player: |
| void SetDefaultGroup(class ScGroup &) | Sets the default Group for this player |
| void SetFoodStored(int foodAmt) | Set initial food storage |
| void SetKids(int numKids) | Set initial number of children |
| void SetOre(int commonOreAmt) | Set initial common metals |
| void SetRareOre(int rareOreAmt) | Set initial rare metals |
| void SetScientists(int numScis) | Set initial number of scientists |
| void SetSolarSat(int numSats) | Set initial number of solar satellites |
| void SetTechLevel(int techLevelId) | Set initial techlevel (1~12) |
| void SetWorkers(int numWorkers) | Set initial number of workers |
| int Workers( ) const | Returns number of workers for this player |
| int canAccumulateOre( ) | Presumably returns if this player's common ore storage is not completely filled |
| int canAccumulateRareOre( ) | Presumably returns if this player's rare ore storage is not completely filled |
| int canBuildBuilding(int) | Presumably returns if this player can produce the specified structure kit |
| int canBuildSpace(int) | Presumably returns if this player can produce the specified starship module/satellite/launch vehicle |
| int canBuildVehicle(int) | Presumably returns if this player can produce the specified vehicle |
| int canDoResearch(int) | Presumably returns if the specific research topic is available for this player |
| int hasActiveCommand( ) | Returns if this player has an active command center |
| int hasVehicle(enum map_id,enum map_id) | |
| void resetChecks( ) | (Unknown/untested) |
Categories: Coding | SDK
