promotional bannermobile promotional banner

damageoverhaul

This mod adds config to implement a Dark Souls‑style damage.

This mod adds config to implement a Dark Souls‑style damage. It automatically generates five configuration files that cover: damage types, weapon damage types and their distribution, entity resistances, armor resistances, mob damage typesThese settings also apply to entities and weapons from other mods. I can't speak English. If you find bugs, tell me.
This is how to use it

================================================================
Damage Overhaul Mod Usage Guide
For Minecraft 1.20.1 Forge Version
================================================================

[Table of Contents]

  1. Mod Introduction

  2. Installation and Startup

  3. Explanation of the Eight Damage Types

  4. Tooltip Explanation

  5. Command List

  6. Configuration File List and Common Modification Examples

  7. Enchantment System

  8. Projectile System and Entity Replacement

  9. Gun Mod Compatibility (Scorched Guns / TACZ, etc.)

  10. Block-Sourced Damage Configuration

  11. Charm System (Own Gems + Third-Party Charm Bonuses)

  12. Mana Repair (Requires Botania)

  13. Display Toggles and Server-Side Sync

  14. Automatic Migration and Backup Mechanism

  15. Patchouli Manual Explanation

  16. Frequently Asked Questions (FAQ)

================================================================

  1. Mod Introduction
    ================================================================

Damage Overhaul is a damage system overhaul mod. It splits the vanilla
single damage value into 8 damage types (Slashing / Blunt / Piercing /
Magic / Fire / Lightning / Dark / Holy), and allows you to freely control
through JSON configuration files:

  • The damage composition dealt by each weapon (e.g., Iron Sword = 60% Slashing + 30% Piercing + 10% Blunt)

  • Each creature's resistance to different damage types

  • Each piece of armor's resistance to different damage types

  • The damage distribution of each projectile (arrows, tridents, snowballs, fireballs...)

  • The environmental damage distribution caused by each block (magma blocks, campfires, cacti...)

  • The weapon damage distribution of gun mods (Scorched Guns, TACZ, etc.)

  • Charm system: 8 built-in damage gems, plus configuring damage bonuses
    and type resistances for any Curios charm from other mods (automatic
    scanning, no need to manually enter item IDs)

All configurations can be hot-reloaded in-game via commands, with no game
restart required throughout.
(Note: Adding new damage types / adding new built-in charm entries requires
a restart, because enchantments and items are frozen at startup.)

================================================================

  1. Installation and Startup
    ================================================================

  2. Requirements: Minecraft 1.20.1 + Forge (47.x).

  3. Prerequisite mod: Curios API (charm slots). The mod cannot load without Curios.

  4. Place damageoverhaul-1.0.0.jar into the mods folder.

  5. (Optional) Install Patchouli to get the mod's in-game illustrated
    manual. The mod runs normally without Patchouli.

  6. On first startup, all configuration files (with default values) are
    automatically generated in the config/damageoverhaul/ directory;
    simultaneously, Curios charm slots (charm) are automatically added to players.

[How to Obtain the In-Game Manual]

  • When Patchouli is installed, the "Damage Overhaul Guide" (purple book
    model) is in the creative inventory "Tools & Utilities" category. It can
    also be obtained via command:
    /give @s patchouli:guide_book{patchouli:book:"damageoverhaul:guide"}

  • In survival mode, you can add acquisition methods yourself via data pack recipes.

================================================================

  1. Explanation of the Eight Damage Types
    ================================================================

Slashing —— Sword-slashing type damage
Blunt —— Hammer strikes, explosions, falls, crushing
Piercing —— Arrows, spikes, cacti, berry bushes
Magic —— Potions, enchantment damage, phantoms, etc.
Fire —— Burning, lava, campfires
Lightning —— Lightning strikes
Dark —— Wither, shadow-type damage
Holy —— Light-type damage (reserved for expansion)

How are damage types determined?
Each instance of vanilla damage carries a "damage source identifier"
(damage type), such as minecraft:arrow (arrow), minecraft:explosion
(explosion). The mod translates these identifiers into the 8 types via
damage_type_mappings.json, and supports "splitting one source into a
mixed distribution of multiple types", for example:

"minecraft:explosion": { "blunt": 0.7, "fire": 0.3 }

This means explosion damage is settled as 70% Blunt and 30% Fire.

The mod also automatically scans all damage types registered in the game
(including those added by other mods), infers mappings based on tags, and
writes them to the configuration. Those with the is_fire tag are inferred
as Fire, those without tags default to Blunt, and all can be modified in
the configuration.

================================================================

  1. Tooltip Explanation
    ================================================================

Hover the mouse over an item:

Weapon → Displays "Damage Distribution": each line = damage type + value
(base attack × proportion) + percentage, sorted in descending
order by proportion
Armor → Displays "Armor Resistance": non-zero resistances sorted in
descending order, red = vulnerability, green = resistance
Projectile → Displays "Projectile Damage Distribution": percentage only
(damage is determined by the bow)
Enchantment → Enchanted item titles have "(Enchanted)" appended, and each
line ends with the values/percentages added by the enchantment
listed in green
Gun → Guns have no attack power attribute; the tooltip automatically
parses the damage number annotated by the gun mod itself as the
base (e.g., "Damage: 10.0"). If parsing fails, only percentages
are displayed
Mana Repair → Displays enabled status and mana cost per point of durability
Own Charm → Displays associated damage type, attack bonus, and damage resistance
Third-Party Charm → Other mod charms with configured non-zero factors
display "External Charm Bonus": red = damage bonus, green = type
resistance, types with 0 effect are not displayed

