That still doesn't help me. I have to know how to set up the branches and variables to make it work. The order and stuff. I'm not scripting. I'm using Rpg Maker itself.
RPG Maker's event system is a form of scripting, which is a form of programming. It's different levels of complexity, but all the same process. The "order and stuff"
is the pseudo-code, that's the point.
- I got 99 things handed to me, so I need to keep track of that number.
Input Number into variable 1.
- I'm going to give back a random number of this other item. I need to randomly decide how many...I say 41! But now I have to take that out of the 99 so I'm keeping track of how many things to give back.
Script: $gameVariables.setValue(2, Math.randomInt($gameVariables.value(1)) + 1;
Change Items glass, variable 2
Control Variables variable 1 sub variable 2
- Do I still have more stuff to give back? Yes!
Conditional Branch variable 1 > 0
So I'll give back a random number of this other item...I say 33! Now I have to take that out of the 58 (which was 99 at the beginning), so I'm keeping track of how many things to give back.
Script: $gameVariables.setValue(2, Math.randomInt($gameVariables.value(1)) + 1;
Change Items crystal, variable 2
Control Variables variable 1 sub variable 2
- Do I still have more stuff to give back? Yes!
Conditional Branch variable 1 > 0
So I'll give back a random number of this other item...I say 25! Now I have to take that out of the 25 (which was 99 at the beginning), so I'm keeping track of how many things to give back.
Script: $gameVariables.setValue(2, Math.randomInt($gameVariables.value(1)) + 1;
Change Items diamond, variable 2
Control Variables variable 1 sub variable 2
- Do I still have more stuff to give back? Nope, I'm done!
Conditional Branch variable 1 > 0
Then you get into how you want your system to work. If you always want to give those three items, then you'd get rid of the last two conditionals and just dump the remainder of variable 1 into diamonds.
If you want to have 1-3 (or however many) items, you might put it into a loop instead of using a bunch of conditionals.
If you want items weighted, you'd change that in the random functions, so you set the minimum number of glass to be one third of the items you were originally given, or whatever you want.