Better Combat [Fabric & Forge]

Better Combat [Fabric & Forge]

21M Downloads

[Forge] Scale Attack Range with Forge's Attack Range Attribute

BookerCatch opened this issue ยท 5 comments

commented

Describe the solution you'd like
Forge provides an attack range attribute set to 3.0 by default. AFAIK this is being renamed to something like "Entity Reach" beyond 1.19.2. I propose that the attack range defined as part of a weapon's attributes sync with the weapon's attack range attribute provided by forge. This enables modpack developers to dynamically adjust a weapon's range using attributes instead of the NBT method provided already.

commented

That would be rather difficult to implement since, attack range is not technically an attribute. Its just more like a property or stat of the weapon.
I will think about how I could open gates for this idea.

commented

I understand and agree. For clarification, Quark allows for data-driven tooltips with custom icons to be displayed on items. This however necessitate a vanilla-like registered attribute. I only wish to see a weapon's attack range displayed with a subjectively fancy icon rather than the vanilla default green text of "2.5 Attack Range." If in the future you change your mind, consider this. Thanks!

commented

Hello!
Sorry this will not be added.

Better Combat discord FAQ:

Why are my attack range increasing buff/enchantments/gems not working?
Better Combat defines its own attack range attribute. This attack range is designed to be a non changeable, intrinsic property of weapons.
Increasing range of melee attacks with buffs/enchants/gems has the following problems:

  • It is an absolutely unbalanceable mechanic (both PVP and PVE)
  • Allows non sense scenarios like: a fist weapon that has bigger range than a glaive
  • Detaches attack animations from attack hitboxes to such an unrealistic extent, it hurts user experience
  • Overloads attack collision detection

No wonder, that no properly designed game (I know of) does increase attack range in such way. In every case this is an intrinsic property of the weapon or attack style. Just because something is possible to code, doesn't mean it should be.
To experience weapons with significantly different range, install some weapon mods adding a wider variety of weapons.

commented

Hello! Sorry this will not be added.

Better Combat discord FAQ:

Why are my attack range increasing buff/enchantments/gems not working? Better Combat defines its own attack range attribute. This attack range is designed to be a non changeable, intrinsic property of weapons. Increasing range of melee attacks with buffs/enchants/gems has the following problems:

  • It is an absolutely unbalanceable mechanic (both PVP and PVE)
  • Allows non sense scenarios like: a fist weapon that has bigger range than a glaive
  • Detaches attack animations from attack hitboxes to such an unrealistic extent, it hurts user experience
  • Overloads attack collision detection

No wonder, that no properly designed game (I know of) does increase attack range in such way. In every case this is an intrinsic property of the weapon or attack style. Just because something is possible to code, doesn't mean it should be. To experience weapons with significantly different range, install some weapon mods adding a wider variety of weapons.

I agree it is the content creators' responsibility to keep their design consistent. But the mentioned problems can be worked around instead of being a hard coded limitation for the imagnation of content creators.

  1. Balance can be broken in many ways, such as "weapon mods adding a wider variety of weapons". Even vanilla Minecraft is not totally balanced. Introduce attack range attribute will even help to balance the weapons.
    2 & 3. Magical effects like the sweep attack particle can be used to
    fill the extended hitbox, which makes sense because usually such attributes are added by some kind of magic. This may also prevent hurting user experience.
  2. Adding a configurable limit to the maximum size of scaled hitboxes will do. Ieave it for the content creators to determine whether they needed larger attack range or better performance.

It would be really cool if such mechanics are implemented.

commented

This concept is fundamentally flawed. So instead, I focus my development efforts on features those actually make sense.

Those who ignore the mentioned game breaking warnings, have the option to use the dedicated API to modify attack range.
https://github.com/ZsoltMolnarrr/BetterCombat/blob/1.21.1/common/src/main/java/net/bettercombat/api/client/AttackRangeExtensions.java