
Critfall 将桌面 D20 战斗机制引入 Minecraft。每次攻击都会掷一个 d20 骰子,与目标的护甲等级(Armor Class)进行比较。
命中则掷伤害骰,自然 20 触发暴击,自然 1 可能导致失误。每项机制都有独立的开关,所有数值均可通过数据修改。

针对护甲等级的攻击检定
近战攻击、箭矢、投掷的三叉戟和法术会掷出一个 d20 并加上攻击加值,与目标的护甲等级进行比较。未命中则不造成伤害。命中则掷该武器的伤害骰。操作栏会显示掷骰结果,以及扣除护甲或抗性后实际造成的生命值伤害。

自然 20 暴击
自然 20 必定命中,并造成其骰子能掷出的最大伤害。它还可以使目标减速或击退,聊天栏中会有行文字标记这一时刻。跳跃攻击具有优势:掷两个 d20,取较高者。

自然 1 失误
自然 1 必定未命中,再掷一个 d20 决定是否会引发失误。失误可能会波及站在最近的人。失误发生后,接下来 10 秒内的自然 1 仅视为普通未命中,因此快节奏的战斗不会频繁发生失误。失误时的武器伤害默认关闭,除非你手动开启;数据包可以添加导致掉落武器、伤害攻击者或使其踉跄的失误效果。

每个生物和武器的属性
原版生物和武器自带配置文件:包括护甲等级、攻击加值、伤害骰和暴击范围。来自其他模组的生物和武器会根据其属性自动计算数值,因此整合包无需额外配置即可运行。使用 /critfall inspect 可查看某生物使用的掷骰参数及其来源配置文件。

面向整合包制作者和模组开发者
生物、武器和法术的配置文件均为数据包 JSON 格式,通过 ID 或标签进行匹配。/critfall generate 会为整合包中的每个生物和武器生成可编辑的配置文件,而 /critfall report 则会列出哪些已有配置文件,哪些使用的是自动计算的数值。试运行模式会在保留原版伤害计算的同时显示每一次掷骰,以便你在正常游玩时调整整合包平衡性。提供三种预设以设定暴击和失误规则:Tempered(默认)、Classic 和 Lite。
模组基于 studio.modroll.critfall.api 中的公开 Java API 构建:包括掷骰事件、RollService 和骰子解析器。Checks、Initiative 和 Headless Horseman 均仅依赖此 API。KubeJS 脚本也可以调用该 API,仓库中提供了示例。


依赖项
- Minecraft 1.21.1
- NeoForge 21.1 或更高版本,或 Fabric Loader 0.16.9 或更高版本搭配 Fabric API
- 在服务器上安装时需部署在服务端。客户端为可选:缺少该模组时,玩家仍能看到掷骰结果的纯文本提示,但无装饰性文字、音效和粒子效果。
可选依赖
兼容项

从模组列表打开配置界面:NeoForge 下为 Mods → Critfall → Config,Fabric 下则为 Mod Menu 中的配置按钮。第一页包含预设选项(Tempered、Classic 或 Lite)以及大多数玩家需要的开关。All settings 页面包含所有规则设置。点击 Save 可一次性应用所有规则。
规则保存在 config/critfall/rules.json 中,并在执行 /reload 时重新读取。在服务器环境中,服务端的文件生效。每位玩家的 config/critfall/client.json 用于控制掷骰读数、装饰性文字、音效和粒子的开关状态。

