Mob Scaling 数据包
一个原版 Minecraft 数据包,根据玩家进度为敌对生物实现动态难度缩放。Mob Scaling 通过根据玩家的 XP 等级和护甲评级调整生物装备、属性和效果来增强游戏挑战性。
作者: WormWoodMC
目标版本: Java Edition 1.20+
网站: quefep.uk
概述
Mob Scaling 是一个服务器端数据包,无需客户端修改即可提供智能难度调整。该系统通过 XP 等级和护甲评级监控玩家进度,然后缩放附近的敌对生物以匹配玩家的战力水平。这确保了新手玩家和资深玩家在多人环境中都能获得引人入胜的游戏体验,同时保持平衡。
功能
- 动态缩放系统: 生物会根据附近最高等级的玩家获得适当的装备、附魔和效果
- Boss 缩放: 凋灵和末影龙具有可配置倍率的动态难度
- 世界难度集成: 缩放响应世界难度设置(和平到困难)
- 维度基础缩放: 主世界、下界和末地维度具有不同的难度修正系数
- 按玩家追踪: 独立的记分板系统确保在混合进度的多人游戏中公平缩放
- 可配置战利品表: 自定义生物装备掉落,无需修改核心功能
- 效果系统: 高等级生物获得有益效果(力量、速度、再生)以增加挑战
- 性能优化: 缩放后生物会被标记,以防止重复计算
- 基于距离的难度: 可选的基于从世界出生点生成距离的缩放
- 模组内容支持: 可在配置中切换对模组装备的支持
- 生命值/伤害倍率: 可配置的高级属性缩放
层级系统
Mob Scaling 使用基于玩家 XP 和护甲评级计算的 9 层系统(0-8):
公式: Tier = clamp((XP / 15) + (Armor / 10), 0, 8)
基础层级 (0-4)
| 层级 |
XP 范围 |
护甲评级 |
装备 |
效果 |
| 0 |
0-4 |
0-5 |
原版装备 |
无 |
| 1 |
5-14 |
6-9 |
皮革/金盔甲,石头/铁武器 |
无 |
| 2 |
15-29 |
10-15 |
带有保护 I、锋利 I/力量 I 的铁盔甲 |
无 |
| 3 |
30-44 |
16-20 |
带有保护 II、火焰/力量 II 弓的钻石盔甲 |
无 |
| 4 |
45+ |
20+ |
下界合金混合装备,满级附魔 |
力量 II、速度 II、抗火 II |
高级层级 (5-8)
| 层级 |
XP 范围* |
护甲评级* |
装备 |
效果 |
| 5 |
可配置 |
可配置 |
钻石/下界合金 |
速度 II、力量 II、再生 I |
| 6 |
可配置 |
可配置 |
钻石/下界合金 |
速度 III、力量 III、再生 II |
| 7 |
可配置 |
可配置 |
下界合金 |
速度 IV、力量 IV、吸收 I |
| 8 |
可配置 |
可配置 |
下界合金 |
速度 V、力量 V、夜视 |
*高级层级阈值在 config.json 中可配置
安装
- 下载最新的 Mob Scaling 数据包发布版(
.zip 文件)
- 导航到你的世界保存文件夹:
[world_name]/datapacks/
- 将数据包 zip 文件解压到 datapacks 目录中
- 加载你的世界,或者如果已在游戏中则执行
/reload
- 使用
/datapack list 验证安装 - Mob Scaling 应出现在列表中
Boss 缩放
凋灵缩放
- 基础生命值: 300 HP
- 生命倍率: 可配置(默认 2.0x)
- 伤害倍率: 可配置(默认 1.5x)
- 效果: 高等级时拥有速度和力量
末影龙缩放
- 基础生命值: 200 HP
- 生命缩放: 根据玩家层级在 200-500 HP 之间
- 击退抗性: 高等级时为 0.8-1.0
- 效果: 高等级时拥有速度和力量
世界难度修正系数
| 难度 |
倍率 |
效果 |
| 和平 |
0.5x |
降低休闲游玩的挑战性 |
| 简单 |
0.75x |
比正常稍易 |
| 普通 |
1.0x |
标准缩放体验 |
| 困难 |
1.5x |
增加资深玩家的挑战性 |
维度修正系数
| 维度 |
倍率 |
描述 |
| 主世界 |
1.0x |
基准难度 |
| 下界 |
1.3x |
危险增加 30% |
| 末地 |
1.5x |
挑战性增加 50% |
配置
基本配置
在 data/ms/storage/config.json 中编辑配置值:
核心设置
difficulty_enabled: 启用/禁用缩放 (0/1)
boss_scaling_enabled: 启用 Boss 缩放 (0/1)
world_difficulty_integration: 启用难度修正系数 (0/1)
dimension_scaling_enabled: 启用维度修正系数 (0/1)
Boss 设置
wither_health_multiplier: 凋灵生命倍率(默认:2.0)
wither_damage_multiplier: 凋灵伤害倍率(默认:1.5)
dragon_health_multiplier: 龙生命倍率(默认:2.5)
dragon_damage_multiplier: 龙伤害倍率(默认:1.8)
难度修正系数
peaceful_modifier: 和平模式下的缩放(默认:0.5)
easy_modifier: 简单模式下的缩放(默认:0.75)
normal_modifier: 普通模式下的缩放(默认:1.0)
hard_modifier: 困难模式下的缩放(默认:1.5)
维度修饰符
overworld_modifier: 主世界缩放(默认:1.0)
nether_modifier: 下界缩放(默认:1.3)
end_modifier: 末地缩放(默认:1.5)
{
"difficulty_enabled": 1,
"boss_scaling_enabled": 1,
"world_difficulty_integration": 1,
"dimension_scaling_enabled": 1,
"modded_content_enabled": 1,
"max_tier": 8,
"wither_health_multiplier": 2.0,
"dragon_health_multiplier": 2.5,
"hard_modifier": 1.5,
"nether_modifier": 1.3,
"end_modifier": 1.5
}
高级自定义
- 装备: 修改
data/ms/loot_tables/equipment/ 中的战利品表
- 缩放逻辑: 调整
data/ms/functions/player/ 中的等级计算
- 生成范围: 编辑
data/ms/functions/scale/apply.mcfunction 中的距离值
- 效果: 在特定等级的函数文件中配置药水效果
兼容性
| Minecraft 版本 |
支持情况 |
备注 |
| 1.20+ |
✅ |
完全兼容 |
| 1.19.x |
❌ |
数据包格式 17 需要 1.20+ |
| 基岩版 |
❌ |
仅支持 Java 版 |
| 多人游戏 |
✅ |
支持按玩家独立缩放 |
测试命令
使用以下命令测试该数据包:
# 为特定等级设置玩家经验值
/xp set @s 50 levels # 4 级
/xp set @s 100 levels # 8 级(如果已配置)
# 生成测试怪物
/summon zombie ~ ~ ~
/summon skeleton ~ ~ ~
/summon creeper ~ ~ ~
# 检查当前等级
/scoreboard objectives add ms_dummy dummy
/scoreboard players set @s ms_tier 4
故障排除
数据包未加载:
- 验证文件夹结构是否完整
- 检查 JSON 文件中是否存在语法错误
- 确保 pack.mcmeta 是有效的 JSON
怪物未缩放:
- 确认 config.json 中已启用难度
- 检查玩家是否有足够的经验值/盔甲以进入更高等级
- 验证记分板目标是否已创建
性能问题:
- 在 config.json 中减少生成倍率
- 增加生成冷却计时器
- 如果不需要,禁用基于距离的缩放
如需更多支持,请参阅 TROUBLESHOOTING.md 或访问项目网站。
路线图
- Boss 缩放(凋灵、末影龙)
- 可配置的各等级效果开关
- 世界难度集成
- 基于生物群系的缩放修饰符
- 自定义怪物支持
鸣谢
由 WormWoodMC 为 Quefep 创意集体开发。
许可证: CC0 1.0 Universal - 公共领域
网站: quefep.uk
最后更新:v3.0.0
Mob Scaling Datapack
A vanilla Minecraft datapack that implements dynamic difficulty scaling for hostile mobs based on player progression. Mob Scaling enhances gameplay challenge by adjusting mob equipment, attributes, and effects according to player XP levels and armor ratings.
Author: WormWoodMC
Target Version: Java Edition 1.20+
Website: quefep.uk
Overview
Mob Scaling is a server-side datapack that provides intelligent difficulty adjustment without requiring client modifications. The system monitors player progression through XP levels and armor ratings, then scales nearby hostile mobs to match the player's power level. This ensures engaging gameplay for both new players and seasoned veterans while maintaining balance in multiplayer environments.
Features
- Dynamic Scaling System: Mobs receive appropriate equipment, enchantments, and effects based on the highest-tier player nearby
- Boss Scaling: Dynamic difficulty for Wither and Ender Dragon with configurable multipliers
- World Difficulty Integration: Scaling responds to world difficulty setting (Peaceful to Hard)
- Dimension-Based Scaling: Different difficulty modifiers for Overworld, Nether, and End dimensions
- Per-Player Tracking: Individual scoreboard systems ensure fair scaling in multiplayer with mixed player progression
- Configurable Loot Tables: Customize mob equipment drops without modifying core functions
- Effect System: High-tier mobs gain beneficial effects (Strength, Speed, Regeneration) for increased challenge
- Performance Optimized: Mobs are tagged after scaling to prevent redundant calculations
- Distance-Based Difficulty: Optional scaling based on spawn distance from world spawn
- Modded Content Support: Toggle support for modded equipment in configuration
- Health/Damage Multipliers: Configurable attribute scaling for higher tiers
Tier System
Mob Scaling utilizes a 9-tier system (0-8) calculated from player XP and armor rating:
Formula: Tier = clamp((XP / 15) + (Armor / 10), 0, 8)
Base Tiers (0-4)
| Tier |
XP Range |
Armor Rating |
Equipment |
Effects |
| 0 |
0-4 |
0-5 |
Vanilla equipment |
None |
| 1 |
5-14 |
6-9 |
Leather/Gold armor, Stone/Iron weapons |
None |
| 2 |
15-29 |
10-15 |
Iron armor with Protection I, Sharpness I/Power I |
None |
| 3 |
30-44 |
16-20 |
Diamond armor with Protection II, Flame/Power II bows |
None |
| 4 |
45+ |
20+ |
Netherite mix, maxed enchantments |
Strength II, Speed II, Fire Resistance II |
Advanced Tiers (5-8)
| Tier |
XP Range* |
Armor Rating* |
Equipment |
Effects |
| 5 |
Configurable |
Configurable |
Diamond/Netherite |
Speed II, Strength II, Regeneration I |
| 6 |
Configurable |
Configurable |
Diamond/Netherite |
Speed III, Strength III, Regeneration II |
| 7 |
Configurable |
Configurable |
Netherite |
Speed IV, Strength IV, Absorption I |
| 8 |
Configurable |
Configurable |
Netherite |
Speed V, Strength V, Night Vision |
*Advanced tier thresholds are configurable in config.json
Installation
- Download the latest Mob Scaling datapack release (
.zip file)
- Navigate to your world save folder:
[world_name]/datapacks/
- Extract the datapack zip file into the datapacks directory
- Load your world or execute
/reload if already in-game
- Verify installation with
/datapack list - Mob Scaling should appear in the list
Boss Scaling
Wither Scaling
- Base Health: 300 HP
- Health Multiplier: Configurable (default 2.0x)
- Damage Multiplier: Configurable (default 1.5x)
- Effects: Speed and Strength at higher tiers
Ender Dragon Scaling
- Base Health: 200 HP
- Health Scaling: 200-500 HP based on player tier
- Knockback Resistance: 0.8-1.0 at higher tiers
- Effects: Speed and Strength at higher tiers
World Difficulty Modifiers
| Difficulty |
Multiplier |
Effect |
| Peaceful |
0.5x |
Reduced challenge for casual play |
| Easy |
0.75x |
Slightly easier than normal |
| Normal |
1.0x |
Standard scaling experience |
| Hard |
1.5x |
Increased challenge for veterans |
Dimension Modifiers
| Dimension |
Multiplier |
Description |
| Overworld |
1.0x |
Baseline difficulty |
| Nether |
1.3x |
30% increased danger |
| End |
1.5x |
50% increased challenge |
Configuration
Basic Configuration
Edit configuration values in data/ms/storage/config.json:
Core Settings
difficulty_enabled: Enable/disable scaling (0/1)
boss_scaling_enabled: Enable boss scaling (0/1)
world_difficulty_integration: Enable difficulty modifiers (0/1)
dimension_scaling_enabled: Enable dimension modifiers (0/1)
Boss Settings
wither_health_multiplier: Wither health multiplier (default: 2.0)
wither_damage_multiplier: Wither damage multiplier (default: 1.5)
dragon_health_multiplier: Dragon health multiplier (default: 2.5)
dragon_damage_multiplier: Dragon damage multiplier (default: 1.8)
Difficulty Modifiers
peaceful_modifier: Scaling on peaceful (default: 0.5)
easy_modifier: Scaling on easy (default: 0.75)
normal_modifier: Scaling on normal (default: 1.0)
hard_modifier: Scaling on hard (default: 1.5)
Dimension Modifiers
overworld_modifier: Overworld scaling (default: 1.0)
nether_modifier: Nether scaling (default: 1.3)
end_modifier: End scaling (default: 1.5)
{
"difficulty_enabled": 1,
"boss_scaling_enabled": 1,
"world_difficulty_integration": 1,
"dimension_scaling_enabled": 1,
"modded_content_enabled": 1,
"max_tier": 8,
"wither_health_multiplier": 2.0,
"dragon_health_multiplier": 2.5,
"hard_modifier": 1.5,
"nether_modifier": 1.3,
"end_modifier": 1.5
}
Advanced Customization
- Equipment: Modify loot tables in
data/ms/loot_tables/equipment/
- Scaling Logic: Adjust tier calculations in
data/ms/functions/player/
- Spawn Ranges: Edit distance values in
data/ms/functions/scale/apply.mcfunction
- Effects: Configure potion effects in tier-specific function files
Compatibility
| Minecraft Version |
Supported |
Notes |
| 1.20+ |
✅ |
Fully compatible |
| 1.19.x |
❌ |
Pack format 17 requires 1.20+ |
| Bedrock Edition |
❌ |
Java Edition only |
| Multiplayer |
✅ |
Per-player scaling supported |
Testing Commands
Test the datapack with these commands:
# Set player XP for specific tiers
/xp set @s 50 levels # Tier 4
/xp set @s 100 levels # Tier 8 (if configured)
# Spawn test mobs
/summon zombie ~ ~ ~
/summon skeleton ~ ~ ~
/summon creeper ~ ~ ~
# Check current tier
/scoreboard objectives add ms_dummy dummy
/scoreboard players set @s ms_tier 4
Troubleshooting
Datapack not loading:
- Verify the folder structure is intact
- Check for syntax errors in JSON files
- Ensure pack.mcmeta is valid JSON
Mobs not scaling:
- Confirm difficulty is enabled in config.json
- Check player has sufficient XP/armor for higher tiers
- Verify scoreboard objectives are created
Performance issues:
- Reduce spawn multiplier in config.json
- Increase spawn cooldown timer
- Disable distance-based scaling if not needed
For additional support, see TROUBLESHOOTING.md or visit the project website.
Roadmap
- Boss scaling (Wither, Ender Dragon)
- Configurable effect toggles per tier
- World difficulty integration
- Biome-based scaling modifiers
- Custom mob support
Credits
Developed by WormWoodMC for the Quefep creative collective.
License: CC0 1.0 Universal - Public Domain
Website: quefep.uk
Last updated: v3.0.0
评论 0
登录后参与评分
还没有评论,来抢沙发吧