Soldak Home   Drox Operative   Din's Curse   Depths of Peril   Zombasite  

Go Back   Soldak Entertainment Forums > Old > Demon War BETA
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2011, 04:10 AM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,002
Default Improving the Absroption Formula

In this thread, I'll try to come up with ways to improve the current formula. I believe the problems we're now discovering with the formula are the reason for people experiencing imbalance at higher levels.

For an absorption formula, we want the following things:
- Different armors should absorb roughly set proportions. Off the top of my head, cloth armor should absorb around 10-20%, leather 30-40%, mail 50% and plate 60-70%.
- There should be a cutoff (as there is now) at some percentage so that 100% is impossible. That would make for a boring game and impossible monsters.
- Diminishing returns is probably desirable so that we don't just bump into the cutoff. However, we also need stronger effects at higher levels to counter increasing damage by the monsters. (It's possible that something like a cubic formula, which starts slowly, then gets sharper, and then tapers off, would be better.)
- We want to feel the difference between armors and minimize the feel of diminishing returns.

Meet the current formula:
Absorb % = armor / (armor + (attacker level * 25) + 50)

This function shows that the absorption percentage depends on both the attacker level and your current armor. If you stay at the same armor level while the attacker level goes up, your % absorption will go down and you'll get hurt

But if we substitute values for attacker level = 1 into the function, we'll see that it simplifies to the following function:

y = x / (x + 75) where y = % absorption and x = armor.

This function behaves quite nicely, since it tapers off to 1.0 (100%). This is convenient since 100% is our maximum absorption (though the game limits absorption to 75%). It also rises pretty slowly, which equates to diminishing returns. You can see what it looks like in the picture (current_func.jpg).

Notice that the function has a faster, almost linear pace up to around 75 (trust me, that's more or less where it's at). After that, it slows down significantly. This is a source of problems for us, because it means that people at the high end of the curve (high armor) will experience very slow growth.

Notice what happens if we now substitute into the function level 50 rather than level 1: the simplified function now becomes
y = x / (x + 1300) which looks like current_func_50.jpg. The previous function at level 1 is also pictured there for comparison.

Remember that y is % absorption, x is armor. Notice that the function is now flatter as it covers the greater distance all the way to 1300, even in the earlier, fast rising part. Basically, at level 50, armor levels (aka x) are higher (in the thousands), the function needs to accept these higher armor levels without jumping to 100% armor (as it would have in the level 1 function). This is the reason for the higher constant. Another reason is that the old armor needs to become less effective -- remember that if you stay with level 1 armor (x) at level 50, you'll get hammered. Using the level 50 function, armor of 200, which would have given you 72% absorption in level 1, will now give you a measly 13%.

You may not be able to tell from the picture, but once again, after x=armor=1000, we get a very slow increase ie. diminishing returns. Once again, this is really frustrating for high level, high armor characters. Any point investment they make has very little effect, and plate armor seems to be of little use as well. Plate armor will try to raise the armor level by a certain amount, but because we're in the diminishing returns region, it'll have minimal effect and not really be worth it.

What can be done to improve this situation? We can treat the function in several ways. One option is to reduce the amount that our constant has to grow between levels. The constant has to be able to handle the highest armor possible at each level. But the more it grows, the flatter it makes our function. The flatter the function, the less impact moving along it has. What we can do is to shift the function to the right mathematically. If we change the formula to be

Absorb % = (armor - (1 * level)) / (armor - (1 * level) + level * 25 + 50)

we can shift the function to the right by the amount specified as 1 * level here. Every increasing level shifts the function a little to the right. This makes sense: A function shifted to the right will produce no values (0) or negative values at lower armor (x) levels. At the higher levels, the shift increases, and this corresponds with the fact that at those high levels, your armor is pretty much worthless anyway. This gives us the ability to reduce the constant of the function, reducing the flattening effect. At level 50, our new function would simplify to
Y = (X - 50) / ((X - 50) + 1050)
this approach only makes a small difference that's barely visible, so I won't provide a picture.

