-
Notifications
You must be signed in to change notification settings - Fork 5
city_placeholders
These functions can be used as PLACEHOLDERS and FILTERS.
Some functions here may accept an argument. The brackets imply argument type, you do NOT include them when using the function.
-
<arg>
- A required parameter -
[arg]
- An optional parameter -
<arg1|arg2>
- Multiple parameters options -
<arg=value>
- Default or suggested value -
[-f flag]
- A optional command argument flag
Placeholders in a text, such as in a spreadsheet or message, are replaced with actual values.
{myFunction}
{functionWithArgs(123)}
{withNamedArgs(myArg: 123 otherArg: 456)}
({conditional}?{ifTrue}:{ifFalse})
9-({numericalFunction}+5)*3
Filters are used to modify a selection. i.e. When you are choosing which things to act upon or display, you use filters to narrow down the selection to ones that meet a certain requirement. When the return type is a string, the filter can be compared using regex to the value. When the return type is boolean (true/false), it will be resolved to either 1 or 0
#myBoolean,#myOtherTrueFalseFunction
(#myFunction=5||#myOtherFunction<10)
#textFunction=abc123,#regexFunction=efg.*
(#myFunction<(#myOtherFunction+5)
TERNARY: ?
- GREATER_EQUAL:
>=
- GREATER:
>
- LESS_EQUAL:
<=
- LESS:
<
- NOT_EQUAL:
!=
- EQUAL:
=
- PLUS:
+
- MINUS:
-
- MULTIPLY:
*
- DIVIDE:
/
- POWER:
^
-
CITY_ID
: City ID Example:12345
-
CITY_URL
: City URL Example:/city/id=12345
-
NATION
: Nation name, id, leader, url, user id or mention (see nation type) Example:Borg
-
*
: All cities
A google sheet url with one of the following columns is accepted:- city
cities
#getAgeDays - int
This command is public
Get city age in days
This command has no arguments
#getAgeMillis - long
This command is public
Get city age in milliseconds
This command has no arguments
#getBuilding - int
This command is public
Get building amount
Arguments:
<building>
- Building
A city building type
#getBuildingCost - Map<ResourceType,Double>
This command is public
Get the resource cost of buildings in the city
This command has no arguments
#getBuildingMarketCost - double
This command is public
Get the market cost of buildings in the city
This command has no arguments
#getCommerce - int
This command is public
Get city commerce
This command has no arguments
#getCreatedMillis - long
This command is public
Get city created date
This command has no arguments
#getCrime - double
This command is public
Get the crime in the city
This command has no arguments
#getDisease - double
This command is public
Get the disease in the city
This command has no arguments
#getFreeInfra - double
This command is public
Get the number of free infrastructure points in the city
This command has no arguments
#getFreeSlots - int
This command is public
Get the number of free building slots in the city
This command has no arguments
#getId - int
This command is public
Get city ID
This command has no arguments
#getInfra - double
This command is public
Get city infrastructure
This command has no arguments
#getLand - double
This command is public
Get city land
This command has no arguments
#getMMR - String
This command is public
Get city mmr
This command has no arguments
#getNation - DBNation
This command is public
Get nation of this city
This command has no arguments
#getNationId - int
This command is public
Get nation id of this city
This command has no arguments
#getNukeTurn - int
This command is public
Get the turns since last nuked, or 0
This command has no arguments
#getNukeTurnEpoch - int
This command is public
The turns since epoch this city was last nuked, or 0
This command has no arguments
#getNumBuildings - int
This command is public
Number of buildings in this city
This command has no arguments
#getPollution - int
This command is public
Get city pollution
This command has no arguments
#getPopulation - int
This command is public
Get the population of the city
This command has no arguments
#getPowered - Boolean
This command is public
Is city powered
This command has no arguments
#getPoweredInfra - int
This command is public
Get the amount of infrastructure powered by buildings
This command has no arguments
#getRequiredInfra - int
This command is public
Get the required infrastructure level for the number of buildings
This command has no arguments
#getResource - double
This command is public
Gets a resource amount from a map of resources
Arguments:
<resources>
- Map<ResourceType, Double>
A comma separated list of resources and their amounts
<resource>
- ResourceType
The name of a resource
#getResourceValue - double
This command is public
Gets the total resource value for a map of resources
Arguments:
<resources>
- Map<ResourceType, Double>
A comma separated list of resources and their amounts
#getRevenue - Map<ResourceType,Double>
This command is public
Get the profit of the city
This command has no arguments
#getRevenueValue - double
This command is public
Get the monetary value of the cities income
This command has no arguments
#getUrl - String
This command is public
Url of this city
This command has no arguments