• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

EliteMobs/指南/创建自定义Boss

来自Minecraft插件百科
跳转到导航 跳转到搜索

创建自定义boss

7.1.0版本后,你就能创建自定义精英Boss了。以下是手动创建自定义Boss的指南。与之配套的网页应用即将推出。

请注意,自定义Boss只能通过/em spawn [customboss] [level]指令或使用spawnChance配置选项生成。高级生成选项只在7.2.0版本后才有。

示例boss

首先你需要知道自定义Boss在哪。它们位于~/EliteMobs/custombosses文件夹(~为插件根目录)。

每个自定义Boss都存储在其文件内,也就是说,如果你想要创建Boss,你就要创建新文件夹。 推荐遵循命名格式:小写并用下划线分隔。

默认的自定义Boss配置文件为test_boss.yml。本指南也将用该测试Boss作为示例。该文件内容如下:

isEnabled: true
entityType: ZOMBIE
name: '&eTest boss'
level: dynamic
timeout: 10
isPersistent: false
healthMultiplier: 2.0
damageMultiplier: 0.5
helmet: GOLDEN_HELMET
chestplate: IRON_CHESTPLATE
leggings: LEATHER_LEGGINGS
boots: CHAINMAIL_BOOTS
mainHand: GOLDEN_AXE
offHand: SHIELD
isBaby: false
powers:
- invulnerability_knockback.yml
spawnMessage: A test boss has been spawned!
deathMessage: A test boss has been slain by $players!
escapeMessage: A test boss entity has escaped!
locationMessage: 'Test entity: $location'
uniqueLootList:
- magmaguys_toothpick.yml:1
dropsEliteMobsLoot: true
dropsVanillaLoot: true
trails:
- BARRIER
onDamageMessages:
- I've hit you!
onDamagedMessages:
- I've been hit!
spawnChance: 0

是否启用

isEnabled设置是否启用自定义Boss。重要提示:如果你禁用了与事件相关的精英怪物会导致错误发生。你需要在事件文件夹内关闭事件。自定义Boss配置文件只能禁用其通过指令生成。

实体类型

entityType sets the type of entity the Boss Mob will be. This uses the Spigot API values which you can find here. Only entity types that can be Elite Mobs in the first place can be Custom Bosses (the entities in the mobproperties folder). 翻译:设置Boss Mob的实体类型。这使用了您可以在这里找到的Spigot API值。只有首先可以成为精英Mobs的实体类型才能成为自定义boss(mobproperties文件夹中的实体)

名称

name sets the display name of the Custom Boss. If you want to use color codes, make sure you surround your name with '' (such as '&2Test')

等级

level sets the level of the Custom Boss. The valid options for these are:

  • Any positive natural numeric value
  • dynamic

Using a positive natural number (such as a number between 1 and 1500) will force the Custom Boss to always use that level.

dynamic sets the mob level to be challenging for the highest tier player currently online. As such, no one in the server will find it easy to kill, although lower tier players will have a particularly hard time at it. Also note that this is ignored in the spawn command, as you set the level in the command arguments.

消失时间

timeout sets the amount of time, in minutes, that passes before the Custom Boss "escapes" or, in other words, automatically despawns. When set to 0, the Custom Boss will never despawn from a timeout.

永存

isPersistent sets whether the Custom Boss can survive a chunk unload. This is recommended for big bosses, but not for minions / trash mobs. Too many active persistent Custom Bosses may cause some performance issues (when in the hundreds).

血量倍数

healthMultiplier modifies the amount of hit necessary to kill a Custom Boss. Values between 0.0001 and 0.9999 lower the amount of hits needed to kill the Custom Boss. Values above 1 increase the amount of hits needed to kill the Custom Boss. This multiplier doesn't actually change the health, just give it damage reduction or damage increase (armor), but it is called healthMultiplier for the sake of simplicity.

伤害倍数

damageMultiplier modifies the damage the Custom Boss deals to players. Values between 0.0001 and 0.9999 lowers the damage. Values above 1 increase it. Does not affect the custom damage of some very specific powers (such as the GoldShotgun).

头盔/胸甲/护腿/鞋子/主手/副手

helmet/chestplate/leggings/boots/mainHand/offHand set the items in those slots. This uses the Spigot API values which you can find here. This only affects entity types that can wear armor.

幼体

isBaby sets whether that Custom Boss is spawned as a baby entity. This is only applicable for entity types that can have baby entity variants, such as Zombies.

能力

powers lists the powers that the Custom Boss has. These powers are the filenames of the powers that can be found the in ~/EliteMobs/powers directory. Some entity types can't have certain powers, and though I can not provide a full list of incompatibilities, I'll let you know that the Phantom entity is prone to causing a some issues. These are not fixable, as they are vanilla Minecraft limitations.

生成消息

spawnMessage sets the message that gets broadcasted to players upon Custom Boss spawn.

死亡消息

