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
| Field | Type | Default | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
items | List<PoolItem> | empty | Items in this pool with their weights and limits.
|
| Field | Type | Default | Description |
|---|---|---|---|
item | Var<Item> | — | The item to give to the player. |
weight | Double | 1.0 | Weight for random selection. Higher = more likely. |
quantity | Int | 1 | Quantity of this item given per purchase. |
isLimited | Boolean | false | If true, this item has a limited supply within the pool. |
limit | Int | 0 | Maximum available count for this item (only used when isLimited is true). |
lore | List<String> | empty | Custom lore override for this pool item. |
displayCountInt0limitedLoreString<yellow>Limited: <red>{limit}unlimitedLoreString<yellow>UnlimitedHow 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.
displayCountshows that many items, picked at random withweight.0shows them all.- A pool item is a fixed-price product with a price of 0, and its lore gets one closing line from
isLimitedandlimit:limitedLore(default<yellow>Limited: <red>{limit}, where{limit}is the quantity available) orunlimitedLore(default<yellow>Unlimited). Both fields are set on the pool and accept color codes. quantity,nameandloreare 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.