Display content can be controlled via the 5 toggles in display_config.json
(see Section 13).

================================================================

  1. Command List
    ================================================================

All commands require OP level 2.

/damageoverhaul reload
Reloads all configuration files, and automatically fills in
resistance/weapon/mapping entries for newly added damage types.

/damageoverhaul migrate
Forces a migration check (equivalent to reload, semantically
emphasizing migration).

/damageoverhaul migrations
Displays the detailed migration log from the most recent load: which
files were changed, which entries were added, backup locations.

/damageoverhaul status
Displays the mod's current status: number of damage types, number of
the three enchantment categories, deflection mechanics, default ranged
source, projectile configuration statistics, dual-use list, mana repair,
block distribution entry count, own charm count, and third-party charm
bonus status (number of recorded entries, startup scan toggle).

================================================================

  1. Configuration File List and Common Modification Examples
    ================================================================

All configurations are located in config/damageoverhaul/:

damage_types.json Damage type definitions (core, other files auto-sync)
damage_type_mappings.json Damage source→type mappings (supports mixed distribution)
weapon_distributions.json Weapon distributions + gun auto-learning
unarmed_distributions.json Unarmed/creature bare-handed distributions
entity_resistances.json Entity resistances
armor_resistances.json Armor resistances
ranged_config.json Ranged sources and projectile distributions
projectile_item_mappings.json Projectile mappings and entity replacement
block_distributions.json Block-sourced damage
special_mechanics.json Special mechanics such as damage deflection
mana_repair_config.json Mana repair
display_config.json Tooltip display toggles
projectile_strike_config.json Projectile enchantment bonuses
charms.json Own charms (8 damage gems)
external_charms.json Third-party charm factor table (auto-scan generated)

