Project 1999

Go Back   Project 1999 > Blue Community > Blue Server Chat

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2023, 08:06 AM
magnetaress magnetaress is offline
Planar Protector

magnetaress's Avatar

Join Date: Feb 2020
Location: Inside of you.
Posts: 10,241
Default

if u want to hit hard don't roll a caster
__________________
Apophis is closest to earth on 2029 April the 13th (a friday) lol

***this post is purely spiritual, speculative, apolitical and nonpartisan in nature.
Reply With Quote
  #2  
Old 02-24-2023, 11:35 AM
Toxigen Toxigen is offline
Banned


Join Date: Jan 2021
Posts: 4,776
Default

can we get a tldr on this
Reply With Quote
  #3  
Old 02-24-2023, 03:23 PM
7thGate 7thGate is offline
Sarnak


Join Date: Dec 2015
Posts: 370
Default

Its kind of interesting, the Damage Table appears to be where this might be adding in as far as I can tell. Here's where it is in EqEmu: https://github.com/EQEmu/Server/blob...tack.cpp#L4690

If I am reading this correctly, its taking your offense and subtracting some number from the table, then dividing that by 2, then doing a random between 0 and that number to add as an extra % to your damage.

So here's an example level 60 damage table entry:

{ 285, 23, 65 }, // 60

Those numbers are Max Extra, Chance, Minusfactor.

There's a 23% chance it just doesn't do anything on a hit. Then subtracts 65 from offense, which has GetAtk as a component, divides by 2, does a random between 0 and (offense - 65)/2 and adds to 100, compares to 285 to see which is smaller, then uses that.

I think based on that, this would lead to larger max hits if (offense - 65)/2 +100 is smaller than 285, because then you can't cap.

offense appears to be skill+atk+(2 * str-150)/3. At 225 Str, on an sk with a 225 skill cap, that would be (225 + (225*2 -150)/3 - 65)/2 + 100, which is 230, so under 285. Up to 110 additional atk would increase max damage. For a Rogue with Epic and 255 Str, it would be (250+(255*2-150)/3+40-65)/2 + 100, which is at 272.5, so up to 25 ATK would increase max damage. Rogues getting Raid buffed will usually have VoG and some combination of Aura of Battle/Grim Aura/Strength of Nature/Call of the Predator, which would make something like Avatar or Bard +ATK songs not add any additional max damage.

Additional +ATK would still impact the roll20 function, which was applied before the damage table as a multiplier between 0.1 and 2.0 that was dependent on the relative offense vs. ac rolls.

I bet this effect is why there are a lot of claims +ATK doesn't add to max damage but only skews the distribution, but you're seeing a +max damage boost from it.

What is really interesting to me is that the actual Offense skill doesn't seem to be used as part of the damage calc directly, just as part of the compute_tohit here: https://github.com/EQEmu/Server/blob...ttack.cpp#L149

Whew, all this stuff is complicated. I wonder how much P99 changed it as well?
__________________
Jayya - 60 Rogue, Officer <Auld Lang Syne>

Sanctum Low Man Vindi Kill: https://www.youtube.com/watch?v=xyZfNjvsDRE
Last edited by 7thGate; 02-24-2023 at 03:52 PM.. Reason: Fixing Math Again -- I apparently can't math today
Reply With Quote
  #4  
Old 02-24-2023, 04:17 PM
DeathsSilkyMist DeathsSilkyMist is offline
Planar Protector

DeathsSilkyMist's Avatar

Join Date: Jan 2014
Posts: 8,205
Default

Quote:
Originally Posted by 7thGate [You must be logged in to view images. Log in or Register.]
Its kind of interesting, the Damage Table appears to be where this might be adding in as far as I can tell. Here's where it is in EqEmu: https://github.com/EQEmu/Server/blob...tack.cpp#L4690

If I am reading this correctly, its taking your offense and subtracting some number from the table, then dividing that by 2, then doing a random between 0 and that number to add as an extra % to your damage.

So here's an example level 60 damage table entry:

{ 285, 23, 65 }, // 60

Those numbers are Max Extra, Chance, Minusfactor.

There's a 23% chance it just doesn't do anything on a hit. Then subtracts 65 from offense, which has GetAtk as a component, divides by 2, does a random between 0 and (offense - 65)/2 and adds to 100, compares to 285 to see which is smaller, then uses that.

I think based on that, this would lead to larger max hits if (offense - 65)/2 +100 is smaller than 285, because then you can't cap.

