- Joined
- Jan 9, 2022
- Messages
- 395
- Reaction score
- 368
- First Language
- English
- Primarily Uses
- RMMZ
Hi, everyone. For background, I am very new to RPG Maker (just bought MZ before Christmas) and I am trying to learn everything I can do with the Basic Engine before delving into Plugins. I have no programming background and I don't know how to use Scripts. That is also on my list of things to explore/learn. So I am experimenting with achieving things based on my still very limited knowledge.
Now, I want to be able to create a Common Event (CE) that can be used a set number of times to randomly determine a result. Once the number of times is reached, the CE wouldn't be called anymore.
Imagine a CE that is called to randomly select a result of 1-4. Each number is a different result. Each time you call the CE, if a number has previously been set with a result, there has to be a re-roll until all 4 results have occurred. I can think of many different ways to use something like this with many different random ranges, but to test the functionality, I wanted to make a CE where the player would be transported to 4 different locations, depending on the result of the CE roll.
So I made a simple crossroads map and created the CE to randomly determine the transport to 4 different locations. Then, on the map, at each exit, I had the Transfer Event call the CE. After much trial and error using variables and self switches, I was able to make something and successfully test it. It seems to work as intended. Each exit from the map transfers the player to a different random location and the results become repeatable. Meaning that if you go North the first time, where you go is initially randomly determined but if you go back to that same exit, you will arrive at the same place that you initially did. The same is true for each exit from the map. Random the first time, then repeatable. So in the end, the 4 exits on the map end up taking you to the 4 locations, it is just that how you got to each location was randomly determined. No exits take you to the same location.
My question is: Is there an easier way to do something like this concept using Scripts or Plugins?
Here are some screenshots that I think will show what I did.




In the transfer event, pages 3-5 are similar to page 2, just with a different switch and different transfer location.
I hope the screenshots adequately show what I did. I am thinking there must be an easier way to do randomization of things, but I haven't stumbled across it yet.
Thanks for any suggestions.
EDIT: I should have also included asking if there is an easier way to do with without Scripting or Plugins too? I did it the only way I could figure out. Maybe there is an easier way.
Now, I want to be able to create a Common Event (CE) that can be used a set number of times to randomly determine a result. Once the number of times is reached, the CE wouldn't be called anymore.
Imagine a CE that is called to randomly select a result of 1-4. Each number is a different result. Each time you call the CE, if a number has previously been set with a result, there has to be a re-roll until all 4 results have occurred. I can think of many different ways to use something like this with many different random ranges, but to test the functionality, I wanted to make a CE where the player would be transported to 4 different locations, depending on the result of the CE roll.
So I made a simple crossroads map and created the CE to randomly determine the transport to 4 different locations. Then, on the map, at each exit, I had the Transfer Event call the CE. After much trial and error using variables and self switches, I was able to make something and successfully test it. It seems to work as intended. Each exit from the map transfers the player to a different random location and the results become repeatable. Meaning that if you go North the first time, where you go is initially randomly determined but if you go back to that same exit, you will arrive at the same place that you initially did. The same is true for each exit from the map. Random the first time, then repeatable. So in the end, the 4 exits on the map end up taking you to the 4 locations, it is just that how you got to each location was randomly determined. No exits take you to the same location.
My question is: Is there an easier way to do something like this concept using Scripts or Plugins?
Here are some screenshots that I think will show what I did.




In the transfer event, pages 3-5 are similar to page 2, just with a different switch and different transfer location.
I hope the screenshots adequately show what I did. I am thinking there must be an easier way to do randomization of things, but I haven't stumbled across it yet.
Thanks for any suggestions.
EDIT: I should have also included asking if there is an easier way to do with without Scripting or Plugins too? I did it the only way I could figure out. Maybe there is an easier way.
Last edited: