Jump to content

Welcome to Obsidian Forum Community
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

[MECHANICS] The Big "Attack Speed" Conundrum

Mechanics Attack Speed Recovery Base Values

  • Please log in to reply
159 replies to this topic

#41
Boeroer

Boeroer

    Arch-Mage

  • Members
  • 7657 posts
  • Location:Bucharest, Romania
  • Lords of the Eastern Reach Backer
  • Deadfire Backer
  • Fig Backer
  • Black Isle Bastard!

Yes, Pen. Shot is wrong.

 

Do you mean dual wielding or two weapon style?

Dual wielding (using two weapons) still is 1.5 (it's not in the list), but Two Weapon Style is "only" 1.2 and comes on top. 



#42
Elric Galad

Elric Galad

    (8) Warlock

  • Members
  • 1160 posts
  • Location:Paris

Yes, Pen. Shot is wrong.

Do you mean dual wielding or two weapon style?
Dual wielding (using two weapons) still is 1.5 (it's not in the list), but Two Weapon Style is "only" 1.2 and comes on top.


I meant dual wielding itself. The talent is in the table, exactly where I expected it to be.

Dual wielding is somehow in the table because it affects what MaxQuest call "recovery factor".

My understanding was the same as yours, Boeroer, but apparently MaxQuest has a new formula, different from what we both thought to be right.

Edited by Elric Galad, 15 January 2017 - 02:02 PM.


#43
JerekKruger

JerekKruger

    Arch-Mage

  • Members
  • 2320 posts
  • Pillars of Eternity Backer
  • Deadfire Backer
  • Fig Backer
  • Black Isle Bastard!

Indeed, it looks like Max's formulas suggest that the effect of dual wielding is to half recovery after all other recovery modifiers have been applied rather than to add a 0.5 to the recovery modifier.

 

For example, previously I thought dual wielding and drinking a DAoM potion would result in 0 recovery, but according to Max's formula, it actually results in a recovery of 0.25*attack speed.

 

Out of interest Max, how did you get the formulas? Were they obtained through testing or did you find them in the game code?



#44
MaxQuest

MaxQuest

    (10) Necromancer

  • Members
  • 1524 posts
  • Deadfire Backer
  • Fig Backer

Great !
Isn't penetrating shot 0.80 instead of 1.20 ?

Thanks! I knew I had to triple check before posting...
Updated the list.
 

Isn't dual wielding recovery recently changed ? 
I thought it was a big 0.5 added to speed coeff ?
(or if you prefer, a separate coef of blue category valued to 1.5)

I understand what you mean. And from end-results this is correct for auto-attacking.
But it's a bit more complicated than that. It's not that dual-wielding provides a bonus. Rather having having only 1 weapon provides a penalty. I will have to check the recovery of spells (with DaoM) to be sure, and also check the deal with recovery_factor. Will try to test these once I get home.
 

but apparently MaxQuest has a new formula, different from what we both thought to be right.

It's more likely I've got an error when trying to simplify things. I will dig this.
 

Out of interest Max, how did you get the formulas? Were they obtained through testing or did you find them in the game code?

First approach was frapsing and counting the frames.
Second approach involved checking the decompiled source code. (I'm probably not allowed to post it as it's considered intellectual property, but the way recovery duration is calculated can be found in AttackBase.cs NotifyAttackComplete() function) (the problem is, it's a bit complex and I've struggled with reducing it to a simple and elegant formula/explanation)
Third approach involved injecting a function into Pillars' dll, that would print in log base (attack, recovery, reload) durations of currently equipped weapon.

Edited by MaxQuest, 16 January 2017 - 03:06 AM.


#45
JerekKruger

JerekKruger

    Arch-Mage

  • Members
  • 2320 posts
  • Pillars of Eternity Backer
  • Deadfire Backer
  • Fig Backer
  • Black Isle Bastard!

It's more likely I've got an error when trying to simplify things. I will dig this.

 

At the moment, if I'm reading it correctly, your formula seems to work like this for recovery (BaseRecovery and ModifiedRecovery introduced by me):

  • BaseRecovery = 5/3 * AttackPhaseDuration,
  • ModifiedRecovery = (1 - speed_coeff) * BaseRecovery [with a floor of 0],
  • RecoveryPhaseDuration = 1/2 * ModifiedRecovery if dual wielding or ModifiedRecovery otherwise.

This implies that the bonus from dual wielding is multipicative rather than additive, going against what the current understanding is i.e. that dual wielding is a 0.5 contribution to the speed_coeff. That's not to say that you're wrong, it's quite possible (even likely) that the current understanding has been wrong. As I understand it, the current (possibly wrong) formula works as follows:

  • BaseRecovery = 2 * AttackPhaseDuration,
  • RecoveryPhaseDuration = (0.5 - speed_coeff) * BaseRecovery if dual wielding or (1 - speed_coeff) * BaseRecovery otherwise.

The 2 instead of the 5/3 comes from the (possibly wrong) fact that wielding a single fast weapon with no Dexterity of attack speed bonuses resulted in a 20/40 frames attack/recovery animation, and for a normal or two-handed weapon it's 30/60 frames. This might be wrong though, I've no idea if these values were ever tested carefully.

 

The main difference is that the bonus for dual wielding (or penalty for not dual wielding) is applied additively to the speed multiplier rather than separately multiplicatively. Actually, given what you've said about dual wielding not providing a bonus but rather non-dual wielding being a penalty, perhaps that formula is better written as:

  • BaseRecovery = AttackPhaseDuration,
  • RecoveryPhaseDuration = (1 - 2 * speed_coeff) * BaseRecovery if dual wielding or (2 - 2 * speed_coeff) * BaseRecovery otherwise.

To compare the two formulae take a Dex 10 naked character with no abilities, talents or items that give +attack speed. Have him drink a potion of DAoM and attack a companion using first a single sword, then dual swords. Under Max's formula you would expect a recovery of 0.83s and 0.42s respectively, whilst under the current formula you would expect recoveries of 1s and 0 respectively, so it should be fairly easy to rule one or the other out.

 

First approach was frapsing and counting the frames.
Second approach involved checking the decompiled source code. (I'm probably not allowed to post it as it's considered intellectual property, but the way recovery duration is calculated can be found in AttackBase.cs NotifyAttackComplete() function) (the problem is, it's a bit complex and I've struggled with reducing it to a simple and elegant formula/explanation)
Third approach involved injecting a function into Pillars' dll, that would print in log base (attack, recovery, reload) durations of currently equipped weapon.

 

 

Kudos on the amount of work put into this. What software would someone need to decompile the code?


  • MaxQuest likes this

#46
JerekKruger

JerekKruger

    Arch-Mage

  • Members
  • 2320 posts
  • Pillars of Eternity Backer
  • Deadfire Backer
  • Fig Backer
  • Black Isle Bastard!

By the way, at the moment I think the way you've written the speed multipliers is wrong. You've written them all as 1.x, but in your speed_coeff calculation you sum them up and only subtract 1 once. This means, for example, for Zahua with his anitlei bonus, a single durganised sword and a DAoM potion, the speed_coeff formula is

 

speed_coeff = (1.1 + 1.5 + 1.15) - 1 = 2.75,

 

which results in 0 recovery, but it should be 1.75. I think either you'd want to change all the speed multipliers to 0.x, or you'd want to change your ORANGE and BLUE coef formulae to something like

 

((coef_1 - 1) + (coef_2 - 1) + ... + (coef_n - 1))

 

and

 

((coef_1 - 1) * (coef_2 - 1) * ... * (coef_n - 1))

 

respectively.


Edited by JerekKruger, 16 January 2017 - 05:49 AM.


#47
MaxQuest

MaxQuest

    (10) Necromancer

  • Members
  • 1524 posts
  • Deadfire Backer
  • Fig Backer

Kudos on the amount of work put into this. What software would someone need to decompile the code?

Thanks :)
As for software I have used ILSpy to inspect Assembly-CSharp.dll.
 

That's not to say that you're wrong, it's quite possible (even likely) that the current understanding has been wrong.

No, no, no. I have indeed made a mistake in the simplified recovery formula.

I have re-checked:
- recovery_factor is not changing if you dw or not. It's a constant 1.2
- when not using an ability, and having 1h or wielding a shield incurs a 0.5 penalty
- naked and with just DaoM, you have zero recovery on spells
- naked and with just DAoM, you have zero recovery when dual-wielding (I already knew this; dunno how I could make this mistake)

I have reflected this, in the updated table:
Spoiler

 

By the way, at the moment I think the way you've written the speed multipliers is wrong. You've written them all as 1.x, but in your speed_coeff calculation you sum them up and only subtract 1 once. This means, for example, for Zahua with his anitlei bonus, a single durganised sword and a DAoM potion, the speed_coeff formula is

speed_coeff = (1.1 + 1.5 + 1.15) - 1 = 2.75

Blue category uses multiplication. It would be: (1.1*1.5*1.15) - 1 = 0.89


But yes, those multpliers are increased by 1. That was done to skip an extra step later.
Consider you have swift aim, swift gloves and cautious attack.
AttackSpeedMult should be: [(1 + 0.2) * (1 + 0.15) * (1 - 0.2)] - 1 = 0.104
Instead, it can be presented as:
AttackSpeedMult should be: [1.2 * 1.15 * 0.8] - 1 = 0.104 (that's why I wrote those multiplers that way)

Edited by MaxQuest, 17 January 2017 - 03:07 AM.

  • AndreaColombo, Elric Galad and Dr <3 like this

#48
Elric Galad

Elric Galad

    (8) Warlock

  • Members
  • 1160 posts
  • Location:Paris

"- when not using an ability, and having 1h or wielding a shield incurs a 0.5 penalty"

 

If I understand well, you should re-write it :

"- when not using an ability, and having single weapon (1-handed or 2-handed) or wielding a shield incurs a 0.5 penalty"

"1h" seems to exclude 2-handed, and I don't think this was your intention.

 

Good to know that spells are so fast.

 

I think DAoM should be greyed out.

If you could also add Nature's bounty too  :geek:


Edited by Elric Galad, 16 January 2017 - 12:16 PM.

  • MaxQuest likes this

#49
Kaylon

Kaylon

    (7) Enchanter

  • Members
  • 833 posts

I never tested how spells work and I'm not sure I understand how recovery works for them. Having 2 weapons gives 50% recovery for spells too, or you can have 50% recovery only with fists? That means 15% attack speed from gloves and 50% from DAoM would allow wearing up to durgan enchanted scale and be able to cast spells with 0% recovery?


  • peddroelm likes this

#50
peddroelm

peddroelm

    (6) Magician

  • Members
  • 604 posts
  • Deadfire Backer

I never tested how spells work and I'm not sure I understand how recovery works for them. Having 2 weapons gives 50% recovery for spells too, or you can have 50% recovery only with fists? That means 15% attack speed from gloves and 50% from DAoM would allow wearing up to durgan enchanted scale and be able to cast spells with 0% recovery?

I don't think equipped weapons have anything to do with spell/ability recovery duration. Only the armor matters.

 

Weapons/shield/armor  will affect recovery for weapon swings.

 

The gray area are the spells that create "virtual spell weapons"  those direct damage spells that benefit from all sorts of weapon related stuff because of that . (those are actually weapon attacks "disguised" as spells and still wouldn't care about your equipped weapons - they use the "virtual spell weapon" for recovery speed calculations)

 

TLDR nothing equipped in the weapon and shield slots should influence spell recovery speed directly (spelltongue's buff probably does).


Edited by peddroelm, 17 January 2017 - 02:01 AM.

  • MaxQuest likes this

#51
MaxQuest

MaxQuest

    (10) Necromancer

  • Members
  • 1524 posts
  • Deadfire Backer
  • Fig Backer

"- when not using an ability, and having 1h or wielding a shield incurs a 0.5 penalty"
 
If I understand well, you should re-write it :
"- when not using an ability, and having single weapon (1-handed or 2-handed) or wielding a shield incurs a 0.5 penalty"
"1h" seems to exclude 2-handed, and I don't think this was your intention.

Thanks for suggestion, as indeed I meant single weapon and not one-handed. So, in the end which variant does sound better?:
- "when not using an ability, and having single weapon (1H or 2H) or wielding a shield"
- "when not using an ability and (wielding a single weapon or using a shield)"
- "when auto-attacking while wielding a single weapon or shield"
 

I think DAoM should be greyed out.
If you could also add Nature's bounty too  :geek:

Fixed.
Ok, I'll check Nature's Bounty later. (reminder to self: plus durgan enchant (shield))
 

I never tested how spells work and I'm not sure I understand how recovery works for them. Having 2 weapons gives 50% recovery for spells too, or you can have 50% recovery only with fists?

When you use an ability or spell, or when you make an auto-attack while dual-wielding (and without a shield) you don't get a 0.5 penalty coefficient.
When you auto-attack while having a single weapon (1h or 2h) or shield equipped, you do get a 0.5 penalty coefficient.
For spells it doesn't matter what you are wielding in weapon/shield slots.

Updated tables:
Spoiler

 

That means 15% attack speed from gloves and 50% from DAoM would allow wearing up to durgan enchanted scale and be able to cast spells with 0% recovery?

Seems so.

speed_coef = (1.15*1.5 - 1) + (0.65 + 0.15 - 1) = 0.725 - 0.2 = 0.525
recovery_duration = attack_duration * max(0, (1 - 2 * speed_coef)) / recovery_factor
recovery_duration = attack_duration * max(0, (1 - 2 * 0.525)) / 1.2
recovery_duration = 0

Will test it today, but I bet it will be zero.


P.S. But as peddroelm noted, not all stuff listed in the attack categories list does apply to spells.
Spells are affected only by AttackSpeedMult (and only those which do not come from weapon or shield passives), RangedAttackSpeedMult (if it is a ranged spell), ArmorSpeedFactor and StatAttackSpeedMult (dexterity).

Edited by MaxQuest, 17 January 2017 - 03:42 AM.

  • AndreaColombo and Elric Galad like this

#52
JerekKruger

JerekKruger

    Arch-Mage

  • Members
  • 2320 posts
  • Pillars of Eternity Backer
  • Deadfire Backer
  • Fig Backer
  • Black Isle Bastard!

But yes, those multpliers are increased by 1. That was done to skip an extra step later.

Consider you have swift aim, swift gloves and cautious attack.
AttackSpeedMult should be: [(1 + 0.2) * (1 + 0.15) * (1 - 0.2)] - 1 = 0.104
Instead, it can be presented as:
AttackSpeedMult should be: [1.2 * 1.15 * 0.8] - 1 = 0.104 (that's why I wrote those multiplers that way)

 

 

Looking at your table again, most attack speed bonuses are blue ones i.e. most are multiplicative. That's not how I thought it worked, interesting.



#53
Dr <3

Dr <3

    (7) Enchanter

  • Members
  • 815 posts
  • Deadfire Silver Backer
  • Fig Backer
Thks for the awesome work maxquest.
I just noted how the reload Speed bonus staks. Apparently with ranger you can stack both gunner and swift aim for a -70% reloading time.
Just asking around: did someone ever tried to build a shotgun ranger with gunner and swift aim? How did it work out?

Edit: so dual wielding wizard ( integrated daom) is the new official boss of spell slinging?

Edited by Dr <3, 17 January 2017 - 08:13 AM.


#54
MaxQuest

MaxQuest

    (10) Necromancer

  • Members
  • 1524 posts
  • Deadfire Backer
  • Fig Backer

Thks for the awesome work maxquest.
I just noted how the reload Speed bonus staks. Apparently with ranger you can stack both gunner and swift aim for a -70% reloading time.
Just asking around: did someone ever tried to build a shotgun ranger with gunner and swift aim? How did it work out?

Reload speed bonuses stack multiplicatively (or would it be right to say divisively? :))

For example blunderbuss has base reloading speed of 5s (or 150 frames)
150 / (1 * 1.5 * 1.2) = 83.33 frames
Unfortunately it won't be -70% in reloading time, but only -44%.
 

Edit: so dual wielding wizard ( integrated daom) is the new official boss of spell slinging?

Too early to judge, as more testing is required. But it seems so. (also casting speed is independent from weapons, dw or not)

Edited by MaxQuest, 17 January 2017 - 08:51 AM.

  • AndreaColombo and Dr <3 like this

#55
Boeroer

Boeroer

    Arch-Mage

  • Members
  • 7657 posts
  • Location:Bucharest, Romania
  • Lords of the Eastern Reach Backer
  • Deadfire Backer
  • Fig Backer
  • Black Isle Bastard!

Actually a barb with Frenzy + Bloodlust + Blood Thirst is the official boss of spell slinging. Too bad he hasn't that many spells. ;)


  • Dr <3 likes this

#56
Elric Galad

Elric Galad

    (8) Warlock

  • Members
  • 1160 posts
  • Location:Paris
DAoM has made wizz the strongest offensive class since 1.0. It was just not as obvious as now as long as people weren't familiar with his unequal low level spells.

Alternatively, you can consider Rogue as ultimate spell caster (who said Death Maelstorm Blows ?)

Edited by Elric Galad, 17 January 2017 - 09:25 AM.


#57
Elric Galad

Elric Galad

    (8) Warlock

  • Members
  • 1160 posts
  • Location:Paris

 

"- when not using an ability, and having 1h or wielding a shield incurs a 0.5 penalty"
 
If I understand well, you should re-write it :
"- when not using an ability, and having single weapon (1-handed or 2-handed) or wielding a shield incurs a 0.5 penalty"
"1h" seems to exclude 2-handed, and I don't think this was your intention.

Thanks for suggestion, as indeed I meant single weapon and not one-handed. So, in the end which variant does sound better?:
- "when not using an ability, and having single weapon (1H or 2H) or wielding a shield"
- "when not using an ability and (wielding a single weapon or using a shield)"
- "when auto-attacking while wielding a single weapon or shield"
 ...

 

IMHO:

"when not using an ability, and having single weapon (1H or 2H) or wielding a shield"



#58
Dr <3

Dr <3

    (7) Enchanter

  • Members
  • 815 posts
  • Deadfire Silver Backer
  • Fig Backer

"- when not using an ability, and having 1h or wielding a shield incurs a 0.5 penalty"

If I understand well, you should re-write it :
"- when not using an ability, and having single weapon (1-handed or 2-handed) or wielding a shield incurs a 0.5 penalty"
"1h" seems to exclude 2-handed, and I don't think this was your intention.

Thanks for suggestion, as indeed I meant single weapon and not one-handed. So, in the end which variant does sound better?:
- "when not using an ability, and having single weapon (1H or 2H) or wielding a shield"
- "when not using an ability and (wielding a single weapon or using a shield)"
- "when auto-attacking while wielding a single weapon or shield"
...

IMHO:
"when not using an ability, and having single weapon (1H or 2H) or wielding a shield"

IMHO:
"Everytime that you are NOT dual wielding" is more clear

#59
Elric Galad

Elric Galad

    (8) Warlock

  • Members
  • 1160 posts
  • Location:Paris
Well, I agree.
Except "not dual wielding OR using an ability"

#60
MaxQuest

MaxQuest

    (10) Necromancer

  • Members
  • 1524 posts
  • Deadfire Backer
  • Fig Backer

That means 15% attack speed from gloves and 50% from DAoM would allow wearing up to durgan enchanted scale and be able to cast spells with 0% recovery?

Had time to test it now.
Yeap, a wizard (with gloves, daom and durganized scale) could cast any spell without recovery. (it doesn't matter what weapons he has equipped, or if he dual-wields or not)
And same thing with ciphers powers.

 
Also, tested Nature's Bounty, Vielo Vidorio and Durgan Enchant (Shield).
The first two are getting into AttackSpeedMult category and are suppressable.
While Durgan Enchant (Shield) is a completely separate thing, and it can decrease (additively) the penalty a character gets when attacking while using a shield OR not dual-wielding.

So, updated tables look like this:
Spoiler


Also, it turned out that full and primary attacks are not considered "abilities" and can be affected by Single1HWeapRecovFactor penalty.
Thus I decided to avoid using the term "ability" and rephrase the penalty condition into "when not casting a spell" or "when performing an attack (auto, primary or full)".

P.S.:
Primary attack follows the same rules of an auto-attack.
Full attack with a single weapon does the same.
Full attack while dual-wielding (or using 1h+bashing shield): offhand_attack -> mainhand_attack -> mainhand_recovery
i.e. offhand_recovery is skipped. so if using weapons of different speed; it's better to put the faster one in main hand, if the character has many full attacks.

Edited by MaxQuest, 22 January 2017 - 01:25 AM.

  • Infinitron, AndreaColombo, peddroelm and 1 other like this





Also tagged with one or more of these keywords: Mechanics, Attack Speed, Recovery, Base Values

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users