Token

Some requests return token objects.

Attributes

  • int id: The unique identifier for this token. Each token type has its own identifier. For example, all trees have the same identifier. There is a separate request which provides a dictionary/database that these identifiers can match to. See Token Database.
  • string coordinate: The coordinate of the token.

Fields

  • param: Sometimes a token have specific setting, or configuration
    With Attribues:

    • string name: The name.
    • mixed value: The value.

Example

Example for a power reflector:

There are 12 units of power being directed to two targets, one of which is the power reactor below. The reflector can be configured by radio on 99.7mhz frequency. And is not locked from user edits.

...
<token id="4" coordinate="127:124:I">
  <param name="current" value="12" />
  <param name="frequency" value="99.7mhz" />
  <param name="target" value="120:103:I" />
  <param name="target" value="120:109:I" />
  <param name="locked" value="false" />
</token>
...

Example for a power reactor:

There are 4 units of power being produced by this reactor at this moment, this power is being directed to a token at position 124:106:I. The reactor can be configured by radio on 99.2mhz frequency.

...
<token id="13" coordinate="120:103:I">
  <param name="output" value="4" />
  <param name="frequency" value="99.2mhz" />
  <param name="target" value="124:106:I" />
</token>
...