Skip to main content

Item Pool

A weighted pool of items for shops

A pool of items that can be referenced by shop definitions. Pools allow grouping items with weighted random selection and limited/unlimited quantities.

Fields

FieldTypeDefaultDescription
itemsList<PoolItem>emptyItems in this pool with their weights and limits.
PoolItem (6)
FieldTypeDefaultDescription
itemVar<Item>—The item to give to the player.
weightDouble1.0Weight for random selection. Higher = more likely.
quantityInt1Quantity of this item given per purchase.
isLimitedBooleanfalseIf true, this item has a limited supply within the pool.
limitInt0Maximum available count for this item (only used when isLimited is true).
loreList<String>emptyCustom lore override for this pool item.
displayCountInt0Number of items from this pool to display in the shop. 0 means all.
limitedLoreString<yellow>Limited: <red>{limit}Lore line added to a limited item of this pool. {limit} is the quantity available. Supports color codes.Colors
unlimitedLoreString<yellow>UnlimitedLore line added to an item of this pool that has no limit. Supports color codes.Colors

How to use it​

Reference a pool from the itemPools field of a Shop Definition. Each pool item becomes a product shown after the shop's own items.

  • displayCount shows that many items, picked at random with weight. 0 shows them all.
  • A pool item is a fixed-price product with a price of 0, and its lore gets one closing line from isLimited and limit: limitedLore (default <yellow>Limited: <red>{limit}, where {limit} is the quantity available) or unlimitedLore (default <yellow>Unlimited). Both fields are set on the pool and accept color codes.
  • quantity, name and lore are the fields shown for it.
Display only

In the current release the buy and sell actions only handle the entries of items in the shop definition, so pool products are displayed but their buttons do not complete a transaction. Use items for anything players must be able to buy.