[Example 1: Modify the Iron Sword's distribution]
Open weapon_distributions.json and find "minecraft:iron_sword":
"damage_distribution": {
"slashing": 0.6, "piercing": 0.3, "blunt": 0.1, ... the rest 0
}
Save after editing, then run /damageoverhaul reload in-game.

[Example 2: Make skeletons immune to fire]
Open entity_resistances.json, find "minecraft:skeleton", and change
"fire" to -1.0 (-100% immunity).

[Example 3: Change explosions to 70% Blunt + 30% Fire]
Open damage_type_mappings.json:
"minecraft:explosion": { "blunt": 0.7, "fire": 0.3 }

[Example 4: Adjust a certain gun's distribution]
First fire that gun once (auto-learning will generate an entry), then
modify the corresponding entry and reload.

[Example 5: Add fire damage bonus to another mod's charm]
After starting the world, external_charms.json has already automatically
recorded all Curios charms. Find the corresponding item line and change
"fire" in attack_bonuses to 0.15 (see Section 11 for details).

Standard procedure: Edit → Save → /damageoverhaul reload → Done.
Missing fields/entries in all files will be automatically filled in and
written back; manual adjustments will not be overwritten.

================================================================

  1. Enchantment System
    ================================================================

At startup, the mod automatically registers three sets of enchantments by
damage type (8 types × 3 categories = 24):

protect_<type> Armor resistance enchantment, 5%/level, max level 4
(settled after armor resistance, before armor value)
strike_<type> Weapon damage bonus enchantment, 10%/level, max level 4
(only increases the corresponding type's proportion,
does not crowd out other types)
projectile_strike_<type> Projectile damage bonus enchantment
(only applicable to pure projectile items, such as arrows;
values same as strike)

How to obtain: protect/strike can be used at enchanting tables and anvils.
Vanilla arrows cannot be enchanted normally; the mod implements projectile
enchanting by taking over the anvil combining process:
Place the weapon on the left (with the corresponding strike enchanted book),
place arrows on the right → combine to get enchanted arrows.

Note: Enchantment registration is frozen at game startup. After adding new
damage types, you need to restart the game to generate the corresponding
enchantments; the value configurations of existing enchantments can be
hot-reloaded.

================================================================

  1. Projectile System and Entity Replacement
    ================================================================

[Projectile Distribution] ranged_config.json

  • ranged_damage_source: Global ranged determination method
    "projectile" = Use projectile distribution (default)
    "weapon" = Use weapon distribution

  • Each projectile entry has a follow_default field:
    true = Follow the global default
    false = Use that entry's own distribution

  • Dual-use items (such as tridents, which are both weapons and projectiles)
    refuse to follow the default by default.

[Projectile Item and Entity Mapping]
The same entity corresponds to multiple items (enchanted arrows / spectral
arrows / normal arrows are all minecraft:arrow). The mod resolves this using
a three-layer mechanism:

  1. Same-name matching: Entity ID is the same as item ID

  2. Tag scanning: Members of the minecraft:arrows / forge:arrows tags are
    automatically mapped to minecraft:arrow

  3. Manual extension: Add custom mappings in projectile_item_mappings.json

[Entity Replacement] projectile_item_mappings.json
Want arrows to shoot TNT? Write in the mapping:
"minecraft:arrow": {
"entity": "minecraft:tnt",
"replace_entity": true
}
And change the global toggle allow_dangerous_replace to true.

Explanation:

  • Replacement occurs at the moment the projectile is spawned; the original
    entity is cancelled, and the new entity inherits position/velocity/
    rotation/owner

  • The replaced entity's damage is settled according to the original
    projectile item's mapped entity distribution; if unconfigured, it falls
    back to the damage type mapping (TNT explosion → Blunt)

  • Risk warning: Mapping to large entities such as the Ender Dragon may
    cause abnormal behavior

================================================================

  1. Gun Mod Compatibility (Scorched Guns / TACZ, etc.)
    ================================================================

Characteristics of gun mods: Damage values are stored in the gun's JSON,
settled by projectile entities, completely different from the vanilla weapon
system (guns have no attack power attribute, projectile entity IDs are not
the same as gun item IDs, ammunition does not carry damage).

This mod's universal compatibility solution (does not hardcode any mod):

  1. Source weapon fallback: When a gun projectile hits and no projectile
    distribution is found, it automatically checks the distribution of the
    gun in the shooter's hand in weapon_distributions.json and splits
    according to it

  2. Auto-learning: When auto_learn_ranged_weapons = true (default), the
    first time a gun deals damage, an entry is automatically generated
    (default Piercing 100%) and written to the configuration

  3. Tooltip base: Automatically parses the damage number annotated by the
    gun mod as the display base

Usage steps (using Scorched Guns as an example):

  1. Enter the game, take any gun and shoot once

  2. Open weapon_distributions.json, and you will see the scguns:xxx entry

  3. Modify its damage_distribution (e.g., change a flamethrower to fire
    proportion)

  4. /damageoverhaul reload to take effect

Ammunition does not need configuration — damage is entirely determined by
the gun. The same applies to "gun JSON + projectile" type mods such as TACZ.

================================================================

  1. Block-Sourced Damage Configuration
    ================================================================

block_distributions.json configures environmental damage by block ID
(magma blocks, campfires, cacti, powder snow, wither roses, etc.).

Format:
"minecraft:magma_block": {
"use_default": true, ← true=use default mapping chain
"damage_distribution": { ... } ← this distribution takes effect when false
}

Determination condition: The damage source has no entity (such as hot_floor
damage from standing on a magma block). The mod checks the block your body
is in (campfire/fire/cactus, etc.) and the block below your feet (magma
block).

Auto-learning: When auto_learn_block_damage = true (default), the first time
an entity takes damage from a certain block, that block is automatically
registered into the configuration (use_default=true, behavior unchanged).
Afterwards, change use_default to false and fill in the distribution to take
over that block.

Campfires and magma blocks can use completely different distributions — this
is the fine granularity that damage_type_mappings cannot achieve.

================================================================

  1. Charm System (Own Gems + Third-Party Charm Bonuses)
    ================================================================

The charm feature depends on the Curios API. Players have a charm slot
(automatically added by the mod, coexisting with rings/necklaces and other
slots from other mods in the modpack, without conflict).

[11.1 Own Charms: 8 Damage Gems]

The mod comes with 8 charms (findable in the creative inventory):
Slashing Gem / Blunt Gem / Piercing Gem / Magic Gem / Flame Gem /
Thunder Gem / Shadow Gem / Holy Light Gem
Default: +15% damage of the corresponding type on attack, -10% damage of
the corresponding type when hit.

Stacking rule: Multiple charms of the same type (including third-party
charms) only take the highest value, no stacking.
Settlement position:

  • Attack: That type's damage ×(1+bonus)

  • Defense: After creature resistance, armor resistance, and enchantment
    resistance, independently reduced by type ×(1-resistance) (only applies
    to configured types; each part of mixed damage is reduced separately)

charms.json can adjust each gem's values and texture frame animation; note
that adding/deleting own charm entries is an item registration change and
requires a game restart to take effect.

[11.2 Third-Party Charm Bonuses: external_charms.json (Key Point)]

No need to manually look up item IDs, no need to hand-write entries in a
format — the mod automatically traverses:

  1. Startup/reload full scan: All other mod charms in the item registry
    that have the curios tag and can be equipped in Curios slots are
    automatically recorded into the table

  2. Equipment-time supplementary scan: When a player actually equips a
    charm into a slot (checked at login and every 10 seconds thereafter),
    if any missed items are found (such as mods whose tags are dynamically
    generated by in-memory data packs), they are automatically added to
    the table

Each charm has one row in the table, listing two types of factors for all
damage types, for example:

{
"item_id": "botania:sojourner_sash",
"attack_bonuses": {
"slashing": 0, "blunt": 0, "piercing": 0, "magic": 0,
"fire": 0.15, "lightning": 0, "dark": 0, "holy": 0
},
"defense_resistances": {
...same as above, "fire": 0.1 means 10% fire damage reduction...
}
}

Value meanings:
attack_bonuses Damage bonus, 0.15 = +15% damage of that type
defense_resistances Type resistance, 0.10 = -10% damage of that type
0 = no effect (produces no effect, and the tooltip does not display that line)

Usage procedure:

  1. Start the world once (the table is automatically generated)

  2. Open config/damageoverhaul/external_charms.json

  3. Find the target charm's row, and change the corresponding type's 0 to
    the desired factor

  4. /damageoverhaul reload (servers require reconnection to sync client
    display)

Two master toggles (at the top of the file):
enable_external_charms Master toggle, false = all third-party charm
features stopped
auto_scan_curios_items Startup scan toggle, false = only keep existing
entries, no longer automatically record new charms
(equipment supplementary scan also stops)

Features and rules:

  • When new damage types are added, a 0 column for that type is
    automatically added to all charms in the table

  • All-zero entries do not participate in network sync; no matter how many
    charms are in the modpack, login speed is unaffected

  • Same damage type: When own gems and third-party charms are worn together,
    the highest is taken

  • Old manually filled entries are automatically migrated and their values
    preserved; old files are automatically backed up

  • Must be actually equipped in a Curios slot to take effect (putting it in
    the backpack has no effect)

================================================================

  1. Mana Repair (Requires Botania)
    ================================================================

When Botania is installed, mana_repair_config.json allows durable items to
automatically repair by consuming mana:

  • Each item entry needs to be enabled individually

  • The "mana consumed per point of durability" can be configured (the ratio
    can be adjusted arbitrarily)

  • When Botania is not installed, this feature is automatically disabled,
    and the mod runs normally

The tooltip displays the enabled status and mana consumption ratio.

================================================================

  1. Display Toggles and Server-Side Sync
    ================================================================

display_config.json controls five categories of tooltip display:

show_weapon_distribution Weapon damage distribution
show_armor_resistance Armor resistance
show_projectile_distribution Projectile damage distribution
show_mana_repair Mana repair status
show_external_charm_bonus Third-party charm bonuses

Server-side priority: In multiplayer, the server's display configuration
takes precedence, and is automatically synced to the client when the player
logs in, ensuring consistent display across the server. Single-player
directly uses the local configuration.

================================================================

  1. Automatic Migration and Backup Mechanism
    ================================================================

Each time configurations are loaded (startup/reload/migrate):

  1. Verify each file's _schema_version; old formats are automatically
    migrated to the new format

  2. Missing damage types/entries are automatically filled in and written
    back to the file

  3. Before modification, the original file is automatically backed up to:
    config/damageoverhaul/backups/<timestamp>/

  4. All automatic changes are recorded in the migration log (view with
    /damageoverhaul migrations)

Manual adjustments you have made will never be overwritten.

================================================================

  1. Patchouli Manual Explanation
    ================================================================

The mod includes a complete Patchouli manual "Damage Overhaul Guide" (the
in-game version of this tutorial), with the following content and table of
contents:

  • Mod Introduction: Welcome / Eight Damage Types / Quick Start

  • System Details: Weapon Distribution / Resistances / Enchantments /
    Projectiles / Entity Replacement / Gun Compatibility / Block Damage /
    Charm System / Mana Repair / Special Mechanics and Display

  • Configuration Files: Overview / Modification and Reload Process

  • Commands: Detailed Explanation of the Four Commands

  • FAQ

The manual supports both Chinese and English (automatically follows the game
language). Manual entries can be hot-reloaded: Shift+click the pencil icon
at the bottom left of the manual in-game to refresh the content.

================================================================

  1. Frequently Asked Questions (FAQ)
    ================================================================

Q1: The client cannot see the server's distribution configuration?
A: No manual sync is needed — the server automatically pushes all
configurations when the player logs in. If you just changed the server
configuration, reconnect.

Q2: Enchantments did not appear after adding new damage types?
A: Enchantments are frozen at startup registration and require a game
restart to generate new enchantments. Configuration values can be
hot-reloaded.

Q3: Configuration changes do not take effect?
A: Run /damageoverhaul reload. If the JSON format is incorrect, check the
error messages in the startup log.

Q4: How to customize the distribution of a gun mod's gun?
A: First fire that gun once (auto-learning will register an entry), then
modify the corresponding entry in weapon_distributions.json and reload.

Q5: If arrows are changed to shoot TNT, how is damage calculated?
A: See Sections 9/10. TNT explosions default to the Blunt mapping, and can
be refined in the mapping table or block/projectile configurations.

Q6: Want to hide certain tooltips?
A: Five toggles in display_config.json, server-side takes precedence.

Q7: Can vanilla arrows be enchanted?
A: Yes. Via anvil: weapon on the left + strike enchanted book, arrows on
the right, combine to get enchanted arrows. projectile_strike
enchantments only apply to pure projectile items.

Q8: Will configurations be lost after upgrading the mod version?
A: No. Automatic migration preserves your manual adjustments, and old files
are first backed up to the backups directory.

Q9: How to add damage bonuses or resistances to other mods' rings/charms?
A: No need to hand-write configuration. After starting the world, the mod
has already automatically recorded all Curios charms into
external_charms.json. Find the corresponding item row and change the
needed damage type factor from 0 to a value (such as 0.15), then reload.
See Section 11 for details.

Q10: Third-party charm values changed but no effect/display?
A: Check in order: ① Whether the charm is actually equipped in a Curios
slot (putting it in the backpack has no effect); ② Whether the factor is
a non-zero value (0 has no effect and is not displayed); ③ Whether reload
was executed (multiplayer servers also require reconnection to sync
display); ④ Whether enable_external_charms is true.

Q11: The modpack has too many charms, and external_charms.json is too long?
A: A long file does not affect performance (all-zero rows are not synced and
do not participate in settlement). If you do not want to automatically
record new charms, change auto_scan_curios_items to false; you can also
directly delete unneeded rows (they will be re-recorded on the next scan).

================================================================
End of tutorial. Have fun!
================================================================

 

================================================================
  伤害改革(Damage Overhaul)模组使用教程
  适用于 Minecraft 1.20.1 Forge 版本
================================================================

【目录】
  一、模组简介
  二、安装与启动
  三、八种伤害类型说明
  四、悬浮提示(tooltip)说明
  五、指令一览
  六、配置文件一览与常用修改示例
  七、附魔系统
  八、射弹系统与实体替换
  九、枪械模组兼容(焦火枪械 / TACZ 等)
  十、方块源性伤害配置
  十一、饰品系统(自家宝石 + 第三方饰品加成)
  十二、魔力修复(需要植物魔法)
  十三、显示开关与服务端同步
  十四、自动迁移与备份机制
  十五、帕秋莉手册说明
  十六、常见问题(FAQ)

================================================================
一、模组简介
================================================================

伤害改革是一款伤害系统重构模组。它把原版单一的伤害数值拆分为
8 种伤害类型(斩击/钝击/穿刺/魔法/火焰/闪电/黑暗/神圣),并且
允许你通过 JSON 配置文件自由控制:

  - 每一件武器打出来的伤害构成(如铁剑 = 60%斩击 + 30%穿刺 + 10%钝击)
  - 每一个生物对不同伤害类型的抗性
  - 每一件护甲对不同伤害类型的抗性
  - 每一种射弹(箭、三叉戟、雪球、火球……)的伤害分布
  - 每一个方块造成的环境伤害分布(岩浆块、篝火、仙人掌……)
  - 枪械类模组(焦火枪械、TACZ 等)的武器伤害分布
  - 饰品系统:8 种自带的伤害宝石,以及给其他模组任意 Curios
    饰品配置伤害增幅与类型抗性(自动扫描,无需手填物品ID)

所有配置都可以在游戏中用指令热重载,全程无需重启游戏。
(注:新增伤害类型/新增自家饰品条目需重启,因为附魔与物品
注册在启动时冻结。)

================================================================
二、安装与启动
================================================================

1. 环境要求:Minecraft 1.20.1 + Forge(47.x)。
2. 前置模组:Curios API(饰品栏)。没有 Curios 时模组无法加载。
3. 把 damageoverhaul-1.0.0.jar 放入 mods 文件夹。
4. (可选)安装帕秋莉手册(Patchouli),即可在游戏内获得本模组
   的图文手册。没有帕秋莉手册时模组照常运行。
5. 首次启动会自动在 config/damageoverhaul/ 目录下生成全部配置
   文件(带默认值);同时自动给玩家添加 Curios 饰品槽(charm)。

【如何拿到游戏内手册】
- 装有帕秋莉手册时,创造物品栏"工具与实用"分类中有
  《伤害改革指南》(紫色书本模型),也可用指令获取:
    /give @s patchouli:guide_book{patchouli:book:"damageoverhaul:guide"}
- 生存模式可通过数据包配方自行添加获取途径。

================================================================
三、八种伤害类型说明
================================================================

  斩击(slashing)  —— 刀剑劈砍类伤害
  钝击(blunt)     —— 锤击、爆炸、坠落、挤压
  穿刺(piercing)  —— 箭矢、尖刺、仙人掌、浆果丛
  魔法(magic)     —— 药水、附魔伤害、幻翼等
  火焰(fire)      —— 烧灼、岩浆、篝火
  闪电(lightning) —— 雷击
  黑暗(dark)      —— 凋零、暗影类伤害
  神圣(holy)      —— 光明系伤害(预留扩展)

伤害类型如何判定?
原版每段伤害都带有一个"伤害来源标识"(damage type),
例如 minecraft:arrow(箭)、minecraft:explosion(爆炸)。
模组通过 damage_type_mappings.json 把这些标识翻译成 8 种类型,
并且支持"一种来源拆成多种类型的混合分布",例如:

  "minecraft:explosion": { "blunt": 0.7, "fire": 0.3 }

表示爆炸伤害 70% 按钝击、30% 按火焰结算。

模组还会自动扫描游戏内注册的全部伤害类型(包括其他模组新增
的),按标签自动推断映射并写入配置。带 is_fire 标签的推断为
火焰,无标签的默认钝击,全部可在配置中修改。

================================================================
四、悬浮提示(tooltip)说明
================================================================

把鼠标悬停在物品上:

  武器   → 显示"伤害分布":每行 = 伤害类型 + 数值(基础攻击×占比)
           + 百分比,按占比降序排列
  护甲   → 显示"护甲抗性":非零抗性降序排列,红色=易伤,
           绿色=抗性
  射弹   → 显示"射弹伤害分布":仅百分比(伤害由弓决定)
  附魔   → 带附魔的物品标题会追加"(含附魔)",每行末尾用绿色
           列出附魔增加的数值/百分比
  枪械   → 枪械没有攻击力属性,tooltip 会自动解析枪械模组自己
           标注的伤害数字作为基数(如"伤害: 10.0"),解析失败则
           只显示百分比
  魔力修复 → 显示启用状态与每点耐久魔力消耗
  自家饰品 → 显示关联伤害类型、攻击增伤与伤害抗性
  第三方饰品 → 已配置非0因子的其他模组饰品显示"外部饰品加成":
           红色=伤害增幅,绿色=类型抗性,0 影响的类型不显示

显示内容可通过 display_config.json 的 5 个开关控制(见第十三节)。

================================================================
五、指令一览
================================================================

所有指令需要 OP 等级 2。

  /damageoverhaul reload
      重载全部配置文件,并自动补齐新增伤害类型对应的
      抗性/武器/映射条目。

  /damageoverhaul migrate
      强制执行一次迁移检查(与 reload 等价,语义强调迁移)。

  /damageoverhaul migrations
      显示最近一次加载的详细迁移日志:改了哪些文件、
      新增了哪些条目、备份位置。

  /damageoverhaul status
      显示模组当前状态:伤害类型数、三类附魔数量、偏转机制、
      远程默认来源、射弹配置统计、两用清单、魔力修复、
      方块分布条目数、自家饰品数量与第三方饰品加成状态
      (收录条目数、启动扫描开关)。

================================================================
六、配置文件一览与常用修改示例
================================================================

全部配置位于 config/damageoverhaul/:

  damage_types.json              伤害类型定义(核心,其他文件自动同步)
  damage_type_mappings.json      伤害来源→类型映射(支持混合分布)
  weapon_distributions.json      武器分布 + 枪械自动学习
  unarmed_distributions.json     空手/生物裸击分布
  entity_resistances.json        实体抗性
  armor_resistances.json         护甲抗性
  ranged_config.json             远程来源与射弹分布
  projectile_item_mappings.json  射弹映射与实体替换
  block_distributions.json       方块源性伤害
  special_mechanics.json         伤害偏转等特殊机制
  mana_repair_config.json        魔力修复
  display_config.json            tooltip 显示开关
  projectile_strike_config.json  射弹附魔加成
  charms.json                    自家饰品(8 种伤害宝石)
  external_charms.json           第三方饰品因子表(自动扫描生成)

【示例 1:修改铁剑的分布】
打开 weapon_distributions.json,找到 "minecraft:iron_sword":
  "damage_distribution": {
    "slashing": 0.6, "piercing": 0.3, "blunt": 0.1, ... 其余 0
  }
改完保存,游戏内执行 /damageoverhaul reload。

【示例 2:让骷髅免疫火焰】
打开 entity_resistances.json,找到 "minecraft:skeleton",
把 "fire" 改为 -1.0(-100% 免疫)。

【示例 3:把爆炸改为 70% 钝击 + 30% 火焰】
打开 damage_type_mappings.json:
  "minecraft:explosion": { "blunt": 0.7, "fire": 0.3 }

【示例 4:调整某把枪的分布】
先拿那把枪射一次(自动学习会生成条目),再修改对应条目并 reload。

【示例 5:给其他模组的饰品加火焰增伤】
启动世界后 external_charms.json 已自动收录所有 Curios 饰品,
找到对应物品行,把 attack_bonuses 里的 "fire" 改为 0.15 即可
(详见第十一节)。

标准流程:编辑 → 保存 → /damageoverhaul reload → 完成。
所有文件缺少的字段/条目会自动补齐回写,手动调整不会被覆盖。

================================================================
七、附魔系统
================================================================

模组在启动时按伤害类型自动注册三套附魔(8 类型 × 3 类 = 24 个):

  protect_<类型>   护甲抗性附魔,5%/级,最高 4 级
                   (在护甲抗性之后、护甲值之前结算)
  strike_<类型>    武器增伤附魔,10%/级,最高 4 级
                   (只增加对应类型占比,不挤占其他类型)
  projectile_strike_<类型>  射弹增伤附魔
                   (仅纯射弹物品可附,如箭类;数值同 strike)

获取方式:protect/strike 可在附魔台与铁砧使用。原版箭无法被
正常附魔,模组通过接管铁砧合并流程实现射弹附魔:
  左侧放武器(用对应 strike 附魔书),右侧放箭 → 合并得附魔箭。

注意:附魔注册在游戏启动时冻结。新增伤害类型后需要重启游戏
才会生成对应附魔;已有附魔的数值配置可以热重载。

================================================================
八、射弹系统与实体替换
================================================================

【射弹分布】ranged_config.json
  - ranged_damage_source:全局远程判定方式
      "projectile" = 按射弹分布(默认)
      "weapon"     = 按武器分布
  - 每个射弹条目有 follow_default 字段:
      true  = 跟随全局默认
      false = 使用该条目自己的分布
  - 两用物品(如三叉戟既是武器又是射弹)默认拒绝跟随默认。

【射弹物品与实体的映射】
同种实体对应多种物品(附魔箭/光灵箭/普通箭都是 minecraft:arrow)。
模组用三层机制解析:
  1) 同名匹配:实体 ID 与物品 ID 相同
  2) 标签扫描:minecraft:arrows / forge:arrows 标签成员
     自动映射到 minecraft:arrow
  3) 手动扩展:projectile_item_mappings.json 添加自定义映射

