Vending Machine Devices

With this device you can make items available for purchase during games.

The Vending Machine is a device that can hold and spawn items, with an optional cost for each item. The Vending Machine can hold up to three items, and players can cycle between these by hitting the machine with their pickaxe. To add items to the Vending Machine, drop items in front of it while in Create mode.

The Vending Machine is one of several devices in Creative that spawns items — in this case, spawning them in front of the device when the player pays the cost. If the item was spawned by a player interacting directly with the device (as opposed to remotely), it will then be added to the player's inventory.

Finding and Placing the Device

Click image to enlarge.

  1. From Create mode, press the Tab key to open the Creative inventory window.

  2. Click the Devices tab and scroll to select the device. You can also use the Search box or the Categories panel on the left to find your device.

  3. Click PLACE NOW to place immediately, or put the device in the QUICK BAR to place later.

  4. Press Esc to return to your island in Create mode. Use your phone to position the device, then left-click to place it. Press Esc to detach the device from your phone tool.

  5. Point at the device with your phone. If the Customize popup doesn't open immediately, move closer until it does, then press E to open the Customize panel.

Adding Items to the Device

Adding items to the Vending Machine

  1. Stand in front of the Vending Machine.

  2. Press Tab to open the Creative Inventory. Click the tab for the type of item you want to add to the device. Locate the item and select it.

  3. Click Equip at the bottom of the screen. This equips the item to your Equipment Bar.

  4. Repeat the first three steps until you have equipped the three items you want to put in the Vending Machine.

  5. While still in the Creative Inventory, drag an item from your Equipment Bar into a blank area on the screen. This drops the item, and if you are in front of the device it will add that item to the device.

  6. Repeat the previous step for the other two items. You should see images of the three items cycling on the front display of the Vending Machine.

Device Options

This device has some basic functionality, and some more advanced functionality.

When placed, the Vending Machine is inactive. When an item is dropped onto it in Create mode, a preview of that item will appear on the screen. When the game starts, a player can interact with the device and it will spawn the item. By default, there is no cost for the item. The device can have up to three items at a time, and will show an error message if you try to add more.

You can configure this device with the following options.

Default values are bold.

Basic Options

Option

Value

Description

First Item Resource Type

Wood, Stone, Metal, Gold

Determines what type of resource the first item is purchased with.

Cost of First Item

No Cost, Pick a cost

Determines the amount of resources (defined in the First Item Resource Type option) the first item costs.

Second Item Resource Type

Wood, Stone, Metal, Gold

Determines what type of resource the second item is purchased with.

Cost of Second Item

No Cost, Pick an amount

Determines the amount of resources (defined in the Second Item Resource Type option) the second item costs.

Third Item Resource Type

Wood, Stone, Metal, Gold

Determines what type of resource the third item is purchased with.

Cost of Third Item

No Cost, Pick an amount

Determines the amount of resources (defined in the Third Item Resource Type option) the third item costs.

Bonus Ammo for Weapons

On, Off

If one of the items in the Vending Machine is a weapon, this determines whether or not the player is given bonus ammunition with the weapon.

Model

Default, Western, Modern, Screen Only

Determines the visual style of the Vending Machine.

All Options (Additional)

Option

Value

Description

Enabled at Game Start

Yes, No

Determines whether or not the Vending Machine is enabled at start of the game.

Interaction Time

Instant, Pick an amount of seconds

Determines how long the player needs to hold down the Interact control to purchase an item from the Vending Machine.

Channels

When one device needs to "talk" to another device, it does so by transmitting a signal on a specific channel. The receiving device needs to be set up to receive the signal on the same channel.

A channel is identified by a number, and channel numbers are customized for a device under the option that uses the channel. Most devices will also pass the identity of the player who triggered the device with the signal.

This device has receivers that perform a variety of functions when receiving a signal over a channel. Also, this device can transmit signals when certain conditions are met.

Receivers

Receivers listen for a channel and perform an action when they hear any device (including themselves) send a signal on that channel.

Option

Value

Description

Enable When Receiving From

No Channel, Pick a channel or enter a channel number

Enables the device when it receives a signal on the selected channel. This does nothing unless the device is Disabled.

Disable When Receiving From

No Channel, Pick a channel or enter a channel number

Disables the device when it receives a signal on the selected channel. A disabled Vending Machine enters a powered-down state, and players cannot interact with it, switch the current item, or buy an item.

Spawn Item When Receiving From

No Channel, Pick a channel or enter a channel number

When the device receives a signal on the selected channel, it spawns an item from the Vending Machine.

Cycle to Next Item When Receiving From

No Channel, Pick a channel or enter a channel number

When the device receives a signal on the selected channel, it cycles the screen to show the next item.

Transmitters

Transmitters send a signal on the selected channel when triggered.

Option

Value

Description

When Item Spawned Transmit On

No Channel, Pick a channel or enter a channel number

When an item is spawned from the Vending Machine, it transmits a signal on the selected channel.

Design Examples

Here are some examples of how you can use the Vending Machine device.

  • You can resize the Vending Machines.

  • You can use resources to purchase items.

  • You can Enable or Disable Vending Machines.

  • You can place multiple items in each Vending Machine.

Resizing Vending Machines

If you resize the Vending Machines, you can fit many Vending Machines into a smaller area, such as an equipment store.

You can also connect the size of the Vending Machine to the value of the items. You can stack smaller machines with less valuable items, and put more expensive items in larger machines.

Click image to enlarge.

Designer's Tip

If you are going to stack machines, or place them near each other, make sure that they are already filled with items. Trying to drop items into machines that are close to each other is difficult, because you might end up adding it to the wrong one.

Using Resources To Purchase Items

As a creator, you can adjust the cost of the items in a Vending Machine and use any kind of resource as a currency. For each item you can set Wood, stone, metal or gold as the currency used to pay for that item. For example, the first item can cost 50 wood, the second item can cost 100 stone, and the third item can cost 200 gold.

This gives you some interesting ways to control the resources on your island, and determines how valuable every type of resource is.

Enable or Disable Vending Machines

The Vending Machine can be disabled until a channel is activated. This effectively locks the machine until a criteria is met, or until the player performs a specific action. This is useful if you want to limit the player's access to items.

A disabled Vending Machine

  1. Place a Vending Machine device and customize the following options as shown below.

    • Enabled At Game Start: No

    • Enable When Receiving From: Channel 1

    • Disable When Receiving From: Channel 2

  2. By using other devices to send the appropriate signals, you can enable or disable the device from being used certain times during your game.

Designer's Tip

You can have Vending Machines become available when a player reaches a certain level, when they press a certain button, or even when they defeat a specific type of creature.

Multiple Items in Each Vending Machine

Each Vending Machine can sell up to 3 different items.

  1. To put three items into the machine, drop the items in order that you want them to be displayed.

  2. Next open the Customize panel and enter a price for each item using the Cost of First Item, Cost of Second Item and Cost of Third Item options. The price values range from No Cost to 999 of any resource. The type of resource used to buy an item is set in the Resource Type option for each item.

Cycling Vending Machine Video

A player can cycle through each item in the Vending Machine by waiting for a few seconds until the next item is shown, or by using their pickaxe to hit the machine. Each hit will show the next item that can be purchased.

Designer's Tip

You can include a text message for the player, using a HUD Message or Billboard device to remind them that they can hit the Vending Machine to cycle through all the available items that it can sell.

Gameplay Examples Using the Vending Machine