Vulnera

Every hit has a type. A damage type library: 15 kinds, resistances and weaknesses, build-up bars, 12 reactions and colored damage numbers, shared by every mod that uses it.

Vulnera

Every hit has a type. Vulnera is a small library mod that gives every hit in the game a damage type (slash, fire, lightning and 12 more) and does the damage math the same way for every mod that uses it.

I made it for my own mod, Roguecraft Cards, and kept it as a separate mod so other mods and modpacks can use it too. It is still early, so feedback and bug reports are very welcome.

Roguecraft Cards 1.0 (coming soon) needs Vulnera. Launchers install it for you. Vulnera also works alone: it changes how the game's own damage works, with no other mod.

Damage kinds

15 kinds of damage

  • Slash, pierce and blunt are the weapon's own damage. A sword cuts, a mace hits blunt, an arrow pierces.
  • Fire, ice, lightning, poison, shadow, light, nature, blood, wind, arcane and water are extra hits, and they skip armor.
  • True damage ignores every defense.
  • Every damage in the game becomes one of them: lava is fire, magic is arcane, drowning and hunger are true damage. Damage from another mod that has no vulnera:kind/* tag counts as true damage (the log says so once).

Bars and reactions

Hits fill bars

  • Each hit fills the target's bar of its kind: 10 points per point of damage. The bar size is max health × 5, between 100 and 600.
  • A full bar does something small, only to the target: Bleeding, Chilled, a 1-block Gust and so on.
  • 12 reactions between two kinds, read from data files. Example: fire on a target with half an ice bar melts for ×1.5. A reaction needs two different sources, so one card or weapon alone never causes one.
  • Damage over time: Bleeding and Poisoned add up into one tick per second.

In game

In game

  • Colored damage numbers, a bar with a small icon for each kind, and a colored mark on the crosshair.
  • Its own quiet hit sounds, one set per kind, kept below the game's own hit sound.
  • Each player can turn numbers, bars and sounds on or off.

Weapons and mobs

  • Items convert, cards add up to a cap. An iron sword (6 slash) with fire 3 deals 3 slash + 3 fire = 6, never 9, so an iron sword with fire never beats a plain netherite sword. Fire from cards or attributes adds on top, but only up to what the weapon's material holds: iron +2, diamond +2.5, netherite +3.
  • Weapon tooltip: one line per kind with its color and icon. Hold Shift to see how many hits fill each bar, what a full bar does and the damage per second.
  • Resistance and weakness per mob, from data files. Example: a skeleton takes 25% less slash and 50% more blunt.
  • Hit properties: one critical roll for all mods, life steal, reflect, execute, armor pierce and armor shred, cleave, stagger, damage by max health.
  • Optional Apothic Attributes bridge: with Apothic installed, critical hits roll once and Apothic's fire and cold damage fill the fire and ice bars.

Configuration

  • config/vulnera-server.json: caps (critical, life steal, reflect, execute), bar size, and how much fire, ice and other elements each weapon material holds. The server sends these numbers to the players, so the tooltip always matches.
  • config/vulnera-client.json (each player): sound volume, numbers, bars, crosshair color and mark size.

For mod authors

One call, all the math

  • The API is in com.vulnera.api (also built alone as vulnera-api). API version 4. A version only goes up when something is added; nothing is removed before it has been deprecated for one version.
  • Data files: data/<ns>/vulnera/weapon/*.json, entity/*.json, reaction/*.json, kind/*.json, and the damage type tags vulnera:kind/<kind>.
  • Add it to your project with CurseMaven: curse.maven:vulnera-1843388:9940299 (NeoForge) or curse.maven:vulnera-1843388:9940314 (Fabric)

Used by

Roguecraft Cards 1.0

Made something with Vulnera? Tell me in the comments and I'll list it here.

Requirements

  • Minecraft 1.21.1.
  • NeoForge 21.1.200 or newer, or Fabric Loader 0.16 or newer with Fabric API.
  • Install it on the client and on the server.
  • Free to play and free to use in modpacks. Please don't re-upload it or copy it (ShadowsCrow Community License 1.0).

Em português: o Vulnera é uma biblioteca de tipos de dano. Cada golpe tem um tipo (corte, fogo, raio e mais 12), e o Vulnera faz a conta do dano do mesmo jeito para todos os mods que o usam: resistência e fraqueza por monstro, barras que enchem com cada golpe, 12 reações entre dois tipos e números de dano coloridos. O Roguecraft Cards 1.0 precisa dele; os launchers instalam sozinhos. Grátis e liberado em modpacks. Opiniões e relatos de bug são muito bem-vindos.

Vulnera Team

profile avatar
  • 5
    Projects
  • 392
    Downloads

More from ShadowsCrow1122View all