【实体替换】projectile_item_mappings.json
  想让箭射出 TNT?在映射中写:
    "minecraft:arrow": {
      "entity": "minecraft:tnt",
      "replace_entity": true
    }
  并把全局开关 allow_dangerous_replace 改为 true。

  说明:
  - 替换发生在射弹生成瞬间,原实体被取消,新实体继承
    位置/速度/旋转/所有者
  - 被替换实体的伤害按原弹药物品映射实体的分布结算,
    未配置时按伤害类型映射兜底(TNT 爆炸 → 钝击)
  - 风险提示:映射到末影龙等大型实体可能产生异常行为

================================================================
九、枪械模组兼容(焦火枪械 / TACZ 等)
================================================================

枪械类模组的特点:伤害数值存储在枪械 JSON 中,由射弹实体结算,
与原版武器体系完全不同(枪械没有攻击力属性、射弹实体 ID 与
枪物品 ID 不同名、弹药不携带伤害)。

本模组的通用兼容方案(不硬编码任何模组):
  1. 来源武器回退:枪械射弹命中后查不到射弹分布时,自动检查
     射手手中的枪在 weapon_distributions.json 中的分布并按其拆分
  2. 自动学习:auto_learn_ranged_weapons = true(默认)时,
     某把枪首次造成伤害会自动生成条目(默认穿刺 100%)写入配置
  3. tooltip 基数:自动解析枪械模组标注的伤害数字作为显示基数

