Damage Output Calculations

Don't know how something works? Here you will find some useful links. And if you have a question, feel free to ask.
Post Reply
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Damage Output Calculations

Post by MagicUser »

I had set my mind on creating a relayer spreadsheet a long time ago. I created one. I revised it. I revised it some more. It is all mine blah blah. One of the features I looked into for it was to have a damage calculation. I mean how cool would it be to see how your change in armor will affect your future game style.
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

This is a zip of the relayer spreadsheet I made. I will post my more formal question about the damage calculator later.
Attachments
Relayer plan.zip
(68.98 KiB) Downloaded 148 times
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

I apologize for the long delay. I had a really long term at school and decided to wait for winter break. Okay so my formal question involves, as the title suggests, the games damage calculations.

This is not where I found the information originally but the post is close to what I had found.
http://uoex.net/forum/viewtopic.php?f=1 ... dmg#p72858

Eless has some good points, mainly the webpages as that is where I originally went to find out more about the calculations.
Eless wrote:1. You can only add points up to the cap, so 20% to a weapon that has already 30% DI.
2. All stuff that you wear including your weapon.
3. Check this webpage: http://www.uoguide.com/Damage_Calculations except that we don't have the 300% limit that they state (so another factors are your skills and your strength, and some spells like enemy of one).
4. Don't know
I just found this, but it might have been the answer to my question.
http://uoex.net/forum/viewtopic.php?f=25&t=6052#p36157

I have formulas that I am using so i will list them.... post this.... and then go test the link I just found. If I find that this works as I intend excel the discussion is over... if not :grins: this could be fun.
The appearance of my current dmg calculation area
The appearance of my current dmg calculation area
appearance.PNG (36.01 KiB) Viewed 2771 times
I have the user put in their Tactics, Anatomy, Lumberjacking, Axe equipped, Weapon Low and Weapon high. Still a work in progress, my set up which allows for your current armor to be evaluated for your current stats has not been used for this all that much. This would remove the need for a few parameters, but at the same time there is a possibility that someone might want to check out a completely random weapon that they do not want to have to put in all the data for. This is just a base dmg calculation and as I say there is no spells, rpd, or monster consideration.

This is the formula that I am using in the current (incorrect) calculation.

Code: Select all

=IF((IF(L76>=100,L76/1.6+6.25,L76/1.6)+IF(N76>=100,N76/2+5,N76/2)+IF(P77>=100,P77/5+10, 0)+IF(R77>=100,R77*0.3+5,R77*0.3)+T77)>=400,400,(IF(L76>=100,L76/1.6+6.25,L76/1.6)+IF(N76>=100,N76/2+5,N76/2)+IF(P77>=100,P77/5+10, 0)+IF(R77>=100,R77*0.3+5,R77*0.3)+T77))
L76 is Tactics. N76 is Anatomy. P77 is the effective lumber jacking. R76 is the current strength and T76 is the current DI.
In normal C coding (I hear the shard is coded in C so I figured it would be easier to check) it would look something like this:

Code: Select all

#import <stdio.h>
int main() {
	result = formula(tactics, anatomy, lumberjacking, currStr, currDI);
	printf(%d, result);
	return 0;
}
int formula(float tactics, float anatomy, float lumberjacking, int str, int DI) {
	float result  = 0;
	
	if (tactics >= 100) {
		result += tactics/1.6 + 6.25;
	}
	else {
		result += tactics/1.6;
	}
	
	if (anatomy >= 100) {
		result += anatomy/2 + 5;
	}
	else {
		result += anatomy/2;
	}
	
	if (lumberjacking >= 100) {
		result += lumberjacking/5 + 10;
	}
	
	if (str >= 100) {
		result += ((float)str)*.3 + 5;
	}
	else {
		result += ((float)str)*.3;
	}
	
	result += DI;
	
	if (result > 400) {
		result = 400;
	}
	
	return result;
}
One thing that I am the most curious about is if the max of 400 is in place here? I did some testing which you can see at the bottom right corner and those were the results for certain items with different base damages. Some of them looked to be over the 400% cap.

I guess I can also do some black box testing with a new character and then get the character up to various levels to see if the calculations are working right... that seems super tedious though.
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

Diclaimer... Untested code is code that will fail. There is a high probability for syntax errors (not initializing result to a proper float 0.0 for example) it is meant only as a help to understand what excel is doing. I find excels formulas to be messy and irritatingly sloppy. Such is life I guess. Also the first pasted code was for the goal dmg output as that had the >= 400 and the current did not. This meant that the goal dmg formula ended up being the one referenced rather than the current dmg formula. I can't seem to edit the post so this is my way of trying to keep people from confusion.