所有选项及其默认值
config/critfall/rules.json。粗体显示的选项位于配置界面的第一页。
| 选项 |
默认值 |
作用 |
attack_rolls.enabled |
true |
总开关:关闭则所有战斗保持原版机制。 |
attack_rolls.players |
true |
玩家的攻击进行命中判定掷骰。 |
attack_rolls.mobs |
true |
生物的 attack 进行命中判定掷骰。 |
attack_rolls.projectiles |
true |
箭矢、三叉戟和投掷物在落地时进行命中判定掷骰。 |
attack_rolls.spells |
true |
法术伤害进行命中判定掷骰,或要求进行豁免检定。 |
damage_dice.enabled |
true |
命中造成掷骰伤害;关闭则保持原版伤害机制。 |
crits.enabled |
true |
自然 20 触发暴击。关闭则将暴击判定留给原版和其他模组。 |
crits.rule |
max_dice |
暴击伤害计算方式:max_dice(最大面额)、double_dice(双倍骰子数)或 double_total(双倍总和)。 |
crits.nat20_always_hits |
true |
自然 20 无视护甲等级必定命中。 |
crits.apply_effect.enabled |
true |
暴击可对目标施加状态效果。 |
crits.knockback.enabled |
true |
暴击可将目标击退。 |
fumbles.enabled |
true |
自然 1 可能引发失误(Fumble)。 |
fumbles.nat1_always_misses |
true |
自然 1 无视攻击加值必定未命中。 |
fumbles.confirmation_roll.enabled |
true |
必须进行第二次 d20 掷骰且失败,失误才算成立。 |
fumbles.confirmation_roll.dc |
10 |
第二次 d20 掷骰需低于此数值才能算作失误(范围 2-20)。 |
fumbles.cooldown_ticks |
200 |
发生失误后,在此时长内自然 1 仅视为普通未命中。20 ticks = 1 秒。 |
fumbles.durability_break.enabled |
false |
失误可能导致武器损坏。 |
fumbles.durability_break.mode |
set_to_1 |
耐久度降至 1 (set_to_1),或损失一定比例 (percent_loss)。 |
fumbles.durability_break.percent |
25 |
在 percent_loss 模式下损失的耐久度占最大值的比例。 |
fumbles.hit_nearest_ally.enabled |
true |
失误可能误伤最近的友方单位。 |
fumbles.hit_nearest_ally.radius |
4 |
该友方单位的距离范围,以方块为单位(范围 1-64)。 |
fumbles.hit_nearest_ally.can_hit_players |
true |
关闭则永远不会将失误转化为对玩家的命中。 |
fumbles.hit_nearest_ally.respect_pvp_rules |
true |
遵循服务器的 PvP 设置及队伍友好火力规则。 |
fumbles.self_damage.enabled |
false |
允许数据包定义的失误使攻击者自伤。 |
fumbles.self_damage.dice |
1d4 |
失误对攻击者造成的伤害骰。 |
fumbles.drop_weapon.enabled |
false |
允许数据包定义的失误使攻击者掉落手中的武器。 |
fumbles.stumble.enabled |
false |
允许数据包定义的失误短暂减缓攻击者的移动速度。 |
fumbles.stumble.slowness_ticks |
40 |
减速效果的持续时间。 |
fumbles.applies_to |
players_and_mobs |
哪些实体的自然 1 会触发失误:players(玩家)、mobs(生物)或 players_and_mobs(两者)。 |
spells.saves.enabled |
true |
范围法术改为要求目标进行豁免检定,而非进行命中判定掷骰。 |
spells.saves.default_dc |
13 |
当法术未指定 DC 时的默认难度等级(范围 1-30)。 |
spells.saves.on_success |
half |
成功豁免时受到的伤害:half(减半)或 negate(完全免疫)。 |
fallbacks.unknown_entity |
derive |
没有配置文件的生物:derive(推导属性),或保持原版 (vanilla_passthrough)。 |
fallbacks.unknown_weapon |
derive |
没有配置文件的武器:derive(推导骰子),或保持原版。 |
fallbacks.unknown_spell |
derive |
没有配置文件的法术:derive(推导骰子),或保持原版。 |
feedback.roll_visibility |
everyone |
谁能看到掷骰结果:everyone(所有人)、attacker_only(仅攻击者)或 off(关闭)。 |
feedback.flavor.enabled |
true |
在暴击、失误和部分击杀时显示趣味提示文本。 |
feedback.flavor.cooldown_ticks |
20 |
对同一目标显示趣味提示文本的最短间隔时间。 |
feedback.flavor.kill_chance_percent |
25 |
普通击杀时出现提示文本的概率。命名生物和 Boss 必定出现。 |
balance.global_damage_multiplier |
1.0 |
缩放所有掷骰伤害。 |
balance.disable_vanilla_armor_reduction |
false |
开启后,护甲仅提升护甲等级,不再减少受到的伤害。 |
balance.armor_ac_divisor |
4 |
每点护甲等级所需的护甲点数(范围 1-100)。 |
balance.toughness_ac_divisor |
4 |
每点护甲等级所需的护甲韧性点数(范围 1-100)。 |
balance.player_attack_bonus |
5 |
添加到玩家攻击加值的数值(范围 -20 到 20)。 |
dry_run.enabled |
false |
显示掷骰结果,但仍应用原版伤害。用于调整整合包。 |
modifier_providers.enabled |
true |
使用来自提供此类功能的模组(如 Checks)的攻击加值和护甲等级。 |
advantage_sources.jump_attack |
true |
下落暴击命中时掷两次 d20 并取较高值。 |
config/critfall/client.json
| 选项 |
默认值 |
作用 |
rolls |
true |
在操作栏显示掷骰读数。 |
flavor |
true |
在聊天栏显示趣味提示文本。 |
sounds |
true |
在命中、暴击和失误时播放音效。 |
particles |
true |
在暴击和失误时生成粒子效果。 |
完整参考文档,包含每个选项的所有取值,请参见
docs/rules-config.md。

