Discounts
How to add an apply discounts to items.
This feature allows you to apply discounts to all items in a store.
Currently, there's no way to exclude specific items - but that migiht change in the future.
To enable discounts, add discount: followed by a Game Variable ID.
You can set up discounts in three ways:
First way - Game Variable + Array
Use a Game Variable and assign it an array of percentage values (e.g., 4 = 4% discount).
27is the Game Variable ID.- The array values are used base on the variable's value (treated as an index).
| Game Variable | Discount Used |
|---|---|
| 0 | 0% |
| 1 | -1% |
| 2 | -4% |
| 3 | -7% |
| 4 | -11% |
HintEach value in the array is accessed by index. If the variable is set too high and the index doesn't exist, you'll be warned in-game.
Second way - Item + Game Variable(s)
You can combine an item requirement with one or more Game Variables.
- Player must have the
:COUPONAitem. - Each key (
26,28) is a Game Variable ID. - Negative values are allowed - they result is overcharges.
Example for Variable 26:
| Game Variable | Discount Used |
|---|---|
| 0 | 0% |
| 1 | -3% |
| 2 | -6% |
| 3 | -8% |
| 4 | -10% |
Example for Variable 28 (Overcharges):
| Game Variable | Overchage Used |
|---|---|
| 0 | 0% |
| 1 | +2% |
| 2 | +5% |
You can combine discount and overcharge values - just be careful not to duplicate the same Game Variable ID under the same item, or you may get unpredictable results.
Example - Scaling Discounts and Overcharges
Or with an item requirement:
This lets you gradually reduce a player's discount the more they do something (e.g. blacking out), and eventually start overcharging.
- Player must have the
:COUPONBitem. - Each key (
29) is a Game Variable ID.
| Game Variable | Discount/Overcharge Used |
|---|---|
| 0 | -10% |
| 1 | -8% |
| 2 | -6% |
| 3 | -4% |
| 4 | -2% |
| 5 | 0% |
| 6 | +2% |
| 7 | +4% |
| 8 | +6% |
| 9 | +8% |
| 10 | +10% |
| 11 | +12% |
Third way - Direct Value Use
This method skips the array setup and uses the Game Variable's actual value as the discount or overchage.
So discount: 30 will directly pull the value of Game Variable 30.
- 10 = 10% discount
- -5 = 5% overcharge
- 0 = no change
This gives you more flexibility and lets you reuse the same variable across different Mart events.

















