BetterCombat icon indicating copy to clipboard operation
BetterCombat copied to clipboard

Different speed for each attack

Open jaimarl opened this issue 1 year ago • 7 comments

I read project readme, checked client side and server side configurations, and no such feature exists - YES

Is your feature request related to a problem? Please describe. I wanted to make the first 2 rapier attacks slow and the next 3 fast.

Describe the solution you'd like Add the ability to change the speed of each attack the same way it is done with damage. Without this feature, creating a unique and interesting attack pattern for a weapon is much more difficult.

jaimarl avatar Aug 12 '24 20:08 jaimarl

I agree it would be nice to have such feature.

I have been thinking about this feature, and unfortunately I came to the conclusion that there is no good way to implement it.

Faster attacks within a combo would deal less damage due to the weapon cooldown reducing it. This could be automatically counteracted. However in such scenario it would be easy to just wait before doing the quick attack, deal full damage, with the added bonus damage of speed counteract. Leading to exploitable combat.

This feature requires a great deal of math magic to get it work. Anyone with the capacity to dwell into this is welcome to PR it.

ZsoltMolnarrr avatar Aug 13 '24 16:08 ZsoltMolnarrr

Can't you just use the formula damage + (base_damage - damage)? In this case, it doesn't matter how charged the attack is, the damage will always be the same.

jaimarl avatar Aug 17 '24 15:08 jaimarl

There is no such variable as base damage. Hence no.

ZsoltMolnarrr avatar Aug 17 '24 15:08 ZsoltMolnarrr

@Jaimarl Hello! How about configurable cooldown for each attack? Let's say the cooldown between the first two attacks is the normal one for the rapier, and the second cooldown is shorter, leading to the third attack being faster? Would it be possible?

Farenheith avatar Mar 29 '25 13:03 Farenheith

This is not possible in a way that most people expect it to work.

The attack move with the faster attack speed, would be performed without fully recovering from the attack cooldown. Hence doing lower damage. Damage could be compensated with a multiplier. But this only works when the user is spamming attack, in case there is a little pause between attacks, the faster attack would result higher damage done.

ZsoltMolnarrr avatar Mar 30 '25 18:03 ZsoltMolnarrr

I mean, if the second cooldown could be lesser, the attack would not be performed without fully recovering from it;

But some things would be needed:

  • A combo system. The player would need to press the attack key consecutively in the correct time window, otherwise, the combo would reset, and the next attack would be the same as the first one.
  • Different, configurable cooldowns would be needed after each strike (let's say the default cooldown is 1; the cooldown after the second strike could be 0.75).
  • Keep tracking o what step of a combo the player is in, and reset it every time a combo is finished or missed.

But I don't know if it's possible to do such a thing with the current state of the Minecraft code, it's just what I think could conceptually work

Farenheith avatar Mar 31 '25 01:03 Farenheith

As mentioned before, I don't think this is possible to implement in a consistent way, most people expect.

ZsoltMolnarrr avatar Mar 31 '25 07:03 ZsoltMolnarrr