使用步骤(以焦火枪械为例):
  1. 进游戏,拿任意枪射击一次
  2. 打开 weapon_distributions.json,能看到 scguns:xxx 条目
  3. 修改它的 damage_distribution(如火焰枪改 fire 占比)
  4. /damageoverhaul reload 生效

弹药不需要配置——伤害完全由枪决定。TACZ 等"枪 JSON + 射弹"
型模组同样适用。

================================================================
十、方块源性伤害配置
================================================================

block_distributions.json 按方块 ID 配置环境伤害
(岩浆块、篝火、仙人掌、细雪、凋零玫瑰等)。

格式:
  "minecraft:magma_block": {
    "use_default": true,                  ← true=使用默认映射链路
    "damage_distribution": { ... }        ← false 时此分布生效
  }

判定条件:伤害来源没有实体(如站在岩浆块上的 hot_floor 伤害)。
模组检查你身体所在的方块(篝火/火/仙人掌等)与脚下方块(岩浆块)。

自动学习:auto_learn_block_damage = true(默认)时,实体首次受到
某方块的伤害,该方块自动登记进配置(use_default=true,行为不变)。
之后把 use_default 改为 false 并填写分布,即可接管该方块。

篝火和岩浆块可以使用完全不同的分布——这是 damage_type_mappings
做不到的细粒度。