offense appears to be skill+atk+(2 * str-150)/3. At 225 Str, on an sk with a 225 skill cap, that would be (225 + (225*2 -150)/3 - 65)/2 + 100, which is 230, so under 285. Up to 110 additional atk would increase max damage. For a Rogue with Epic and 255 Str, it would be (250+(255*2-150)/3+40-65)/2 + 100, which is at 272.5, so up to 25 ATK would increase max damage. Rogues getting Raid buffed will usually have VoG and some combination of Aura of Battle/Grim Aura/Strength of Nature/Call of the Predator, which would make something like Avatar or Bard +ATK songs not add any additional max damage.

Additional +ATK would still impact the roll20 function, which was applied before the damage table as a multiplier between 0.1 and 2.0 that was dependent on the relative offense vs. ac rolls.

I bet this effect is why there are a lot of claims +ATK doesn't add to max damage but only skews the distribution, but you're seeing a +max damage boost from it.

What is really interesting to me is that the actual Offense skill doesn't seem to be used as part of the damage calc directly, just as part of the compute_tohit here: https://github.com/EQEmu/Server/blob...ttack.cpp#L149

Whew, all this stuff is complicated. I wonder how much P99 changed it as well?
Yeah I think that is a good overview of the code!

My SK is 58, so he would be using this table entry: { 265 Max Extra, 28 Chance, 70 Minusfactor.}

I had slightly off numbers for my STR and Offense. He has 226 STR and 224 Offense, and +48 ATK with 2 AoB items, Firefist, and Grim Aura. He is using https://wiki.project1999.com/Eye_of_the_Rigtorgn , which has 25 Damage on it, and is a 1h weapon.

Based on the EQEMU formula my max damage would be as follows:

1. Calculate the "Offense" variable, which isn't simply the offense skill: 224 Offense Skill + ((2 * 226 Strength - 150) / 3) + 48 ATK = 372.6666666666667.

2. Apply the damage table:
2a. 372.6666666666667 "Offense" - 70 Minusfactor = 302.6666666666667
2b. (302.6666666666667 / 2) + 100 = 251.3333333333334 "extra percent damage"
2c. ((25 Weapon Damage * 2) * 251.3333333333334) / 100 = 125.6666666666667 damage. Add the 11 main hand weapon bonus for a total of 136 max damage. I have only hit for 132 so far, but maybe I could go a bit higher, or the calculation is a tad different on P99.

The one assumption I am making is they are multiplying weapon damage by 2 on step 2c. I can't actually find that anywhere in the code, but it is common knowledge that weapon damage is multiplied by 2.

Either that is P99 specific, or somewhere in the code I can't find. The function that pulls weapon damage on EQEMU seems to just pull the raw damage value. Maybe the damage gets doubled somewhere else a bit further along the function chain.
Last edited by DeathsSilkyMist; 02-24-2023 at 04:25 PM..
Reply With Quote
  #5  
Old 02-24-2023, 07:07 PM
Vivitron Vivitron is offline
Sarnak


Join Date: Apr 2020
Posts: 478
Default

Quote:
Originally Posted by DeathsSilkyMist [You must be logged in to view images. Log in or Register.]
Yeah I think that is a good overview of the code!

My SK is 58, so he would be using this table entry: { 265 Max Extra, 28 Chance, 70 Minusfactor.}

I had slightly off numbers for my STR and Offense. He has 226 STR and 224 Offense, and +48 ATK with 2 AoB items, Firefist, and Grim Aura. He is using https://wiki.project1999.com/Eye_of_the_Rigtorgn , which has 25 Damage on it, and is a 1h weapon.

Based on the EQEMU formula my max damage would be as follows:

1. Calculate the "Offense" variable, which isn't simply the offense skill: 224 Offense Skill + ((2 * 226 Strength - 150) / 3) + 48 ATK = 372.6666666666667.

2. Apply the damage table:
2a. 372.6666666666667 "Offense" - 70 Minusfactor = 302.6666666666667
2b. (302.6666666666667 / 2) + 100 = 251.3333333333334 "extra percent damage"
2c. ((25 Weapon Damage * 2) * 251.3333333333334) / 100 = 125.6666666666667 damage. Add the 11 main hand weapon bonus for a total of 136 max damage. I have only hit for 132 so far, but maybe I could go a bit higher, or the calculation is a tad different on P99.

The one assumption I am making is they are multiplying weapon damage by 2 on step 2c. I can't actually find that anywhere in the code, but it is common knowledge that weapon damage is multiplied by 2.