As always please ignore spelling errors. Feel free to correct me.
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

Haha darn. I had high hopes. The GUI looks really nice and though it has a few bugs looks like it was made very well.
SoClose.png
SoClose.png (689.58 KiB) Viewed 2759 times
A few things to notice. My base was 15-17 with the ax (notice the word choice, only an ax can have lumber jacking bonus). My Damage increase from all my armor is over 100% (just use 100%). My skills are what I say they are. I have no buffs on. The game damage on the character status bar is different then the Damage min-max. Okay so then the question remains how to test if either is right or wrong. So far I have just been trusting the character status bar and the formula's given. As I am performing black box testing I can only do so much without access to the code (this is fine I am just reasoning things out). To show an error I need to prove by contradiction (the easiest). If I assume correct and then find an instance where it is incorrect then the code is buggy.

The easiest code to prove buggy will probably be the nice GUI. So I guess that is what I will try to do first.
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

Okay, did that so the status bar is believable. The Damage Calculator is not. There is a possibility that I am actually adding more error, but for the sake of simplicity I chose a personal trainer with no stat clothes on. I assumed this would be the best way to test out the actual dmg done without finding another player in guild, asking to strip them, and then beating them to the brink of death repeatedly.
Annotation 2019-12-15 100129.png
Annotation 2019-12-15 100129.png (471.86 KiB) Viewed 2799 times
I found that when beating the trainer over the head with the double axe 100 times I got a minimum dmg of 70 and max dmg of 79. Now I only hit 3 numbers (70, 75, and 79), but the fact remains that I never once got more than 79 or less than 70. This would lead me to believe that the Character status bar is an accurate reflection of the max and min damage. To prove this I would have to test every single possible scenario and I don't feel like that is worth my time. It seems reasonable just to continue trusting it as I was before. That means that the calculations in the Damage Calculator are wrong. Thankfully I have the source file and my copy separated so I can edit to my hearts content. Since it is consistently close to the actual answer it seems like a good idea to just continue with the GUI version that someone else created. Especially since they said it works for them.
Respectfully,
Paroxysmus ILV Master Spellcaster
User avatar
Devlin
Legendary Scribe
Posts: 647
Joined: Thu Mar 18, 2010 12:50 pm

Re: Damage Output Calculations

Post by Devlin »

- If there is a cap, it isn't 400%. Did some testing; my damage range continued to boost until about 420%, when I ran out of things I could increase it with ;P

- The status bar is absolutely accurate. What it shows is the range you'll hit for with no modifiers (enemy of one, consecrate weapon, abilities, etc.). Side note: Divine fury adds about a 10% damage bonus to your base damage. UOguide says 20%, but my numbers show ~10%.

- Your stat caps are slightly off. DCI's cap is 55%, if you factor in the 10% penalty from divine fury. Regens are close; source can be found here: viewtopic.php?f=1&t=4688

- Debeza's script does work, with the exception of the Axe/LJ additional damage calculation. Looks like he missed a small step in the calculation for the LJ bonus.

set %lumberjackingBonus ( ( %lumberjackingBonus + 10 ) * 1000 )

I've gone ahead and updated the script to fix the LJ damage bonus and autopop the strength/skill levels. You just need to replace the min/max of the wep, dmg inc, and say if it's an axe or not.

Code: Select all