================================================================
十一、饰品系统(自家宝石 + 第三方饰品加成)
================================================================

饰品功能依赖 Curios API。玩家拥有 charm 饰品槽(模组自动添加,
与整合包中其他模组的戒指/项链等槽位共存,不冲突)。

【11.1 自家饰品:8 种伤害宝石】

模组自带 8 件饰品(创造模式物品栏可找到):
  斩击宝石/钝击宝石/穿刺宝石/魔力宝石/炽焰宝石/雷霆宝石/
  暗影宝石/圣光宝石
默认:攻击对应类型伤害 +15%,受击时对应类型伤害 -10%。

叠加规则:同类型多件饰品(含第三方饰品)只取最高值,不叠加。
结算位置:
  - 攻击:该类型伤害 ×(1+增幅)
  - 防御:在生物抗性、护甲抗性、附魔抗性之后,按类型独立减免
    ×(1-抗性)(仅对配置的类型生效,混合伤害的各部分分别减免)

charms.json 可调整每件宝石的数值与贴图帧动画;注意新增/删除
自家饰品条目属于物品注册变更,需要重启游戏才生效。

【11.2 第三方饰品加成:external_charms.json(重点)】

不需要手动查物品ID、不需要按格式手写条目——模组会自动遍历:

  1) 启动/ reload 全量扫描:物品注册表中所有带 curios 标签、
     能装进 Curios 槽位的其他模组饰品,自动收录进表格
  2) 装备时补扫:玩家实际把饰品装到槽位上时(登录时与之后每
     10 秒检查一次),若发现漏网物品(如标签由内存数据包动态
     生成的模组),自动补录进表格

