This project is used for creating other projects with DIFFERENT RARITIES (different statuses a player can "roll" for, each status or group of statuses having a unique %chance of being "rolled") Specifically, this project shows you how to implement a luck buff and how that luck buff affects the odds of getting different rarities. A way to increase your luck when rolling will be greatly appreciated by players who value effort/playtime over luck. (Example: reward an increased luck buff every time a player uses x number of spins, creating a sort of pity system) How does it work? Either roll a single time (:rr = None, rollRequirement=0) with the given odds, or autoroll (rollRequirement>0) until a requested rarity is met. THIS PROJECT WAS MADE PURELY FOR PERSONAL TESTING. MANY OF THE OPTIONS DON'T MAKE SENSE, SO HERE'S A MORE DETAILED EXPLAINATION: [Lists]: loot.items is for display only. it gives each rarity's name along with the associated number for that rarity (heavenly=6, legendary=5, etc.) loot.odds is also display only. It shows the original, UNDEDITED odds for different rarities. (By default, the exotic rarity has a 0.45% chance of being rolled) loot.modifiedOdds is a modified version of loot.odds, displaying the effect of oddsDistributionFactor on loot.odds. PRESS SPACEBAR TO UPDATE THIS LIST. IMPORTANT: Rarities used when rolling elements are pulled from this list, not the regular loot.odds. rollCounts displays the number of times each rarity was rolled while autorolling for the requested element. If item 3 says 5, then the "rare" rarity was rolled 3 times. [Variables]: oddsDistributionFactor this variable is used when calculating the chances for loot.modifiedOdds. Press SPACEBAR to apply changes to that list. Whatever number this variable is will be the total percent chance shifted from the first three rarities to the second three rarities, with ratios in the group being kept equivalent. EXAMPLE: if you press spacebar while this variable is at 10, then the following will happen: 1. The total chance of rolling ANY of the first three rarities will be calculated from loot.odds (chance for common + chance for uncommon + chance for rare). The same will be done for the second three rarities. 2. 10% of the chance between the first three rarities will be reduced, causing 10% of the chance between the second three rarities to be increased. 3. Ratios between rarities within the same group are kept (heavenly will ALWAYS be 5x rarer than legendary, no matter what ODS is) rollsSpent is how many rolls were used when autorolling for the requested rarity rollRequirement is which rarity # will be autorolled for. Press the down arrow key to update. :rR shows the rarity that will be autorolled for. THIS VARIABLE IS USED WHEN AUTOROLLING, rollRequirement is ONLY for setting THIS variable. If this variable is None, then a single rarity will be rolled. /////// For the lowest possible odds, require a rare to be rolled with the maximum oddsDistributionFactor. The chance will be around 0.002% (genuine ~1/50k) a 1/50k may not sound horrible, but keep in mind that most games skew your perception of odds significantly with massive luck multipliers. These settings will have a GENUINE ~1/50k chance, which is incredibly rare.
Keys: -Up arrow key to roll -down arrow key to update :rR -Spacebar to update loot.modifiedOdds -press setfactor to set a specific oddsDistributionFactor