Settings and Setup file
The different customization options this plugin offers.
Settings
Below are the links to each of the customizable features available in this plugin:
Setup
To add settings in a Vending Machine script call is very similar to how it's done in the Poké Market plugin.
- You no longer need to worry about the order of arguments (except for the item list, which should always come first).
- Here's how you'd define a Vending Machine event:
Each optional argument is explained below and in more detail on its corresponding Settings page.
speech: "string"
This lets you assign a specific Vending Machine Class to the event.
➡️See Vending Machine Class for more info.
type: "string"
This defines the "type" of items you can buy from the Vending Machine rather than make it say "What item do you want to buy", it could say "What drink do you want to buy" if you're only selling dinkable items.
discount: number
Use this to apply a discount by refering a Game Variable ID:
currency: "string"
Set which currency the Vending Machine should use. Valid default values:
"money"or"gold""coins""bp"or"battle points"
bonusChance: number
Set the chance the player has to receive a bonus item when buying 1 or more items from the Vending Machine. The higher the number, the higher the chance of getting a bonus item.
stuckChance: number
Set the chance the player has of an item getting stuck when buying 1 or more items from the Vending Machine. Not providing this setting will disable items getting stuck completely.
kickChance: number
Set the chance the player's kick will be successful upon items getting stuck in the Vending Machine. This setting is only used if a stuckChance was given as well, otherwise this setting has no effect.
multiBuy: { min: number, max: number }
Set the minimum and maximum amount of a same item the player can buy at once. By default this would be 1 at a time when not providing this setting at all. When not providing a minimum, the default is 1. Whene not providing a maximum, the amount will be the minumum.