Help with Rebirth cost system math

Hey everyone,

I am currently trying to create a rebirth cost / price mathematical formula for my game.
I have been trying a few things but currently it increases exponentially

I would like something that kinda looks like this = 50, 90, 180, 310, 600, 1000, 1500, 2300, 3100, 4500, 5200, 6300, 7200 + 9100 + 10900 + 11500 + 12300...

Those numbers above are just made up they don’t follow a particular formula, I mean that as the overall speed I would like the players to progress.

Does anyone know how to achieve something like that?

My current try, this increases exponentially though:
local function GetRebirthPricePerLvl(iLvl: number)
	return iLvl * 0.5
end
function calculator.GetRebirthCostByLevel(iLvl: number)
if iLvl == 1 then
		return 50
	elseif iLvl > 1 then
		return calculator.GetRebirthCostByLevel(iLvl - 1) * GetRebirthPricePerLvl(iLvl + 1)
end

Any help is really appreciated!

2 Likes