deathMessage sets the message that gets broadcasted to players upon Custom Boss death. This uses the `$players$ placeholder which gets replaced with a list of all the players that participated in killing the Custom Boss using their display name.

死亡消息列表

deathMessages sets a list of messages that get broadcasted to players upon Custom Boss Death. This is far more extensive than the deathMessage option, and follows this format:

逃脱消息

escapeMessage sets the message that gets broadcasted to players upon Custom Boss escape. This only happens if a timeout time has been set for the Custom Boss, and when that time has elapsed.

deathMessages:
- '&e&l---------------------------------------------'
- '&4The Test Boss has been killed!'
- '&c&l    1st Damager: $damager1name &cwith $damager1damage damage!'
- '&6&l    2nd Damager: $damager2name &6with $damager2damage damage!'
- '&e&l    3rd Damager: $damager3name &ewith $damager3damage damage!'
- '&4Slayers: $players'
- '&e&l---------------------------------------------'

As you can see, it uses the following placeholders: $damager1name, $damager2name, $damager3name, $damager1damage, $damager2damage, $damager3damage and $players. $damager1name etc. display the display name of the player. $damager1damageetc. display the damage the player has dealt to the boss throughout the fight. $players displays a list of all damagers. Numbers 1-3 go through players from the highest damage dealt to the lower damage dealt.

位置消息

locationMessage sets the message shown in the BossBar. This is used to track both Custom Boss health and its location in the server. It uses the $location placeholder which gets automatically replaced with the custom boss' coordinates. The $location placeholder can be removed from the message (or the entire configuration option can be removed) for server that do not wish to display the locations near player bases.

特殊战利品列表

uniqueLootList sets the loot that drops from the custom boss. This is a list of items which follows the following format:

  • item:chanceToDrop

The item field is filled with the file name of the custom item in the ~/EliteMobs/customitems directory. In our case, it's magmaguys_toothpick.yml. The chanceToDrop is a value between 0 and 1 which expresses the odds of the item dropping. 0 expresses a 0% chance to drop, whereas 1 expresses a 100% chance to drop. 0.5 is 50%.

The item dropped does not necessarily have to have the unique itemType tag.

掉落精英怪物战利品

dropsEliteMobsLoot sets whether the Custom Boss will drop EliteMobs loot, excluding items in the uniqueLootList. This affects the loot that would drop from a normal Elite Mob and the loot shower coins. It is highly recommended that you disable this for trash mobs and reinforcement mobs.

掉落原版战利品

dropsVanillaLoot sets whether the Custom Boss will drop the vanilla loot usually associated to its vanilla mob type.

轨迹

trails sets the type of trail that the Custom Boss have. These are a list, so multiple can be selected (and repeatedly) to craft unique effects. Trails can both be particles or items. Both particles and item names have to be pulled from the Spigot API - here for items and here for trails.

击中消息

onDamageMessage sets the message that the Boss Mob displays when they hit a player. This is a list, and the one used is randomized from the list.

受伤消息

onDamagedMessage sets the message that the Boss Mob displays when damaged by a player. This is a list, and the one used is randomized from the list.

生成率

spawnChance sets the chance of the custom boss spawning naturally. The odds are contained between 0 and 1, where 0 is a 0% chance and 1 is a 100% chance (0.5 is a 50% chance). Only Elite Mobs of the same type are eligible for becoming Custom Bosses. This means that if you set your spawnChance to 0.5 and your custom boss is a Blaze entity type, every time an Elite Blaze spawns there's a 50% chance that it will become your Custom Boss. I recommend you keep the odds of conversion between 1/100 and 1/1000 (0.01 and 0.001) depending on how many players you have and how rare you want your Custom Boss to be.

骑乘实体

mountEntity allows the Custom Boss to mount an entity. Two types of values are allowed here:

  • Entity types from the spigot api if you want your boss to mount a normal mob (example: mountEntity: BAT)
  • File names of custom bosses if you want your custom boss to mount another custom boss (example: mountEntity: balrog.yml)

Regional bosses will share their leash with the entity they're mounting, meaning they'll both be dragged back to the spawn location if they exceed the distance allowed by their leash.

公告优先度

announcementPriority sets the priority level for the spawn/kill/escape announcements and allows or prevents the Custom Boss from being tracked by players. The accepted values are 0, 1, 2 and 3, with the default being 1. You can click here for more details on how the Announcement Priority System works.

Here's an example of a boss that is trackable, is able to send spawn/death/escape messages on chat and on Discord:

announcementPriority: 3

Note: You will have to configure the spawnMessage, deathMessage/deathMessages, escapeMessage for chat and discord announcements and the locationMessage for the tracking feature if you wish to use the corresponding Announcement Priority level.

跟随距离

followDistanceset the Minecraft follow distance attribute. This is used to set custom aggro distances. Note that this sometimes does not work properly for certain mob types due to inconsistencies with Minecraft AI.

示例用法:

followDistance: 30 sets a range of 30 blocks where if a player gets within that distance near the boss it will start chasing/attacking the player.

``Note:** The higher the followDistance, the more intensive the boss. Try to keep these reasonable and make sure you only use them when it matters.

死亡运行指令

onDeathCommandssets the list of commands to run on custom boss death. The list supports the following placeholders: $level for the level of the Elite Mob, $name for the name of the Elite Mob and $players for the players that killed the elite mob.

Please note that this probably doesn't work the way you assume it does! The $players placeholder will make the command run multiple times and each time it will replace the placeholder with the name of a player who damaged the Elite Mob. As an example:

onDeathCommands:
- broadcast $players has killed $name! That was level $level!

If Player1, Player2 and Player3 all damaged the boss before killing it, this is what the command output will be from console:

broadcast Player1 has killed CustomBossName! That was level X!
broadcast Player2 has killed CustomBossName! That was level X!
broadcast Player3 has killed CustomBossName! That was level X!

The main goal of this command is not to broadcast messages, but to allow admins to give specific non-elitemobs rewards to players for killing Elite Mobs.