[Tutorial] How to fix the refilling/infinite chest bug in RPGmaker

Greetings

First of all, if you’re very new to using RPG Maker and want a quick introduction to using the software in general, you’ll want to check out my Introduction to RPG Maker VX Ace. Even if you are using RPG Maker 2003, it should be helpful.

In this article I’m going to explain how to fix a very common issue in RPGmaker. In this case, chests not staying empty after you open them. This issue is so common in fact that one of the Steam Trading Cards for RPGmaker VX Ace makes a joke about it (The “Unlimited Item Works” card if you’re curious).

The reason for this is that the only thing that the game remembers is the values associated with variables and switches. That means that, unless an event changes either a variable or a switch, that event will be repeated every time something triggers it.

In short, each chest needs to have a switch associated with it. The event governing the chest needs to do the following in order: Check if the chest has been opened, add the item to your inventory, show text telling you what was in the chest, and flip the switch from off to on.

This event should have two pages. The first page should look like this:

chest-tutorial-1

First notice that this page has no conditions, which means that by default, it will enact this page unless something tells it to enact the second page. Second, notice the contents window has three components: “Change Items [Potion] +5”, “Text: – – Normal, Bottom :Found 5 Potions”, and “Control Switches [0002:Chest 1] = ON”. This means that this page will add 5 potions to the player’s inventory, show text saying the player found 5 potions, and flip switch 0002, the switch associated with chest, into the ON position. Now we’re ready to deal with what happens when you come back to the chest a second time.

The second page of the event should look like this:chest-tutorial-2

Now, the first time interact with the chest, it will open and give you whatever item was inside it (in this case 5 potions), and the second time, the chest will look like it is already open, and you will see a message saying that it is empty. You can also leave the second page blank, so nothing will happen when the player interacts with it, but the second page has to exist, and has to exist so that the appearance of the chest will change and it will stop adding items to your inventory after it has been opened once.

Advertisements

2 thoughts on “[Tutorial] How to fix the refilling/infinite chest bug in RPGmaker”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s