Here's the tutorial for a simple randomizer. It can be used if you want a chest to contain a random item, if you want your character to learn a random ability or whatever you want, but, for this tutorial, I'll teach you to create a chest that gives random items.
1 - Open the common events tab in the database and double click the empty line to show the event commands:
2 - Click "Control Variables", create a variable and check these options:
3 - According to the percentage you want and the number of items/abilities, choose two values. To keep it simple, I'll use 1 and 4 and it'll be 4 items, 25% for each item. Click OK:
4 - Now create conditional branches like this, create as many as the higher number you chose in the step #3, the constant in each branch should be equal to the branch's corresponding number (it may seem confusing now, but you'll understand it later):
5 - The common event should look similar to this:
6 - Create a chest or something to give you an item. Double click the chest to open the event editor, open the event commands and click "Common Event". Select the common event you just created:
7 - And it's done. The final randomizer event should look like this:
Good luck!
本贴来自国际rpgmaker官方论坛作者:Shenic处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/simple-randomizer.54008/