表格中每个饰品一行,列出全部伤害类型的两类因子,例如:

  {
    "item_id": "botania:sojourner_sash",
    "attack_bonuses": {
      "slashing": 0, "blunt": 0, "piercing": 0, "magic": 0,
      "fire": 0.15, "lightning": 0, "dark": 0, "holy": 0
    },
    "defense_resistances": {
      ...同上,"fire": 0.1 表示火焰伤害减免 10%...
    }
  }

数值含义:
  attack_bonuses       伤害增幅,0.15 = 该类型伤害 +15%
  defense_resistances  类型抗性,0.10 = 该类型伤害 -10%
  0 = 无影响(不产生任何效果,tooltip 也不显示该行)

使用流程:
  1. 启动一次世界(自动生成表格)
  2. 打开 config/damageoverhaul/external_charms.json
  3. 找到目标饰品的行,把对应类型的 0 改成想要的因子
  4. /damageoverhaul reload(服务器需重连同步客户端显示)

两个总开关(文件顶部):
  enable_external_charms   总开关,false=第三方饰品功能全停
  auto_scan_curios_items   启动扫描开关,false=只保留已有条目,
                           不再自动收录新饰品(装备补扫同时停止)

特性与规则:
  - 新增伤害类型时,自动给表格里所有饰品补一行该类型的 0 列
  - 全 0 条目不参与网络同步,整合包饰品再多也不影响登录速度
  - 同一伤害类型:自家宝石与第三方饰品混戴时合并取最高
  - 旧版手工填写的条目自动迁移保留数值;旧文件自动备份
  - 必须是真正装备在 Curios 槽位中才生效(放在背包无效)

