Random Items Instead of Set Items?

I'm wondering how to go about making an RNG for multiple things in my game. So far I just want to add this to a fishing event, where the player would catch a random fish instead of just one (Which is all I have accomplished at the moment -,-..). I'm sure this doesn't require any scripting, but I just cant seem to figure it out.. It probably has to do with variables, which I have no idea how to use them.. I just recently figured out how switches work and made a little test quest, so bear with me ;-;..
Okay so, I have two ways of doing it. I think the best one is with common events.
If you do not know what are common events, feel free to ask !

Make an event for your chest, where you want on your maps. You can save time by doing the auto event process for a chest. We don't care for the loot, so make anything.
That done, supress in the event's page the line for the reward. We will do that later (it will be in the common event).
Insert before where was normally the reward, a line where you will call a common event, the one that will be the "chest rewarding random loot".

Now, let's create the common event in question.
Insert the line in it where you will be asking a variable a random number beetween 1 and 20 (for example, but you can make very very much more)
Then, you will have to create twenty lines, where you will call a conditionnal check to see the number of the variable for each. One for number one, another for number two, another for number three and again until you reach the number 20.

In each conditionnal line, you will insert the reward of your choice.

In the very end of the common event, you will insert a line where you will make the variable have the number 0.


Does this explanation help you ?
yes, it requires variables - as anything that goes farther than simple "go there" quests will require variables for counting or checking.

I suggest you search for the "variables guide" - that is a tutorial game intended to teach the use of variables. It is written in Ace, so there are a few differences to RM2K, but the basis for variables are mathematics, and those don't change with an editor. So you might have to search for where is what part in RM2K(3), but the mathematics of using variables will be the same.

(you can also follow the link to the starting point in my signature, the variables guide is linked there as well)

And sorry, but any try to explain random effects to you if you can't handle variables won't do you much good, it would be like trying to teach you how to dive when you don't know how to swim...
It's really simple to do it with variables on a fishing event.

You make an event for the fishing, then create a variable for this fishing event, then use the Control Variable command. Set it to random and choose a number for max and minimum random values.

If it's just a random value of the same item, you will just need to use the Change Items command just after the Control Variable in the same event page and add the variable you created for the fishing as the total sum of items.

Here is a screenshot example:
Spoiler
fishing1.png

fishing2.png

Now... If you want random items instead of random quantities, you will need to use a conditional branch for each item. So...

If variable fishing ( as in the screenshots above) is = 1:
You add the item Piranha
If variable fishing ( as in the screenshots above) is = 2:
You add the item Jellyfish

And so goes on...
Spoiler
fishing3.png

Original thread: https://forums.rpgmakerweb.com/threads/random-items-instead-of-set-items.78079/