STYGION Documentation Search the docs

The exchange

Items for items at a fixed rate, in the game's own trading window - a coin bank, say - opened by a command or a figure players click. New in 0.3, off by default.

Keystone 0.2.8 Updated 1 min read

The exchange

New in 0.3, module exchange, off by default. An exchange swaps items for items at a fixed rate in the game's own trading window, which every player already knows. Typical use: a coin bank that changes small coins for big ones and back.

Setting it up (exchange.toml)

#
  • items: the server's own items, the same lines as crates.items: obol minecraft:debug_stick model=74001 look=stygion:coin_obol colour=#e8dcc0 Obol | The ferryman's fare. An item with a look carries Keystone's mark, and only marked items are taken in, so a renamed copy is worth nothing.
  • trades: what each exchange swaps, a line each: <exchange> | <count> <item> -> <count> <item>, with ids from items or any game item id. bank | 8 obol -> 1 ember, bank | 1 ember -> 8 obol.
  • titles: the window's title per exchange (bank | &#ffca36&lBank), [en]…[cs]… allowed.
  • command: the command that opens it, /exchange [name] by default; write bank to make it /bank. A restart applies a new name.
  • figures: figures that open an exchange when clicked, kept standing by Keystone (put back if gone, moved back if pushed, never hurt, never picked up): bank | minecraft:overworld | 209.5 131.0625 43.5 | 69 | Banker (exchange, world, position, facing, name).
  • range: how near a figure of the same exchange the command works, in blocks; 0 works anywhere.

Every opening is a window of its own with nothing shared between players. Permission keystone.exchange (everybody by default). GET /v1/exchange (scope status.read) lists the exchanges and their trades.

Did this page help?

Opens the feedback panel with this page attached. It lands in the same queue as everything else.