================================================================
十二、魔力修复(需要植物魔法)
================================================================

安装了植物魔法(Botania)时,mana_repair_config.json 可以让耐久
物品消耗魔力自动修复:

  - 每个物品条目需单独启用
  - 可配置"每点耐久消耗的魔力值"(比例任意调整)
  - 未安装植物魔法时该功能自动禁用,模组照常运行

tooltip 会显示启用状态与魔力消耗比例。

================================================================
十三、显示开关与服务端同步
================================================================

display_config.json 控制五类 tooltip 显示:

  show_weapon_distribution    武器伤害分布
  show_armor_resistance       护甲抗性
  show_projectile_distribution 射弹伤害分布
  show_mana_repair            魔力修复状态
  show_external_charm_bonus   第三方饰品加成

服务端优先:多人游戏中以服务端的显示配置为准,玩家登录时自动
同步到客户端,保证全服显示一致。单人游戏直接使用本地配置。

================================================================
十四、自动迁移与备份机制
================================================================

每次加载配置时(启动/reload/migrate):

  1. 校验每个文件的 _schema_version,旧格式自动迁移为新格式
  2. 缺失的伤害类型/条目自动补齐并回写文件
  3. 修改前原文件自动备份到:
       config/damageoverhaul/backups/<时间戳>/
  4. 全部自动变更记录在迁移日志中(/damageoverhaul migrations 查看)

手动做过的调整永远不会被覆盖。

================================================================
十五、帕秋莉手册说明
================================================================

模组内置一本完整的帕秋莉手册《伤害改革指南》(本教程的游戏内
版本),内容与目录:

  - 模组简介:欢迎阅读 / 八种伤害类型 / 快速上手
  - 系统详解:武器分布 / 抗性 / 附魔 / 射弹 / 实体替换 /
    枪械兼容 / 方块伤害 / 饰品系统 / 魔力修复 / 特殊机制与显示
  - 配置文件:总览 / 修改与重载流程
  - 指令:四大指令详解
  - 常见问题

手册支持中英双语(自动跟随游戏语言)。手册条目可热重载:
游戏内 Shift+点击手册左下角的铅笔图标即可刷新内容。

================================================================
十六、常见问题(FAQ)
================================================================

Q1:客户端看不到服务器的分布配置?
A:无需手动同步——玩家登录时服务端自动推送全部配置。
   刚改完服务端配置的话,重连即可。

Q2:新增伤害类型后附魔没出现?
A:附魔在启动时注册冻结,需要重启游戏生成新附魔。
   配置数值可以热重载。

Q3:修改配置后不生效?
A:执行 /damageoverhaul reload。若 JSON 格式错误,
   查看启动日志中的报错信息。

Q4:枪械模组的枪想自定义分布?
A:先拿那把枪射一次(自动学习会登记条目),再改
   weapon_distributions.json 中对应条目并 reload。

Q5:把箭改成射 TNT,伤害怎么算?
A:见第九/十节。TNT 爆炸默认走钝击映射,
   可在映射表或方块/射弹配置中细化。

Q6:想隐藏某些 tooltip?
A:display_config.json 五个开关,服务端为准。

Q7:原版箭能附魔吗?
A:可以。通过铁砧:左侧武器+strike 附魔书,右侧箭,
   合并得附魔箭。projectile_strike 附魔只附在纯射弹物品上。

Q8:升级模组版本后配置会丢吗?
A:不会。自动迁移会保留你的手动调整,
   旧文件都会先备份到 backups 目录。

Q9:怎么给其他模组的戒指/饰品加增伤或抗性?
A:无需手写配置。启动世界后模组已自动把所有 Curios 饰品
   收录进 external_charms.json,找到对应物品行,把需要的
   伤害类型因子从 0 改成数值(如 0.15),reload 即可。
   详见第十一节。

Q10:第三方饰品改了数值却没效果/没显示?
A:依次检查:① 饰品是否真的装备在 Curios 槽位里(放背包
   无效);② 因子是否为非 0 值(0 不生效也不显示);③ 是否
   执行了 reload(多人服务器还需重连以同步显示);
   ④ enable_external_charms 是否为 true。

Q11:整合包饰品太多,external_charms.json 太长怎么办?
A:文件长不影响性能(全 0 行不同步、不参与结算)。若不想
   自动收录新饰品,把 auto_scan_curios_items 改为 false;
   也可以直接删掉不需要的行(下次扫描会重新收录)。

================================================================
  教程结束。祝你玩得愉快!
================================================================

===========================

The damageoverhaul Team

profile avatar
  • 1
    Projects
  • 237
    Downloads