Chests giving Random Items

MisterTorgue

Explosioooooooons!
Veteran
Joined
Nov 4, 2014
Messages
324
Reaction score
49
First Language
Explosions!
Primarily Uses
So I know to create a variable that looks at numbers 1-10 or whatever, then create conditional branches that will say if 1 give item else 

branch 2 if 2 give item else... and so on

However is there anyway to create different chances for each? or can the specific chance % only be managed through scripts?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Yes and no - it is possible to give different chances by eventing in the same way as it is possible with scripting, it's just a lot more work.


Instead of making the conditional branch if 1 give item 1, make it if below 3 give item 1, if below 10 give item 2 and so on, giving a range of different numbers (and thereby a different chance) to each item.
 

Archduke

Jack of all Trades
Veteran
Joined
Jul 1, 2012
Messages
292
Reaction score
80
First Language
English
Primarily Uses
It could be done through events by setting the variable to a random number between 1 and 100 and then checking it, but depending on how many items for each chest and how many chests you have it could quickly grow out of proportion and be a little unmanageable.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
You can have the variable set to random between 1 and 100, and treat it as a percentage. So between 1 and 10 is basically 10%. Or a single number is a 1% chance.


All you have to do, is make a conditional branch for all of the possible options, and place them in the else branch of the previous conditional branch (using 'equal to or less than'). It's certainly do-able.


I suggest making a common event for this, and to call this common event in the chest event. If you want to make it really super random, create several common events, each with different items and different percentages. Say you have created 3 different 'randomized chest items' common events. Set a variable to random from 1 to 3 in the chest event. Create a conditional branch for each number (equal to), and have it call a different common event. Now you have a truly random chest ;)
 

Warpmind

Twisted Genius
Veteran
Joined
Mar 13, 2012
Messages
936
Reaction score
578
First Language
Norwegian
Primarily Uses
As an added surprise, make at least one of the results in the randomizer be a battle.
"What's in the chest?"
"...Teeth. Lots and lots of teeth. And a tongue. And it's staring at me... licking its, uh, lid?"

"Aws**t!"

;)
 

Patryk

Best in the World
Member
Joined
Jan 15, 2015
Messages
21
Reaction score
3
First Language
Polish
Primarily Uses
However is there anyway to create different chances for each? or can the specific chance % only be managed through scripts?
I was wondering setting specific % too, it would be really cool if there was an update or if in a new RPG Maker there would be an easy randomizing system just setting the % you'd like for each item. It would make everything a lot faster, and random generation overall is a very important and fun feature.
 

MisterTorgue

Explosioooooooons!
Veteran
Joined
Nov 4, 2014
Messages
324
Reaction score
49
First Language
Explosions!
Primarily Uses
Never thought about it that way, thanks guys, really helped :)
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
or you could try this: https://lescripts.wordpress.com/rgss3/chest-drop-randomizer/

However is there anyway to create different chances for each? or can the specific chance % only be managed through scripts?
Code:
Set variable to random (let's say 1-10)Conditional branch: If variable < 2  Add Item 1Else  Conditional Branch If variable < 4    Add Item 2  And so on
Here, Item 1 has a 1/10 chance while Item 2 has a 2/10 chance (because it will only be true for 2 and 3 since getting 1 will invoke Item 1 and it won't proceed to the next check)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top