关于动态难度
动态难度允许新老玩家在您的服务器上玩游戏,而不必担心它太难或太容易。新玩家可以在游戏中漫步而不会每隔几秒钟就被杀死,经验丰富的玩家将获得更具挑战性的体验,并有可能获得更多的战利品和经验值。
制作 DynamicDifficulty
的动机 我有一个小型 Minecraft 服务器,我和朋友一起玩。他们中的一些人经验丰富,他们中的大多数人在杀戮暴徒方面表现不佳。当我将难度更改为困难模式时,大多数没有经验的玩家都不再来服务器了。我找不到任何最近具有大量可定制性的动态难度插件,所以我制作了这个插件,以便我所有的朋友都可以同时玩,而不会让他们对我
其他信息
- DynamicDifficulty 目前支持 Bukkit、Spigot 和 Paper 服务器实现。其他服务器实现可能有效,但尚未经过测试,因此我不确定。
- 支持 1.13 - 1.20 版本的 Minecraft 服务器。
- 支持 SQLite、MySQL、PostGreSQL 和 MongoDB
配置文件和权限 在这个插件中可以改变
很多。您甚至可以自定义难度!例如,如果你想让小怪在某些难度下造成更多的伤害,你可以改变它,或者你可以改变它,让小怪有更高的几率掉落更多的战利品和经验值。
# bStats (https://bStats.org) collects some basic information for plugin authors, like how
# many people use their plugin and their total player count. It's recommended to keep bStats
# enabled, but if you're not comfortable with this, you can turn this setting off. There is no
# performance penalty associated with having metrics enabled, and data sent to bStats is fully anonymous.
version: 1.8
# Some info in the config have been typed shorter so as not to clutter it too much. Please visit for more detailed explanations with examples:
# https://github.com/JeannotM/DynamicDifficulty or https://www.spigotmc.org/resources/dynamic-difficulty.92025/
# Affinity Gained or Lost When Doing Certain Things.
points-per-minute: 3
block-mined: 2
player-hit: -1
affinity-per-heart-loss: -1 # So 1.5 hearts of damage (counts as 2 hearts) amounts to (-1 * 2) = -2 affinity
pve-kill: 2
death: -100
# How much affinity player can gain or lose every minute at most.
# This is to prevent players from gaining too much affinity in a short amount of time,
# for example, when using mob farms or killing themselves in a loop.
# NOTE: If the momentary gain is higher than the max (or lower than the min),
# the affinity gain WILL NOT BE CAPPED, so big gains, like from killing the boss or dying,
# are still be possible. That's why if it is set to 0, the limitation does not apply.
max-affinity-gain-per-minute: 0
max-affinity-loss-per-minute: 0 # this value is expected to be negative
# How Much Affinity a Player Starts With When Joining For The First Time.
starting-affinity: 600
# To set custom min and max affinity when players start playing for the first time
starting-min-affinity: -1
starting-max-affinity: -1
# What The Maximum and Minimum Affinity Are, no one can get more or less than this (even with commands)
min-affinity: 0
max-affinity: 1500
# Mobs that will give affinity, Will use "pve-kill" if no value was specified: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
# - MOBTYPE: <Affinity points>
mobs-count-as-pve:
- BLAZE: 4
- CAVE_SPIDER: 3
- CREEPER: 3
- DROWNED
- ENDER_DRAGON: 100
- ELDER_GUARDIAN: 20
- ENDERMAN: 5
- GUARDIAN: 3
- HUSK
- IRON_GOLEM: 50
- MAGMA_CUBE
- PHANTOM
- PLAYER: 20
- PIGLIN
- PIGLIN_BRUTE: 5
- SKELETON
- SPIDER
- VILLAGER: 20
- VINDICATOR: 5
- WARDEN: 200
- WITCH
- WITHER: 100
- WITHER_SKELETON: 5
- ZOMBIE
# Blocks that will give affinity, Will use "block-mined" if no value was specified: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
# - BLOCKTYPE: <Affinity points>
blocks:
- ANCIENT_DEBRIS: 4
- DEEPSLATE_DIAMOND_ORE
- DIAMOND_ORE
- EMERALD_ORE
toggle-settings:
difficulty-type: player # Supported: player
silk-touch-allowed: false # Whether the Player Will Receive Affinity When Mining Blocks With Silk Touch
prevent-affinity-loss-on-suicide: true # People won't lose affinity if they die by their own hands.
loot-changes-to-spawned-mobs: false # Mobs that spawn from eggs or spawners, won't have damage, loot or other changes. Players will also NOT receive any Affinity from these mobs.
allow-tamed-wolves-in-calculations: true # Whether to allow tamed wolves in the damage calculations
force-hard-difficulty: true # Forces hard Difficulty on all worlds that are not in "disabled-worlds"
advanced:
# advanced features may decrease performance or are a little harder to configure
custom-enchants-on-mobs: true
armor-on-mobs: true
exact-percentage: true # Calculates the percentage between 2 difficulties so the progression will feel more natural
saving-data:
type: file # Supported: none, file, mysql, sqlite, mongodb, postgresql
# port: 3306
# host: localhost
# username: root
# password:
# database: dynamicdifficulty
# You can disable DynamicDifficulty in certain worlds
disabled-worlds:
- example_name_test
# These mobs ignore everything except the "effects-when-attacked" and "mobs-ignore-player" settings from difficulty
disabled-mobs:
- ENDER_DRAGON
- ENDER_CRYSTAL
- ELDER_GUARDIAN
- WARDEN
- WITHER
# This has been calculated from the hard difficulty. So it is recommended to change these if you're not playing on hard world difficulty
# More information if you want to make your own difficulty (I'd recommend copying one of the other difficulties and changing values):
# <custom_name>:
# enabled: <bool, Whether this difficulty is enabled>
# affinity-required: <number, At What affinity this difficulty starts working>
# damage-done-by-mobs: <percentage, How much damage mobs do to you>
# damage-done-on-mobs: <percentage, How much damage you do on mobs>
# hunger-drain-chance: <percentage, Chance that the hunger of a player will drain>
# damage-done-by-ranged-mobs: <percentage, How much damage projectiles do>
# double-durability-damage-chance: <percentage, Chance to take double damage on item durability>
# chance-cancel-death: <number, Chance to cancel death when attack by a entity>
# minimum-health-starvation: <number, Minimum hearts left from starvation damage>
# maximum-health: <number, Maximum health when a player is in this difficulty>
# experience-multiplier: <percentage, Experience Multiplier>
# double-loot-chance: <percentage, Chance to double the loot dropped when a mob is killed or an ore that is mined>
# keep-inventory: <bool, Whether the player keeps everything on death or not>
# allow-pvp: <bool, Whether the player can attack or be attacked by other players>
# allow-natural-regen <bool, Whether health regen from 'natural occurrences' (full foodbar) should be allowed.
# effects-when-attacked: <bool, Whether you get poison/wither etc from mob attacks (not including splash potions), works only on normal/hard world difficulty>
# prefix: <text, prefix to return if PlaceholderAPI is enabled>
# commands-not-allowed-on-difficulty: <list, What commands aren't allowed to be run by players on certain difficulties, spaces not recommended>
# extra-damage-per-armor-point: <number, how much damage reduction/increased needs to be added per armor point a player has (E.g. Diamond Chestplate has 8 armor points, 8 * 1 = 8)>
# extra-damage-for-certain-armor-types: <list, how much damage reduction/increased per armor set worn (full diamond on Hard = 100 + (4 x 4)). Settings include: [nothing, leather, golden, chainmail, iron, turtle, elytra, diamond and netherite]>
# mobs-ignore-player: <list, these mobs will ignore the players unless they're provoked>
# enchanting: <Will only work if 'custom-enchants-on-mobs' in the toggle-settings is enabled>
# max-enchants: <number, Maximum amount of enchants on armor or weapons>
# max-level: <number, Maximum level of the enchants>
# chance-to-have-armor: <percentage, Chance for a mob to spawn with armor>
# chance-to-enchant-a-piece: <percentage, Chance for a piece to be enchanted>
# armor-drop-chance: <percentage, Chance to drop a piece of armor if killed>
# weapon-drop-chance: <percentage, Chance to drop the weapon if killed>
# weapon-chance: <percentage, Chance for a mob to spawn with weapons if armor is allowed>
# helmet-chance: <percentage, Chance for a mob to have a helmet if armor is allowed>
# chest-chance: <percentage, Chance for a mob to have a chestplate if armor is allowed>
# leggings-chance: <percentage, Chance for a mob to have a leggings if armor is allowed>
# boots-chance: <percentage, Chance for a mob to have a boots if armor is allowed>
# mythic-mobs:
# <MythicMob>:
# replace-with: <Entity, replaces mob>
# chance-to-replace: <percentage, chance to replace a mob>
# execute: <Use %player% placeholder to customize>
# on-join: <list, commands to execute when a player with this difficulty joins the server>
# on-switch-from-next: <list, commands to execute when a player switches to this difficulty from the next one>
# on-switch-from-previous: <list, commands to execute when a player switches to this difficulty from the previous one>
difficulty:
Easy:
enabled: true
affinity-required: 0
damage-done-by-mobs: 50.0
damage-done-on-mobs: 100.0
damage-done-on-tamed: 75.0
hunger-drain-chance: 60.0
damage-done-by-ranged-mobs: 75.0
double-durability-damage-chance: 0.0
chance-cancel-death: 0.5
minimum-health-starvation: 2
maximum-health: 20
experience-multiplier: 70.0
double-loot-chance: 0
allow-pvp: true
keep-inventory: true
allow-natural-regen: true
effects-when-attacked: false
prefix: '&7&l[&b&lEasy&7&l]&r'
extra-damage-per-armor-point: 0
extra-damage-for-certain-armor-types:
nothing: -3
leather: -1
mobs-ignore-player:
- CREEPER
enchanting:
max-enchants: 1
max-level: 1
chance-to-have-armor: 5.0
chance-to-enchant-a-piece: 15.0
armor-drop-chance: 10.0
weapon-drop-chance: 5.0
weapon-chance: 1.0
helmet-chance: 100.0
chest-chance: 75.0
leggings-chance: 56.25
boots-chance: 42.19
execute:
on-join:
# - '/minecraft:tellraw %player% "You are playing on EASY difficulty"'
on-switch-from-next:
# - '/minecraft:tellraw %player% "You are now playing on EASY difficulty"'
# - '/minecraft:tellraw %player% "Have a cookie for your troubles!"'
# - '/minecraft:give %player% minecraft:cookie 1'
# this line will be ignored if you don't have a previous difficulty
# on-switch-from-previous: []
Normal:
enabled: true
affinity-required: 400
damage-done-by-mobs: 75.0
damage-done-on-mobs: 100.0
damage-done-on-tamed: 100.0
hunger-drain-chance: 80.0
damage-done-by-ranged-mobs: 100.0
double-durability-damage-chance: 1.0
chance-cancel-death: 0.0
minimum-health-starvation: 1
maximum-health: 20
experience-multiplier: 90.0
double-loot-chance: 0.0
allow-pvp: true
keep-inventory: false
allow-natural-regen: true
effects-when-attacked: true
prefix: '&7&l[&9&lNormal&7&l]&r'
enchanting:
max-enchants: 2
max-level: 1
chance-to-have-armor: 15.0
chance-to-enchant-a-piece: 30.0
armor-drop-chance: 15.0
weapon-drop-chance: 10.0
weapon-chance: 2.0
helmet-chance: 100.0
chest-chance: 75.0
leggings-chance: 56.25
boots-chance: 42.19
mythic-mobs:
SkeletalKnight:
replace-with: SKELETON
chance-to-replace: 1.0
execute:
on-join:
# - '/minecraft:tellraw %player% "You are playing on NORMAL difficulty"'
on-switch-from-next:
# - '/minecraft:tellraw %player% "You are now playing on NORMAL difficulty"'
on-switch-from-previous:
# - '/minecraft:tellraw %player% "You are now playing on NORMAL difficulty"'
Hard:
enabled: true
affinity-required: 1100
damage-done-by-mobs: 100.0
damage-done-on-mobs: 100.0
damage-done-on-tamed: 100.0
hunger-drain-chance: 100.0
damage-done-by-ranged-mobs: 125.0
double-durability-damage-chance: 5.0
chance-cancel-death: 0.0
minimum-health-starvation: 0
maximum-health: 20
experience-multiplier: 125.0
double-loot-chance: 5.0
allow-pvp: true
keep-inventory: false
allow-natural-regen: true
effects-when-attacked: true
prefix: '&7&l[&4&lHard&7&l]&r'
commands-not-allowed-on-difficulty:
- gotohome
- help 34
extra-damage-per-armor-point: 0
extra-damage-for-certain-armor-types:
golden: 1
chainmail: 1
iron: 2
diamond: 4
netherite: 5
enchanting:
max-enchants: 3
max-level: 2
chance-to-have-armor: 20.0
chance-to-enchant-a-piece: 45
armor-drop-chance: 20.0
weapon-drop-chance: 15.0
weapon-chance: 5.0
helmet-chance: 100.0
chest-chance: 90.0
leggings-chance: 81.0
boots-chance: 72.9
execute:
on-join:
# - '/minecraft:tellraw %player% "You are playing on HARD difficulty"'
on-switch-from-previous:
# - '/minecraft:tellraw @a "%player% has switched to HARD difficulty!"'
# This line will be ignored if you don't have a difficulty after this one
# on-switch-from-next: []
custom-mob-items-spawn-chance:
override-default-limits: false # will allow higher levels than Minecraft's defaults. (E.g. Unbreaking 7 can happen if max-level is higher or equals 7)
override-enchant-conflicts: false # Allows conflicting enchants to occur on a single armor (E.g. Protection & Fire Protection)
# These are the only mobs that will spawn with these custom settings
# You can add any mob you want, but some will not show any armor. So it's not recommended going too wild
includes-mobs:
- ZOMBIE
- SKELETON
weapons-include:
- WOODEN_SHOVEL: 200
- GOLDEN_SHOVEL: 50
- IRON_SHOVEL: 5
- WOODEN_AXE: 200
- GOLDEN_AXE: 50
- IRON_AXE: 5
- WOODEN_PICKAXE: 200
- GOLDEN_PICKAXE: 50
- IRON_PICKAXE: 5
- WOODEN_SWORD: 200
- GOLDEN_SWORD: 50
- IRON_SWORD: 5
armor-set-weight:
leather: 3706
golden: 4872
chainmail: 1290
iron: 127
diamond: 4
netherite: 1
# https://www.digminecraft.com/lists/enchantment_list_pc.php
# You'll have to use the names that are beneath the names with those __snakes__
helmet-enchants-include:
#- <ENCHANT_NAME>: WEIGHT, higher means more likely to occur, no value = weight of 1
- protection: 10
- blast_protection: 5
- fire_protection: 5
- projectile_protection: 5
- vanishing_curse
- binding_curse
- aqua_affinity: 2
- thorns
- respiration: 2
- unbreaking: 5
chestplate-enchants-include:
- protection: 10
- blast_protection: 5
- fire_protection: 5
- projectile_protection: 5
- vanishing_curse
- binding_curse
- thorns
- unbreaking: 5
leggings-enchants-include:
- protection: 10
- blast_protection: 5
- fire_protection: 5
- projectile_protection: 5
- vanishing_curse
- binding_curse
- thorns
- unbreaking: 5
boots-enchants-include:
- protection: 10
- blast_protection: 5
- fire_protection: 5
- projectile_protection: 5
- vanishing_curse
- binding_curse
- feather_falling: 5
- thorns
- frost_walker: 2
- soul_speed
- depth_strider: 2
- unbreaking: 5
weapon-enchants-include:
- sharpness: 10
- bane_of_arthropods: 5
- smite: 5
- fire_aspect: 2
- looting: 2
- knockback: 2
- sweeping: 2
- vanishing_curse
- binding_curse
- unbreaking: 5
bow-enchants-include:
- power: 10
- flame: 2
- infinity
- punch: 2
- vanishing_curse
- binding_curse
- unbreaking: 5
lang # 如果你不喜欢这里的任何文字,你可以随意修改.但会让我很伤心 //译者:原文如此
# 这些变量不一定对每个指令均有效
# %number% 是命令执行者输入的数字 (如:1,49,71)
# %difficulty%是玩家当前所处的难度(常与%number%一同使用,作用于单个玩家)
# %user% 用于显示玩家名
# 使用 &颜色 添加颜色(见https://minecraft.fandom.com/wiki/Formatting_codes)
# 译注: 吸引力的确是更接近本意的……但语境下显得十分突兀,故而我选择了意译化。
# 将对MC机制等的“亲和度”,译为“适应力”。适应力强者,对MC机制熟悉,故而难度更高。
translated-by: "翻译者: kuzuanpa, Auxiliary Words"
translator-url: "https://github.com/kuzuanpa 及 https://github.com/AuxiliaryWords"
command:
set:
affinity: "%user% 的难度已被改为 %difficulty% , 适应力为 %number%"
max-affinity: "将玩家 %user% 的适应力上限设为 %number%"
min-affinity: "将玩家 %user% 的适应力下限设为 %number%"
all: "将所有在线玩家的适应力设为 %number%"
max-affinity-all: "将所有在线玩家的适应力上限设为 %number%"
min-affinity-all: "将所有在线玩家的适应力下限设为 %number%"
remove:
max-affinity: "移除了玩家 %user% 的适应力上限"
min-affinity: "移除了玩家 %user% 的适应力下限"
max-affinity-all: "移除了所有在线玩家的适应力上限"
min-affinity-all: "移除了所有在线玩家的适应力下限"
get:
cannot-use-get-for-all: "/get中不可使用 @a 选择器"
has-affinity: "%user% 有 %number% 点适应力"
currently-on: "当前难度为 %difficulty%"
max-affinity: "适应力上限: %number%"
min-affinity: "适应力下限: %number%"
player-gui:
next-page: "下一页 >"
previous-page: "< 上一页"
reset-values: "重设适应力"
affinity: "适应力: %number%"
current-page: "当前页码: %number%"
max-affinity: "适应力上限: %number%"
min-affinity: "适应力上限: %number%"
other:
reload-config: "配置已重载! 汉化 by 苦钻怕、怡和知音"
force-save: "玩家数据保存完毕!"
help:
label: "&f/dd"
name-num: "<?名称> <数字>"
name: "<?名称>"
command:
0: "&c======== &6[&eDynamic Difficulty/动态难度&6] &c========&f"
1: "也可使用难度名代替适应力数字"
2: "不指定玩家将选中命令执行者"
3: "指令不对大小写敏感, 如/dD sEtMaX 等也可使用"
4: "%label% setMax %name-num% &7>&6 设置玩家的适应力上限"
5: "%label% setMin %name-num% &7>&6 设置玩家的适应力下限"
6: "%label% remove %name-num% &7>&6 扣除玩家N点适应力"
7: "%label% add %name-num% &7>&6 增加玩家N点适应力"
8: "%label% set %name-num% &7>&6 设置玩家适应力"
9: "%label% delMax %name% &7>&6 移除玩家的适应力上限"
10: "%label% delMin %name% &7>&6 移除玩家的适应力下限"
11: "%label% get %name% &7>&6 获取玩家的当前适应力值 和 适应力上下限"
12: "%label% author &7>&6 查看作者与译者名"
13: "%label% reload &7>&6 重载本插件"
14: "%label% forceSave &7>&6 保存玩家适应力值"
15: "%label% playerGUI &7>&6 使用箱子GUI展示全部玩家"
16: "%label% help &7>&6 显示本菜单"
17: "%label% info &7>&6 显示debug信息"
in-game:
attacker-no-pvp: "你还是个萌新,你不可以攻击 %user%!"
attackee-no-pvp: "你不可以攻击 %user% ,他还是个萌新!"
command-not-allowed: "你怎敢使用该指令?"
other:
database-chosen: "成功连接至 %database%"
update-config: "你正在使用旧版配置,请及时更新!"
error:
no-permission: "你没有执行权限!"
include-number: "你需要填入一个数字或难度!"
not-a-number: "%number% 不是一个可用的数字或难度"
cannot-be-found: "该玩家不存在或不在线"
console:
console-selected: "你不可以选择终端或命令方块!"
cannot-open-playergui: "玩家GUI不能在终端打开!"
权限和命令
You can also add .other or .self after the permissions to only allow commands for oneself.
affinity.*.self / affinity.*.other is also allowed.
If you don't provide a user in the commands, the player executing the command will be selected
/Affinity set <user?> <number>
perm: affinity.set
The amount of affinity an user will be set to.
/Affinity difficulties
perm: affinity.difficulties
See all the config values of the difficulties in the game
/Affinity get <user?>
perm: affinity.get
Get the maximum and current affinity of an user.
/Affinity add <user?> <number>
perm: affinity.add
Adds an amount of affinity to an user.
/Affinity remove <user?> <number>
perm: affinity.remove
Removes an amount of affinity to an user.
/Affinity delMax <user?> <number>
perm: affinity.delmax
Removes the maximum Affinity limit for an user.
/Affinity setMax <user?> <number>
perm: affinity.setmax
Sets a maximum Affinity limit for an user.
/Affinity delMin <user?> <number>
perm: affinity.delmin
Removes the minimum Affinity limit for an user.
/Affinity setMin <user?> <number>
perm: affinity.setmin
Sets a minimum Affinity limit for an user.
/Affinity author
perm: affinity.author
Mentions DynamicDifficulty, my name and the person who translated the language you selected
/Affinity reload
perm: affinity.reload
Reloads the config.
/Affinity forceSave
perm: affinity.forcesave
Force saves the current data to the yml or database.
/Affinity playergui
perm: affinity.playergui
Allows you to change all player settings in a chestGUI.
/Affinity help
perm: affinity.help
Sends all the commands in DD to the player.
/Affinity info
perm: affinity.info
Returns some info about stuff that was saved or calculated in the app
PAPI 的占位符
1.6之前
%dd_text_difficulty%
- 返回玩家的难度。
%dd_affinity_points%
- 返回玩家的亲和力点数。
%dd_world_text_difficulty%
- 返回世界的难度。
%dd_world_affinity_points%
- 返回世界的亲和力点。
%dd_max_affinity%
- 返回您可以获得的最大亲和力。
%dd_min_affinity%
- 返回您可以获取的最小关联。
1.6+
%dd_user_difficulty%
- 返回玩家的难度。
%dd_user_progress%
- 此难度与下一个难度之间的进度。
%dd_user_next_difficulty%
- 用户将遇到的下一个难度。
%dd_user_affinity%
- 返回玩家的亲和力点数。
%dd_user_min_affinity%
- 返回用户可以获取的最小关联。
%dd_user_max_affinity%
- 返回用户可以获得的最大关联。
|