Skip to content

treasure_placeholders

test edited this page Aug 14, 2024 · 23 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: ^

treasure Selectors

  • TREASURE: One of the entity values Example: Sutton Hoo Helmet, Warren Cup, Onyx, Amethyst, Tourmaline, Statue of David, Ain Sakhri Lovers, Terracotta Army, Vergulde Draeck, Mona Lisa, Mexican Codex, Sapphire, Smoky Quartz, Akan Drum, El Dorado, Holy Grail, Admonitions Scroll, Hammurabi's Code, Liberty Bell, Honjo Masamune, James Ossuary, Ruby, Citrine, Pillar of Ashoka, Diamond, Rosetta Stone, Kakiemon Elephants, Hoa Hakananai'a, Cymophane, Emerald

Sheet Columns

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


Placeholders


#getBonus - int

This command is public

Revenue bonus of this treasure (1% = 1)

This command has no arguments


#getColor - NationColor

This command is public

Color of this treasure (if any)

This command has no arguments


#getContinent - Continent

This command is public

Continent of this treasure (if any)

This command has no arguments


#getDaysRemaining - long

This command is public

Days remaining until this treasure respawns

This command has no arguments


#getId - int

This command is public

ID of this treasure

This command has no arguments


#getName - String

This command is public

Name of this treasure

This command has no arguments


#getNation - DBNation

This command is public

The nation holding this treasure

This command has no arguments


#getNation_id - int

This command is public

Id of nation holding this treasure

This command has no arguments


#getNationsInRange - Set<DBNation>

This command is public

Get the nations that are in range of this treasure

Arguments:

<maxNationScore> - double A decimal number


#getNumNationsInRange - int

This command is public

Get the number of nations that are in range of this treasure

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


#getSpawnDate - long

This command is public

Date this treasure spawned (epoch milliseconds)

This command has no arguments


#getTimeUntilNextSpawn - long

This command is public

Time in milliseconds until this treasure respawns

This command has no arguments


Clone this wiki locally