Gw Temp


Tutorial - 'Flexibly Random Treasure Chests' by Guest

An item about RPGMaker 2000 posted on


A tutorial that shows how to make a chest that contains a randomly determined item.


Have you ever had the desire to make Treasure chests, completely random?

If no, then screw you, but since your'e already here shut up and read anways!

If yes, then you've come to the right place! You're good ol' buddy Animus is gonna tell you how!


Knowledge of how to make a treasure chest.
Knowledge of Variables.
Knowledge of common events.

Note: Generaly this is the part where I should be telling you to give me credit in your game, but seeing as how over half of you will never finish your game, and the rest will never give me credit when I ask for it... I'm not gonna say you need to put me in your credits, besides more names in credits = pain in the @$$.

Note: Please do not steal this tutorial and claim it as your own. It is written exclusively for and


Part 1: Creating the Random treasure table

1. Create a common event, and name it General Items Table.

2. Create a variable and call it "treasure number" or whatever you want to call it.

3. Set the variable equal to a random number between one and six. (This means that there will be six possible outcomes of the Chest, but this can be changed easily.)

4. Create one conditional branch for each possible outcome.

5. Within each different conditional branch, give the Hero's a different item.

Example code:
<>Variable Oper: [0001:Treasure number] Set, Rnd 1-6
<> Branch: Var [0001:Treasure number] is 1
<>Change Items: Potion 1 Add
<>Message: You got a Potion!
<>Play Sound: cow
: End
<> Branch: Var [0001:Treasure number] is 2
<>Change Money: 200 Add
<>Message: You got a 200 Gold!
<>Play Sound: cow
: End
<> Branch: Var [0001:Treasure number] is 3
<>Change Items: Stimulant 1 Add
<>Message: You got a Stimulant!
<>Play Sound: cow
: End
<> Branch: Var [0001:Treasure number] is 4
<>Change Items: High Potion 1 Add
<>Message: You got a High Potion!
<>Play Sound: cow
: End
<> Branch: Var [0001:Treasure number] is 5
<>Change Items: Miracle Potion 1 Add
<>Message: You got a Miracle Potion!
<>Play Sound: cow
: End
<> Branch: Var [0001:Treasure number] is 6
<>Change Items: Antidote 1 Add
<>Message: You got an Antidote!
<>Play Sound: cow
: End

Ta Da! You've now created an easy to call common event that gives your hero a random item.

Part 2 : Installing the Random treasure table

1. Go to your treasure chest or what-ever you're getting the item out of, and instead of giving an item, just call that common event!

*BAM* There you have a random treasure chest!
Now, about now you're probably asking, "Well that's great Animus, but what if I want a more random treasure chest?"
Well friend, I'll tell you...

Part 3 : Making your random treasure chest... Spiffy!!!

Now I will go over (in passing) ways to make your treasure chest more spiffy.

Multiple random treasure tables:

This one is fairly simple, just create more than one common event for treasure tables, and link them together. For example, make one first table, that you always go to, and then make six more tables with more specific items, like weapons, scrolls, etc.

With multiple random treasure tables, you could also just skip straight to a table. This is useful for items that you don't want to build up. (IE--Items that raise hero stats or something)

Increasing the number of possible outcomes:

This too, is fairly simple. Merely change the possible number of outcomes on the variable, then change the number of conditional branches you have to match.

Creating multiple levels of treasure:

1. Create another variable named Treasure-level.
2. Create a conditional branch, for each level of treasure you wish to have.
3. Put the treasure table you already made into each one, and make the items rarer, and better as the level get's higher.
4. Whenever calling the treasure event at the treasure chest, be sure to set the Treasure-level variable to match the level of treasure you want.

Trapped Chests:

The possibilities for trapped chests are endless, one of my favorite things to do, is make a table that is all trapped, except for one--This one is the only way to get a roll on a high level table such as Super-rare items table, or Artifacts table. O.o

Note: Due to the volatility of Trapped chests, it may be best to wait until later in the game to place some.


If you have comments, suggestions, or requests for tutorials, then please E-mail me at

~~Animus Blackstar
August 10th, 2004