public abstract class Templates
extends Object
This class provides a collection Templates that can be used in certain UI gadgets, such as the FormatTextGadget.
At runtime, these templates are parsed and their actual value is shown to the user.
The syntax is as follows: {template_name(param)}
.
I'm not 100% sure that this list is complete, but the most useful ones are certainly present.
Chats use a FormatTextGadget, so these templates can be used there.
,Nesting commands won't work properly.
,String arguments may be passed without quotes.
,The results of these function calls isn't stored anywhere,
so with every new screen refresh the functions are recalculated and might have a different value.
On top of that the result isn't necessarily the same for every player,
e.g. {playerName(-1)}
shows the nickname of the player looking at the text.
Modifier and Type | Method and Description |
---|---|
string |
aiDifficulty()
The current difficulty level, i.e.
|
string |
areaDebugText()
AI area debug text
|
string |
areaGroupDebugText()
AI area group debug text
|
string |
attackRouteDebugText()
AI attack route debug text
|
string |
baseDebugText()
AI base info text
|
string |
buildingPlacementDebugText()
AI BP debug text
|
string |
colorizeCost() |
bool |
configDefined(int configIndex)
True if the given config is defined.
|
string |
countdown()
Holds the text for the current countdown.
|
int |
currentPlayerNum()
The current player's number.
|
int |
currentPlayerTeam()
The current player's team.
|
int |
currentUnitArmor(int type)
The current unit's armor.
|
float |
currentUnitArmorFloat(int type)
The current unit's armor.
|
string |
currentUnitArmorList()
Shows the current armor values.
|
int |
currentUnitAttack(int type)
The current unit's attack.
|
float |
currentUnitAttackFloat(int type)
The current unit's attack.
|
string |
currentUnitAttackList()
The current unit's attack values.
|
int |
currentUnitAttackRange()
The current unit's range.
|
float |
currentUnitAttackRangeFloat()
The current unit's range.
|
string |
currentUnitAttackstring()
The current unit's attack possibilities, including bonuses.
|
string |
currentUnitAttackText(int type)
The current unit's attack values.
|
float |
currentUnitBounty(string type) |
float |
currentUnitBountyFactor(string type) |
int |
currentUnitBuildingWorkRate() |
float |
currentUnitBuildingWorkRateFloat() |
int |
currentUnitBuildPoints() |
float |
currentUnitBuildPointsFloat() |
int |
currentUnitBuildRate() |
float |
currentUnitBuildRateFloat() |
int |
currentUnitCapacity()
The current unit's capacity details, i.e.
|
int |
currentUnitCurrentAnimLength()
The current unit's animation length.
|
int |
currentUnitGatherRate(string resource)
The current unit's gather rate for the given resource:
Fish, Huntable, WildCrops, Herdable, Farm, Wood, Gaia Forest tree, Gold.
|
float |
currentUnitGatherRateFloat(string resource)
Same as
currentUnitGatherRate , but with float values. |
string |
currentUnitGatherRateString()
A string representation of the current gather rates of the selected unit.
|
int |
currentUnitGroup() |
int |
currentUnitHP()
The current unit's (starting) hit points.
|
float |
currentUnitHPFloat()
Same as
currentUnitHP , but with float values. |
int |
currentUnitID()
The current unit's (in-game) ID number.
|
string |
currentUnitIFFcolor()
Friend-foe colors?
|
int |
currentUnitInv() |
float |
currentUnitInvFloat() |
string |
currentUnitInvList() |
int |
currentUnitLogicalGroupID() |
string |
currentUnitLogicalGroupName() |
int |
currentUnitLOS()
The current unit's Line of Sight.
|
float |
currentUnitLOSFloat()
Same as
currentUnitLOS , but with float values. |
int |
currentUnitMaximumHP()
The current unit's maximum hit points.
|
float |
currentUnitMaximumHPFloat()
Same as
currentUnitMaximumHP , but with float values. |
int |
currentUnitMaxVelocity()
The current unit's speed (in m/s).
|
float |
currentUnitMaxVelocityFloat()
Same as
currentUnitMaxVelocity , but with float values. |
int |
currentUnitMinAttackRange()
The current unit's minimum attack range.
|
float |
currentUnitMinAttackRangeFloat()
Same as
currentUnitMinAttackRange , but with float values. |
string |
currentUnitName()
The current unit's name.
|
int |
currentUnitOwnerID()
The playerID of the player that owns the current unit.
|
string |
currentUnitPlayerIFF() |
float |
currentUnitRecharge()
The current unit's recharge time meter.
|
string |
currentUnitScenarioName()
The current unit's scenario name, as can be chosen in the
trUnitCreate() function. |
int |
currentUnitTrainPoints()
The current unit's train points.
|
float |
currentUnitTrainPointsFloat()
Same as
currentUnitTrainPoints , but with float values. |
string |
escrowDebugText()
AI escrow debug text
|
string |
FavorHelp()
Text on favor mouse over
|
string |
gamespeed() |
string |
gametime()
The current game time, in milliseconds if the configuration option
showMilliseconds is activated. |
string |
gameVersion()
Shows the current game version.
|
string |
GPRechargeTimeRemaining(int index) |
string |
kbArmyDebugText() |
string |
kbResourcesDebugText()
AI resources debug text
|
string |
kbunitDebugText(int unitID)
AI unit debug text
|
string |
kbUnitPickDebugText()
AI unit pick debug text
|
int |
marketBuy(string resourceType)
Current market buy rates
|
int |
marketSell(string resourceType)
Current market sell rates
|
int |
maxResource(string resourceType)
Maximum amount of a resource, used to display total availble favor (100 or 200).
|
int |
numGatherers(string resourceType)
The number of villagers currently working on the given resource type.
|
int |
numIdle(string protoUnit)
The number of units of given type that are idle.
|
string |
planDebugLines()
AI plan debug text
|
bool |
playerActive(int playerNumber)
Use -1 for current player
|
string |
playerAge(int playerNumber)
The current player's age, e.g.
|
string |
playerCivilization(int playerNumber)
The current player's civilization name.
|
string |
playerColor(int playerNumber)
The RGB-colorvalues of the current player.
|
string |
playerCulture(int playerNumber)
The current player's culture name.
|
string |
PlayerIDNameString() |
string |
playerName(int playerNumber)
The given player's nickname.
|
string |
PlayerNamestring(int playerNumber) |
int |
playerScore(int playerNumber)
The given player's score.
|
int |
playerTeam(int playerNumber)
The given player's team.
|
int |
playerTeamScore(int playerNumber)
The given player's team score.
|
int |
pop()
The current player's population in use.
|
int |
popcap()
The current player's population cap.
|
string |
populationHelp()
The population help text, showing #houses, #TCs etc.
|
string |
productID()
Your personal productID.
|
string |
progressionDebugText()
AI progression debug text
|
int |
resource(string resourceType)
The current amount of resources of the current player.
|
string |
techResearchName(int techID)
The string version of a given technology ID.
|
int |
techResearchPercentage(int techID)
The percentage the given technology ID is researched so far.
|
string |
techResearchPercentageText(int techID) |
int |
trainUnitPercentage(int unitID)
The percentage the given unitID is trained so far.
|
public string aiDifficulty()
public string areaDebugText()
public string areaGroupDebugText()
public string attackRouteDebugText()
public string baseDebugText()
public string buildingPlacementDebugText()
public string colorizeCost()
public bool configDefined(int configIndex)
public string countdown()
public int currentPlayerNum()
public int currentPlayerTeam()
public int currentUnitArmor(int type)
type
- public float currentUnitArmorFloat(int type)
type
- public string currentUnitArmorList()
AbstractVillager: Armor: Hack 25% Armor: Pierce: 35%
public int currentUnitAttack(int type)
public float currentUnitAttackFloat(int type)
public string currentUnitAttackList()
AbstractVillager: 8 Hack
public int currentUnitAttackRange()
public float currentUnitAttackRangeFloat()
public string currentUnitAttackstring()
public string currentUnitAttackText(int type)
public float currentUnitBounty(string type)
public float currentUnitBountyFactor(string type)
public int currentUnitBuildingWorkRate()
public float currentUnitBuildingWorkRateFloat()
public int currentUnitBuildPoints()
public float currentUnitBuildPointsFloat()
public int currentUnitBuildRate()
public float currentUnitBuildRateFloat()
public int currentUnitCapacity()
public int currentUnitCurrentAnimLength()
public int currentUnitGatherRate(string resource)
public float currentUnitGatherRateFloat(string resource)
currentUnitGatherRate
, but with float values.public string currentUnitGatherRateString()
public int currentUnitGroup()
public int currentUnitHP()
public float currentUnitHPFloat()
currentUnitHP
, but with float values.public int currentUnitID()
public string currentUnitIFFcolor()
public int currentUnitInv()
public float currentUnitInvFloat()
public string currentUnitInvList()
public int currentUnitLogicalGroupID()
public string currentUnitLogicalGroupName()
public int currentUnitLOS()
public float currentUnitLOSFloat()
currentUnitLOS
, but with float values.public int currentUnitMaximumHP()
public float currentUnitMaximumHPFloat()
currentUnitMaximumHP
, but with float values.public int currentUnitMaxVelocity()
public float currentUnitMaxVelocityFloat()
currentUnitMaxVelocity
, but with float values.public int currentUnitMinAttackRange()
public float currentUnitMinAttackRangeFloat()
currentUnitMinAttackRange
, but with float values.public string currentUnitName()
trUnitChangeName(string name)
.public int currentUnitOwnerID()
public string currentUnitPlayerIFF()
public float currentUnitRecharge()
public string currentUnitScenarioName()
trUnitCreate()
function.public int currentUnitTrainPoints()
public float currentUnitTrainPointsFloat()
currentUnitTrainPoints
, but with float values.public string escrowDebugText()
public string FavorHelp()
public string gamespeed()
public string gametime()
showMilliseconds
is activated.public string gameVersion()
public string GPRechargeTimeRemaining(int index)
index
- range: 0 - 3public string kbArmyDebugText()
public string kbResourcesDebugText()
public string kbunitDebugText(int unitID)
public string kbUnitPickDebugText()
public int marketBuy(string resourceType)
resourceType
- public int marketSell(string resourceType)
resourceType
- public int maxResource(string resourceType)
resourceType
- the type of resource, i.e. favor.public int numGatherers(string resourceType)
public int numIdle(string protoUnit)
public string planDebugLines()
public bool playerActive(int playerNumber)
public string playerAge(int playerNumber)
public string playerCivilization(int playerNumber)
trSetCivilizationNameOverride(long playerID, string civName)
.public string playerColor(int playerNumber)
public string playerCulture(int playerNumber)
public string PlayerIDNameString()
public string playerName(int playerNumber)
public string PlayerNamestring(int playerNumber)
public int playerScore(int playerNumber)
public int playerTeam(int playerNumber)
public int playerTeamScore(int playerNumber)
public int pop()
public int popcap()
public string populationHelp()
public string productID()
public string progressionDebugText()
public int resource(string resourceType)
resourceType
- public string techResearchName(int techID)
public int techResearchPercentage(int techID)
public string techResearchPercentageText(int techID)
public int trainUnitPercentage(int unitID)