Archery Damage

Discussion in 'General Discussion' started by Sutebun, Aug 9, 2023.

  1. Sutebun

    Sutebun New Member

    Messages:
    3
    Hello,

    I am wondering how archery damage is calculated (before AAs and disc) on TAKP. It looks like on P99 and for a long time on live EQ it used strength instead of dexterity, and that bonus damage was calculated from the weapon equipped in your main hand (leading to some wonky interactions with slow 2hers).

    Do these hold true on this server? Is there a known general formula for damage including stats/damage bonuses? Thanks!
     
  2. Kithani

    Kithani Well-Known Member

    Messages:
    70
    Since the server is open source everything is “known” but I don’t know if anyone has dove in and posted the formula for archery damage.
     
  3. Sutebun

    Sutebun New Member

    Messages:
    3
    These are from server / zone / attack.cpp.

    Found this in reference to first part:

    So looks like the first part for Dex VS Str.... it is using Dex for some of the bonus. In other words from above, offense_calculation = offense_skill + specialATKbonuses + DexBonus.

    For second part, range weapon / archery damage bonus...this is harder for me and I still don't really understand it.

    I was trying to follow how "Melee" (physical) damage is calculated, and it seems to be basically the game is trying to run a calculation through it's base_damage and damage_bonus functions. While looking at damage bonus code though I don't see anything calling out range slot. So maybe it is using main hand bonus, or maybe there is no range bonus? No idea.

    The trail I was following:
     
    Last edited: Aug 9, 2023
    Hoodlum likes this.
  4. Yaximus

    Yaximus Member

    Messages:
    107
    The damage bonus on bows thing doesn't sit right with me as I played a ranger back in the day. I feel like if 2hander damage bonus was being applied it would have been noticed by Luclin and every ranger would be walking around with dathor great hammers.

    So I had a quick google and found a couple of comments, by no means conclusive but still:
    https://everquest.allakhazam.com/db/item.html?item=17778#m104028686471019
    Dec 19 2002 at 3:59 AM
    there is no minimum damage on bows because i can hot from 1 to 474 on a running mob and do. its when you hit for 8 on a stationary mob with trueshot discipline up thats a problem when the max is 1880 !

    https://everquest.allakhazam.com/db/item.html?item=2668&p=1#m104333093883349
    Jan 23 2003 at 9:37 AM
    There is no damage bonus on arrows. If there was, you wouldnt hit for 1 dam every now and then. The only dam bonus is main hand weapon.

    With regard to the January 17, 2001 patch note:

    - The ranger's "Trueshot" discipline has had its damage increased after
    analyzing data from its fix last week. Prior to the last patch, all
    bows, while under the discipline, were hitting as if they were 45dmg
    bows regardless of the delay. Last week's patch fixed it so that damage
    was based on the damage of the bow. This weeks patch increases damage
    bonuses in relation to delay (longer delays yield better damage
    bonuses).

    There is a comment that does seem to align that longer delay bows received higher damage bonus during Trueshot.

    https://everquest.allakhazam.com/db/item.html?item=17778#m106701602090288
    Oct 24 2003 at 12:26 PM

    Number 3: The trueshot discapline grants higher crits for bows with higher delays. To test the truth of this, get 2 bows with the same damage and different delays. Trueshot with both of them enough and you will come to see that the one with the higher delay crits harder, despite having equal damage. Therefore, a stonewood, for instance, probably out performes a featherwood during trueshot.

    Perhaps the patch note is merely referencing that Trueshot gave a high bonus damage calculation due to delay rather than referencing damage bonus on melee weapons.
     
  5. Yaximus

    Yaximus Member

    Messages:
    107
    Another comment regarding Trueshot increasing damage bonus / modifier according to delay:

    https://everquest.allakhazam.com/db/item.html?item=5522&p=2#m99021051596414
    May 18 2001 at 1:28 PM
    Acutally highest critical using trueshot on the glade is said to be 1100ish on a velk the sorcery. The bow was a efetti bow. Since delay is one of the factors in damage on trueshot. IE higher delay larger hits.
     
  6. Torven

    Torven I Feel Loved

    Messages:
    2,742
    Archery does not get a damage bonus here. Client::Attack() is the melee routine. The archery routine is DoArcheryAttackDmg() in special_attacks.cpp.

    Archery damage still is not perfect here. I got it 99% right before Luclin launched and moved on to develop zones. Melee damage is more accurate and for example a Blade of War will do the correct 321/528 normal/crit max hits. I did some investigating on this today and it appears that there's some rounding error somewhere making normal shots do a couple extra damage and Trueshot damage is a bit too low. How Trueshot works exactly is a little fuzzy and simply multiplying by 1x or 1.05x doesn't fit perfectly. Currently Stonewood+Blessed max hits are 674 and 1154 when they should be 672 and 1150, and under TS max crit seems to be 2296 when it should be 2320 because our multiplier is 1x.

    The basic archery damage math that I'm aware of as of now is this:

    dmg = bow dmg + arrow dmg = 57 for stonewood + blessed arrows
    max AM0 non-crit non-TS moving hit = INT(dmg * 2.95) = 168 for stonewood + blessed arrows
    max AM0 non-crit non-TS stationary hit = doubled = 336 for stonewood + blessed arrows
    max AM3 non-crit non-TS stationary hit = doubled = 672 for stonewood + blessed arrows
    max AM3 critical non-TS stationary hit = INT(672*1.7+0.5)+8 = 1150 for stonewood + blessed arrows
    max AM3 critical TS stationary hit = INT(INT(672*2.025)*1.7+0.5)+8 = 2320 for stonewood + blessed arrows

    The problem I have is that I'm seeing 2.05 as the TS multiplier on some webpages (or +105%) and this doesn't fit. 2.025 doesn't fit perfectly for other bows either but it's still closer than 2.05. I'll probably bump our multiplier to +102%. The way it's implemented can't do fractions but if I had the precise logic I'd rip it out and hardcode it.
     
    Linkamus, Phaeton, Dairmuid and 4 others like this.
  7. Sutebun

    Sutebun New Member

    Messages:
    3
    Thanks all appreciate the answers!
     
  8. Gorgolax

    Gorgolax New Member

    Messages:
    1
    So, Strength or Dexterity? Or something else?