I am wanting to return a multiplier, based on 2 values
function MonsterLevels:GetMultiplier(zoneNumber, monsterLevel)
local Multiplier = zoneNumber * (monsterLevel + 1)
return Multiplier
end
monsterLevel goes from level 0 to 3. I need it return numbers similar to these
and so on…
I assume a specific formula is impossible for these exact values, but I want something that returns something similar to the numbers given
1 Like
You could look to a parabola equation;
e.g:
1 Like
It’s fairly similar to this pattern.
1.15^(n-1)
I think it needs to proceed like this for future zones.
1.15^(level-1) + 1.5*zone
That returns 2.5 for zone 1, level 1 tho
1 Like
Is there a way I can convert that into lua
1 Like
y = Multi
x = Level
a & b = any number, but because it helps align with the values you’re going for; 0.04
c = Starting y basically, so 1
Your equation would basically look like the following:
Multi = (a * Level^2) + (b * Level) + c
y = 0.04x^2 + 0.04x + 1
1 Like
Sorry last bit should be +1.5*(zone-1)
1 Like
blokav
(blokav)
March 25, 2022, 8:35pm
#9
If you’re willing to make a small compromise and adjust your values to follow a pattern like this (which is similar to yours):
Then that can be represented by a simple linear formula:
function MonsterLevels:GetMultiplier(zoneNumber, monsterLevel)
local trueZone = zoneNumber + monsterLevel / 4
local multiplier = trueZone / 2 + 0.5
return multiplier
end
(‘trueZone’ is a combination of the zone and level values)
1 Like
I need to incorporate the zoneNumber too, not just a level value
1 Like
Seeing as you have 2 [+0.15]'s in the chart for Zone 2, I don’t see a plausible formula for such a chart that’s also consistent with the chart seen in Zone 1.
However, you seem to be adding a mode-average of 0.5 to the slots from Zone 1, so perhaps you could use an additional formula for deciding a multiplier/adder to the chart’s “Multi” depending on the Zone. Or just adding a fixed value if that’s what you’re into.