Hello, I’m new to Panda and rather new to Python but not stranger to programing. However, i only had basic training in VB.
I’m currently reading python programing for absolute beginers, and I find programing in python addictive.
My question is, what’s the best way to implement a random loot system?
I tried with random.randrange and random.choice, they both well but what if i wan to limit certain loots? Like common loots drop more frequently than rare.
I want to create a small rpg for private use, nothing fancy. Just a character hacking few mobs with random drops, no networking.
Thank you. I hope I made my first post clear enough.
There’s a few ways you can go about this. The easiest (IMHO) is to generate a random number between 1-1000, with ranges between 1-499 being common items, 500-799 being uncommon items, 800-899 being rare items, 900-949 for super rare items, 950-989 for ultra rare items, 990-1000 for zomg rare items, etc.