Emberstore logoEmberstore

Dialog files

Change how the checkout, pay and error dialogs are laid out, from body elements and widths to buttons and sounds.

The three files in plugins/Emberstore/dialogs/ decide the structure of each checkout dialog: which parts appear and in what order, widths, columns, buttons and sounds. They hold no words. Every piece of text is a key into the language file, so colours and wording are changed in Messages and language.

The checkout picker dialog with each part labelled with the dialogs/checkout.yml key that controls it.
FileSectionsDialog
checkout.ymlpicker, confirmThe checkout dialog with several gateways, or with one
pay.ymlpayThe dialog with the payment link
error.ymlerrorThe dialog shown when the gateway refused

Keys every dialog has

KeyWhat it does
title-keyLanguage key of the title.
can-close-with-escapeAllow closing with Escape.
pausePause the game in single player. Leave false on servers.
after-actionWhat happens after a click: close, none or wait_for_response. none only works with pause: false. The picker and confirm use wait_for_response, so the player sees a waiting screen while the checkout is made, and Emberstore always answers.
open-soundSound played when the dialog opens, like BLOCK_AMETHYST_BLOCK_CHIME or minecraft:block.amethyst_block.chime. Empty for none. An unknown sound logs a warning and plays nothing.
bodyThe parts above the buttons, in order.

Body elements

body:
  - type: item
    show-decoration: false
    show-tooltip: true
    description-key: dialog.checkout.summary
    description-width: 240
  - type: item-lines
    width: 300
  - type: price-details
    width: 300
  - type: message
    text-key: dialog.checkout.choose
    width: 300
TypeShowsKeys
itemThe item with its tooltip, and a text beside itshow-decoration, show-tooltip, description-key, description-width
item-linesThe item's checkout-lines. Nothing if it has nonewidth
price-detailsOnly what applies: the discount line, the converted price line, the gift line, the quantity line and the fee linewidth
messageAny language key. Repeat it as often as you liketext-key, width

Add, remove and reorder elements freely. Widths are 1 to 1024. Out-of-range values are clamped with a warning, and an unknown type is skipped with a warning naming the file and position.

Picker and confirm

KeyInWhat it does
columnspickerColumns the gateway buttons use.
button-widthpickerWidth of each gateway button.
gateway-tooltip-keypickerTooltip on every gateway button.
cancelpickerFooter cancel button: enabled, label-key, tooltip-key, width.
yes, noconfirmThe pay and cancel buttons: label-key, tooltip-key, width.
inputs.codebothCode field: enabled, label-key, width, max-length (up to 32).
inputs.giftbothGift field: enabled, label-key, width, max-length (up to 16).
inputs.quantitybothQuantity slider: enabled, label-key, width.
updatepickerThe Apply button: enabled, label-key, tooltip-key, width.

An input only shows when its feature applies (codes exist, gifts are on, max-quantity is above 1), whatever its enabled says. Setting enabled: false hides it even then.

The gateway buttons cannot be turned off, a dialog without them would have no way to pay.

Pay and error

KeyInWhat it does
columnspayColumns the open and copy buttons use.
openpayThe Pay now button that opens the link: label-key, tooltip-key, width. Cannot be turned off.
copypayThe Copy link button: enabled, label-key, tooltip-key, width.
closepayFooter close button: enabled, label-key, tooltip-key, width.
buttonerrorThe Okay button: label-key, tooltip-key, width.

Placeholders in dialog text

PlaceholderValue
<item>The item's display name
<price>The price, in the main currency until a gateway is chosen, then in that gateway's currency
<category>The category's display name
<player>The buyer's name
<minutes>checkout.expire-minutes
<gateway>The gateway's name from the language file
<original>, <discount>Price before discounts, and the amount saved
<quantity>, <recipient>, <fee>Quantity, gift recipient, estimated fee
<currency>, <charge>, <base-price>, <base-currency>, <rate>In the converted price line
<reason>Why typed values were refused

Safe to experiment

A dialog file that cannot be read falls back to the built-in version of that dialog with a warning, so checkout never breaks. A missing key is taken from the built-in file. After a change, run /store admin reload and /store admin preview <picker|confirm|pay|error> to see it.

On this page