Weapon Damage Calculation Spreadsheet

Discussion in 'Renaissance Discussion' started by Blendax, Apr 24, 2020.

  1. Blendax

    Blendax Well-Known Member
    UO:R Donor

    Joined:
    Sep 18, 2017
    Messages:
    1,856
    Likes Received:
    1,255
    I'm not sure who the original creator was, but I made a copy and some updates to the formulas. I use this spreadsheet religiously when making decisions about builds or even just what weapons to carry.

    This is the original: https://docs.google.com/spreadsheet...11tYYoKrhmJLzfE7dNbuuR0PA/edit#gid=1750798924

    Anyway, I noticed some things. First, there was nothing to calculate the exceptional bonus for runics or even the damage bonus for slayers. I added checkboxes for those. Also, I noticed that updating player skills and magic bonus would change the damage values for pets. This didn't seem right at all, so I fixed that.

    Two deficiencies that I just didn't feel like fixing:

    1) You can have both the slayer AND the exceptional checkboxes selected at the same time. Obviously, this is not possible, but I didn't feel like adding validation.
    2) The slayer damage bonus doesn't update the min/max damage values. Instead, it updates the "combat ability" percentage. This value isn't exact, so the actual slayer damage will be a few points more than what is shown in the spreadsheet.

    https://drive.google.com/open?id=15CD2fXEIQU0_NwnAcwMFsyvadxyXj3opGV5NEsFqp5Q

    I hope people find this useful.
    Nusir, Chafe, Steady Mobbin and 2 others like this.
  2. Keza

    Keza Renaissance Staff
    Renaissance Staff

    Joined:
    Jan 6, 2015
    Messages:
    2,194
    Likes Received:
    4,236
    I like the update but the whole document is view-only. Any way you can allow edits to the sections for Stats/Skills?
    Blendax likes this.
  3. Labeler

    Labeler Well-Known Member
    UO:R Donor

    Joined:
    Jul 18, 2016
    Messages:
    3,303
    Likes Received:
    1,581
    upload_2020-4-24_15-37-6.png
    Kiryana, Blendax and One like this.
  4. Blendax

    Blendax Well-Known Member
    UO:R Donor

    Joined:
    Sep 18, 2017
    Messages:
    1,856
    Likes Received:
    1,255
    Yeah. Sorry. I should have mentioned that. I found it frustrating to edit the original, just to have my edits changed by someone else :). @Labeler is right, just make a copy.
    Kiryana likes this.
  5. Plentimon

    Plentimon Well-Known Member
    UO:R Subscriber

    Joined:
    Jan 10, 2018
    Messages:
    2,525
    Likes Received:
    1,479
    Would there be a way to incorporate armour value into this?
    Xavant_BR likes this.
  6. Blendax

    Blendax Well-Known Member
    UO:R Donor

    Joined:
    Sep 18, 2017
    Messages:
    1,856
    Likes Received:
    1,255
    It's definitely doable. I'm not 100% sure of the dmg vs. AR calculation, though
  7. Chafe

    Chafe Well-Known Member

    Joined:
    Dec 5, 2018
    Messages:
    362
    Likes Received:
    300
    Thanks for this Blendax, I've never had a look at weapon damages before, going on feel alone. Really useful!
  8. Blendax

    Blendax Well-Known Member
    UO:R Donor

    Joined:
    Sep 18, 2017
    Messages:
    1,856
    Likes Received:
    1,255
    So, I liked @Plentimon 's suggestion of adding monster AR values in the damage calculations. I started playing around with adding them to the spreadsheet, but whoever made the original version made it a little unwieldy to update .. and upon further examination ... it seems like the calculations weren't very accurate.

    So, I built a web app to replace this!
    https://uor.vinti.dev/

    Basically, you have your stats and skills at the left corner (with handle info on how much of a damage bonus you get for each stat and skill).
    The Weapon Info section allows you to select the damage bonus (ruin, might, exceptional, vanq, etc), and also whether the weapon is a slayer or runic.
    And now, the big update: the Enemy Info. The enemy drop down lists all the mobs on the UOR web site. If you select one, you'll see the 1-Min Sim column update based on that Mob's AR. You can also cause that column to generate a new number by clicking the "Simulate Attacks" button. What IS that number? Well, it takes into consideration your attack speed and damage values, and then calculates how much damage you would make in 1 minute of combat, minus the mob's AR. Fair warning: it DOES NOT take misses into consideration.

    Any comments/requests/issues would be appreciated!

    upload_2020-7-10_20-43-42.png
  9. Keza

    Keza Renaissance Staff
    Renaissance Staff

    Joined:
    Jan 6, 2015
    Messages:
    2,194
    Likes Received:
    4,236
    Interesting results, I might run some sims of my own on test center later and see how accurate this is. The AR reduction to damage seems a little high in your formulas. However, I have seen damage fall off to almost nothing vs. event monsters I tested with armor set too high. Pretty much ALL my event monsters are under 60 armor to avoid loads of zero-damage hits.
    Blendax likes this.
  10. Blendax

    Blendax Well-Known Member
    UO:R Donor

    Joined:
    Sep 18, 2017
    Messages:
    1,856
    Likes Received:
    1,255
    Plentimon likes this.
  11. Blendax

    Blendax Well-Known Member
    UO:R Donor

    Joined:
    Sep 18, 2017
    Messages:
    1,856
    Likes Received:
    1,255
    Some of the calculations seemed to be a little off (again, I'm basing it off UO stratics rules, so I don't know how they compare to UOR).

    I added calculations for crushing blow. If you look at the numbers, a 50% increase in base damage, even only 25% of the time at 100 anatomy, makes a very big difference. I really does make it a good choice, especially given the stamina drain.


    upload_2020-7-16_16-28-22.png

    upload_2020-7-16_16-30-34.png
    Plentimon likes this.
  12. Keza

    Keza Renaissance Staff
    Renaissance Staff

    Joined:
    Jan 6, 2015
    Messages:
    2,194
    Likes Received:
    4,236
    Did a little testing after some talk in discord about slayers and the damage they do with or without damage mods. Link here
    Last edited: Oct 30, 2020
  13. Dalavar

    Dalavar Well-Known Member
    UO:R Subscriber

    Joined:
    Aug 11, 2013
    Messages:
    3,336
    Likes Received:
    1,915
    Regarding monster AR, and many other pieces of combat calculations... the best place to look is in some RunUO code. Whoever wrote the RunUO code tried to largely imitate Stratics data but there are some strange decisions in RunUO that have gone unchanged for ~20 years, as far as I can tell.

    For example... with monster AR, it appears that RunUO code tries to imitate the area-based functionality of armor on player characters. (the chance of getting hit in the head, versus hit in the body, versus the legs, etc). Each part of the "body" of the monster has a certain chance of getting hit, and a certain percent of its AR that reduces the damage.


    Here is what I found in an old spreadsheet of mine. Reading the "AR 60" row for example... a monster with an AR of 60 will block an average of 11 damage per hit, but that amount can vary between 3.1 damage blocked and 22 damage blocked. Add in the variability of weapon rolls as well, and you have a very complex equation to model... so for simplicity in my spreadsheet, I just use the average column. In this case, I just assume a monster with AR of 60 blocks 10.0 damage every single hit.

    Attached Files:

    • AR2.png
      AR2.png
      File size:
      42.6 KB
      Views:
      422
    Last edited: Nov 5, 2020
    Xavant_BR likes this.
  14. DrFunke

    DrFunke Active Member

    Joined:
    Mar 30, 2017
    Messages:
    121
    Likes Received:
    103
    @Dalavar, I am interested in your monster AR calculation. My understanding is that monster AR for each body part is based on % chance of a body part being hit or something like this...

    If Monster AR = 60 then
    Head AR: 14% * 60 = 8.4
    Neck AR: 7% * 60 = 4.2
    Hand AR: 7% * 60 = 4.2
    Arm AR: 14% * 60 = 8.4
    Chest AR: 44% * 60 = 26.4
    Leg AR: 14% * 60 = 8.4

    Average armor would then be a weighted average based on odds of a particular area. For a hundred hits this would be...

    (8.44*14+4.2*7+4.2*7+8.4*14+26.4*44+8.4*14)/100
    = 15.73 average armor

    Applying the (1d50+50)/100 absorb multiplier...

    [(1+50)/2+50]/100=75.5%
    75.5%*15.73=11.87 damage absorbed

    At least that is the way I have it in my spreadsheet. Admittedly that could be wrong which is why I’d be interested in how you came up with an average absorb of 10.

    -Edited to include the absorb %.
    Last edited: Nov 3, 2020
  15. Xavant_BR

    Xavant_BR Well-Known Member

    Joined:
    Apr 2, 2018
    Messages:
    1,304
    Likes Received:
    1,467
    All you guys are talking here is very interesting.. and have potential to impact the price of some "slow" weapons.. 10 points absorbed by a armor from a katana impact more the % of damage than in a halberd hit if we follow the logic.
  16. Keza

    Keza Renaissance Staff
    Renaissance Staff

    Joined:
    Jan 6, 2015
    Messages:
    2,194
    Likes Received:
    4,236
    I'll help make one thing clear. Damage vs. any NPC/monster is calculated off their Armor Rating, not their armor worn. Additionally, wearing armor doesn't add to any NPC or monsters armor rating, its a preset value thats coded into them. So dragons with their 60 Armor will always absorb WAY more damage then any player ever could. The MAX armor a player can have to deflect any hit is only 24 (Invul chest plate). Yes, players can reach almost 80 armor overall but the math still goes off one piece at a time.

    Guard Stats.jpg
  17. DrFunke

    DrFunke Active Member

    Joined:
    Mar 30, 2017
    Messages:
    121
    Likes Received:
    103
    So what you are saying @Keza is that when hitting a dragon with 60 ar, the calculation for hits absorbed is...

    Avg. Absorb percentage
    [(1+50)/2+50]/100=75.5%
    75.5% * 60 ar = 45.3 damage absorbed on average. (This ignores the halving that’s done at the end of the actual damage calc.)

    ...or in narrative, mobs have essentially only one body part (armorwise) you can hit which always has the rated armor?
  18. Keza

    Keza Renaissance Staff
    Renaissance Staff

    Joined:
    Jan 6, 2015
    Messages:
    2,194
    Likes Received:
    4,236
    Yes, monsters basically only have one body part and their armor rating is coded into them before they even spawn. It is a bit unfair to players, mostly because the majority of armor worn in pvp is leather (13 AR chest). IF that chest piece is hit then you have a small reduction on melee damage. Other servers have changed their whole player AR system so your total armor rating is used vs. piece by piece. I dont expect UOR would ever change the classic system currently in use.
    DrFunke likes this.
  19. Dalavar

    Dalavar Well-Known Member
    UO:R Subscriber

    Joined:
    Aug 11, 2013
    Messages:
    3,336
    Likes Received:
    1,915
    @DrFunke I think we're pretty close. Here's what I have for a formula for average damage blocked by an AR60 monster:

    Code:
    =average(((0.07*0.14+0.14*0.14+0.15*0.15+0.22*0.22+0.35*0.35)*60)/2,(0.07*0.14+0.14*0.14+0.15*0.15+0.22*0.22+0.35*0.35)*60)+1
    It's been a solid five years since I've played or poked around in this code, but if I had to guess based on eyeballing things... it looks like you're applying chance-to-hit-a-body-area which is used for players, whereas I think I found some RunUO code that showed it was not quite precisely that for monsters.

    EDIT: here is the code I believe I used for my formula:
    Code:
    if ( virtualArmor > 0 )
                {
                    double scalar;
    
                    if ( chance < 0.14 )
                        scalar = 0.07;
                    else if ( chance < 0.28 )
                        scalar = 0.14;
                    else if ( chance < 0.43 )
                        scalar = 0.15;
                    else if ( chance < 0.65 )
                        scalar = 0.22;
                    else
                        scalar = 0.35;
    
                    int from = (int)(virtualArmor * scalar) / 2;
                    int to = (int)(virtualArmor * scalar);
    
                    damage -= Utility.Random( from, (to - from) + 1 );
                }
    
                return damage;
    I'm not an engineer/coder though, so I am definitely not 100% sure that this is the actual relevant code, nor am I sure I interpreted it correctly :)

    DOUBLE EDIT: I forgot to add the "+1" in my formula; I've corrected my screenshot and formula.
    Last edited: Nov 5, 2020
    DrFunke likes this.
  20. Dalavar

    Dalavar Well-Known Member
    UO:R Subscriber

    Joined:
    Aug 11, 2013
    Messages:
    3,336
    Likes Received:
    1,915
    See my code snippet above from RunUO... I actually think monsters actually do have body parts. Or at least... the code is trying to pretend they do.
    DrFunke likes this.

Share This Page