Another option is to utilize what we noticed about this function: it's much more linear in the lower part, and tapers off after passing the value of its constant. What does this mean? If we adjust the function so that the constant at each level (for the simplified function) will be about equal to the highest possible armor we can get at that level, we'll essentially only be using the linear, fast growing part of the function. The problem will then be that even at our maximum, the % values will be rather low since we aren't using the WHOLE function; we're just using a part of it. To fix this, we multiply the function by another constant, for example 1.5. The result will look like

Absorb % = ( armor / (armor + (attacker level * 25) + 50) ) * 1.5

We would play with the constants to make sure we cover the realistic armor values. Sure, we'll have some percentages greater than 100% when we pass the maximum armor values, but since we limit our maximum percentage, that's not a problem (anything over 90% is equivalent to 90%, for example). This option produces quite a strong effect (see mult50.jpg).

If you want to play with these constants, you can use my excel sheet at http://www.mediafire.com/?aavhm44ml01ao6m (it's too big for the forum). There's a sheet for the old formula and one for the one I'm trying out. The constants are all at the top, and they correspond to a full equation that includes both solution 1 and 2 which I mentioned above. Going from left to right, the constants are D1, E1, F1 and G1 (named for their cells). They correspond to:

Absorb % = (armor - (D1 * level)) / (armor - (D1 * level) + level * E1 + F1) * G1

There are other options as well. Who's to say that % blocked should depend on the attacker level? If we can state that 2000, for example, is around the maximum armor, then we could use a linear or non-linear function to turn any number out of 2000 into a percentage. This actually makes a lot of sense: characters will slowly be working up their armor percentage until the end game when their armor will be strongest. Absorb percentage would never go down just because you're fighting a higher level monster. Monster hits already get stronger with levels, and high level armors have minimum level requirements, so it really does seem like a good idea. Also, armor points seem to increase non-linearly with levels already: relatively speaking, plate armor gets gradually stronger than cloth armor at the next level -- they don't maintain the same ratios. I really think this is an idea worth seriously considering.

Other options yet would be to switch to a linear function or some other function, while keeping the current variables intact.

The most helpful thing you guys can do to help come up with good adjustments to the formula is experience from characters: what's typical cloth/leather/mail/plate armor for each level? What's the maximum at each level? The minimum? Uploading your characters to the Character Repository thread would really help with that.
Attached Images
File Type: jpg current_func.jpg (18.6 KB, 6 views)
File Type: jpg current_func50.jpg (18.9 KB, 5 views)
File Type: jpg mult50.jpg (19.1 KB, 5 views)

Last edited by Bluddy : 02-22-2011 at 10:47 AM.
Reply With Quote
  #2  
Old 02-22-2011, 06:20 AM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,002
Default

I played around some more, trying a linear function instead of a non-linear one, and it seems pretty good. Updated my excel spreadsheet at http://www.mediafire.com/?nnas66mec6bi95c with the 'Linear' sheet.

The advantage of linearity is that you never get a feeling that you're not rewarded -- every advance carries you forward by a couple of percentage points at least. In general, the rewards in DC seem better suited for a linear function since they, for example, include non-linearity already in the armor values. I think this might be the best direction to go in.

The function is something like
Absorb % = ( (armor - (attacker level * 0.8)) / ( 60 + attacker level * 40) ) * 0.9

The constants in the excel sheet correspond to (based on their cells):
Absorb % = ( (armor - (attacker level * D1)) / ( E1 + attacker level * F1) ) * G1

The important thing is, once again, knowing the min and max values at each level. It's not terrible if they're exceeded -- the result would just be clamped to the maximum (0.9 in this case). Negative values should become 0.

Last edited by Bluddy : 02-22-2011 at 10:46 AM.
Reply With Quote
  #3  
Old 02-22-2011, 09:56 AM
Maledictus's Avatar
Maledictus Maledictus is offline
Champion
 
