Aller au contenu

Photo

Attack Speed: Bug or Intended?


  • Veuillez vous connecter pour répondre
10 réponses à ce sujet

#1
Maverick827

Maverick827
  • Members
  • 3 193 messages
According to the Wiki:

"There is a bug in core_h.nss resulting in the loss of any attack speed bonus if the speed modifier is higher than 0.5. Activating Haste + Momentum corresponds to a speed modifier of 0.55, resulting in the loss of the speed bonus. Activating Haste + Momentum + Precise Striking results in a valid speed modifier of 0.45." 

Assuming this is a bug, is it possible to fix?  If it is intended: why?

I would love to see what Momentum + Haste + Blessing of the Fade + Blood Thirst looks like.

#2
PaulSX

PaulSX
  • Members
  • 1 127 messages
I dont think this is a bug, 0.5 is possibly the cap for the attack speed bonus, if over 0.5, it will be re-calculated.

#3
beancounter501

beancounter501
  • Members
  • 702 messages
It is a bug. There is one line of code in there labeled "legacy" which normally means obsolete that resets you back to 0. You should cap at 50% not wrap around to 0.

#4
Maverick827

Maverick827
  • Members
  • 3 193 messages
Can you edit the .nss files? I've been searching for a mod fix, but no keywords are working.

#5
rayzorium

rayzorium
  • Members
  • 121 messages
If there's a fix, it'd be the first time I heard of it. It's a very well-known issue that players have had to work around for a long time. I had thought that the values worked in reverse (1.0 being base attack speed and lower values being faster), but I haven't seen it myself, so I'll take the wiki's word for it.

While the wrap is clearly a bug, the cap itself is almost certainly intended. Unless I'm sorely mistaken, attack speed bonuses are calculated in a "subtractive" manner (not sure what else to call it) in Dragon Age. In many other games, a speed modifier of 0.95 (or something of the sort) would mean you attack 95% faster. Here, it means you're attacking at 1/0.05 speed, or 20 TIMES your normal attack speed. Yes, this means infinite attack speed with a speed modifier of 1.0, but that wouldn't work out in game for obvious reasons. While this is hella awesome, it means attack speed becomes exponentially stronger - ridiculously so - the more of it you have.

For example, using a Swift Salve (20% attack speed) with no other effects would give you a modifier of 0.2.
1/0.8 = 125% damage.

Using three Hastes with no other effects would give you a modifier of 0.75. 1/0.25 =
400% damage.

Adding Swift Salve on TOP of the Hastes, however, gives you 0.95.
1/0.05 = 2000% damage.

No idea what would happen if you got to 1.0, but you get the picture. They capped attack speed at 0.5 because it would be too strong otherwise. They made it wrap to 1.0 if you got any more than that because... well, they were careless.

Modifié par rayzorium, 02 août 2010 - 06:39 .


#6
Maverick827

Maverick827
  • Members
  • 3 193 messages
According to the Wiki, the attack speed formula is:

AttackDuration = (BaseTiming + WeaponSpeedMod) * CharaterSpecModifier

Since the issue at hand would be attacking too fast, I'll use daggers as an example.  BaseTiming for dual wielding is 1.5

AttackDuration = (1.5 + (-0.5)) * CharacterSpecModifier

AttackDuration = 1 * CharcterSpecModifier

CharacterSpecModifier defaults to 1 and and is subtracted by haste effects.  If it gets below 0.5, it resets to 1.

At 0.5, daggers swing every 1 * (1 - 0.5) = 0.5 seconds.

At 0.45 (impossible, set it resets), daggers would swing every 1 * (1 - 0.45) = 0.45

With the currently available haste buffs, it would be easy to get into a theoretical negative attack speed.  Now, they could wrap this negative attack speed back to something like 0.1, but that is attacking very fast and as you have said increases DPS too much.


I guess the only hope of not having go waste all of these great abilities (Momentum, Blessing of the Fade, Blood Thirst, Haste, Swift Salve, etc.) would be to modify the attack speed formula, which we probably cannot do.

Modifié par Maverick827, 02 août 2010 - 07:40 .


#7
beancounter501

beancounter501
  • Members
  • 702 messages
It is a very simple fix. Open the Toolset, click on the script tabs and do a search core_h. Left click on the file and "Check Out"



Do a asearch for the "CalculateAttackTiming(object oAttacker, object oWeapon)"



Look for the following under that function:

// -----------------------------------------------------------------

// compatibility with some old savegames.

// -----------------------------------------------------------------

if (GetCreatureProperty(oAttacker, PROPERTY_ATTRIBUTE_ATTACK_SPEED_MODIFIER) < 0.5f)

{

fSpeedEffects = 1.0f;

}



Change the final fSpeedEffects = 0.5f;



Save the file. and check it back in.



Since that is just the include file, you have to change the program that calls it.

Find the script called "Rules_Core". Check it out and the following line to the very top

// This is mine



Save it and check it back in. Viola - your first script mod.




#8
Maverick827

Maverick827
  • Members
  • 3 193 messages
Thank you for the fix. I do not have the tookit on hand at this moment, so I must have to ask if the entire calculation done in CalculateAttackTiming?

That is to say, would it be possible to alter the formula to something that does not scale so well, allowing for all haste buffs to stack in some balanced manner without breaking anything?

#9
Last Darkness

Last Darkness
  • Members
  • 2 794 messages
If you could fix the code to just cap at 50% like its supposed to instead of rolling over and doing like -45% attack speed etc that would work great.

#10
beancounter501

beancounter501
  • Members
  • 702 messages

Maverick827 wrote...

Thank you for the fix. I do not have the tookit on hand at this moment, so I must have to ask if the entire calculation done in CalculateAttackTiming?
That is to say, would it be possible to alter the formula to something that does not scale so well, allowing for all haste buffs to stack in some balanced manner without breaking anything?


That gets a little more tricky.  You would have to change the talents and salves to apply different Speed Modifiers but it should be doable.  That function only applies the speed modifier.  For instance haste is set up in the spells_modal script.

I should point out that you should not use that script in Awakening.  Since we do not have the source code for the Awakening scripts it may break some things.  Rules_Core script controls a LOT of things.

@Darkness - I generally don't use any of the speed boosting talents so I have never worried about the bug.

#11
Maverick827

Maverick827
  • Members
  • 3 193 messages

beancounter501 wrote...

Maverick827 wrote...

Thank you for the fix. I do not have the tookit on hand at this moment, so I must have to ask if the entire calculation done in CalculateAttackTiming? 
That is to say, would it be possible to alter the formula to something that does not scale so well, allowing for all haste buffs to stack in some balanced manner without breaking anything?


That gets a little more tricky.  You would have to change the talents and salves to apply different Speed Modifiers but it should be doable.  That function only applies the speed modifier.  For instance haste is set up in the spells_modal script.

I should point out that you should not use that script in Awakening.  Since we do not have the source code for the Awakening scripts it may break some things.  Rules_Core script controls a LOT of things.

@Darkness - I generally don't use any of the speed boosting talents so I have never worried about the bug.

Yeah, I definitely don't want to break anything anywhere.  I'll just have to do without.  Thanks for the responses.

Modifié par Maverick827, 02 août 2010 - 10:19 .