I'm trying to set up a common event for an Item, the item is a special chest. What i want the common event to do is to randomly give me an item when I use the special chest. I just don't know how to go about setting it up
I know there is a way to do this because i remember playing a sword art online game to where when you clicked the floating crystal you had to pay col (game currency) for it to randomly give you an item.
I'm not sure if it was done through common event or just a regular event but i believe since I need it for an Item and not an event i would need to do it through common event. Any and all help is appreciated. Ty in advance.
Control variable to a random number between # and # (however many possible items you put in the chest).
Seperate conditional branches equal to each possible number outcome with their items.
ty that worked, i forgot to ask though, is there a way to give it a certain chance of obtaining an item such as
example:
Bait 35% chance of obtaining
Rock 20% chance of obtaining
10k gold 3% chance of obtaining
Use number ranges instead. Random a number between 1 and 100 and then give an item based on what was rolled.
Your conditional branches would look more like:
Conditional Branch x <= 35 then
bait
Else
Conditional Branch x <= 55 then
Rock
Else
Conditional Branch x <= 58 then
Gold
Branch End
Branch End
Branch End
I think I got that right...
control variable random 1-100
if variable <35 get bait
if variable <55 get rock (after the check for 35, can only be happen between 35-55 or in 20% of the cases)
if variable <58 get gold
The sum of the percentages needs to be 100% and you need the conditions to be serialized, but then it is possible to make something like this.
If you want the chances independend (including getting one of each in a single try), then just roll once for each item and check for each item below percentage
You would need to use else statements or you'll get all 3 items if you rolled under 35.
So it would look like this right? I would just have to keep adding stuff untill it all added up to 100%?
You don't have to keep adding stuff. If you only want it to go up to 59, just set your range to 1-59.
Your numbers are out above. Your 20% chance of finding a rock would be 55, not 56 (35+20=55), and your 3% of finding gold would be 58.
but if its < or = to 35 u cant count 35 in the next set of chances u would have to start your next set of chances at 36 wouldnt u? If you started your second set at 35 you would get the 1st set (bait) and the 2nd set (Rock) if you rolled a 35
If you want to say "what number is 20 more than 35", you don't add 1 to 35 then add 20 to that. You just add 20 to 35. That will give you a range from 36 to 55, which is 20 numbers. 36-56 is 21 numbers. Count them.
LOL your right XD i didnt feel like counting them so i just subtracted them on a calculator when i did it. i guess thats y i couldnt get things to add up to 100%
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.