Join Date: Jun 2008
Location: Haarlem, NH, The Netherlands
Posts: 163
Default

Some impressions:

First, I'm trying to understand what you're saying:

Quote:
Absorb % = armor / (armor + level * 25 + 50)
Really, this function is just
y = x / (x + 75)
In my view, the current formula expresses a direct relation between level and armor value; let armor value lag as you level up and you'll suffer. The second formula doesn't show that. Could you elaborate? Also, level here is player character level, correct?

Quote:
Notice what happens around level 50: the function becomes
y = x / (x + 1300)
Using this formula to calculate absorption doesn't click with me. What is the basis for the armor value here (which I assume to be x in this formula) ?

Also, does this imply that absorption is absolute, in the sense that if it is 25% for a character, that 25% is applied to monsters above and below the character's current level? If so, that sounds wrong to me.

Forgive me if I ask stupid questions here, but reading your post without full context (i.e. not being the developer of the game) is tricky at best, I'm first of all trying to understand the situation.
Reply With Quote
  #4  
Old 02-22-2011, 10:11 AM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,002
Default

Quote:
Originally Posted by Maledictus View Post
Some impressions:

First, I'm trying to understand what you're saying:

In my view, the current formula expresses a direct relation between level and armor value; let armor value lag as you level up and you'll suffer. The second formula doesn't show that. Could you elaborate? Also, level here is player character level, correct?
Yes, sorry. I tried to generalize. What I wanted to show is that the function is simply the mathematical function y = x/(x+C) where C is a constant . What I wanted to study was the behavior of that function.

It's true that there's a relationship between attacker level and armor value. But decomposing it into parts, the role of the level is just to add to that constant (C). As the level goes up, the constant gets bigger and bigger, changing the shape of the function.

The practical result of that is that staying at a certain x (aka armor level) while the level goes up, will cause the % absorption to go down.

Quote:
Using this formula to calculate absorption doesn't click with me. What is the basis for the armor value here (which I assume to be x in this formula) ?
I hope it's a little clearer. Looking at the function itself, I noticed that it's problematic at areas of higher armor (high x) and high levels (high constant). That's what I'm trying to address.

Quote:
Also, does this imply that absorption is absolute, in the sense that if it is 25% for a character, that 25% is applied to monsters above and below the character's current level? If so, that sounds wrong to me.
No, it goes by attacker's level, not the defender's level.

Quote:
Forgive me if I ask stupid questions here, but reading your post without full context (i.e. not being the developer of the game) is tricky at best, I'm first of all trying to understand the situation.
No problem. I tried to get through a lot of stuff and probably didn't explain myself well enough. I'm glad you asked.

EDIT: I edited the first 2 posts trying to make them more reader friendly. Hope that helps somewhat.

Last edited by Bluddy : 02-22-2011 at 10:47 AM.
Reply With Quote
  #5  
Old 02-22-2011, 11:11 AM
Maledictus's Avatar
Maledictus Maledictus is offline
Champion
 
Join Date: Jun 2008
Location: Haarlem, NH, The Netherlands
Posts: 163
Default

Ah, yes. I now get the current situation/problem and your interpretation of it. Now studying the rest...

Edit: Some thoughts... Please comment and point out the flaws in my thinking, should there be any.

Currently absorption can never reach a value as high as 90%. What you're suggesting is essentially a formula that allows absorption to (potentially) get to 90% (max) when a char reaches level 100. That in itself is a rather linear approach for this problem. Turn this around: if I absorb 90% of the damage, I'm virtually immortal. That removes the threat of running into level 100 monsters. I assume this formula is only for melee damage, so the threat would then come from elemental and/or magic damage, which might then require tweaking of it's own if the balance is shifted with regard to melee damage.

Maximum armor values for a given level can never be ascertained, given the random nature of the game. I assume that's (at least partly) the reason the absorption formula is shaped the way it is.

