Search Unity

How to derive a single strength value (estimate) from a bunch of character stats

Discussion in 'General Discussion' started by Bazz_boyy, May 20, 2020.

  1. Bazz_boyy

    Bazz_boyy

    Joined:
    May 22, 2013
    Posts:
    192
    Hello,

    I've noticed in lots of games they usually have a single value that is supposed to reflect the overall strength of the unit based on its stats. Take for example idle heroes:



    In the top left of the character info panel (ignoring the red lines) You can see the number 72878. This is a value that is derived from those 4 stat values you can see in the centre (health, attack, defence, speed). I assume this is what they use to do a lot of their level generation.

    Although it's probably not always entirely accurate, it seems to hold up pretty well.

    How would one go about determining this value?

    I'd appreciate any answers!
     
  2. ChazBass

    ChazBass

    Joined:
    Jul 14, 2013
    Posts:
    153
    Not easily done. You are essentially trying to solve an equation in terms of 4 unknowns with an unknown relationship between the dependent variable (the 72878 value) and the the independent variables (the four stats). If you can assemble a data set of N observations of different dependent values and stat value sets (by observing them in the game), you could, for example, try to fit a linear regression to the data. This would then give you 4 beta coefficients, one for each stat, which best fit the data:

    y = B0 + B1*Stat1 + ... B4*Stat4

    Of course, this approach assumes the developer is using a linear relationship to calculate the dependent variable from the stats. If that doesn't seem to work well, then you can explore a non-linear relationship through non-linear regression.

    If that fails, you could try to solve through optimization. In that case, solving the N-dimension hypercube where N is the number of stats.

    Lastly, you could e-mail the developer and ask them nicely:)
     
  3. Bazz_boyy

    Bazz_boyy

    Joined:
    May 22, 2013
    Posts:
    192
    Haha yeah I figured it would be tough. I tried to break it down once by adding items to the character that would increase a single stat and see the effect on the dependent variable but I still wasn't able to get there. Can't remember why exactly.

    How do you think you personally would go about generating this value? How would determine the coefficient for each of the stats? I assume it has something to do with estimating the general effectiveness of the stats relative to each other..
     
  4. ChazBass

    ChazBass

    Joined:
    Jul 14, 2013
    Posts:
    153
    I would go with something linear, weighting each of the stats and then tweaking the weights based on how the game plays. This is the approach commonly used in roguelikes.
     
    Bazz_boyy likes this.
  5. Bazz_boyy

    Bazz_boyy

    Joined:
    May 22, 2013
    Posts:
    192
    Fantastic! A staight forward and simple answer :,D

    Thank you chaz
     
  6. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,998
    In a game where you can customize, ratings always suck and everyone knows it. They can't take into account how well everything works together. For example, whether manna regen gives a sustainable spell rotation. People in these games know to ignore ratings.

    The games where ratings work are where characters are pretty much the same. Many collectable hero games are like this. A higher rated character has every stat slighter higher than a lower rated one, so of course the rating correctly predicts it will win.

    One thing you can do with semi-boring characters is have rating be "damage vs. a boss". Compute their damage-per-second, and the total damage it would take to kill them. The rating is the two, multiplied. That's roughy how much damage they'd do against a boss-monster before being killed by it.
     
    Bazz_boyy likes this.
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    It is a weighted sum. They have several different factors, assign "valueModifier" to them and then multiply each value by its modifier. As others has said, this kinds of metrics often end up being completely useless, or of dubious utility . Also, most likely its only purpose is to make the player feel good about their unit.
     
  8. Bazz_boyy

    Bazz_boyy

    Joined:
    May 22, 2013
    Posts:
    192
    Couldn't it be a useful metric for creating/generating levels of a certain difficulty?
     
  9. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    Rather than a number why not use a word?

    So instead of STR: 3

    Just say "Tanky" (assuming 3 is above 2 which is average)
     
  10. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    No. It is almost certainly useless.

    See problems with D&D's "challenge rating"

    In order for it to be useful, it need to be calculated correcly, and when trying to come up with a metric that determines "power". The issue is that people can overlook something, or overestimate importance of something else. Additionally, it is possible that a combination of two enemies turns out to be much more difficult due to unexpected synergy.

    Given that "power" is 5 digit number, I believe that its sole function is to make player feel good about themselves.