CobbleBoss Boss 用户指南
1. 数据包结构
CobbleBoss 数据包使用 cobbleboss 命名空间。
普通 Boss 文件放置在:
data/cobbleboss/bosses/
付费多人 Boss 团队文件放置在:
data/cobbleboss/boss_teams/
主要结构:
pack.mcmeta
data/cobbleboss/bosses/
data/cobbleboss/boss_teams/
推荐的文件命名规范:
- 使用小写英文字母。
- 使用下划线代替空格。
- 使用与 Boss 相关的清晰名称。
- 保持每个 Boss 文件的独立性。
2. Boss JSON 控制内容
一个 Boss JSON 控制以下内容:
- Boss 对应的宝可梦种类
- Boss 显示名称
- Boss 发光颜色
- 自然生成规则
- 胜利后的奖励
- 失败后的惩罚
- 招式
- 个体努力值 (EVs)
- 自定义战斗属性
- 性格
- 特性
- 形态
- 携带物品
- 战斗模式
- 每回合行动次数
- 护盾设置
- 阶段技能
- Boss 体型大小
3. 推荐阅读顺序
对于初学者,首先理解以下部分:
- Boss 身份标识
- 生成规则
- 奖励与惩罚机制
- 战斗配置
- 视觉设置
- 高级突袭机制
最重要的字段:
unique_id
species_id
random_configs
推荐使用的字段:
display_name
glow
moves
battle_mode
actions_per_turn
scale
可选字段:
spawn_rule
reward_rule
punish_rule
effort_values
custom_battle_stats
phase_skills
held_items
nature
ability
form
shield_layers
shield_recover_per_turn
shield_weaken_turns
4. 顶层 Boss 字段
unique_id
用途:
Boss 的唯一内部 ID。
建议:
必填。
注意:
- 必须唯一。
- 指令使用该 ID。
- 不要在多个 Boss 文件中重复使用相同的 ID。
- 推荐使用小写英文字母加下划线的格式。
display_name
用途:
游戏中向玩家显示的名称。
建议:
推荐。
注意:
- 支持 Minecraft 颜色代码。
- 有助于使 Boss 名称更加醒目。
- 如果省略,可能会使用物种名称作为替代。
species_id
用途:
定义 Boss 所属的宝可梦物种。
建议:
必填。
注意:
- 通常使用
cobblemon 命名空间。
- 这决定了由 Boss 系统实际生成的宝可梦。
glow
用途:
控制 Boss 生成后发光轮廓的颜色。
位置:
顶层字段。
建议:
可选。
工作原理:
- 如果设置,Boss 将获得发光轮廓。
- 如果缺失或为空,Boss 不会发光。
- 使用 Minecraft 颜色名称。
可用颜色:
black
dark_blue
dark_green
dark_aqua
dark_red
dark_purple
gold
gray
dark_gray
blue
green
aqua
red
light_purple
yellow
white
注意:
- 无效的颜色可能导致 Boss 文件加载失败。
- 此设置仅控制实体发光,不控制公告颜色。
spawn_rule
用途:
控制自然生成规则。
建议:
可选。
重要提示:
对于自然生成,Boss 通常需要:
spawn_locations(生成地点)
spawn_times(生成时间)
spawn_biomes 或 spawn_structures(生物群系或结构)
spawn_weight(生成权重)
注意:
- 没有有效生成规则的 Boss 可能无法参与自然生成。
spawn_biomes 和 spawn_structures 按“生物群系或结构”匹配进行检查。
reward_rule
用途:
控制玩家在击败 Boss 后获得的奖励。
建议:
可选。
可包含:
- 直接物品奖励
- 直接指令奖励
- 奖励池(抽取一次并随机选择一个条目)
- 数量
- 几率
- 权重
- 抽取次数
punish_rule
用途:
控制玩家在输给 Boss 后受到的惩罚。
建议:
可选。
可包含:
random_configs
用途:
定义该 Boss 的一个或多个可能的战斗配置。
建议:
必填。
工作原理:
- 一个 Boss 可以拥有多个随机配置。
- 在 Boss 创建时选择一个配置。
- 不同的配置可以拥有不同的招式、属性、携带物品、战斗模式、护盾设置和体型大小。
5. 生成规则字段
spawn_locations
用途:
限制 Boss 可以生成的位置。
可用值:
land(陆地)
water_surface(水面)
underwater(水下)
cave(洞穴)
sky(天空)
lava(岩浆)
注意:
- 自然生成需要有效的生成地点类型。
- 使用与 Boss 主题相匹配的值。
spawn_times
用途:
限制 Boss 可以生成的时间段。
可用值:
all_day(全天)
early_morning(清晨)
morning(早晨)
noon(中午)
afternoon(下午)
dusk(黄昏)
night(夜晚)
midnight(午夜)
时间映射:
early_morning: 0 - 2999 tick
morning: 3000 - 5999 tick
noon: 6000 - 11999 tick
afternoon: 12000 - 14999 tick
dusk: 15000 - 17999 tick
night: 18000 - 20999 tick
midnight: 21000 - 23999 tick
all_day: 无时间限制
注意:
- Minecraft 一天有 24000 tick。
- 可以使用多个时间值。
all_day 表示 Boss 可以在任何时间生成。
spawn_biomes
用途:
限制 Boss 可以在哪些生物群系中生成。
工作原理:
- 正常的生物群系 ID 将生成限制在该生物群系内。
- 以
# 开头的生物群系标签允许在该标签内的所有生物群系中生成。
注意:
- 使用生物群系 ID 进行精确控制。
- 使用生物群系标签进行更广泛的生物群系组控制。
- 这可以与
spawn_structures 结合使用。
spawn_structures
用途:
允许当玩家位于特定结构内时生成 Boss。
工作原理:
- 使用结构 ID。
- 如果玩家位于匹配的结构内,Boss 可以匹配此规则。
- 这与生物群系规则一起作为“生物群系或结构”匹配进行检查。
注意:
- 这是针对结构 ID,而不是结构标签。
- 适用于地牢、神殿、废墟、要塞或自定义结构的 Boss。
spawn_weight
用途:
控制自然生成的选择权重。
工作原理:
- 当多个 Boss 符合条件时,更高的权重意味着更高的选择几率。
- 它不是直接的百分比。
注意:
- 使用正值。
- 如果所有有效权重均为 0,选择可能会回退到随机有效的 Boss 选择。
6. 奖励规则字段
reward_items
用途:
直接奖励条目的列表。
工作原理:
- 每个条目独立进行判定。
- 如果有三个条目各自的
chance: 0.1,则每个条目都有独立的 10% 概率。
- 玩家可以从同一个
reward_items 列表中收到多个条目。
每个奖励条目可以包含:
item_id(物品 ID)
count(数量)
command(命令)
chance(概率)
weight(权重)
weight 仅在相同的奖励条目被放置在 reward_pools.entries 中时使用。在直接的 reward_items 中,它虽然无害但是不必要的。
reward_pools
用途:
奖励池的列表。
工作原理:
- 每个池子根据其
chance 进行一次判定。
- 如果池子判定成功,模组会从
entries 中随机选择一个条目。
- 如果
rolls 大于 1,则池子会选出相应数量的条目。
- 选择基于每个条目的
weight 进行加权。
- 选择是有放回的,因此当
rolls 大于 1 时,同一个条目可能会被选中多次。
每个奖励池可以包含:
chance(概率)
rolls(抽取次数)
entries(条目列表)
每个池子条目可以包含:
item_id(物品 ID)
count(数量)
command(命令)
chance(概率)
weight(权重)
重要提示:
- 池级别的
chance 控制该池子是否产出任何奖励。
- 条目级别的
chance 仅为兼容性而解析,但在池子成功后,池子条目是通过随机权重选择的。
- 如果你希望拥有各自独立的概率,请使用
reward_items。
- 如果你想要“从该列表中获取一件物品的 10% 概率”,请使用
reward_pools。
item_id
用途:
给予玩家的物品。
备注:
- 请使用有效的物品 ID。
- 可以是 Minecraft、Cobblemon 或其他模组的物品。
count
用途:
给予物品的数量。
备注:
- 如果省略,通常默认为 1。
- 数量仅用于物品奖励。
- 必须大于 0。
command
用途:
执行一条命令作为奖励。
备注:
- 适用于给予宝可梦、货币、积分、头衔、权限或其他服务器奖励。
- 支持
{player} 占位符。
- 编写命令时不要以斜杠开头。
chance
用途:
控制概率。
对于直接的 reward_items:
- 如果
chance 大于 0,则使用该自定义概率。
- 如果
chance 缺失或为 0,则该奖励使用来自 boss-reward.toml 的默认掉落率。
对于 reward_pools:
- 如果池子
chance 大于 0,则使用该自定义概率。
- 如果池子
chance 缺失或为 0,则该池子使用来自 boss-reward.toml 的默认掉落率。
含义:
1 表示 100%。
0.5 表示 50%。
0.1 表示 10%。
rolls
用途:
控制从成功的奖励池中选取多少个条目。
备注:
- 如果省略,默认为 1。
- 必须大于 0。
- 同一个条目可以被选中多次。
weight
用途:
控制奖励池内选择条目的机会。
工作原理:
- 权重越高,在该池内的选中几率越大。
- 默认权重为 1。
- 权重不是直接的百分比。
示例:
- 条目 A 权重 1
- 条目 B 权重 3
- 在该池内,条目 B 被选中的可能性是条目 A 的三倍。
奖励示例
独立奖励:
"reward_rule": {
"reward_items": [
{
"item_id": "cobblemon:poke_ball",
"count": 3,
"chance": 0.1
},
{
"item_id": "cobblemon:great_ball",
"count": 2,
"chance": 0.1
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1,
"chance": 0.1
}
]
}
从池子中获取一个奖励:
"reward_rule": {
"reward_pools": [
{
"chance": 0.1,
"rolls": 1,
"entries": [
{
"item_id": "cobblemon:poke_ball",
"count": 3
},
{
"item_id": "cobblemon:great_ball",
"count": 2
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1
}
]
}
]
}
加权池子:
"reward_rule": {
"reward_pools": [
{
"chance": 0.25,
"rolls": 1,
"entries": [
{
"item_id": "minecraft:diamond",
"count": 1,
"weight": 1
},
{
"item_id": "minecraft:emerald",
"count": 3,
"weight": 3
},
{
"command": "give {player} minecraft:gold_ingot 8",
"weight": 5
}
]
}
]
}
直接奖励和池子可以一起使用:
"reward_rule": {
"reward_items": [
{
"item_id": "minecraft:gold_ingot",
"count": 2,
"chance": 1.0
}
],
"reward_pools": [
{
"chance": 0.1,
"entries": [
{
"item_id": "cobblemon:poke_ball",
"count": 3
},
{
"item_id": "cobblemon:great_ball",
"count": 2
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1
}
]
}
]
}
7. 惩罚规则字段
punish_items
用途:
惩罚条目的列表。
每个惩罚条目可以包含:
level(等级)
evs(努力值)
ivs(个体值)
command(命令)
chance(概率)
level
用途:
在失败后降低宝可梦等级。
备注:
- 等级不会降低到 1 以下。
- 请谨慎使用,因为等级损失可能会让玩家感到痛苦。
evs
用途:
减少努力值。
可用属性:
hp(生命值)
attack(攻击)
defense(防御)
special_attack(特殊攻击)
special_defense(特殊防御)
speed(速度)
备注:
ivs
用途:
减少个体值。
可用属性:
hp(生命值)
attack(攻击)
defense(防御)
special_attack(特殊攻击)
special_defense(特殊防御)
speed(速度)
备注:
- IV 惩罚非常严厉。
- 建议仅用于高风险的 Boss 设计。
command
用途:
执行一条命令作为惩罚。
备注:
- 适用于施加效果、扣除货币、传送、广播或触发服务器系统。
- 支持
{player} 占位符。
- 编写命令时不要以斜杠开头。
chance
用途:
控制此惩罚的概率。
重要提示:
- 如果
chance 大于 0,则使用自定义概率。
- 如果缺少
chance 或为 0,则惩罚将使用 boss-penalty.toml 中的默认惩罚概率。
8. 随机配置字段
shiny
用途:
控制 Boss 是否闪光。
备注:
true 使 Boss 闪光。
false 使其正常(不闪光)。
- 如果省略,通常默认为 false。
effort_values
用途:
设置 Boss 的个体值(EV)分布。
可用属性:
hp
attack
defense
special_attack
special_defense
speed
规则:
- 每个属性值应在 0 到 252 之间。
- EV 总和不应超过 510。
custom_battle_stats
用途:
覆盖或限制 Boss 的战斗属性。
可用属性:
hp
attack
defense
special_attack
special_defense
speed
每个属性规则使用:
value
用途:
目标属性值。
备注:
mode
用途:
控制属性值的施加方式。
可用值:
含义:
exact:直接使用此值。
minimum:属性值至少为此值。
maximum:属性值至多为这此值。
moves
用途:
设置 Boss 的技能。
备注:
- 通常最多使用 4 个技能。
- 技能名称应与 Cobblemon 技能 ID 匹配。
- 无效的技能名称可能导致 Boss 创建失败。
nature
用途:
设置 Boss 的性格。
备注:
- 如果省略,Boss 将使用默认性格。
- 请使用 Cobblemon 的性格名称。
ability
用途:
设置 Boss 的特性。
备注:
- 如果省略,则使用默认特性行为。
- 无效的特性名称可能导致 Boss 创建失败。
form
用途:
设置 Boss 的形态。
备注:
- 用于特殊形态。
- 如果不需要请留空。
- 该值应与 Cobblemon 的形态或外观行为匹配。
held_items
用途:
设置 Boss 可能携带的物品。
备注:
- 可包含一个或多个物品 ID。
- 如果配置了多个物品,Boss 可能会随机使用其中一个。
- 无效的物品 ID 可能导致 Boss 创建失败。
battle_mode
用途:
设置 Boss 的战斗模式及战斗布局。
可用值:
1v1 / one_vs_one
2v1 / two_vs_one
3v1 / three_vs_one
4v1 / four_vs_one
5v1 / five_vs_one
6v1 / six_vs_one
重要提示:
battle_mode 不会限制 actions_per_turn。
备注:
- 此字段控制战斗模式和布局。
- Boss 的行动次数由
actions_per_turn 单独控制。
actions_per_turn
用途:
设置 Boss 每回合可以采取的行动次数。
规则:
- 必须至少为 1。
- 不受
battle_mode 限制。
备注:
- 较高的值会使 Boss 变得非常困难。
- 这是主要的难度控制因素之一。
scale
用途:
设置 Boss 的大小。
位置:
位于 random_configs 内部。
工作原理:
- 如果设置,Boss 将使用此自定义大小。
- 如果省略,Boss 的大小将根据其等级自动计算。
规则:
- 必须大于 0。
- 最终值将被模组允许的大小范围限制。
备注:
- 使用此选项创建巨型 Boss。
- 留空以启用基于等级的自动大小。
9. Boss 护盾系统
用途:
Boss 护盾系统为 Boss 在战斗中提供额外保护。
工作原理:
- Boss 可以在战斗开始时拥有护盾层数。
- 某些攻击会消耗护盾层数。
- 克制伤害的移动招式会消耗护盾层数。
- 特殊移动招式会消耗配置的护盾层数。
- 只要护盾存在,某些护盾交互可以减少或阻挡伤害。
- 当护盾降至 0 时,护盾破碎。
- 护盾破碎后,Boss 可能进入虚弱状态。
- 虚弱回合结束后,如果配置了恢复,护盾可以每回合恢复。
重要提示:
必须在 boss-shield.toml 中启用全局护盾开关。
Boss 还需要在 random_configs 中包含护盾字段。
shield_layers
用途:
设置 Boss 的初始护盾层数。
位置:
位于 random_configs 内部。
工作原理:
0 表示此 Boss 没有护盾。
- 大于 0 的值将为此 Boss 启用护盾行为。
- 此值也用作最大护盾层数。
规则:
备注:
- 这是为特定 Boss 启用护盾的主要字段。
- 如果此值为 0,其他护盾字段通常无效。
shield_recover_per_turn
用途:
控制护盾破碎并处于虚弱状态后,Boss 每回合恢复多少护盾层数。
位置:
位于 random_configs 内部。
工作原理:
0 表示护盾不恢复。
- 大于 0 的值允许护盾恢复。
- 护盾恢复不能超过最大护盾层数。
规则:
备注:
- 使用 0 实现一次性护盾破碎行为。
- 使用较高值实现副本式重复护盾破碎。
shield_weaken_turns
用途:
控制护盾破碎后 Boss 保持虚弱状态的回合数。
位置:
位于 random_configs 内部。
工作原理:
- 当护盾降至 0 时,护盾破碎。
- Boss 在此回合数内进入虚弱状态。
- 在虚弱回合期间,护盾恢复等待。
- 虚弱回合结束后,如果配置了恢复,护盾恢复可以开始。
规则:
备注:
- 使用此选项在护盾破碎后创造输出窗口。
- 较大的值给玩家更多时间进行攻击。
0 表示没有虚弱延迟。
10. 阶段技能系统
phase_skills
用途:
根据 HP 百分比更改 Boss 的技能。
工作原理:
- 每个阶段都有一个 HP 百分比阈值。
- 当 Boss HP 达到该百分比时,Boss 可以切换到另一组技能。
备注:
- 适用于多阶段 Boss 战斗。
- 避免重复的 HP 阈值。
- 技能应为有效的 Cobblemon 技能名称。
hp_percent
用途:
触发阶段的 HP 百分比。
规则:
- 通常为 1 到 100。
- 小于或等于该 HP 时进入该阶段。
备注:
moves
用途:
此阶段使用的招式。
备注:
- 通常为 1 到 4 个招式。
- 使用此项可在战斗期间让 Boss 改变策略。
11. 属性键参考
以下属性键用于 effort_values、evs、ivs 和 custom_battle_stats:
hp
attack
defense
special_attack
special_defense
speed
12. 配置文件
所有配置文件均放置在以下路径下:
config/cobbleboss/
统一配置文件:
level-mapping.json
pokemon-max-level.json
boss-spawn.toml
boss-level.toml
boss-reward.toml
boss-penalty.toml
boss-battle-check.toml
boss-capture.toml
boss-immune.toml
boss-music.toml
boss-shield.toml
player-level-limit.toml
重要提示:
Fabric 和 NeoForge 使用相同的字段名称和顶层 TOML 结构。
如果旧的 NeoForge 配置是在此统一版本之前生成的,请删除旧配置文件或将值手动移动到顶层。
level-mapping.json
用途:
将玩家宝可梦等级映射为 Boss 等级。
备注:
- 仅在启用自定义等级映射时使用。
- 左侧为玩家等级。
- 右侧为 Boss 等级。
- 如果未找到映射关系,则使用常规等级计算。
pokemon-max-level.json
用途:
控制 Cobblemon 的全局宝可梦最高等级。
字段:
configName
maxPokemonLevel
description
备注:
- 默认最高等级通常为 900。
- 这会影响 Cobblemon 使用的全局宝可梦等级上限。
boss-spawn.toml
用途:
控制 Boss 的自然生成。
字段:
enableBossSpawn
checkIntervalTicks
spawnChance
enableSpawnTimeRandom
randomValueMin
randomValueMax
spawnFrequency
备注:
checkIntervalTicks 的范围是 100 到 72000。
spawnChance 的范围是 0 到 1。
randomValueMin 和 randomValueMax 的范围是 1 到 10000。
spawnFrequency 的范围是 0 到 100。
boss-level.toml
用途:
控制 Boss 等级计算。
字段:
bossLevelMultiplier
minBossLevel
maxBossLevel
includePCPokemon
scaleByMaxLevel
enableCustomLevelMapping
enableLevelRandom
randomMin
randomMax
备注:
bossLevelMultiplier 的范围是 1.0 到 10.0。
minBossLevel 的范围是 1 到 100。
maxBossLevel 的范围是 50 到 200。
enableCustomLevelMapping 控制是否使用 level-mapping.json。
boss-reward.toml
用途:
控制默认 Boss 奖励概率。
字段:
minDropRate
maxDropRate
levelScale
重要提示:
具有大于 0 的 chance 的直接奖励条目和奖励池会使用其自身的概率。
没有 chance 或 chance 为 0 的直接奖励条目和奖励池,将使用此配置中的默认掉落率。
备注:
minDropRate 和 maxDropRate 的范围是 0 到 1。
levelScale 的范围是 1 到 1000。
boss-penalty.toml
用途:
控制默认惩罚概率。
字段:
enablePenalty
minPenaltyChance
maxPenaltyChance
penaltyLevelScale
重要提示:
具有大于 0 的 chance 的惩罚条目会使用其自身的概率。
没有 chance 或 chance 为 0 的惩罚条目,将使用此配置中的默认惩罚概率。
备注:
minPenaltyChance 和 maxPenaltyChance 的范围是 0 到 1。
penaltyLevelScale 的范围是 1 到 1000。
boss-battle-check.toml
用途:
控制 Boss 战斗限制检查。
字段:
enableBattleCheck
cancelBattle
enablePokemonCheck
bannedPokemonList
enableItemCheck
bannedItemsList
enableMoveCheck
bannedMovesList
备注:
enableBattleCheck 是主开关。
cancelBattle 控制是否在检测到禁用内容时取消战斗。
bannedPokemonList 使用宝可梦物种 ID。
bannedItemsList 使用物品 ID。
bannedMovesList 使用招式 ID。
boss-capture.toml
用途:
控制 Boss 宝可梦是否可以被捕获。
字段:
preventBossCapture
showCaptureMessage
备注:
preventBossCapture 通常应保持启用状态。
showCaptureMessage 控制当捕获被阻止时玩家是否看到消息。
boss-immune.toml
用途:
控制世界中的 Boss 实体是否无敌。
字段:
重要提示:
这主要用于保护 Boss 实体免受正常战斗伤害以外的伤害。
这并不意味着 Boss 在战斗中免疫所有招式。
备注:
- 建议保持启用。
- 有助于防止玩家使用非战斗方式杀死 Boss。
boss-music.toml
用途:
控制 Boss 战斗音乐。
字段:
enableBossBattleMusic
stopOnBattleEnd
重要提示:
音乐系统不再使用 bossBattleMusicSoundId。
当 Boss 战斗开始时,模组会从以下来源随机选择一种音乐声音事件:
- 模组的内置文件
assets/cobbleboss/sounds.json。
- 在
sounds.json 中定义音乐的已启用资源包。
仅放置在 resourcepacks 文件夹中但未在客户端资源包菜单中启用的资源包将被忽略。
备注:
- 默认内置声音事件为
cobbleboss:boss_battle_theme。
- 自定义音乐必须由资源包提供。
- 声音文件应为 OGG 格式。
- 玩家需要启用资源包才能听到资源包中的音乐。
- 包含
bossBattleMusicSoundId 的旧配置应重新生成或清理。
boss-shield.toml
用途:
控制全局 Boss 护盾系统。
字段:
enableBossShield
superEffectiveLayers
moveLayerOverrides
含义:
enableBossShield:启用或禁用 Boss 护盾行为。
superEffectiveLayers:克制伤害招式消耗的护盾层数。
moveLayerOverrides:特殊的招式到护盾层的规则。
备注:
- 如果
enableBossShield 为 false,则 Boss JSON 中的护盾字段将不起作用。
moveLayerOverrides 使用招式 ID 和护盾层数值。
player-level-limit.toml
用途:
控制玩家宝可梦等级上限。
字段:
enableLevelLimit
maxPlayerPokemonLevel
说明:
enableLevelLimit 启用玩家宝可梦等级上限。
maxPlayerPokemonLevel 设置允许的玩家宝可梦最高等级。
13. 资源包音乐
可以通过资源包自定义 Boss 战背景音乐。
工作原理:
- 模组内置了位于
assets/cobbleboss/sounds.json 的音乐文件。
- 已启用的资源包可以添加更多音乐事件。
- 当 Boss 战开始时,模组会随机选择其中一个可用的音乐事件。
- 无需在配置文件中指定具体的音效 ID。
资源包路径:
pack.mcmeta
assets/cobbleboss/sounds.json
assets/cobbleboss/sounds/music/
示例结构:
my_boss_music_pack.zip
pack.mcmeta
assets/cobbleboss/sounds.json
assets/cobbleboss/sounds/music/boss_1.ogg
assets/cobbleboss/sounds/music/boss_2.ogg
assets/cobbleboss/sounds/music/boss_3.ogg
示例 sounds.json:
{
"music.boss_1": {
"category": "music",
"sounds": [
{
"name": "cobbleboss:music/boss_1",
"stream": true
}
]
},
"music.boss_2": {
"category": "music",
"sounds": [
{
"name": "cobbleboss:music/boss_2",
"stream": true
}
]
}
}
匹配的文件:
assets/cobbleboss/sounds/music/boss_1.ogg
assets/cobbleboss/sounds/music/boss_2.ogg
音效 ID 示例:
assets/cobbleboss/sounds.json 中的 music.boss_1 对应 cobbleboss:music.boss_1。
assets/cobbleboss/sounds.json 中的 music.boss_2 对应 cobbleboss:music.boss_2。
音乐检测规则:
如果满足以下任一条件,模组会将该音效事件视为 Boss 音乐:
- 事件键以
music 开头。
- 事件键包含
.music。
- 事件具有
"category": "music"。
- 其任意音效文件路径位于
music/ 文件夹内。
说明:
- 请使用 OGG 格式。
- 对于背景音乐请设置
stream: true。
- 玩家需要启用资源包才能听到自定义音乐。
- 仅使用原版或拥有版权的音乐。
- 如果未启用资源包,客户端将不会注册其音效事件。
14. 固定生成点命令
主命令:
/spawnpokemonbossat
权限:
需要管理员权限。
功能子命令:
create
addboss
removeboss
setweight
remove
list
info
trigger
settext
cleartext
announcement enable
announcement text
announcement color
announcement clear
create
用途:
创建一个固定的 Boss 生成点。
参数:
- 生成点 ID
- 维度
- X 坐标
- Y 坐标
- Z 坐标
- Boss 等级
- 重生秒数
- 可选的全息文本
说明:
- 生成点 ID 必须唯一。
- 重生时间单位为秒。
- Boss 等级范围为 1 到 900。
addboss
用途:
向固定生成点池中添加一个 Boss。
参数:
说明:
- Boss 唯一 ID 必须在已加载的 Boss 数据中存在。
- 权重越高,在该固定生成点生成的几率越大。
removeboss
用途:
从固定生成点池中移除一个 Boss。
setweight
用途:
更改固定生成点池中某个 Boss 的权重。
remove
用途:
删除一个固定生成点。
说明:
- 移除生成点数据。
- 移除相关的全息显示。
- 处理当前激活的固定 Boss。
list
用途:
列出所有固定生成点。
显示内容:
- 生成点 ID
- 维度
- 坐标
- Boss 等级
- 重生时间
- Boss 池
- 当前激活的 Boss
info
用途:
显示单个生成点的详细信息。
显示内容:
- 维度
- 坐标
- Boss 等级
- 重生时间
- 下次重生的刻数
- 当前激活的 Boss
- 全息文本
- Boss 池
- 公告状态
- 公告文本
- 公告颜色
trigger
用途:
手动使生成点进入可再次生成的状态。
说明:
settext
用途:
设置固定生成点的全息文本。
支持的占位符:
{id}
{level}
{time}
{x}
{y}
{z}
{dimension}
{boss_count}
{boss_pool}
{active_boss_id}
{active_boss}
{active_weight}
说明:
- 使用
| 分隔多行全息文本。
- 全息占位符与公告占位符不同。
cleartext
用途:
清除自定义全息文本并恢复默认的全息行为。
announcement enable
用途:
启用或禁用固定生成点公告。
工作原理:
说明:
- 没有单独的禁用公告命令。
- 请使用
announcement enable 配合 true 或 false 使用。
announcement text
用途:
设置自定义公告文本。
支持的占位符:
{boss}
{boss_id}
{species}
{point}
{dimension}
{x}
{y}
{z}
{position}
announcement color
用途:
设置公告消息的颜色。
可用颜色:
black (黑色)
dark_blue (深蓝色)
dark_green (深绿色)
dark_aqua (深青色)
dark_red (深红色)
dark_purple (深紫色)
gold (金色)
gray (灰色)
dark_gray (深灰色)
blue (蓝色)
green (绿色)
aqua (青色)
red (红色)
light_purple (浅紫色)
yellow (黄色)
white (白色)
说明:
- 默认颜色为
gold (金色)。
- 此选项更改的是公告颜色,而非 Boss 发光颜色。
announcement clear
用途:
恢复默认的公告文本。
说明:
- 不会移除生成点。
- 不会清除全息文本。
- 仅重置固定生成点公告模板。
固定生成 Boss 池权重
用途:
控制单个固定生成点内的选择几率。
规则:
说明:
- 这与自然生成的
spawn_rule.spawn_weight 是分开的。
- 权重越高,在该固定生成点池生成的几率越大。
15. 基础 Boss 命令
checkpokemonboss
用途:
检查玩家当前位置可以刷新的 Boss。
显示内容:
- 距离下次 Boss 刷新剩余的时间
- 匹配的 Boss
- Boss 显示名称
- 生成权重
权限:
通常普通玩家即可使用。
spawnpokemonboss
用途:
直接在玩家附近生成 Boss。
参数:
权限:
需要管理员权限。
备注:
- 使用 Boss 唯一 ID,而非物种 ID。
- 等级范围为 1 到 900。
- 适用于测试 Boss 配置。
spawnpokemonbossat
用途:
管理固定的 Boss 生成点。
权限:
需要管理员权限。
16. 新手设置建议
对于最简单的设置:
- 启用自然 Boss 生成。
- 使用合理的生成间隔。
- 初始时使用较低的生成概率。
- 启用 Boss 捕获防止功能。
- 启用 Boss 免疫功能。
- 使用等级映射或等级倍增器。
- 添加具有合理概率值的奖励。
- 添加发光效果以使 Boss 更容易被发现。
- 除非想要巨型 Boss,否则将缩放(scale)留空。
对于更严格的 Boss 服务器:
- 启用战斗检查。
- 根据需要禁止特定宝可梦。
- 根据需要禁止特定物品。
- 根据需要禁止特定招式。
- 通过
custom_battle_stats 增加 Boss 属性。
- 谨慎使用
actions_per_turn。
- 为类似突袭的战斗添加护盾设置。
对于休闲服务器:
- 保持惩罚较低或禁用。
- 使用可见的 Boss 发光效果。
- 使用适度的 Boss 体型。
- 提供保证的小额奖励和稀有的特殊奖励。
- 使用奖励池来实现“从该组中抽取一件物品”的奖励。
- 避免极高的
actions_per_turn。
17. 常见问题
Boss 未加载
可能原因:
- 重复的
unique_id。
- 无效的
species_id。
- 无效的招式名称。
- 无效的特性名称。
- 无效的物品 ID。
- 无效的发光颜色。
- 无效的缩放值。
- JSON 格式损坏。
- 空的
reward_pools.entries。
- 无效的奖励池
rolls。
- 无效的奖励池条目
weight。
Boss 未自然生成
可能原因:
- 自然生成已禁用。
- 生成概率过低。
- 生成间隔尚未过去。
- 当前生物群系不匹配。
- 当前结构不匹配。
- 当前时间不匹配。
- 当前位置类型不匹配。
- 缺少
spawn_weight 或其值过低。
- Boss 文件未加载。
Boss 音乐未播放
可能原因:
- Boss 音乐配置已禁用。
- 选定的声音事件未在客户端注册。
- 资源包未启用。
- 声音文件路径错误。
- 声音文件不是 OGG 格式。
- 客户端没有该资源包。
- 资源包虽已放入文件夹但未移至启用列表。
- 音乐音量被静音。
重要提示:
模组会从内置音乐和启用的资源包中随机选择。
它不使用 bossBattleMusicSoundId。
Boss 护盾无效
可能原因:
- 全局 Boss 护盾配置已禁用。
shield_layers 为 0 或缺失。
- 使用的招式未消耗护盾层数。
superEffectiveLayers 设置为 0。
- 该招式并非克制属性。
- 该招式未列在
moveLayerOverrides 中。
- Boss 是从旧版或过时的数据生成的。
Boss 太小或太大
可能原因:
scale 设置过低或过高。
- Boss 等级导致自动计算缩放比例。
- 缩放比例受模组允许范围的限制。
Boss 不发光
可能原因:
- 未设置
glow。
- 发光颜色无效。
- Boss 是从旧数据生成的。
- 其他系统移除了发光效果。
公告颜色未改变
可能原因:
- 颜色名称无效。
- 使用了错误的生成点 ID。
- 公告已禁用。
- 正在检查的消息不是固定生成公告。
旧 NeoForge 配置无法工作
可能原因:
- 配置文件是在统一配置字段之前生成的。
- 旧的分组 TOML 部分仍然存在。
- 旧的护盾 snake_case 字段仍然存在。
- 旧的
bossBattleMusicSoundId 仍然存在。
修复方法:
- 删除旧配置文件并让模组重新生成。
- 或将旧值移动到新顶层字段中。
- 移除旧的音乐声音 ID 配置。
18. 总结
CobbleBoss 的配置可以这样理解:
- 使用
unique_id、species_id、display_name 和 glow 定义 Boss 的身份和外观。
- 使用
spawn_rule 定义其出现的位置和时间。
- 使用
reward_rule 和 punish_rule 定义胜利和失败的结果。
- 使用
reward_items 进行独立的奖励抽取。
- 使用
reward_pools 实现“抽取一次,然后从列表中选择一个奖励”。
- 使用
random_configs 定义属性、招式、战斗模式、行动次数、护盾、阶段技能、持有物品、形态、特性、闪光状态和体型。
- 使用配置文件控制全局 Boss 行为。
- 使用资源包添加随机的 Boss 战斗音乐。
- 使用固定生成点命令创建受控的 Boss 生成位置。
19. 付费功能:多人团队 Boss 战
这是一个高级付费功能。
数据包路径:
data/cobbleboss/boss_teams/
一个 Boss 团队文件定义了一场团队 Boss 战。
字段:
team_id
pokemon_unique_ids
spawn_structures
defeat_rewards
punish_rule
team_id
用途:
Boss 团队的唯一 ID。
备注:
- 如果未编写命名空间,则使用
cobbleboss。
- 命令可以使用此 ID。
pokemon_unique_ids
用途:
该团队使用的 Boss 宝可梦的唯一 ID。
备注:
- 这些 ID 必须与正常 Boss JSON 中的
unique_id 值匹配。
- 团队系统从现有的 Boss 定义中创建 Boss 宝可梦。
spawn_structures
用途:
控制哪些结构可以触发此 Boss 团队。
备注:
- 使用结构 ID。
- 当玩家处于匹配的结构内并派出宝可梦时,可以触发团队战斗。
- 会记录结构实例,以防止同一结构被重复触发。
defeat_rewards
用途:
击败 Boss 团队后的奖励。
字段:
reward_items
reward_pools
item_id
count
command
chance
rolls
weight
工作原理:
reward_items 的行为类似于独立的奖励投掷。
reward_pools 仅进行一次投掷,然后从奖池中随机选择条目。
- 团队奖励池使用与常规 Boss 奖励池相同的格式。
概率说明:
如果 chance 大于 0,则使用该自定义概率。
如果 chance 缺失或为 0,则使用默认的奖励概率。
示例:
"defeat_rewards": {
"reward_items": [
{
"item_id": "minecraft:gold_ingot",
"count": 4,
"chance": 1.0
}
],
"reward_pools": [
{
"chance": 0.1,
"rolls": 1,
"entries": [
{
"item_id": "cobblemon:poke_ball",
"count": 3
},
{
"item_id": "cobblemon:great_ball",
"count": 2
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1
}
]
}
]
}
punish_rule
用途:
在输给 Boss 队伍后施加的惩罚。
字段:
punish_items
level
evs
ivs
command
chance
概率说明:
如果 chance 大于 0,则使用该自定义概率。
如果 chance 缺失或为 0,则使用默认的惩罚概率。
spawnpokemonbossteam
用途:
为玩家手动启动一场 Boss 队伍战斗。
命令含义:
/spawnpokemonbossteam <player> <bossTeamId>
权限:
需要管理员权限。
备注:
bossTeamId 可以带命名空间或不带命名空间书写。
- 如果未书写命名空间,则默认使用
cobbleboss。
- 此命令主要用于测试和管理员控制的事件。
多人队伍战斗行为
工作原理:
- 系统会扫描附近有效的玩家。
- 附近的玩家必须尚未处于战斗中。
- spectator(旁观者)和已移除的玩家将被忽略。
- 当前的队伍战斗系统设计为最多支持 2 名玩家。
- 当前的 Boss 队伍战斗系统最多使用 2 只 Boss 宝可梦。
- 当有足够的玩家和 Boss 时,这将形成一场 2v2 的突袭风格战斗。
- 如果不满足多人游戏条件,它可以回退到单人队伍 Boss 战斗。
备注:
- 此功能最好在正常 Boss 配置之后进行解释。
- 它旨在供希望实现突袭风格玩法的服务器使用。
- 对于队伍战斗,Boss 的属性、奖励、护盾以及
actions_per_turn(每回合行动次数)应仔细平衡。
CobbleBoss Boss User Guide
1. Data Pack Structure
CobbleBoss data packs use the cobbleboss namespace.
Normal Boss files are placed in:
data/cobbleboss/bosses/
Paid multiplayer Boss team files are placed in:
data/cobbleboss/boss_teams/
Main structure:
pack.mcmeta
data/cobbleboss/bosses/
data/cobbleboss/boss_teams/
Recommended file naming:
- Use lowercase English letters.
- Use underscores instead of spaces.
- Use clear names related to the Boss.
- Keep each Boss file independent.
2. What A Boss JSON Controls
A Boss JSON controls:
- Which Pokemon the Boss is
- Boss display name
- Boss glow color
- Natural spawn rules
- Rewards after victory
- Punishments after defeat
- Moves
- EVs
- Custom battle stats
- Nature
- Ability
- Form
- Held items
- Battle mode
- Actions per turn
- Shield settings
- Phase skills
- Boss size
3. Recommended Reading Order
For beginners, understand these parts first:
- Boss identity
- Spawn rules
- Rewards and punishments
- Battle configuration
- Visual settings
- Advanced raid mechanics
Most important fields:
unique_id
species_id
random_configs
Recommended fields:
display_name
glow
moves
battle_mode
actions_per_turn
scale
Optional fields:
spawn_rule
reward_rule
punish_rule
effort_values
custom_battle_stats
phase_skills
held_items
nature
ability
form
shield_layers
shield_recover_per_turn
shield_weaken_turns
4. Top-Level Boss Fields
unique_id
Purpose:
The unique internal ID of the Boss.
Recommendation:
Required.
Notes:
- Must be unique.
- Commands use this ID.
- Do not reuse the same ID in multiple Boss files.
- Recommended format is lowercase English letters with underscores.
display_name
Purpose:
The name shown to players in game.
Recommendation:
Recommended.
Notes:
- Supports Minecraft color codes.
- Useful for making Boss names more obvious.
- If omitted, the species name may be used instead.
species_id
Purpose:
Defines which Pokemon species the Boss is.
Recommendation:
Required.
Notes:
- Usually uses the
cobblemon namespace.
- This determines the actual Pokemon created by the Boss system.
glow
Purpose:
Controls the Boss glowing outline color after it spawns.
Position:
Top-level field.
Recommendation:
Optional.
How it works:
- If set, the Boss receives a glowing outline.
- If missing or empty, the Boss does not glow.
- Uses Minecraft color names.
Available colors:
black
dark_blue
dark_green
dark_aqua
dark_red
dark_purple
gold
gray
dark_gray
blue
green
aqua
red
light_purple
yellow
white
Notes:
- Invalid colors can cause the Boss file to fail loading.
- This only controls entity glow, not announcement color.
spawn_rule
Purpose:
Controls natural spawning rules.
Recommendation:
Optional.
Important:
For natural spawning, a Boss usually needs:
spawn_locations
spawn_times
spawn_biomes or spawn_structures
spawn_weight
Notes:
- A Boss without usable spawn rules may not participate in natural spawning.
spawn_biomes and spawn_structures are checked as biome-or-structure matching.
reward_rule
Purpose:
Controls rewards after players defeat the Boss.
Recommendation:
Optional.
Can contain:
- Direct item rewards
- Direct command rewards
- Reward pools that roll once and randomly choose one entry
- Count
- Chance
- Weight
- Rolls
punish_rule
Purpose:
Controls punishments after players lose to the Boss.
Recommendation:
Optional.
Can contain:
- Level reduction
- EV reduction
- IV reduction
- Command punishment
- Chance
random_configs
Purpose:
Defines one or more possible battle configurations for this Boss.
Recommendation:
Required.
How it works:
- A Boss can have multiple random configurations.
- One configuration is selected when the Boss is created.
- Different configurations can have different moves, stats, held items, battle modes, shield settings, and size.
5. Spawn Rule Fields
spawn_locations
Purpose:
Restricts where the Boss can spawn.
Available values:
land
water_surface
underwater
cave
sky
lava
Notes:
- Natural spawning needs a valid spawn location type.
- Use values that match the Boss theme.
spawn_times
Purpose:
Restricts the time period when the Boss can spawn.
Available values:
all_day
early_morning
morning
noon
afternoon
dusk
night
midnight
Time mapping:
early_morning: 0 - 2999 ticks
morning: 3000 - 5999 ticks
noon: 6000 - 11999 ticks
afternoon: 12000 - 14999 ticks
dusk: 15000 - 17999 ticks
night: 18000 - 20999 ticks
midnight: 21000 - 23999 ticks
all_day: no time restriction
Notes:
- Minecraft has 24000 ticks per day.
- Multiple time values can be used.
all_day means the Boss can spawn at any time.
spawn_biomes
Purpose:
Restricts which biomes the Boss can spawn in.
How it works:
- A normal biome ID limits spawning to that biome.
- A biome tag starting with
# allows all biomes in that tag.
Notes:
- Use biome IDs for precise control.
- Use biome tags for broader biome groups.
- This can be combined with
spawn_structures.
spawn_structures
Purpose:
Allows Boss spawning when the player is inside specific structures.
How it works:
- Uses structure IDs.
- If the player is inside a matching structure, the Boss can match this rule.
- This is checked together with biome rules as biome-or-structure matching.
Notes:
- This is for structure IDs, not structure tags.
- Useful for dungeon, temple, ruin, stronghold, or custom structure Bosses.
spawn_weight
Purpose:
Controls natural spawn selection weight.
How it works:
- When multiple Bosses are valid, higher weight means higher selection chance.
- It is not a direct percentage.
Notes:
- Use positive values.
- If all valid weights are 0, selection may fall back to random valid Boss selection.
6. Reward Rule Fields
reward_items
Purpose:
List of direct reward entries.
How it works:
- Each entry rolls independently.
- If three entries each have
chance: 0.1, each one has its own 10% chance.
- The player can receive multiple entries from the same
reward_items list.
Each reward entry can contain:
item_id
count
command
chance
weight
weight is only used when the same reward entry is placed inside reward_pools.entries. It is harmless but unnecessary in direct reward_items.
reward_pools
Purpose:
List of reward pools.
How it works:
- Each pool rolls once using its
chance.
- If the pool succeeds, the mod randomly chooses one entry from
entries.
- If
rolls is greater than 1, the pool chooses that many entries.
- Selection is weighted by each entry's
weight.
- Selection is with replacement, so the same entry can be selected more than once when
rolls is greater than 1.
Each reward pool can contain:
Each pool entry can contain:
item_id
count
command
chance
weight
Important:
- Pool-level
chance controls whether the pool gives anything.
- Entry-level
chance is parsed for compatibility, but pool entries are selected by random weight after the pool succeeds.
- If you want separate independent chances, use
reward_items.
- If you want "10% chance for one item from this list", use
reward_pools.
item_id
Purpose:
The item given to the player.
Notes:
- Use a valid item ID.
- Can be Minecraft, Cobblemon, or another mod item.
count
Purpose:
The number of items given.
Notes:
- If omitted, it usually acts as 1.
- Count is only used for item rewards.
- Must be greater than 0.
command
Purpose:
Executes a command as a reward.
Notes:
- Useful for giving Pokemon, money, points, titles, permissions, or other server rewards.
- Supports the
{player} placeholder.
- Write the command without a leading slash.
chance
Purpose:
Controls probability.
For direct reward_items:
- If
chance is greater than 0, that custom chance is used.
- If
chance is missing or 0, the reward uses the default drop rate from boss-reward.toml.
For reward_pools:
- If pool
chance is greater than 0, that custom chance is used.
- If pool
chance is missing or 0, the pool uses the default drop rate from boss-reward.toml.
Meaning:
1 means 100%.
0.5 means 50%.
0.1 means 10%.
rolls
Purpose:
Controls how many entries are selected from a successful reward pool.
Notes:
- If omitted, it defaults to 1.
- Must be greater than 0.
- The same entry can be selected more than once.
weight
Purpose:
Controls selection chance inside a reward pool.
How it works:
- Higher weight means higher chance inside that pool.
- Default weight is 1.
- Weight is not a direct percentage.
Example:
- Entry A weight 1
- Entry B weight 3
- Entry B is three times as likely as Entry A inside that pool.
Reward Examples
Independent rewards:
"reward_rule": {
"reward_items": [
{
"item_id": "cobblemon:poke_ball",
"count": 3,
"chance": 0.1
},
{
"item_id": "cobblemon:great_ball",
"count": 2,
"chance": 0.1
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1,
"chance": 0.1
}
]
}
One reward from a pool:
"reward_rule": {
"reward_pools": [
{
"chance": 0.1,
"rolls": 1,
"entries": [
{
"item_id": "cobblemon:poke_ball",
"count": 3
},
{
"item_id": "cobblemon:great_ball",
"count": 2
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1
}
]
}
]
}
Weighted pool:
"reward_rule": {
"reward_pools": [
{
"chance": 0.25,
"rolls": 1,
"entries": [
{
"item_id": "minecraft:diamond",
"count": 1,
"weight": 1
},
{
"item_id": "minecraft:emerald",
"count": 3,
"weight": 3
},
{
"command": "give {player} minecraft:gold_ingot 8",
"weight": 5
}
]
}
]
}
Direct rewards and pools can be used together:
"reward_rule": {
"reward_items": [
{
"item_id": "minecraft:gold_ingot",
"count": 2,
"chance": 1.0
}
],
"reward_pools": [
{
"chance": 0.1,
"entries": [
{
"item_id": "cobblemon:poke_ball",
"count": 3
},
{
"item_id": "cobblemon:great_ball",
"count": 2
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1
}
]
}
]
}
7. Punish Rule Fields
punish_items
Purpose:
List of punishment entries.
Each punishment entry can contain:
level
evs
ivs
command
chance
level
Purpose:
Reduces Pokemon level after losing.
Notes:
- Level will not be reduced below 1.
- Use carefully because level loss can feel severe.
evs
Purpose:
Reduces effort values.
Available stats:
hp
attack
defense
special_attack
special_defense
speed
Notes:
- Only fill stats you want to reduce.
- Missing stats are ignored.
ivs
Purpose:
Reduces individual values.
Available stats:
hp
attack
defense
special_attack
special_defense
speed
Notes:
- IV punishment is very severe.
- Recommended only for high-risk Boss designs.
command
Purpose:
Executes a command as punishment.
Notes:
- Useful for applying effects, taking currency, teleporting, broadcasting, or triggering server systems.
- Supports the
{player} placeholder.
- Write the command without a leading slash.
chance
Purpose:
Controls the probability of this punishment.
Important:
- If
chance is greater than 0, that custom chance is used.
- If
chance is missing or 0, the punishment uses the default penalty chance from boss-penalty.toml.
8. Random Config Fields
shiny
Purpose:
Controls whether the Boss is shiny.
Notes:
true makes the Boss shiny.
false makes it normal.
- If omitted, it usually defaults to false.
effort_values
Purpose:
Sets the Boss EV spread.
Available stats:
hp
attack
defense
special_attack
special_defense
speed
Rules:
- Each stat should be between 0 and 252.
- Total EVs should not exceed 510.
custom_battle_stats
Purpose:
Overrides or limits Boss battle stats.
Available stats:
hp
attack
defense
special_attack
special_defense
speed
Each stat rule uses:
value
Purpose:
The target stat value.
Notes:
- Usually a positive number.
- Useful for raid-style Bosses.
mode
Purpose:
Controls how the stat value is applied.
Available values:
Meanings:
exact: use this value directly.
minimum: stat will be at least this value.
maximum: stat will be at most this value.
moves
Purpose:
Sets the Boss moves.
Notes:
- Usually use up to 4 moves.
- Move names should match Cobblemon move IDs.
- Invalid move names can cause Boss creation failure.
nature
Purpose:
Sets the Boss nature.
Notes:
- If omitted, the Boss uses a default nature.
- Use Cobblemon nature names.
ability
Purpose:
Sets the Boss ability.
Notes:
- If omitted, default ability behavior is used.
- Invalid ability names can cause Boss creation failure.
form
Purpose:
Sets the Boss form.
Notes:
- Use this for special forms.
- Leave empty if not needed.
- The value should match Cobblemon form or aspect behavior.
held_items
Purpose:
Sets possible held items for the Boss.
Notes:
- Can contain one or more item IDs.
- If multiple items are configured, the Boss may randomly use one.
- Invalid item IDs can cause Boss creation failure.
battle_mode
Purpose:
Sets the Boss battle mode and battle layout.
Available values:
1v1 / one_vs_one
2v1 / two_vs_one
3v1 / three_vs_one
4v1 / four_vs_one
5v1 / five_vs_one
6v1 / six_vs_one
Important:
battle_mode does not limit actions_per_turn.
Notes:
- This field controls the battle mode and layout.
- Boss action count is controlled separately by
actions_per_turn.
actions_per_turn
Purpose:
Sets how many actions the Boss can take each turn.
Rules:
- Must be at least 1.
- Not limited by
battle_mode.
Notes:
- Higher values make the Boss much harder.
- This is one of the main difficulty controls.
scale
Purpose:
Sets the Boss size.
Position:
Inside random_configs.
How it works:
- If set, the Boss uses this custom size.
- If omitted, the Boss size is calculated automatically from its level.
Rules:
- Must be greater than 0.
- The final value is clamped by the mod's allowed size range.
Notes:
- Use this to create giant Bosses.
- Leave it empty for automatic level-based size.
9. Boss Shield System
Purpose:
The Boss shield system gives a Boss extra protection during battle.
How it works:
- A Boss can start battle with shield layers.
- Certain attacks can consume shield layers.
- Super-effective damaging moves can consume shield layers.
- Special moves can consume configured shield layers.
- While shield still exists, some shield interactions can reduce or block damage.
- When shield reaches 0, the shield breaks.
- After shield breaks, the Boss can enter a weakened state.
- After weakened turns end, shield can recover each turn if recovery is configured.
Important:
The global shield switch in boss-shield.toml must be enabled.
The Boss also needs shield fields inside random_configs.
shield_layers
Purpose:
Sets the Boss initial shield layers.
Position:
Inside random_configs.
How it works:
0 means this Boss has no shield.
- A value greater than 0 enables shield behavior for this Boss.
- This value is also used as the maximum shield layer count.
Rules:
Notes:
- This is the main field that enables shield for a specific Boss.
- If this value is 0, the other shield fields usually have no effect.
shield_recover_per_turn
Purpose:
Controls how many shield layers the Boss recovers each turn after shield break and weakened state.
Position:
Inside random_configs.
How it works:
0 means shield does not recover.
- A value greater than 0 allows shield recovery.
- Shield recovery cannot exceed maximum shield layers.
Rules:
Notes:
- Use 0 for one-time shield break behavior.
- Use higher values for raid-style repeated shield breaking.
shield_weaken_turns
Purpose:
Controls how many turns the Boss stays weakened after shield breaks.
Position:
Inside random_configs.
How it works:
- When shield reaches 0, the shield breaks.
- The Boss enters weakened state for this many turns.
- During weakened turns, shield recovery waits.
- After weakened turns end, shield recovery can begin if configured.
Rules:
Notes:
- Use this to create a damage window after shield break.
- Larger values give players more time to attack.
0 means no weakened delay.
10. Phase Skill System
phase_skills
Purpose:
Changes Boss moves based on HP percentage.
How it works:
- Each phase has an HP percentage.
- When Boss HP reaches that percentage, the Boss can switch to another moveset.
Notes:
- Useful for multi-phase Boss fights.
- Avoid duplicate HP thresholds.
- Moves should be valid Cobblemon move names.
hp_percent
Purpose:
The HP percentage that triggers the phase.
Rules:
- Usually 1 to 100.
- Lower or equal HP enters that phase.
Notes:
- Higher values trigger earlier.
- Lower values trigger later.
moves
Purpose:
The moves used in this phase.
Notes:
- Usually 1 to 4 moves.
- Use this to make the Boss change strategy during battle.
11. Stat Key Reference
The following stat keys are used in effort_values, evs, ivs, and custom_battle_stats:
hp
attack
defense
special_attack
special_defense
speed
12. Configuration Files
All configuration files are placed under:
config/cobbleboss/
Unified config files:
level-mapping.json
pokemon-max-level.json
boss-spawn.toml
boss-level.toml
boss-reward.toml
boss-penalty.toml
boss-battle-check.toml
boss-capture.toml
boss-immune.toml
boss-music.toml
boss-shield.toml
player-level-limit.toml
Important:
Fabric and NeoForge use the same field names and top-level TOML structure.
If an old NeoForge config was generated before this unified version, delete the old config file or manually move values to the top level.
level-mapping.json
Purpose:
Maps player Pokemon level to Boss level.
Notes:
- Used only when custom level mapping is enabled.
- The left side is player level.
- The right side is Boss level.
- If no mapping is found, normal level calculation can be used.
pokemon-max-level.json
Purpose:
Controls Cobblemon's global maximum Pokemon level.
Fields:
configName
maxPokemonLevel
description
Notes:
- Default max level is usually 900.
- This affects the global Pokemon level limit used by Cobblemon.
boss-spawn.toml
Purpose:
Controls natural Boss spawning.
Fields:
enableBossSpawn
checkIntervalTicks
spawnChance
enableSpawnTimeRandom
randomValueMin
randomValueMax
spawnFrequency
Notes:
checkIntervalTicks range is 100 to 72000.
spawnChance range is 0 to 1.
randomValueMin and randomValueMax range is 1 to 10000.
spawnFrequency range is 0 to 100.
boss-level.toml
Purpose:
Controls Boss level calculation.
Fields:
bossLevelMultiplier
minBossLevel
maxBossLevel
includePCPokemon
scaleByMaxLevel
enableCustomLevelMapping
enableLevelRandom
randomMin
randomMax
Notes:
bossLevelMultiplier range is 1.0 to 10.0.
minBossLevel range is 1 to 100.
maxBossLevel range is 50 to 200.
enableCustomLevelMapping controls whether level-mapping.json is used.
boss-reward.toml
Purpose:
Controls default Boss reward chance.
Fields:
minDropRate
maxDropRate
levelScale
Important:
Direct reward entries and reward pools with chance greater than 0 use their own chance.
Direct reward entries and reward pools without chance, or with chance 0, use the default drop rate from this config.
Notes:
minDropRate and maxDropRate range is 0 to 1.
levelScale range is 1 to 1000.
boss-penalty.toml
Purpose:
Controls default punishment chance.
Fields:
enablePenalty
minPenaltyChance
maxPenaltyChance
penaltyLevelScale
Important:
Punish entries with chance greater than 0 use their own chance.
Punish entries without chance, or with chance 0, use the default penalty chance from this config.
Notes:
minPenaltyChance and maxPenaltyChance range is 0 to 1.
penaltyLevelScale range is 1 to 1000.
boss-battle-check.toml
Purpose:
Controls Boss battle restriction checks.
Fields:
enableBattleCheck
cancelBattle
enablePokemonCheck
bannedPokemonList
enableItemCheck
bannedItemsList
enableMoveCheck
bannedMovesList
Notes:
enableBattleCheck is the main switch.
cancelBattle controls whether battle is cancelled when banned content is detected.
bannedPokemonList uses Pokemon species IDs.
bannedItemsList uses item IDs.
bannedMovesList uses move IDs.
boss-capture.toml
Purpose:
Controls whether Boss Pokemon can be captured.
Fields:
preventBossCapture
showCaptureMessage
Notes:
preventBossCapture should usually stay enabled.
showCaptureMessage controls whether players see a message when capture is blocked.
boss-immune.toml
Purpose:
Controls whether Boss entities are invulnerable in the world.
Fields:
Important:
This mainly protects Boss entities outside normal battle damage.
It does not mean the Boss is immune to every move inside battle.
Notes:
- Recommended to keep enabled.
- Helps prevent players from killing Bosses with non-battle methods.
boss-music.toml
Purpose:
Controls Boss battle music.
Fields:
enableBossBattleMusic
stopOnBattleEnd
Important:
The music system no longer uses bossBattleMusicSoundId.
When a Boss battle starts, the mod randomly selects a music sound event from:
- The mod's built-in
assets/cobbleboss/sounds.json.
- Enabled resource packs that define music in
sounds.json.
Resource packs that are only placed in the resourcepacks folder but not enabled in the client resource pack menu are ignored.
Notes:
- Default built-in sound event is
cobbleboss:boss_battle_theme.
- Custom music must be provided by a resource pack.
- The sound file should be OGG format.
- Players need the resource pack enabled to hear resource-pack music.
- Old configs containing
bossBattleMusicSoundId should be regenerated or cleaned up.
boss-shield.toml
Purpose:
Controls the global Boss shield system.
Fields:
enableBossShield
superEffectiveLayers
moveLayerOverrides
Meaning:
enableBossShield: enables or disables Boss shield behavior.
superEffectiveLayers: shield layers consumed by super-effective damaging moves.
moveLayerOverrides: special move-to-shield-layer rules.
Notes:
- If
enableBossShield is false, Boss JSON shield fields will not work.
moveLayerOverrides uses move IDs and shield layer values.
player-level-limit.toml
Purpose:
Controls player Pokemon level limit.
Fields:
enableLevelLimit
maxPlayerPokemonLevel
Notes:
enableLevelLimit enables the player Pokemon level cap.
maxPlayerPokemonLevel sets the maximum allowed player Pokemon level.
13. Resource Pack Music
Boss battle music can be customized through resource packs.
How it works:
- The mod has built-in music in
assets/cobbleboss/sounds.json.
- Enabled resource packs can add more music events.
- When a Boss battle starts, the mod randomly chooses one available music event.
- There is no need to specify one sound ID in config.
Resource pack paths:
pack.mcmeta
assets/cobbleboss/sounds.json
assets/cobbleboss/sounds/music/
Example structure:
my_boss_music_pack.zip
pack.mcmeta
assets/cobbleboss/sounds.json
assets/cobbleboss/sounds/music/boss_1.ogg
assets/cobbleboss/sounds/music/boss_2.ogg
assets/cobbleboss/sounds/music/boss_3.ogg
Example sounds.json:
{
"music.boss_1": {
"category": "music",
"sounds": [
{
"name": "cobbleboss:music/boss_1",
"stream": true
}
]
},
"music.boss_2": {
"category": "music",
"sounds": [
{
"name": "cobbleboss:music/boss_2",
"stream": true
}
]
}
}
Matching files:
assets/cobbleboss/sounds/music/boss_1.ogg
assets/cobbleboss/sounds/music/boss_2.ogg
Sound ID examples:
music.boss_1 in assets/cobbleboss/sounds.json becomes cobbleboss:music.boss_1.
music.boss_2 in assets/cobbleboss/sounds.json becomes cobbleboss:music.boss_2.
Music detection:
The mod treats a sound event as Boss music if one of these is true:
- The event key starts with
music.
- The event key contains
.music.
- The event has
"category": "music".
- One of its sound file paths is inside a
music/ folder.
Notes:
- Use OGG format.
- Use
stream: true for music.
- Players need the resource pack enabled to hear custom music.
- Use original or licensed music only.
- If the resource pack is not enabled, the client will not register its sound events.
14. Fixed Spawn Point Commands
Main command:
/spawnpokemonbossat
Permission:
Requires administrator permission.
Functions:
create
addboss
removeboss
setweight
remove
list
info
trigger
settext
cleartext
announcement enable
announcement text
announcement color
announcement clear
create
Purpose:
Creates a fixed Boss spawn point.
Parameters:
- Spawn point ID
- Dimension
- X coordinate
- Y coordinate
- Z coordinate
- Boss level
- Respawn seconds
- Optional hologram text
Notes:
- Spawn point ID must be unique.
- Respawn time is in seconds.
- Boss level range is 1 to 900.
addboss
Purpose:
Adds a Boss to a fixed spawn point pool.
Parameters:
- Spawn point ID
- Boss unique ID
- Weight
Notes:
- Boss unique ID must exist in loaded Boss data.
- Higher weight means higher chance inside that fixed spawn point.
removeboss
Purpose:
Removes a Boss from a fixed spawn point pool.
setweight
Purpose:
Changes the weight of a Boss in a fixed spawn point pool.
remove
Purpose:
Deletes a fixed spawn point.
Notes:
- Removes spawn point data.
- Removes related hologram display.
- Handles the currently active fixed Boss.
list
Purpose:
Lists all fixed spawn points.
Shows:
- Spawn point ID
- Dimension
- Coordinates
- Boss level
- Respawn time
- Boss pool
- Current active Boss
info
Purpose:
Shows detailed information for one spawn point.
Shows:
- Dimension
- Coordinates
- Boss level
- Respawn time
- Next respawn tick
- Current active Boss
- Hologram text
- Boss pool
- Announcement status
- Announcement text
- Announcement color
trigger
Purpose:
Manually makes a spawn point ready to spawn again.
Notes:
- Useful for testing.
- Does not delete the spawn point.
settext
Purpose:
Sets fixed spawn point hologram text.
Supported placeholders:
{id}
{level}
{time}
{x}
{y}
{z}
{dimension}
{boss_count}
{boss_pool}
{active_boss_id}
{active_boss}
{active_weight}
Notes:
- Use
| to separate multiple hologram lines.
- Hologram placeholders are different from announcement placeholders.
cleartext
Purpose:
Clears custom hologram text and restores default hologram behavior.
announcement enable
Purpose:
Enables or disables fixed spawn point announcement.
How it works:
true enables announcement.
false disables announcement.
Notes:
- There is no separate announcement disable command.
- Use
announcement enable with true or false.
announcement text
Purpose:
Sets custom announcement text.
Supported placeholders:
{boss}
{boss_id}
{species}
{point}
{dimension}
{x}
{y}
{z}
{position}
announcement color
Purpose:
Sets announcement message color.
Available colors:
black
dark_blue
dark_green
dark_aqua
dark_red
dark_purple
gold
gray
dark_gray
blue
green
aqua
red
light_purple
yellow
white
Notes:
- Default color is
gold.
- This changes announcement color, not Boss glow color.
announcement clear
Purpose:
Restores the default announcement text.
Notes:
- Does not remove the spawn point.
- Does not clear hologram text.
- Only resets the fixed spawn announcement template.
Fixed Spawn Boss Pool Weight
Purpose:
Controls selection chance inside one fixed spawn point.
Rules:
- Minimum weight: 1
- Maximum weight: 1000000
Notes:
- This is separate from natural
spawn_rule.spawn_weight.
- Higher weight means higher chance inside that fixed spawn point pool.
15. Basic Boss Commands
checkpokemonboss
Purpose:
Checks which Bosses can spawn at the player's current location.
Shows:
- Time until next Boss refresh
- Matching Bosses
- Boss display names
- Spawn weights
Permission:
Usually available to normal players.
spawnpokemonboss
Purpose:
Directly spawns a Boss near the player.
Parameters:
- Boss unique ID
- Optional level
Permission:
Requires administrator permission.
Notes:
- Uses Boss unique ID, not species ID.
- Level range is 1 to 900.
- Useful for testing Boss configuration.
spawnpokemonbossat
Purpose:
Manages fixed Boss spawn points.
Permission:
Requires administrator permission.
16. Beginner Setup Suggestions
For the simplest setup:
- Enable natural Boss spawning.
- Use a reasonable spawn interval.
- Use a low spawn chance at first.
- Enable Boss capture prevention.
- Enable Boss immunity.
- Use level mapping or level multiplier.
- Add rewards with reasonable chance values.
- Add glow to make Bosses easier to find.
- Leave scale empty unless you want giant Bosses.
For stricter Boss servers:
- Enable battle checks.
- Ban specific Pokemon if needed.
- Ban specific items if needed.
- Ban specific moves if needed.
- Increase Boss stats through
custom_battle_stats.
- Use
actions_per_turn carefully.
- Add shield settings for raid-style fights.
For casual servers:
- Keep punishments low or disabled.
- Use visible Boss glow.
- Use moderate Boss size.
- Give guaranteed small rewards and rare special rewards.
- Use reward pools for "one item from this group" rewards.
- Avoid extremely high
actions_per_turn.
17. Common Problems
Boss does not load
Possible reasons:
- Duplicate
unique_id.
- Invalid
species_id.
- Invalid move name.
- Invalid ability name.
- Invalid item ID.
- Invalid glow color.
- Invalid scale value.
- Broken JSON format.
- Empty
reward_pools.entries.
- Invalid reward pool
rolls.
- Invalid reward pool entry
weight.
Boss does not spawn naturally
Possible reasons:
- Natural spawning is disabled.
- Spawn chance is too low.
- Spawn interval has not passed.
- Current biome does not match.
- Current structure does not match.
- Current time does not match.
- Current location type does not match.
spawn_weight is missing or too low.
- Boss file is not loaded.
Boss music does not play
Possible reasons:
- Boss music config is disabled.
- The selected sound event is not registered on the client.
- Resource pack is not enabled.
- Sound file path is wrong.
- Sound file is not OGG format.
- Client does not have the resource pack.
- The resource pack was placed in the folder but not moved to the enabled list.
- Music volume is muted.
Important:
The mod randomly chooses from built-in music and enabled resource packs.
It does not use bossBattleMusicSoundId.
Boss shield does not work
Possible reasons:
- Global Boss shield config is disabled.
shield_layers is 0 or missing.
- The move used does not consume shield layers.
superEffectiveLayers is set to 0.
- The move is not super-effective.
- The move is not listed in
moveLayerOverrides.
- Boss was spawned from old or outdated data.
Boss is too small or too large
Possible reasons:
scale is set too low or too high.
- Boss level causes automatic scale calculation.
- Scale is clamped by the mod's allowed range.
Boss does not glow
Possible reasons:
glow is not set.
- Glow color is invalid.
- Boss was spawned from old data.
- Another system removed the glow effect.
Announcement color does not change
Possible reasons:
- The color name is invalid.
- The wrong spawn point ID was used.
- Announcement is disabled.
- The message being checked is not the fixed spawn announcement.
Old NeoForge config does not work
Possible reasons:
- The config was generated before unified config fields.
- Old grouped TOML sections are still present.
- Old shield snake_case fields are still present.
- Old
bossBattleMusicSoundId is still present.
Fix:
- Delete the old config file and let the mod regenerate it.
- Or move the old values to the new top-level fields.
- Remove old music sound ID configuration.
18. Summary
CobbleBoss configuration can be understood like this:
- Use
unique_id, species_id, display_name, and glow to define Boss identity and appearance.
- Use
spawn_rule to define where and when it appears.
- Use
reward_rule and punish_rule to define win and loss results.
- Use
reward_items for independent reward rolls.
- Use
reward_pools for "roll once, then choose one reward from this list".
- Use
random_configs to define stats, moves, battle mode, action count, shield, phase skills, held items, form, ability, shiny state, and size.
- Use config files to control global Boss behavior.
- Use resource packs to add random Boss battle music.
- Use fixed spawn point commands to create controlled Boss spawn locations.
19. Paid Feature: Multiplayer Team Boss Battles
This is an advanced paid feature.
Data pack path:
data/cobbleboss/boss_teams/
A Boss team file defines a group Boss battle.
Fields:
team_id
pokemon_unique_ids
spawn_structures
defeat_rewards
punish_rule
team_id
Purpose:
The unique ID of the Boss team.
Notes:
- If no namespace is written,
cobbleboss is used.
- Commands can use this ID.
pokemon_unique_ids
Purpose:
The Boss Pokemon unique IDs used by this team.
Notes:
- These IDs must match normal Boss JSON
unique_id values.
- The team system creates Boss Pokemon from existing Boss definitions.
spawn_structures
Purpose:
Controls which structures can trigger this Boss team.
Notes:
- Uses structure IDs.
- When a player is inside a matching structure and sends out a Pokemon, the team battle can be triggered.
- Structure instances are recorded so the same structure is not repeatedly triggered.
defeat_rewards
Purpose:
Rewards after defeating the Boss team.
Fields:
reward_items
reward_pools
item_id
count
command
chance
rolls
weight
How it works:
reward_items behave as independent reward rolls.
reward_pools roll once, then randomly choose entries from the pool.
- Team reward pools use the same format as normal Boss reward pools.
Chance note:
If chance is greater than 0, that custom chance is used.
If chance is missing or 0, the default reward chance can be used.
Example:
"defeat_rewards": {
"reward_items": [
{
"item_id": "minecraft:gold_ingot",
"count": 4,
"chance": 1.0
}
],
"reward_pools": [
{
"chance": 0.1,
"rolls": 1,
"entries": [
{
"item_id": "cobblemon:poke_ball",
"count": 3
},
{
"item_id": "cobblemon:great_ball",
"count": 2
},
{
"item_id": "cobblemon:ultra_ball",
"count": 1
}
]
}
]
}
punish_rule
Purpose:
Punishments after losing to the Boss team.
Fields:
punish_items
level
evs
ivs
command
chance
Chance note:
If chance is greater than 0, that custom chance is used.
If chance is missing or 0, the default penalty chance can be used.
spawnpokemonbossteam
Purpose:
Manually starts a Boss team battle for a player.
Command meaning:
/spawnpokemonbossteam <player> <bossTeamId>
Permission:
Requires administrator permission.
Notes:
bossTeamId can be written with or without namespace.
- If no namespace is written,
cobbleboss is used.
- This command is mainly for testing and admin-controlled events.
Multiplayer Team Battle Behavior
How it works:
- The system scans nearby valid players.
- Nearby players must not already be in battle.
- Spectators and removed players are ignored.
- The current team battle system is designed around up to 2 players.
- The current Boss team battle system uses up to 2 Boss Pokemon.
- This creates a 2v2 raid-style battle when enough players and Bosses are available.
- If multiplayer conditions are not met, it can fall back to a single-player team Boss battle.
Notes:
- This feature is best explained after normal Boss configuration.
- It is intended for servers that want raid-style gameplay.
- Boss stats, rewards, shield, and
actions_per_turn should be balanced carefully for team battles.
评论 0
登录后参与评分
还没有评论,来抢沙发吧