Quote:
If we can state that 2000, for example, is around the maximum armor, then we could use a linear or non-linear function to turn any number out of 2000 into a percentage. This actually makes a lot of sense: characters will slowly be working up their armor percentage until the end game when their armor will be strongest. Absorb percentage would never go down just because you're fighting a higher level monster.
I disagree:
- a max armor value for a character can not be stated.
- this setup would diminish the relation between the attacker and defender in terms of their respective levels. This can be seen as personal taste though; I don't think a potentially linear progression of absorption towards 90% is a good thing.

When looking at this, should we not also look at the damage formulas for the attackers? Perhaps answers and insights lie there, and at the very least it's connected.

I do understand however that the current setup makes high-level armor values lose too much power (the diminished return issue is perhaps too effective for high level characters). A tweak for that might be beneficial, but 90% absorption should never be reached.
In short, as fas ar the numbers go I don't have a problem with the current setup. I have yet to experience the problem though; my highest level sofar is 27 so perhaps I'm not qualified to speak. And I might change my tune when I get to 90...

I'll study this some more, I'll update if things come to mind.

Last edited by Maledictus : 02-22-2011 at 12:25 PM.
Reply With Quote
  #6  
Old 02-22-2011, 01:09 PM
alstein alstein is offline
Champion
 
Join Date: Oct 2010
Posts: 116
Default

Changes

a) Make the cap 90% not 75%.
b) Armor values need to increase more heavily with increased lvl requirements for cloth/leather, and much more heavily with str reqs for chain/plate. Maybe exponentially so.
c) +% armor bonus skills need to increase, and the plate armor skill should give a massive +% armor with each level. Right now it's a skill you take 1 level in and that's it. Either that or give those chars plate at creation.

Resistance formula needs to be tweaked as well, because right now even with a demonologist or warden and lots of spirit, I'm only getting 10-15% reduction on elemental damage.

This is a large reason why the game isn't fun past lvl 20. It's real fun until then, but once you get past a certain point, the game breaks down and is less fun. Many skills/spells become unviable, and the only way to play the game effectively for your combo is very obvious.
Reply With Quote
  #7  
Old 02-22-2011, 01:31 PM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,002
Default

Quote:
Originally Posted by Maledictus View Post
Currently absorption can never reach a value as high as 90%. What you're suggesting is essentially a formula that allows absorption to (potentially) get to 90% (max) when a char reaches level 100. That in itself is a rather linear approach for this problem. Turn this around: if I absorb 90% of the damage, I'm virtually immortal. That removes the threat of running into level 100 monsters. I assume this formula is only for melee damage, so the threat would then come from elemental and/or magic damage, which might then require tweaking of it's own if the balance is shifted with regard to melee damage.
Actually, the maximum limit for absorption is arbitrary. Currently, 75% is the maximum absorption in the game. In reality though, it seems like it's much less because of the diminishing returns effect of the function. Better and better armor (plate etc) at those levels has almost no effect. I personally think a character with plate armor + armor skills + armor rings should be able to approach 90%, but that's just my personal preference. It's not really a part of my suggestion.

While it sounds like all that's needed is a slight tweak of the numbers (ie. not the solutions I suggested), I don't think that's good enough. The function is built to cause diminishing returns at high levels. Without modifying the actual build of the function in some way (or switching to linear functions), I think this problem will stay. Also, this problem also exists in the resistance function (which I haven't examined properly yet) where the game often rewards 10 points of resistance which quickly become almost meaningless at higher levels.

Another important point is that whatever the maximum is set at, it doesn't mean many characters will reach it. It can be set higher than any normal character can reach.

Quote:
Maximum armor values for a given level can never be ascertained, given the random nature of the game. I assume that's (at least partly) the reason the absorption formula is shaped the way it is.
Even though the armor values are random, they cluster around certain values (by design). The mix of all armor pieces together tends to produce certain maximum values. The current function as it is also assumes certain maximum values -- they're just not precisely tuned. That's why for level 1 the constant is just 75 -- it basically assumes you won't get values too far above 200-300 for level 1. Each level has its spread of possible values. I'm just trying to get enough of a sampling of values to tune the function, mostly because I'm not so good at interpreting Shadow's armor balance factors