所有命令均需拥有操作员权限。
| 命令 |
作用 |
/critfall inspect [entity] |
查看某生物的护甲等级、攻击加值和伤害,以及其所属的配置来源。不指定实体时,检查你正对着的那个。 |
/critfall check [item] |
查看某物品的伤害骰、加值、暴击范围和失误/暴击表。不指定物品时,检查你手中拿着的那个。 |
/critfall generate [missing] |
为游戏中所有的生物和武器写入一个包含配置的数据包,以便编辑。若加上 missing 参数,则仅写入那些缺少配置的生物和武器。 |
/critfall report |
生成一个 CSV 和 JSON 列表,列出所有生物和物品及其属性来源。 |

可自由用于任何整合包中。


Critfall brings tabletop D20 combat to Minecraft. Every attack rolls a d20 against the target's Armor Class.
A hit rolls damage dices, natural 20s crit and natural 1s can fumble. Every mechanic has its own switch, and every number comes from
data you can change.

Attack rolls against Armor Class
Melee hits, arrows, thrown tridents and spells roll a d20 plus an attack bonus against the target's Armor Class. A miss
deals no damage. A hit rolls the weapon's damage dice. The action bar shows the roll, and the health the hit actually
took when armor or Resistance changed it.

Natural 20s crit
A natural 20 always hits and deals the most its dice can roll. It can also slow the target or knock it back, and a line in
chat marks the moment. A jump attack rolls with advantage: two d20s, keep the higher.

Natural 1s fumble
A natural 1 always misses, and a second d20 decides whether it turns into a fumble. A fumble can land on whoever stands
nearest. After a fumble, natural 1s are plain misses for 10 seconds, so fast fights don't fumble all the time. Weapon
damage on a fumble is off until you turn it on, and datapacks can add fumbles that drop the weapon, hurt the attacker or
make them stumble.

Stats for every mob and weapon
Vanilla mobs and weapons come with profiles: Armor Class, attack bonus, damage dice and crit range. Mobs and weapons from
other mods get stats worked out from their attributes, so a modpack works without setup. /critfall inspect shows what a
mob rolls with and which profile it came from.

For pack makers and mod developers
Profiles for mobs, weapons and spells are datapack JSON, matched by id or tag. /critfall generate writes an editable
profile for every mob and weapon in the pack, and /critfall report lists which ones have a profile and which use worked
out stats. Dry run shows every roll while vanilla damage still applies, so you can tune a pack in normal play. Three
presets set crits and fumbles: Tempered (the default), Classic and Lite.
Mods build on the public Java API in studio.modroll.critfall.api: roll events, RollService and a dice parser. Checks,
Initiative and the Headless Horseman use only this API. KubeJS scripts can call it too, with examples in the repo.


Requires
- Minecraft 1.21.1
- NeoForge 21.1 or newer, or Fabric Loader 0.16.9 or newer with Fabric API
- On a server, install it on the server. On clients it is optional: without it, players still see the roll as plain text,
without the flavor lines, sounds and particles.
Optional
- Mod Menu on Fabric, for the config button in the mod list.
Works with
- Critfall: Checks: ability scores feed Critfall's attack bonus, damage, Armor Class
and saving throws.
- Critfall: Initiative: fights become turn based encounters. Critfall still
rolls every attack and save.
- Critfall: Headless Horseman: a Halloween boss whose attacks, damage
and saves Critfall rolls.
- Spell mods that tag their damage as magic: spells roll to hit or call for a saving throw. Tested with Iron's Spells 'n
Spellbooks and Ars Nouveau on NeoForge.

Open the config screen from the mod list: Mods → Critfall → Config on NeoForge, or the config button in Mod Menu on
Fabric. The first page has a preset (Tempered, Classic or Lite) and the switches most players want. All settings has
every rule. Save applies the rules at once.
The rules live in config/critfall/rules.json and are read again on /reload. On a server, the server's file applies.
Each player's config/critfall/client.json turns the readout, flavor lines, sounds and particles on or off.

