Random Chest Event & Reset

This is likely one of the most wanted things people have been looking for.


Step 1:


You need to make these two switches.  I chose 6 and 7 but they can be whatever you want.  


**Note switch 7: I want to set this up so I can set up this up like a tutorial event the 1st time the chest is opened**


Switches.JPG


Step 2:


You need to make a control variable.


 Variable.JPG


**Note that I made this count a random number between 1 to 100**


**It can be 1 - 300 or 1-1000 whatever you want it to be**


Control Variable.JPG


Step 3 A:


This is what I set up:


Use a condition branch of the variable 


In this example if the random number is equal to less than or greater than 10.


Conditional Branch.JPG


Which now shows in the area I circled


The text is used as a first time opened tutorial letting you know what the chest does.


I will set it up where this shows only one time then goes away.


Step 3B:


Look at the conditional branch that I showed you in Step 3A.


So from this you can see that the 1st time you open the chest you'll get a quick message then


if the Red Chest #1 Event rolls a number Equal to or less than 10.  You'll get a potion.


I also turn on the switch shown in Step 1: Check Chest 1st Time.


1st Page.JPG


Step 4:


You need to make a conditional branch in the else branch of the last conditional branch using the same variable higher than 10. As shown in Step 3B just under where I circled.


In this case I chose 20.  Then follow the steps that gives an item.  In this case if the random number is equal or less than 20.  You get whatever item that you put as a reward.


**Note that you will need to place the same switches in each conditional branch.  It would be best if you copy the 1st conditional branch into the else branch then


change the variables, reward and text.


Step 4.JPG


Step 5:


It should be easy now.  You can make a conditional branch so it will be equal to or less than 30 or 40 whatever and follow the same steps.


Just make sure you put each conditional branch into the else of the last one you created.


Step 6:


Okay you're making progress.  This is the part where you don't want the same message to pop up each time you open the chest and you don't want people to spam


the chest pulling out random items of your choosing at will.


So you make this page.  Note that you see the required switch to see this.  Check Chest 1st time.


That should kill the 1st page for good.


2nd Page.JPG


Step 7:


Ofcourse, you didn't want to eliminate the chest from giving out items. so copy and paste the event of the 1st page.


You'll have to do some editing.


1st you elimate the tutorial test. Also the switch Check Chest 1st Time


Also look at the required switch Red Chest Reset(This should keep people from spamming the chest).  Also note that you have to turn that of on each conditional branch made.


3rd Page.JPG
 


Step 8:
This is an event you can put on the ground without any graphic.  You just want to make sure people step on it.  You see it turns on the Red Chest Reset switch.


You could put up a message like to go back and check the chest again.  But I prefer not letting them know.  Or atleast let them figure it out themselves.


This will reset the event to page 3 of the Random Red Chest event.


Reset Chest.JPG


And there you have it.  Post or message me if you have any questions.

1st Page.JPG
Looks great! I'll hopefully implement this into a future game
But what if someone has figured out where the touch event is to reset the chest, and then all they have to do is walk over to that spot, reset the chest, and they can spam it over and over again. I know it is highly unlikely for something like that to happen, but I for one look for any exploits used in video games to ensure that I myself don't end up making a game with some that are game breaking like this one. If I may make a suggestion, to insert a self switch onto the event that resets the chest, and then clears itself, so that the reset event only works once.
But what if someone has figured out where the touch event is to reset the chest, and then all they have to do is walk over to that spot, reset the chest, and they can spam it over and over again. I know it is highly unlikely for something like that to happen, but I for one look for any exploits used in video games to ensure that I myself don't end up making a game with some that are game breaking like this one. If I may make a suggestion, to insert a self switch onto the event that resets the chest, and then clears itself, so that the reset event only works once.



Yeah but what you have to do is make it far enough away and/or not give a prize so great that it's not worth the time/effort to keep spamming it.  But if you plan on using it for something really good.  Make them have to travel far away to reset it.  Or make it really hard for them to find the reset point.

Original thread: https://forums.rpgmakerweb.com/threads/random-chest-event-reset.55378/