Either that is P99 specific, or somewhere in the code I can't find. The function that pulls weapon damage on EQEMU seems to just pull the raw damage value. Maybe the damage gets doubled somewhere else a bit further along the function chain.
This formula works out perfectly for the high str/attack rogue with a 15 damage weapon*. It also works out perfectly for all of your shaman's avatar numbers**. (Edit: this might work for your shaman's non-avatar numbers too but I'm not sure on your exact +atk and exact str.)

To me these numbers suggest that the October 2001 patch to bring (edit: pally/sk/bard) onto the (edit: high) damage table has not been applied to p1999. https://web.archive.org/web/20011113...ML/000346.html

* Eqemu damage table of { 285, 23, 65 }
** Eqemu damage table of { 210, 49, 105 }
Last edited by Vivitron; 02-24-2023 at 07:24 PM..
Reply With Quote
  #6  
Old 02-24-2023, 07:27 PM
7thGate 7thGate is offline
Sarnak


Join Date: Dec 2015
Posts: 370
Default

Quote:
Either that is P99 specific, or somewhere in the code I can't find. The function that pulls weapon damage on EQEMU seems to just pull the raw damage value. Maybe the damage gets doubled somewhere else a bit further along the function chain.
I believe this comes in the Roll20 function. Its called as part of MeleeMitigation here: https://github.com/EQEmu/Server/blob...ttack.cpp#L960

RollD20 is selecting one of these values to multiply the damage by: https://github.com/EQEmu/Server/blob...ttack.cpp#L915 , based on the difference between an offense roll and an AC roll. This is how additional +ATK increases average damage even if it doesn't increase max damage.

MeleeMitigation is called here, right before the damage table is applied: https://github.com/EQEmu/Server/blob...tack.cpp#L1348
__________________
Jayya - 60 Rogue, Officer <Auld Lang Syne>

Sanctum Low Man Vindi Kill: https://www.youtube.com/watch?v=xyZfNjvsDRE
Reply With Quote
  #7  
Old 02-26-2023, 08:31 PM
Vivitron Vivitron is offline
Sarnak


Join Date: Apr 2020
Posts: 478
Default

Quote:
Originally Posted by DeathsSilkyMist [You must be logged in to view images. Log in or Register.]
1. Calculate the "Offense" variable, which isn't simply the offense skill: 224 Offense Skill + ((2 * 226 Strength - 150) / 3) + 48 ATK = 372.6666666666667.
I was poking around the eqemu code a little too and I think the skill used in the "offense" calculation is (confusingly) the weapon skill not the offense skill.
Reply With Quote
  #8  
Old 02-27-2023, 12:18 AM
Swish Swish is offline
Planar Protector

Swish's Avatar

Join Date: Nov 2010
Posts: 20,070
Default

Quote:
Originally Posted by Vivitron [You must be logged in to view images. Log in or Register.]
I was poking around the eqemu code a little too and I think the skill used in the "offense" calculation is (confusingly) the weapon skill not the offense skill.
[You must be logged in to view images. Log in or Register.]
__________________
Reply With Quote
  #9  
Old 02-27-2023, 01:01 AM
Vivitron Vivitron is offline
Sarnak


Join Date: Apr 2020
Posts: 478
Default

Quote:
Originally Posted by Swish [You must be logged in to view images. Log in or Register.]
[You must be logged in to view images. Log in or Register.]
Code:
	// The Sleeper Tomb Avatar proc counts towards item ATK
	// The client uses a 100 here, so using a 100 here the client and server will agree
	// For example, if you set the effect to be 200 it will get 100 item ATK and 100 spell ATK
	if (IsValidSpell(SPELL_AVATAR_ST_PROC) && FindBuff(SPELL_AVATAR_ST_PROC)) {
		itembonuses.ATK += 100;
		spellbonuses.ATK -= 100;
	}
Reply With Quote
  #10  
Old 02-27-2023, 01:54 AM
DeathsSilkyMist DeathsSilkyMist is offline
Planar Protector

DeathsSilkyMist's Avatar

Join Date: Jan 2014
Posts: 8,205
Default

Quote:
Originally Posted by Vivitron [You must be logged in to view images. Log in or Register.]
I was poking around the eqemu code a little too and I think the skill used in the "offense" calculation is (confusingly) the weapon skill not the offense skill.
Yes, I saw that too. I assume on P99 they changed that part of the code. The normal EQEMU codebase supports expansions past Velious, so that is probably related to future expansions. I am mostly curious to see if the max damage formula is the same as EQEMU. That indicates they didn't have any data from classic to justify changing the formula. The formulas in P99 are probably the same as EQEMU in any situation where they couldn't find an alternative.
Reply With Quote
Reply


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

BB 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 03:57 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.