Technology
Written by: Alian713, Kramb
1. xsResearchTechnology¶
Returning Type: bool
Prototype: bool xsResearchTechnology(int techId, bool force, bool techAvailable, int playerNumber)
Parameters:
int techId: The technology ID to research.bool force: Force researching the tech even if it is not enabled. To force an unavailable tech, the argumenttechAvailablemust be set to falsebool techAvailable: This flag determines if it is required to check if a tech is available before researching itint playerNumber: The player to research the technology for
Returns a boolean based on whether the technology was researched or not.
2. xsGetTechName¶
Returning Type: string
Prototype: string xsGetTechName(int techId, int playerId, bool internalName)
Parameters:
int techId: The tech to get the name forint playerId: The player to get the tech's name for- (Optional)
bool internalName: Returns the internal name of the tech if set.!#xs falseby default.
Returns the current name of the given tech for the specified player.
3. xsGetTechState¶
Returning Type: int
Prototype: int xsGetTechState(int techId, int playerId)
Parameters:
int techId: The tech to get the state forint playerId: The player to get the tech's state for
Returns one of the cTechState constants based on the tech's status