Luck Multiplier Doesn't Increase Rare/Legendary Drop Rates – What Am I Doing Wrong?

Hey everyone! I’m currently working on a simulator-style game where player do something to find random loot. Each item has a rarity, and I want the player’s “Luck Multiplier” to increase the chances of getting Rare and Legendary items, like how it works in many other games.

Right now, I’m testing with a Luck Multiplier of 10, but I still keep getting mostly Common items. I expected to be getting at least some Rare or Legendary items, but that’s not happening.

Here’s how my system is currently set up:

PlayerDataManager (simplified)

data = {
    diggingLuckMultiplier = 10
}

ItemsData Module (simplified)

ItemsData.RarityWeights = {
	Common = 69,
	Uncommon = 20,
	Rare = 10,
	Legendary = 1,
}

ItemsData.ItemsByRarity = {
	Common = {
		{ Name = "Banana", Value = 1, Tool = itemTools:WaitForChild("Banana")},
	},
	Uncommon = {
		{ Name = "Car Battery", Value = 5 },
	},
	Rare = {
		{ Name = "Vintage Toy", Value = 25 },
		{ Name = "Collector Card", Value = 30 },
	},
	Legendary = {
		{ Name = "Diamond Ring", Value = 150 },
		{ Name = "Ancient Coin", Value = 200 },
	}
}

LootService (Rarity Roll Logic)

function LootService.RollRarity(playerLuckMultiplier: number)
	local totalWeight = 0
	local adjustedWeights = {}

	for rarity, baseWeight in pairs(ItemsData.RarityWeights) do
		local adjusted = baseWeight
		if rarity ~= "Common" then
			adjusted *= playerLuckMultiplier
		end

		adjustedWeights[rarity] = adjusted
		totalWeight += adjusted
	end

	local roll = math.random() * totalWeight
	local cumulative = 0

	for rarity, weight in pairs(adjustedWeights) do
		cumulative += weight
		if roll <= cumulative then
			return rarity
		end
	end

	return "Common" -- fallback
end
1 Like

Your RollRarity logic looks fine to me. Have you ran simulations to see if you’re getting the correct drop rates on average? Based on the rarity weights and luck multiplier you posted, these would be the chances:

Common: 18.2%
Uncommon: 52.7%
Rare: 26.3%
Legendary: 2.6%

I’d suggest calling RollRarity 5000-10000 times and check the percentages for each rarity to see if they come close to those values.

1 Like

Try printing adjustedWeights