Skip to content

taxbracket_placeholders

test edited this page Aug 14, 2024 · 9 revisions

This page contains a list of functions that can be used as PLACEHOLDERS and FILTERS

About Arguments

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

About Placeholders

Placeholders in a text, such as in a spreadsheet or message, are replaced with actual values.

Examples:

  • {myFunction}
  • {functionWithArgs(123)}
  • {withNamedArgs(myArg: 123 otherArg: 456)}
  • ({conditional}?{ifTrue}:{ifFalse})
  • 9-({numericalFunction}+5)*3

About filters

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

Examples:

  • #myBoolean,#myOtherTrueFalseFunction
  • (#myFunction=5||#myOtherFunction<10)
  • #textFunction=abc123,#regexFunction=efg.*
  • (#myFunction<(#myOtherFunction+5)

Operators

  • TERNARY: ?
  • GREATER_EQUAL: >=
  • GREATER: >
  • LESS_EQUAL: <=
  • LESS: <
  • NOT_EQUAL: !=
  • EQUAL: =
  • PLUS: +
  • MINUS: -
  • MULTIPLY: *
  • DIVIDE: /
  • POWER: ^

taxbracket Selectors

  • TAX_ID: Tax Bracket ID Example: tx_id=12345
  • ALLIANCE: Alliance id, name, url or mention (see alliance type) Example: AA:Rose
  • *: All tax brackets in this guilds alliances, else all tax brackets

Sheet Columns

A google sheet url with one of the following columns is accepted: id


Placeholders


#countNations - int

This command is public

Count the number of nations in this tax bracket

Arguments:

[filter] - NationFilter A comma separated list of filters (can include nations and alliances)


#getAlliance - DBAlliance

This command is public

The alliance object for this bracket

This command has no arguments


#getAlliance_id - int

This command is public

The alliance id this bracket belongs to, else 0

This command has no arguments


#getId - int

This command is public

Id of the tax bracket

This command has no arguments


#getMoneyRate - int

This command is public

Money tax rate

This command has no arguments


#getName - String

This command is public

The name of this tax bracket

This command has no arguments


#getNationList - NationList

This command is public

The list of nations currently in this bracket

Arguments:

[filter] - NationFilter A comma separated list of filters (can include nations and alliances)


#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


#getRssRate - int

This command is public

Resource tax rate

This command has no arguments


#getTaxRate - TaxRate

This command is public

Tax rate object

This command has no arguments


#getUrl - String

This command is public

Url of this tax bracket in-game

This command has no arguments


Clone this wiki locally