- 版权类型
- 原创
- 插件中文名称
- GTMobDrops
- 插件英文名称
- GTMobDrops
- 原帖地址
- #
- 支持的核心(服务端)
- Spigot
- Paper
- Folia
- Purpur
- PufferFish
- Leaves
- 其他核心
- 语言支持
- 中文(简体)
- 适配版本(Java)
- 1.21
- 1.20
- 1.19
- 1.18
- 1.17
- 1.16
- 1.15
- 1.14
- 1.13
- 1.12
[MD]`点击查看插件WIKI`[/MD]
GT系列插件交流群
[MD]`985955382`[/MD]
[MD]`GTMobDrops免费版群内获取`[/MD]
[MD] # GTMobDrops 插件介绍 GTMobDrops 是怪物死亡后自定义掉落加成及掉落条件/规则等的插件。它可以把掉落直接写在 MythicMobs 怪物文件里,也可以写在 GTMobDrops 自己的分类目录里;支持掉落池、保底、连续未掉落加成、CraneAttribute、AttributePlus/AP、PlaceholderAPI、掉落规则、单物品掉落加成、掉落组掉率加成、套装掉率暗改支持正负、物品保护、掉落提示、GUI 预览和命令模拟等。 ## 1. 安装前先确认 常用软依赖: - `MythicMobs`:识别 MM 怪物、MM物品、读取修改 MM 怪物的掉落。 - `PlaceholderAPI`:条件、动作、显示文本里解析 PAPI 变量。 - `CraneAttribute`:读取 `ca:属性名` 掉率属性。 - `AttributePlus` :读取 `ap:属性名` 掉率属性。 - `NeigeItems`、`ItemsAdder`、`Oraxen`、`MMOItems`、`Zaphkiel`、`Nexo`:读取对应物品库物品。 - `Adyeshach`:可选虚拟显示模块。 没有安装某个软依赖时,对应物品来源或功能不会生效,但插件本体不应该因为缺少软依赖而停止启用。 ### 首次启动后你会看到这些核心文件和文件夹: ```text plugins/GTMobDrops/ config.yml # 主配置,消息、存储、保护、全局功能等 droppools.yml # 旧版单文件掉落池,仍兼容 rateBoost.yml # 旧版单文件掉率加成,仍兼容 sets.yml # 旧版单文件套装,仍兼容 drops/ # 新版怪物掉落分类目录 droppools/ # 新版掉落池分类目录 rateBoost/ # 新版加成分类目录 sets/ # 新版套装分类目录 ``` ## 分类目录 推荐把大配置拆进文件夹,方便按副本、区域、等级、职业分类。 ###四个目录都支持无限子文件夹: ```text plugins/GTMobDrops/drops/**/*.yml plugins/GTMobDrops/droppools/**/*.yml plugins/GTMobDrops/rateBoost/**/*.yml plugins/GTMobDrops/sets/**/*.yml ``` 例如: ```text plugins/GTMobDrops/drops/ novice/zombie.yml novice/skeleton.yml dungeon/dragon/dragon_king.yml plugins/GTMobDrops/droppools/ common/common.yml boss/dragon.yml plugins/GTMobDrops/sets/ newbie.yml dragon/dragon_set.yml ``` ## 3. 掉落写在哪里 GTMobDrops 有三种写法。 第一种:写在 MythicMobs 怪物文件的 `GTDrops` 节点里。适合每只 MM 怪物旁边就能看到掉落。 ```yaml 骷髅王: Type: SKELETON Display: "&6骷髅王" Health: 500 Damage: 18 GTDrops: enabled: true drops: - "vanilla:DIAMOND 1 0.05" ``` 第二种:写在 `plugins/GTMobDrops/drops/` 目录里。适合做大量分类。 ```yaml # plugins/GTMobDrops/drops/boss/skeleton_king.yml 骷髅王: enabled: true drops: - "vanilla:DIAMOND 1 0.05" ``` 第三种:写在旧版 `config.yml` 的 `Drops:` 或 `Mobs:` 里。仍支持,但不建议新配置继续堆在这里。 优先级规则: 1. MythicMobs 文件里的 `GTDrops` 优先级最高。 2. 如果 MM 怪物配置了 `GTDrops.enabled: false`,表示明确禁用该怪物的 GTMobDrops 掉落,不会回退读取 GTMobDrops 目录里的同名配置。 3. 没有 MM `GTDrops` 时,才读取 GTMobDrops 的 `drops/`。 ## 4. 第一个能用的掉落 先做一个最简单的例子:击杀原版僵尸有 10% 概率掉 1 个钻石。 创建文件: ```text plugins/GTMobDrops/drops/novice/zombie.yml ``` 写入: ```yaml ZOMBIE: enabled: true drops: - "vanilla:DIAMOND 1 0.10" ``` 保存后执行: ```text /gtmd reload /gtmd preview ZOMBIE 200 ``` 如果模拟结果里出现 `DIAMOND`,说明配置已被识别。`200` 是模拟次数,不是真的生成 200 只怪。 ## 5. 物品 ID 和概率 掉落字符串格式: ```text 物品ID 数量 概率 ``` 例子: ```yaml drops: - "vanilla:DIAMOND 1 0.05" - "ni:gold_coin 1-5 0.50" - "mm:boss_soul 1 0.03" ``` 概率范围是 `0.0` 到 `1.0`: - `1.0` = 100% - `0.5` = 50% - `0.05` = 5% - `0.01` = 1% 数量支持固定值和范围: - `1`:固定掉 1 个。 - `1-5`:随机掉 1 到 5 个。 常见物品来源: ```text vanilla:DIAMOND 原版物品,也可以直接写 DIAMOND ni:item_id NeigeItems mm:item_id MythicMobs Items ia:item_id ItemsAdder oa:item_id Oraxen sx:item_id SX-Item / SXItem / VirtuaItem mi:type:id MMOItems mmo:type:id MMOItems,等同 mi zl:item_id Zaphkiel nexo:item_id Nexo cmd:say hello 0.1 命令型掉落,最后的数字是概率 ``` ## 6. 详细掉落格式 字符串适合简单掉落。需要条件、动作、限制、稀有度时,用详细格式。 ```yaml 骷髅王: enabled: true detailed-drops: boss_soul: id: "mm:boss_soul" chance: 0.05 amount: "1" rarity: "legendary" conditions: - "level:>=30" - "world:world" actions: onDrop: - "message: &a你获得了 &e{item} &ax{amount}" onRare: - "broadcast: &6{player} 击杀 {mob} 获得了稀有掉落 {item}" limit: personal: 1 global: 10 time: "1D" ``` 字段说明: - `id`:物品 ID。 - `chance`:基础概率。 - `amount`:数量或范围。 - `rarity`:稀有度标记,常用 `common`、`rare`、`epic`、`legendary`。 - `conditions`:条件全部满足才会进入概率判定。 - `actions.onDrop`:成功掉落后执行。 - `actions.onRare`:稀有掉落时执行。 - `limit.personal`:单个玩家在时间周期内最多获得几次。 - `limit.global`:全服在时间周期内最多掉几次。 - `limit.time`:周期,例如 `1D`、`12H`、`30M`。 `detailedDrops` 和 `detailed-drops` 都支持。教程中统一写 `detailed-drops`。 ## 7. 掉落池 掉落池适合多个怪物共用同一批物品,比如所有普通怪共用 `common_pool`,所有 Boss 共用 `boss_pool`。 创建: ```text plugins/GTMobDrops/droppools/common/common.yml ``` 写入: ```yaml DropPools: common_pool: name: "普通怪掉落池" mode: "chance" items: - id: "ni:gold_coin" amount: "1-5" chance: 0.40 displayName: "&e金币" - id: "vanilla:IRON_INGOT" amount: "1-2" chance: 0.08 ``` 怪物引用掉落池: ```yaml ZOMBIE: enabled: true pool: "common_pool" ``` 掉落池有两种模式: - `mode: "chance"`:每个物品独立判定一次概率。适合“金币可能掉,材料也可能掉”。 - `mode: "weight"`:先按 `weight` 抽一个候选物品,再判定这个物品的 `chance`。适合“一次最多从池子里选一个奖励”。 权重模式例子: ```yaml DropPools: boss_reward: mode: "weight" items: - id: "ni:boss_essence" amount: 1 chance: 1.0 weight: 80 - id: "ni:legend_sword" amount: 1 chance: 0.20 weight: 5 rare: true broadcast: true ``` 这里先按权重抽中一个物品;如果抽到 `legend_sword`,还要再过 20% 概率。 ## 8. 保底和 pity 保底:连续未掉落达到次数后,强制给一个物品。 ```yaml DropPools: boss_pool: mode: "chance" items: - id: "ni:legend_material" amount: 1 chance: 0.03 guarantee: enabled: true times: 50 item: "ni:legend_material" amount: 1 message: "&6[保底] 你获得了传说材料。" ``` pity:连续未掉落时逐渐增加本池判定概率。 ```yaml DropPools: boss_pool: mode: "chance" items: - id: "ni:legend_material" amount: 1 chance: 0.03 pity: enabled: true increment: 0.01 maxBonus: 0.20 ``` 含义:每次池子没出货,下次给本池物品额外加 1% 概率,最多加到 20%。 ## 9. 属性掉率加成 掉落池可以监听某个属性源。 ```yaml DropPools: rare_pool: attributeSource: "ca:稀有掉落率" items: - id: "ni:rare_gem" amount: 1 chance: 0.05 ``` 可用来源: - `ca:属性名`:CraneAttribute。 - `ap:属性名`:AttributePlus/AP。 物品级别可以控制是否吃池子加成: ```yaml DropPools: rare_pool: attributeSource: "ca:稀有掉落率" items: - id: "ni:pure_luck_token" amount: 1 chance: 0.01 bonus: ignoreAll: true - id: "ni:rare_gem" amount: 1 chance: 0.05 bonus: extraSources: - "ap:额外稀有掉落" ``` - `ignoreAll: true`:不吃池子属性加成,按自身概率判定。 - `extraSources`:在池子属性之外,再额外读取这些来源。 ## 10. rateBoost 目录 `rateBoost/` 适合把单物品加成拆出来管理。 ```yaml # plugins/GTMobDrops/rateBoost/boss/legend_material.yml singleItemBoost: legend_material: itemId: "ni:legend_material" caAttribute: "传说材料掉率" ``` 也支持这种包一层的写法: ```yaml rateBoost: singleItemBoost: dragon_sword: itemId: "ni:dragon_sword" caAttribute: "龙剑掉率" ``` 如果你只是想让一个掉落池整体吃某个属性,优先用掉落池的 `attributeSource`,更直观。 ## 11. 套装暗改 套装功能可以根据玩家已经获得的部件影响掉落。常见用途:缺哪件就提高哪件掉率,防止玩家一直重复出同一件。 创建: ```text plugins/GTMobDrops/sets/dragon/dragon_set.yml ``` 写入: ```yaml Sets: dragon_set: name: "&6龙魂套装" items: - "ni:dragon_sword" - "ni:dragon_helmet" - "ni:dragon_chestplate" - "ni:dragon_leggings" - "ni:dragon_boots" bonusPerMissing: 0.05 bonusRate: "0%" ``` 字段说明: - `items`:套装部件物品 ID,必须和掉落配置里的 ID 对得上。 - `bonusPerMissing`:每缺少一件给多少暗改加成。 - `bonusRate`:独立加成,支持 `5%`、`0%`、`-5%`。 常用命令: ```text /gtmd sets /gtmd sets dragon_set /gtmd sets list 玩家名 /gtmd setitem 玩家名 ni:dragon_sword add /gtmd setitem 玩家名 ni:dragon_sword remove /gtmd setitem 玩家名 ni:dragon_sword check ``` ## 12. 条件 条件写在 `conditions:` 里,全部满足才继续判定。 ```yaml conditions: - "perm:vip.drop" - "level:>=30" - "world:world" - "biome:DESERT" - "height:30-80" - "time:18:00-06:00" - "weather:clear" - "date:2026-01-01~2026-12-31" ``` 支持: - `perm:权限节点` - `level:>=30`、`level>30`、`level<=50` - `world:世界名` - `biome:群系名` - `height:最低-最高` - `time:18:00-06:00` 或 `time:13000-23000` - `date:开始日期~结束日期` - `weather:clear`、`weather:rain`、`weather:thunder` - `papi:表达式` - `expr:表达式` - `expression:表达式` 表达式里常用变量: ```text {player_level} {player_health} {player_food} {distance} {mob_level} {mob_id} {mob} {chance} ``` ## 13. 动作 动作可以写成简单字符串,也可以写成结构化对象。 简单写法: ```yaml actions: onDrop: - "message: &a你获得了 &e{item} &ax{amount}" onRare: - "broadcast: &6{player} 在 {mob} 身上获得了 {item}" ``` 掉落池物品里的结构化写法: ```yaml actions: - type: "title" target: "player" title: "&6稀有掉落" subtitle: "&e{item} x{amount}" fadeIn: 10 stay: 40 fadeOut: 10 - type: "sound" target: "player" sound: "ENTITY_PLAYER_LEVELUP" volume: 1.0 pitch: 1.2 - type: "command" executor: "console" command: "say {player} got {item}" ``` 常用动作类型: - `message`:给玩家或附近玩家发消息。 - `broadcast`:全服或指定世界广播。 - `sound`:播放声音。 - `title`:标题。 - `actionbar`:动作栏。 - `particle`:粒子。 - `command`:执行命令。 - `json`:JSON 文本。 - `delay`:延迟动作。 - `condition`:带条件动作。 常用变量: ```text {player} 玩家名 {item} 物品显示名 {item_id} 物品 ID {amount} 数量 {chance} 概率 {mob} 怪物显示名 {mob_id} 怪物 ID {mob_level} 怪物等级 {world} 世界名 {x} {y} {z} 坐标 {time} 当前时间 {date} 当前日期 ``` 有 PlaceholderAPI 时,也可以在文本中使用 `%player_name%` 这类 PAPI 变量。 ## 14. MM怪物掉落 MythicMobs 内直接写 GTDrops ```yaml 骷髅王: Type: SKELETON Display: "&6骷髅王" Health: 500 Damage: 18 Drops: [] GTDrops: enabled: true pool: "boss_pool" drops: - "ni:gold_coin 5-12 0.80" detailed-drops: boss_soul: id: "mm:boss_soul" chance: 0.05 amount: 1 rarity: "legendary" actions: onRare: - "broadcast: &6{player} 击杀 {mob} 获得了 {item}" conditions: - "level:>=30" ``` 注意: - MythicMobs 自己的 `Drops:` 和 GTMobDrops 的 `GTDrops:` 是两套系统。 - 如果你不想让 MM 原生掉落和 GTMobDrops 同时生效,可以把 MM 自带 `Drops` 清空或按你的需求保留。 - GTMobDrops 会缓存 MM 文件里的 `GTDrops`,重载 MM 或执行 `/gtmd reload` 后会重新读取。 [/MD]