Skip to main content

ShopDefinitionEntry

Typewriter Web panel: click Add Page, then use Search bar or + to create the entry with its exact identifier.

This entry is the central definition of a shop. Start with the “Overview” group, then add items and the layout. Advanced fields are only needed when the shop uses stock, taxes, views, or a submenu.

Overview and content

Exact fieldRole
titleDisplayed title.
rowsNumber of rows, from 1 to 6.
fillerItemItem used to fill empty slots.
priceLorePrice lore format.
itemsList of ShopItemConfig objects.
itemPoolsReferences to item pools.

Economy and taxes

Exact fieldRole
currencyCurrency type, including VAULT.
balancePlaceholderValue used to read the balance.
addCommandAdd command for a custom economy.
removeCommandRemove command for a custom economy.
taxRateTax rate.
taxModePER_TRANSACTION or PER_ITEM.
currencySymbolDisplayed symbol.
priceFormatPrice format.
defaultItemPriceList of ItemCost (item + quantity per unit) applied to every item in priceMode: ITEMS that declares no itemPrice of its own.

Barter — prices paid in items

An item whose priceMode is ITEMS is sold against one or several items instead of currency: "1 enchanted book for 12 copper ingots and 3 kelp".

Exact fieldWhereRole
priceMode: ITEMSShopItemConfigEnables barter for this item.
itemPriceShopItemConfigList of ItemCost: each line is an item plus a quantity per unit bought. Several lines are all required at once; buying N units multiplies every line.
defaultItemPriceShopDefinitionEntryFallback list for every ITEMS item without its own itemPrice. An item's list replaces the shop's, it is never added to it.
cannotAffordItemsMessageShopDefinitionEntryRefusal when items are missing. {missing} = "3 × Kelp, 12 × Copper Ingot", {amount} = quantity bought.

Rules enforced by the extension:

  • An ITEMS item with no price anywhere is refused and logged, never given away: an empty price is not a zero price.
  • The payment is simulated on the whole inventory before anything is removed; a refused purchase never consumes part of the price. Space for the bought item is checked before the withdrawal, since a barter has no refund.
  • A catalogue item is matched by its identity, not only by its material.
  • BUY_MAX buys as many units as the inventory can pay for.
  • An ITEMS item cannot be sold back for currency: its sell price is zero.

Show the price with the {item_price} token in priceLore, defaultLoreFormat or the item's lore: one line per requested item, - 12 × Copper Ingot. {buy} and {sell} lines are dropped on such an item.

Stock and reset

Exact fieldRole
resetNone, Cron, Interval, Daily, Weekly, or Monthly policy.
defaultRefreshTicksDefault interval.
perPlayerSeparates stock or state per player according to the service.
artifactPersistence reference.

Layout, views, and submenu

Exact fieldRole
layoutPoolGUI layouts used by the shop.
mainLayoutIdMain layout.
baseMenuIdParent GUI menu to inherit.
viewsShop views or tabs.
defaultViewIdDefault view.
contentX / contentYOrigin of the item area.
contentColumns / contentRowsDimensions of the item area.
subMenuLayoutIdQuantity submenu layout.
subMenuTitleSubmenu title.
interactionConfigAction-to-click type mapping.

In custom layout mode, ShopGuiService finds SHOP_ITEM markers, then inserts dynamic items and buttons. mainLayoutId must point to a real layout.

Limits and messages

Exact fieldRole
globalPlayerLimitGlobal per-player limit.
globalBuyLimitGlobal purchase limit.
globalSellLimitGlobal sale limit.
infoMessageInformation message.
cannotAffordMessageInsufficient balance.
cannotAffordItemsMessageMissing items on a priceMode: ITEMS purchase ({missing}, {amount}).
inventoryFullMessageFull inventory.
purchaseMessage / sellMessagePurchase or sale confirmation.
cannotSellMessage / notEnoughItemsMessageSale not possible.
noEconomyMessageEconomy unavailable.
criteriaFailMessageCriteria not met.
lockedItemMessageLocked item.
limitReachedMessageLimit reached.

Quantity dialogs

The fields buyAmountPrompt, sellAmountPrompt, amountConfirmButton, amountInputLabel, amountInputPlaceholder, amountInputWidth, amountInputMaxLength, and invalidAmountMessage customize BUY_CUSTOM and SELL_CUSTOM. Final validation requires a positive integer.

Display and notifications

defaultNameFormat and defaultLoreFormat define the default item rendering. notificationWebhookId identifies the webhook used by transaction notifications when configured.

Common error

If a shop opens but remains empty, check items, criteria, layoutPool, mainLayoutId, and SHOP_ITEM markers. If a button opens the menu but performs no transaction, check ShopButtonType, the action, and click permission.