跳到正文

Auto Defend

作者:Radi

An overcomplicated-but-flavorful way to give entities more HP. Decently configurable.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Auto Defend

Auto Defend gives entities a new resource: Stamina, which is by default 20 for all entities but can be changed with the max_stamina attribute. Instead of losing health, hit entities will _automatically parry or dodge attacks_, redirecting any damage taken to their stamina instead. The conditions to accomplish auto defense are fairly customizable:

  • By default, only players can auto defend. This can be altered in the config.
  • Entities in the #auto_defend:no_auto_defense entity type tag (by default ranged mobs and large, tanky mobs) cannot auto defend.
  • By default, damage not directly from a living entity source (mainly projectiles and environmental damage) cannot be auto defended against. Damage in the #auto_defend:undefendable damage type tag cannot be auto defended, either – this includes explosions and sonic booms by default.
  • If the damage is substantially higher than the defender’s max stamina, they will be “overbroken”, setting their stamina to 0 and causing them to take the attack in full. Overbreak conditions are configurable, including how much damage needs to be done to overbreak and whether overbreaks are measured against current or maximum stamina.
  • If the entity is not looking within a certain angle of the damage source (defined by their defend_angle attribute), they will not auto defend attacks.
  • Entities with a defend_chance attribute lower than 1.0 have a random chance to fail to defend. defend_chance is set to 1.0 by default, so players don’t need to worry about taking health damage because of RNG.

Stamina

Damage dealt to stamina is raw damage, before mitigation from anything like armor, Protection, or Resistance. However, the endurance attribute reduces stamina damage.

Stamina naturally regenerates after enough time has passed since you were last hit. For players, this consumes hunger; players cannot regenerate stamina when below half hunger. Values pertaining to stamina regeneration are configurable.

Although stamina has no UI elements, entities below half stamina will visibly sweat. The more rapidly an entity sweats, the lower their stamina. Additionally, when an entity’s stamina is taken to 0 by a parry or dodge, the visual and audio effects will change to indicate this. This change is configurable, if you’d rather keep players guessing about exactly how long they can keep defending.

Compatibility

Auto Defend may not function properly with mods that add their own methods of negating damage. The main issue you might find is auto defense taking priority over the modded damage negation. There’s no guarantee on what mods will or will not work; your best bet is to try it and see. I’ve personally confirmed proper functionality with:

and confirmed incompatibility with:

  • Shield & Parry (auto defense takes priority over parrying. Since the mod is closed source, I can’t fix this.)

Notices

_This mod is heavily attribute driven. Use of AttributeSetter is highly recommended for pack developers and anyone that wants to change functionality._

_I can only promise functionality on 1.21.1, but feel free to try it and see if it works on later 1.21.x releases._

So, why does this mod even exist? (WARNING: BIG OL’ TEXT WALL)

In Minecraft, entity health is noticeably small relative to damage. This means that small damage differences don’t have much time to compound, so all that matters is specific break-points. For instance, stone swords (5 damage) and iron swords (6 damage), if we ignore crits, both take 4 hits to kill a 20-damage target.

This is an issue when combined with some weapon mods, where damage differences between weapon types can be rather small.

Increasing HP values is one way to get around this. Against a 100-HP target, the same 5-damage stone sword and 6-damage iron sword now take 20 and 17 hits to kill respectively; a small but real difference. The default configs don’t really achieve this, but they’re meant to be less game-altering as a baseline.

However, I have a personal issue with inflating HP: it feels somewhat stupid in certain flavors of modpack. Damage differences mattering is in contrast with combat feeling lethal.

Auto Defend solves this issue by making the vast majority of hits not actually HURT you: you avoid them, but become more and more exhausted over time until you are finished off by a decisive strike.

常见问题

Auto Defend 支持哪些 Minecraft 版本?

Auto Defend 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

Auto Defend 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分

Radi 的其他作品

查看全部 →