I have been polishing the stats and how they scales per level up.
What I really do to handle the progression of a player, each stat has a level, a value, an experience and a multiplier. To get the level of a player a simple operation to calculate the rate of each stat. I guess I will post in the snippet;
Stat
var
level = 1
experience = 0
max_experience = 100
growth_rate = 0.2
value
max_value
multiplier = 1
New() // No default args, just pass a same-name variable to initialize one of the variables with the given value.
for(var/v in args)
if(vars[v])vars[v] = args[v]
if(!value && max_value)value = max_value
return ..()
Heres how the grabbing of the overall level works, although it has not much science into it, lol.
get_overall_level(percentage = 0)
var
thevalue
divisor = 0
for(var/v in vars[v])
if(!istype(v, /Stat))continue
thevalue += v:get_value("[v]")
divisor++
return round(thevalue / divisor)
The only part I am missing here is to know how to scale both, max_experience and max_value.
I have been told to use a sigmoid function and stuff, while I know the basics of mathematic, I don't really have the grasp of how to use aid formulas.
The real concern, is if is there anywhere where I can see some examples of the most used formula, their appliances, etc, and learn on the fly while not having to read my college math book.
Probably more a developer help post than design philosophy, but I think this is highly related to the design philosphy of the game, and more than a problem is a moral question about if go the easy way, or set up my mind and progress.
The problem is that over time the gains become larger.
10% increase in exp needed with exp starting around 100, by the time level 100 hits is upwards in the 2-3 millions or so.
What you could do is decrease the gains over time based on their level OR limit the exp gain.(aka after level 50 1.02-2 percent increase in overal exp needed.)
+10% exp needed to level up for the next level OR +2000 exp, whichever is the least amount.
Also you could either choose to reset exp to 0, or allow the player to keep their current Exp, towards leveling up for the next level (which would effectively decrease the amount of time they'd spend grinding exp.) This is used in one of my favorite games Final Fantasy 6/3