It's not a big deal if the maximum armor value is passed - the maximum percentage value will then be used. This isn't very different from what happens in the current function -- when you pass the maximum assumptions of the function for that level, you'll get for example 57.1% instead of 57.0%, with increments getting smaller and smaller, essentially blocking you at 57%. You're essentially getting blocked in the same way.

Quote:
- this setup would diminish the relation between the attacker and defender in terms of their respective levels. This can be seen as personal taste though; I don't think a potentially linear progression of absorption towards 90% is a good thing.
After playing around with it, I found that a pure linear function without the attacker level isn't really great. I do think that a linear approach like my 2nd post above would probably be best though.

Quote:
When looking at this, should we not also look at the damage formulas for the attackers? Perhaps answers and insights lie there, and at the very least it's connected.
Damage formulas for the attackers are quite easy to predict -- they seem to be generated in a fairly simple way. However, because we're dealing with percentages here, it doesn't really matter. We want percentage absorbed to behave a certain way for different armor types, and to keep working as characters go up in levels.

Quote:
In short, as fas ar the numbers go I don't have a problem with the current setup. I have yet to experience the problem though; my highest level sofar is 27 so perhaps I'm not qualified to speak. And I might change my tune when I get to 90...
Right. I also haven't experienced this. I just saw people complaining, and after testing the function (do check out my excel sheet!), found what I think is the source of the problem. What's more, a low armor (cloth/leather) character, which is what many people here, including myself, usually play with, won't feel this issue even at high levels.
Reply With Quote
  #8  
Old 02-22-2011, 01:37 PM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,002
Default

Quote:
Originally Posted by alstein View Post
a) Make the cap 90% not 75%.
That's my preference as well.

Quote:
b) Armor values need to increase more heavily with increased lvl requirements for cloth/leather, and much more heavily with str reqs for chain/plate. Maybe exponentially so.
Might be necessary, but I think once the absorption function is fixed, the higher values of plate/chain might already make a big difference.

[quote]c) +% armor bonus skills need to increase, and the plate armor skill should give a massive +% armor with each level. Right now it's a skill you take 1 level in and that's it. Either that or give those chars plate at creation.[quote]

How much extra does each skill level give you?

Quote:
Resistance formula needs to be tweaked as well, because right now even with a demonologist or warden and lots of spirit, I'm only getting 10-15% reduction on elemental damage.
Yeah I think that should probably be linear as well. And since the maximum for resistances is pretty low (I think), it might be best to have just one linear scale for resistance, w/o accounting for attacker level. I have to look into it though.
Reply With Quote
  #9  
Old 02-22-2011, 01:41 PM
Crisses's Avatar
Crisses Crisses is offline
Elite
 
Join Date: Jan 2011
Location: Middletown, NY
Posts: 641
Default

If cloth only absorb 10-20% mages may never be endgame-viable. With great armor for my level, I'm being killed constantly with a fire Mage. I can't kill stuff at my level before it closes in on me and if it gets into melee range I have big problems staying alive. No potions, pure character stats apps level 24or so, and same level opponents. Help me, Teleport, you're my only hope!

And the ceiling caving in on me doesn't help much
Reply With Quote
  #10  
Old 02-22-2011, 01:45 PM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,002
Default

Quote:
Originally Posted by Crisses View Post
If cloth only absorb 10-20% mages may never be endgame-viable. With great armor for my level, I'm being killed constantly with a fire Mage. I can't kill stuff at my level before it closes in on me and if it gets into melee range I have big problems staying alive. No potions, pure character stats apps level 24or so, and same level opponents. Help me, Teleport, you're my only hope!

And the ceiling caving in on me doesn't help much
I'm pretty sure the current formula only allows mages to reach 10-25% absorption at most. I think mages are expected to use teleport, shield spells and potions, and to die a lot.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:18 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2007 - 2019 Soldak Entertainment, Inc.