Probability Issues

So, what I am trying to do is make it so when you interact with rubble there is a 25% chance that you will find something. I got the 25% down, but I want there to be different probabilities to what you find. For example I want there to be a 30% chance to find Diamond or Carbyne, and 70% chance to find Gold or Iron, and then I want there to be a 35% chance to find gold instead of iron. I have tried using a variable for every item and tried using 2 different variables for Diamond and Carbyne and Gold or Iron. Nothing has worked. Anyone know how to do this?
You'd need to do some nested if... your highest if-then will have the randomization that will be between that 30 and 70 thing, now if you get the 70 thing, then you put another randomized value and check if it's inside the 35% range, if yes, give the gold, else give the iron

so it will be like

Game Variable 001 = Random number from 1 to 100

if GV 001 less than or equal to 30

  Game Variable 001 = Random number from 1 to 100

  if GV 001 less than or equal to value

    give diamond

  else

    give carbyne

  end

else

  Game Variable 001 = Random number from 1 to 100

  if GV 001 less than or equal to value

    give gold

  else

    give iron

  end

end
Thanks for the quick reply! This worked perfectly!
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.

Original thread: https://forums.rpgmakerweb.com/threads/probability-issues.28852/