; Script: Beza's Base Damage Calculator
; Author: Beza
; Revised by: Devlin 12/15/19
; Current Version: 2.0
; Purpose: The user plugs in the information and the
;          script gives the minimum and maximum base
;          damage.


    chooseskill Anatomy
    {
    set %Anatnum ( #skill / 10 )
    }
    set #skill #n/a
    chooseskill Tactics
    {
    set %Tactnum ( #skill / 10 )
    set #skill #n/a
    }
    chooseskill Lumberjacking
    {
    set %LJNum ( #skill / 10 )
    set #skill #n/a
    }
    
    menu clear
    menu show
    menu window size 400 400
    menu Window Title Damage Calculator
    menu Text MinimumBaseDamageText 10 20 Min Base Damage of Weapon:
    menu Edit MinBaseDamageEdit 220 20 50 18
    menu Text Test1 275 20 Replace w/ Min Dmg

    menu Text MaximumBaseDamageText 10 60 Max Base Damage of Weapon:
    menu Edit MaxBaseDamageEdit 220 60 50 20
    menu Text Test2 275 60 Replace w/ Max Dmg
    
    menu Text StrengthText 10 100 Character Strength:
    menu Edit StrengthEdit 220 100 50 #str
    menu Text Test3 275 100 Autopopulates

    menu Text TacticsText 10 140 Tactics:
    menu Edit TacticsEdit 220 140 50 %Tactnum
    menu Text Test4 275 140 Autopopulates
    
    menu Text AnatomyText 10 180 Anatomy:
    menu Edit AnatomyEdit 220 180 50 %Anatnum
     menu Text Test5 275 180 Autopopulates
     
    menu Text LumberjackingText 10 220 Lumberjacking:
    menu Edit LumberjackingEdit 220 220 50 %LJNum
    menu Text Test6 275 220 Autopopulates
    
    menu Text DamageIncreaseText 10 260 Damage Increase %:
    menu Edit DamageIncreaseEdit 220 260 50 100
    menu Text Test6 275 260 Replace w/ Gear DI%
    
    menu Text AxeWeaponText 10 300 Axe Weapon:
    menu combo create AxeWeaponCombo 220 300 50
    menu combo add AxeWeaponCombo No
    menu combo add AxeWeaponCombo Yes
    menu Text Test7 275 300 Yes or No

    menu Button Calculate 10 350 90 25 Calculate

    ;menu get MinBaseDamageEdit
    ;menu get MaxBaseDamageEdit
    ;menu get StrengthEdit
    ;menu get TacticsEdit
    ;menu get AnatomyEdit
    ;menu get LumberjackingEdit
    ;menu get DamageIncreaseEdit
    ;menu get AxeWeaponCombo


    set #MENUBUTTON n/a


    loop:
    if #MENUBUTTON = Calculate
{
   menu get minBaseDamageEdit
   set %minBaseDamageEdit #menures
   wait 2
   menu get maxBaseDamageEdit
   set %maxBaseDamageEdit #menures
   wait 2
   menu get StrengthEdit
   set %strengthEdit #menures
   wait 2
   menu get TacticsEdit
   set %tacticsEdit #menures
   wait 2
   menu get AnatomyEdit
   set %anatomyEdit #menures
   wait 2
   menu get LumberjackingEdit
   set %lumberjackingEdit #menures
   wait 2
   menu get DamageIncreaseEdit
   set %damageIncreaseEdit #menures
   wait 2
   menu get AxeWeaponCombo
   set %axeWeaponCombo #menures


   ; setting up tactics bonus
   set %tacticsDividerX625 ( %tacticsEdit * 625 )
   set %tacticsAdder 6250 ; 6.25
   set %tacticsAdjustedBonus   %tacticsDividerX625
   if %tacticsEdit => 100
   {
   set %tacticsAdjustedBonus ( %tacticsAdjustedBonus +  %tacticsAdder )
      }
   set %tacticsBonus ( %tacticsAdjustedBonus )


   ; setting up anatomy bonus
  set %anatomyBonus  ( %anatomyEdit / 2 )
  if %anatomyEdit => 100
  {
  set %anatomyBonus ( %anatomyBonus + 5 )
  set %anatomyBonus ( %anatomyBonus * 1000 )

  }


  ; setting up Strength Bonus
  set %strengthAdjustedBonus ( %strengthEdit * 3 )
  if %strengthEdit => 100
  {
  set %strengthAdjustedBonus ( %strengthAdjustedBonus + 50 )
    }
   set %strengthBonus ( %strengthAdjustedBonus * 100 )


  ; setting up Damage Increase  (capped at 100%)
  set %damageIncrease ( %damageIncreaseEdit * 1000 )

  wait 1

  ; setting up Lumberjacking Bonus
  if %axeWeaponCombo = 1
  {
  set %lumberjackingBonus 0
  }

  if %axeWeaponCombo = 2
  {
  set %lumberjackingBonus ( %lumberjackingEdit / 5 )
  if %lumberjackingEdit => 100
  {
  set %lumberjackingBonus ( ( %lumberjackingBonus + 10 ) * 1000 )
  }
  }
  ; setting up Min and Max Damage
  set %minDamage %minBaseDamageEdit
  set %maxDamage %maxBaseDamageEdit



  ; CALCULATING
  set %finalDamageBonus ( %tacticsBonus + %anatomyBonus + %lumberjackingBonus + %strengthBonus + %damageIncrease )
  set %finalDamageBonus ( %finalDamageBonus / 1000 )
  set %minFinalDamage ( %minDamage + ( %minDamage * %finalDamageBonus ) / 100 )

  set %maxFinalDamage ( %maxDamage + ( %maxDamage * %finalDamageBonus ) / 100 )

  wait 2

  display ok  Damage: %minFinalDamage - %maxFinalDamage

  halt












    }

    goto loop
     wait 1s




MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

Nice! Thank you Devlin. I have to be honest I kinda went and did something else for a while.
Respectfully,
Paroxysmus ILV Master Spellcaster
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

Alright I did some testing with my various weapons and decided to do a exceptional weapon bonus. I was told that the bonus was a flat 35%. It appears to be a lot closer to 20%. Every test that I have conducted with exceptional vs non exceptional, 20% bonus for exceptional has given me the right answer.

I also edited the Damage Calculator so that it starts at the bare handed stats and then you change. Another thing was that you had to restart the script every time which was really annoying. Instead the script now repeats until you manually stop it. A possibly flaw is that you can enter bogus values at the moment and it will still try to compute. There is no user protection atm.

Code: Select all

; Script: Beza's Base Damage Calculator
; Author: Beza
; Revised by: Devlin 12/15/19
; Revised by: Paroxysmus 12/15/19
; Current Version: 3.0
; Purpose: The user plugs in the information and the
;          script gives the minimum and maximum base
;          damage.


    chooseskill Anatomy
    {
    set %Anatnum ( #skill / 10 )
    }
    set #skill #n/a
    chooseskill Tactics
    {
    set %Tactnum ( #skill / 10 )
    set #skill #n/a
    }
    chooseskill Lumberjacking
    {
    set %LJNum ( #skill / 10 )
    set #skill #n/a
    }

    menu clear
    menu show
    menu window size 400 410
    menu Window Title Damage Calculator
    menu Text MinimumBaseDamageText 10 20 Min Base Damage of Weapon:
    menu Edit MinBaseDamageEdit 220 20 50 3
    menu Text Test1 275 20 Replace w/ Min Dmg

    menu Text MaximumBaseDamageText 10 60 Max Base Damage of Weapon:
    menu Edit MaxBaseDamageEdit 220 60 50 12
    menu Text Test2 275 60 Replace w/ Max Dmg

    menu Text StrengthText 10 100 Character Strength:
    menu Edit StrengthEdit 220 100 50 #str
    menu Text Test3 275 100 Autopopulates

    menu Text TacticsText 10 140 Tactics:
    menu Edit TacticsEdit 220 140 50 %Tactnum
    menu Text Test4 275 140 Autopopulates

    menu Text AnatomyText 10 180 Anatomy:
    menu Edit AnatomyEdit 220 180 50 %Anatnum
     menu Text Test5 275 180 Autopopulates

    menu Text LumberjackingText 10 220 Lumberjacking:
    menu Edit LumberjackingEdit 220 220 50 %LJNum
    menu Text Test6 275 220 Autopopulates

    menu Text DamageIncreaseText 10 260 Damage Increase %:
    menu Edit DamageIncreaseEdit 220 260 50 100
    menu Text Test6 275 260 Replace w/ Gear DI%

    menu Text ExceptionalCraftedText 10 300 Is It Exceptionally Crafted:
    menu combo create ExceptionallyCrafted 220 300 50
    menu combo add ExceptionallyCrafted No
    menu combo add ExceptionallyCrafted Yes
    menu Text Test7 275 300 Yes or No

    menu Text AxeWeaponText 10 340 Is It an Axe:
    menu combo create AxeWeaponCombo 220 340 50
    menu combo add AxeWeaponCombo No
    menu combo add AxeWeaponCombo Yes
    menu Text Test7 275 340 Yes or No

    menu Button Calculate 220 380 90 25 Calculate

    top:
    set #MENUBUTTON n/a

    loop:
    if #MENUBUTTON = Calculate
{
   menu get minBaseDamageEdit
   set %minBaseDamageEdit #menures
   wait 2
   menu get maxBaseDamageEdit
   set %maxBaseDamageEdit #menures
   wait 2
   menu get StrengthEdit
   set %strengthEdit #menures
   wait 2
   menu get TacticsEdit
   set %tacticsEdit #menures
   wait 2
   menu get AnatomyEdit
   set %anatomyEdit #menures
   wait 2
   menu get LumberjackingEdit
   set %lumberjackingEdit #menures
   wait 2
   menu get DamageIncreaseEdit
   set %damageIncreaseEdit #menures
   wait 2
   menu get ExceptionallyCrafted
   set %ExceptionallyCrafted #menures
   wait 2
   menu get AxeWeaponCombo
   set %axeWeaponCombo #menures


   ; setting up tactics bonus
   set %tacticsDividerX625 ( %tacticsEdit * 625 )
   set %tacticsAdder 6250 ; 6.25
   set %tacticsAdjustedBonus   %tacticsDividerX625
   if %tacticsEdit => 100
   {
   set %tacticsAdjustedBonus ( %tacticsAdjustedBonus +  %tacticsAdder )
      }
   set %tacticsBonus ( %tacticsAdjustedBonus )


   ; setting up anatomy bonus
  set %anatomyBonus  ( %anatomyEdit / 2 )
  if %anatomyEdit => 100
  {
  set %anatomyBonus ( %anatomyBonus + 5 )
  set %anatomyBonus ( %anatomyBonus * 1000 )

  }


  ; setting up Strength Bonus
  set %strengthAdjustedBonus ( %strengthEdit * 3 )
  if %strengthEdit => 100
  {
  set %strengthAdjustedBonus ( %strengthAdjustedBonus + 50 )
  }
  set %strengthBonus ( %strengthAdjustedBonus * 100 )


  ; setting up Damage Increase  (capped at 100%)
  set %damageIncrease ( %damageIncreaseEdit * 1000 )

  wait 1

  ; setting up Exceptionally crafted bonus.
  if %ExceptionallyCrafted = 1
  {
  set %craftedBonus 0
  }

  if %ExceptionallyCrafted = 2
  {
  set %craftedBonus 20000
  }

  ; setting up Lumberjacking Bonus
  if %axeWeaponCombo = 1
  {
  set %lumberjackingBonus 0
  }

  if %axeWeaponCombo = 2
  {
  set %lumberjackingBonus ( %lumberjackingEdit / 5 )
  if %lumberjackingEdit => 100
  {
  set %lumberjackingBonus ( ( %lumberjackingBonus + 10 ) * 1000 )
  }
  }
  ; setting up Min and Max Damage
  set %minDamage %minBaseDamageEdit
  set %maxDamage %maxBaseDamageEdit



  ; CALCULATING
  set %finalDamageBonus ( %tacticsBonus + %anatomyBonus + %lumberjackingBonus + %strengthBonus + %damageIncrease + %craftedBonus )
  set %finalDamageBonus ( %finalDamageBonus / 1000 )
  set %minFinalDamage ( %minDamage + ( %minDamage * %finalDamageBonus ) / 100 )

  set %maxFinalDamage ( %maxDamage + ( %maxDamage * %finalDamageBonus ) / 100 )

  wait 2

  display ok  Damage: %minFinalDamage - %maxFinalDamage

  goto top
  }

  goto loop
  wait 1s
Respectfully,
Paroxysmus ILV Master Spellcaster
User avatar
Devlin
Legendary Scribe
Posts: 647
Joined: Thu Mar 18, 2010 12:50 pm

Re: Damage Output Calculations

Post by Devlin »

MagicUser wrote:Alright I did some testing with my various weapons and decided to do a exceptional weapon bonus. I was told that the bonus was a flat 35%. It appears to be a lot closer to 20%. Every test that I have conducted with exceptional vs non exceptional, 20% bonus for exceptional has given me the right answer.
The 35% is just the damage increase stat you see on the weapon itself, similar to other armor pieces. The exceptional tag comes with a hidden, inherent damage bonus that isn't shown anywhere. It's +4 damage bonus compared to non-exceptional/looted weapons (to both min/max, although rounding may make it look like 3-5). I'm pretty sure it's from the old vanquishing/might/ruin system.

Code: Select all

// Old quality bonus:
#if false
/* Apply quality offset
* : Low : -4
* : Regular : 0
* : Exceptional : +4
*/
damage += ((int)m_Quality - 1) * 4.0;
#endif

/* Apply damage level offset
* : Regular : 0
* : Ruin : 1
* : Might : 3
* : Force : 5
* : Power : 7
* : Vanq : 9
*/
MagicUser
Master Scribe
Posts: 68
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

Re: Damage Output Calculations

Post by MagicUser »

Oh I see. We do not have any low quality attribute crafted though right?

Question to +folks.... will there ever be a crafting bonus/hindrance other than exceptional?

Also.... sounds like that would be a fantastic deed to create? I mean if you can make a weapon one handed, level it to a 100 with +45 points without actually doing combat, and apply all those various stats like luck and spell channeling, it seems that "A Deed of Weapon Excellence" or perhaps "A Certificate of Weapon Excellence" would be a nice addition. One could possibly do it as an auction item if one was too worried about the affect it might have on weapon sales. I am sure something that boosts the base weapon dmg by 4 points is extremely valuable.
Respectfully,
Paroxysmus ILV Master Spellcaster
Post Reply