How to setup an odds/weights system?

Discussion in 'General Chat' started by Renegadez, Jan 14, 2008.

  1. #1
    What's a good way to setup an odds/weight system?

    It's for a game, where let's say there's 3 health items you can win.

    regular health potion is easiest
    then super potion
    then max potion

    How would I setup an odds system for this?

    The system I've come up with is:
    Generating a random number.
    Setting weight for each item(1-950 for regular health potion, 951-999 for super potion and 1000 for max potion). (Out of 1,000).

    Then depending on the random number, it would depend on which item you get!

    how would odds like 1:50, 1:25 etc be calculated from that?

    I don't get how to setup an odds system

    Anyone else got a better system for odds? Etc

    Post it up here!
     
    Renegadez, Jan 14, 2008 IP