Every option and its default
config/critfall/rules.json. Options in bold are on the first page of the config screen.
| Option |
Default |
What it does |
attack_rolls.enabled |
true |
Master switch: off leaves all combat vanilla. |
attack_rolls.players |
true |
Players' attacks roll to hit. |
attack_rolls.mobs |
true |
Mobs' attacks roll to hit. |
attack_rolls.projectiles |
true |
Arrows, tridents and thrown items roll when they land. |
attack_rolls.spells |
true |
Spell damage rolls to hit, or calls for a saving throw. |
damage_dice.enabled |
true |
A hit deals rolled dice; off keeps the vanilla damage. |
crits.enabled |
true |
Natural 20s crit. Off leaves crits to vanilla and other mods. |
crits.rule |
max_dice |
Crit damage: max_dice, double_dice or double_total. |
crits.nat20_always_hits |
true |
A natural 20 hits whatever the Armor Class. |
crits.apply_effect.enabled |
true |
A crit can put a status effect on the target. |
crits.knockback.enabled |
true |
A crit can knock the target back. |
fumbles.enabled |
true |
A natural 1 can set off a fumble. |
fumbles.nat1_always_misses |
true |
A natural 1 misses whatever the attack bonus. |
fumbles.confirmation_roll.enabled |
true |
A second d20 must also fail before a fumble counts. |
fumbles.confirmation_roll.dc |
10 |
The second d20 must roll below this (2 to 20). |
fumbles.cooldown_ticks |
200 |
After a fumble, natural 1s are plain misses this long. 20 ticks = 1 second. |
fumbles.durability_break.enabled |
false |
A fumble can damage the weapon. |
fumbles.durability_break.mode |
set_to_1 |
Down to 1 durability (set_to_1), or lose a share of it (percent_loss). |
fumbles.durability_break.percent |
25 |
Share of max durability lost in percent_loss mode. |
fumbles.hit_nearest_ally.enabled |
true |
A fumble can land on the nearest creature instead. |
fumbles.hit_nearest_ally.radius |
4 |
How far away, in blocks, that creature can be (1 to 64). |
fumbles.hit_nearest_ally.can_hit_players |
true |
Off never turns a fumble into a hit on a player. |
fumbles.hit_nearest_ally.respect_pvp_rules |
true |
Honors the server's PvP setting and team friendly fire. |
fumbles.self_damage.enabled |
false |
Lets a datapack's fumble make the attacker hurt themselves. |
fumbles.self_damage.dice |
1d4 |
Damage a fumble deals to the attacker. |
fumbles.drop_weapon.enabled |
false |
Lets a datapack's fumble knock the weapon out of the attacker's hand. |
fumbles.stumble.enabled |
false |
Lets a datapack's fumble slow the attacker for a moment. |
fumbles.stumble.slowness_ticks |
40 |
How long the stumble lasts. |
fumbles.applies_to |
players_and_mobs |
Whose natural 1s can fumble: players, mobs or players_and_mobs. |
spells.saves.enabled |
true |
Area spells make the target save instead of rolling to hit. |
spells.saves.default_dc |
13 |
The DC when a spell names none (1 to 30). |
spells.saves.on_success |
half |
A successful save takes half damage or none (negate). |
fallbacks.unknown_entity |
derive |
Mobs without a profile: derive stats, or stay vanilla (vanilla_passthrough). |
fallbacks.unknown_weapon |
derive |
Weapons without a profile: derive dice, or stay vanilla. |
fallbacks.unknown_spell |
derive |
Spells without a profile: derive dice, or stay vanilla. |
feedback.roll_visibility |
everyone |
Who is sent the readout: everyone, attacker_only or off. |
feedback.flavor.enabled |
true |
Flavor lines on crits, fumbles and some kills. |
feedback.flavor.cooldown_ticks |
20 |
Least time between flavor lines on one target. |
feedback.flavor.kill_chance_percent |
25 |
Chance of a line on an ordinary kill. Named mobs and bosses always get one. |
balance.global_damage_multiplier |
1.0 |
Scales all rolled damage. |
balance.disable_vanilla_armor_reduction |
false |
On, armor only raises Armor Class and no longer reduces hits. |
balance.armor_ac_divisor |
4 |
Armor points per point of Armor Class (1 to 100). |
balance.toughness_ac_divisor |
4 |
Armor toughness points per point of Armor Class (1 to 100). |
balance.player_attack_bonus |
5 |
Added to a player's attack bonus (−20 to 20). |
dry_run.enabled |
false |
Rolls are shown, but vanilla damage still applies. For tuning a modpack. |
modifier_providers.enabled |
true |
Use bonuses and Armor Class from a mod that supplies them, such as Checks. |
advantage_sources.jump_attack |
true |
A falling crit hit rolls two d20s and keeps the higher. |
config/critfall/client.json
| Option |
Default |
What it does |
rolls |
true |
The roll readout on the action bar. |
flavor |
true |
Flavor lines in chat. |
sounds |
true |
A sound on hits, crits and fumbles. |
particles |
true |
Particles on crits and fumbles. |
The full reference, with every value each option takes, is in
docs/rules-config.md.

All commands need operator permission.
| Command |
What it does |
/critfall inspect [entity] |
A mob's Armor Class, attack bonus and damage, and which profile they came from. Without an entity, the one you look at. |
/critfall check [item] |
An item's dice, bonus, crit range and fumble and crit tables. Without an item, the one in your hand. |
/critfall generate [missing] |
Writes a datapack with a profile for every mob and weapon in the game, ready to edit. missing only writes the ones without a profile. |
/critfall report |
Writes a CSV and JSON list of every mob and item and where its stats come from. |

Free to use in any modpack.

评论 0
登录后参与评分
还没有评论,来抢沙发吧