shop_promotion
A shop discount promotion — misc entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | shop_promotion |
| Type | Misc |
| Color | Yellow |
| Icon | mdi:sale |
Description
A temporary promotion that applies a discount to shop items. When active, all items in the target shop (or specific items if specified) have their buy/sell prices reduced by [discountPercent]. Optionally bound to criteria (e.g., only active during events) and auto-expires after [durationSeconds] (0 = permanent until manually removed).
Fields
| Field | Type | Description |
|---|---|---|
targetShop | Ref<ShopDefinitionEntry> | The shop this promotion applies to. |
discountPercent | Double | Discount percentage (e.g., 20.0 = 20% off). Applied to both buy and sell prices. |
targetItemIndices | List<Int> | Specific item indices this promotion applies to. Empty = all items. |
criteria | List<@Contextual Criteria> | Criteria that must be met for this promotion to be active. |
durationSeconds | Long | Duration in seconds before this promotion auto-expires. 0 = permanent. |
createdAt | Long | Timestamp when this promotion was created (auto-set). |
Usage Example
- entry: shop_promotion
name: "A shop discount promotion"
targetShop: ""
discountPercent: 0
targetItemIndices: 0
criteria: []
durationSeconds: 0
createdAt: 0