Custom Entity YAML Files

This tutorial will detail how to create your own custom entities for the plugin using YAML files.

Before you start, it's reccomended you download Notepad++, which makes editing the config easier.

An entity YAML file is just like a configuration, only there is a new configuration for each new entity. Below are all of the possible things that can be configured, and their default values. You don't have to include any part of the config that you want to leave as the default value.

All Possible Configuration Settings

Type
The type of the entity. Currently supported types are: Zombie, ZombiePigman, Skeleton, Wolf. Default value is Zombie.
Name
The name of the entity. Such as: Fire Zombie. The default value will be identical to the type, so it's recomended to not let this field be the default value.
Damage
The damage the entity will deal, not including armor protection. Default value is 2.
ArmorPiercing
The damage the entity deals that ignores armor. Useful for preventing players that manage to get all diamond armor from surviving forever.
HealthModifier
Multiply this by whatever the current waves health is to get the entities health. E.g., if the wave's health is 10, and the entities health modifier is 2, it will have a health of 20. Default value is 1.
Range
How far the entity will track players from. Default value is 256.
Speed
How fast the entity moves. Note that most mobs move at 0.23. Thus, the default value is also 0.23.
WorthModifier
Multiply this with however much the default money you get from mobs is to get the amount of money you get from this mob. E.g., if the default money reward is 15, and the entities worth modifier is 2, it will give 30 money per kill. Worth modifier also dictates how good the drops are of this entity. Default value is 1.
MinimumSpawnWave
The minimum wave this entity is allowed to spawn on. Default value is 1.
SpawnPriority
The priority at which this entity is spawned. A number from 1 and up, where 1 is very high priority, 3 or 4 is average priority, and 10 is very low priority. Default value is 5. This value CAN be a decimal, such as 1.5 or 3.43.
Weapon
The weapon the entity carries. Not applicable for wolves. Default value is air.
Immunities
A list of damage causes that his entity is immune to. A list of all possible damage causes is in the next section of this tutorial.
Armor
A list of the four items worn by the entity. Not applicable for wolves. There may not be more than four items in the list. The first item is the boots, then leggings, then chestplate, then helmet. If you wish for the item to be nothing, use 'air'. Default value for each slot is air.
DamageEffects
A list of damage effects the entity applies to whatever it hits. More details on damage effects in the next section of this tutorial. Default value is an empty list.
SpecialEffects
A list of special effects the entity applies to whatever it hits. More details on special effects in the next section of this tutorial. Default value is an empty list.
UseMelee
Whether or not the entity uses melee attacks. Default is true.
UseRanged
Whether or not the entity uses ranged attacks. Default for zombies is false, default for skeletons is true. Wolves are unable to have this option as true. If both Use Melee and Use Ranged are set to true, the entity will use ranged attacks from greater than 4 meters away, and melee attacks for less than or equal to 4 meters away.
Wither
Only applicable for skeletons, whether or not the skeleton is a wither skeleton. Default value is false.
IsVillager
Only applicable for zombies, whether or not to have the zombie be a zombie villager
CanDive
Whether or not the entity can dive down underwater to chase it's target.
ShootDelay
The delay, in ticks (a tick is 1/20 of a second), between shots. Default value is 60. Only applicable for entities that use ranged attacks.
SkinURL
A URL to a new skin for the entity. The new skin will only be shown to players with spoutcraft, and only if your server has spout plugin.

Details on Immunities, Damage Effects, and Special Effects

Immunities

Below is a list of all possible immunities, and their effects.

  • Block Explosion - Caused when a block, such as tnt expodes.
  • Contact - Caused by contact with damaging blocks, such as cacti.
  • Custom - Caused by plugins that have custom attacks.
  • Drowning
  • Entity Attack - Caused when a hostile entity attacks using melee.
  • Entity Explosion - Caused when an entity explodes, such as creepers and explosive fire balls.
  • Fall
  • Fire - Caused by standing in fire.
  • Fire Tick - Caused by being on fire.
  • Lava - Caused by standing in lava.
  • Lightning
  • Magic - Caused by potions, excluding poison.
  • Melting - ???
  • Poison - Caused by poison.
  • Projectile - Caused by anything long ranged, i.e arrows.
  • Starvation
  • Suffocation
  • Suicide - Caused when a player types /kill
  • Void - Caused when falling into the void.
  • Wither - Caused when withering away from withers or wither skeletons.

Damage Effects

Damage effects are defined by putting down the name of the effect, followed by a space, followed by the arguments of the effect. Arguments are separated by commas. Example:

- knockback 7,2
- fire 80
- potion slow,80,1

Below are a list of all damage effects, and their possible arguments.

potion
Adds a potion effect to the entity being hit.
args
Argument 1
The type of potion. Possible types are as follows: blindness, confusion, damage resistance, fast digging, fire resistance, harm, heal, hunger, increase damage, invisibility, jump, night vision, poison, regeneration, slow, slow digging, speed, water breathing, weakness, wither. Default is null.
Argument 2
The duration of the effect, in ticks (1/20 of a second). Default is 100.
Argument 3
How powerful the potion will be. Default is 1.


fire
Sets the entity being hit on fire.
args
Argument 1
The duration of the effect, in ticks (1/20 of a second). Default is 100.


knockback
Knocks the entity being hit back farther then normal. (Or less then normal, if you set it as such).
args
Argument 1
How hard the entity is horizontally. Default is 1.
Argument 2
How hard the entity is vertically. Default is 1.


forceequip
Forces the entity being hit to equip something in the specified block. Useful for stripping a player of his armor, or forcing them to wear a pumpkin.
args
Argument 1
The item being equipped. Default is air, which is the equivalent of nothing.
Argument 2
The slot it is being equipped into. 0 is boots, 1 is leggings, 2 is chest plate, 3 is helmet. Default is 3.


teleport
Teleports the entity being hit to specific coordinates in a specified world.
args
Argument 1
The world being teleported to. Default is the current world.
Argument 2 - 4
The x, y, and z coordinates. Default values are the coordinates of the entity being hit.


teleportrelative
Teleports the entity being hit to coordinates offset from it's current coordinates. E.g., if the entity is at 10,0,20, and you make this teleport a person relatively by 100,150,100, it'll be teleported to 110, 150, 120
args
Argument 1 - 3
The relative x, y, and z coordinates. Default values are all 0.


damagehunger
Damages the target entities hunger.
args
Argument 1
Damage dealt to hunger.

Special Effects

Special effects are defined in the same way damage effects are, only under the configuration section of 'Special Effects'. Special effects are effects dealt to the entity that has them (as opposed to the entity being hit). Below are a list of all special effects, and their possible arguments.

potion
Makes the entity constantly have a potion effect.
args
Argument 1
The type of potion. Possible types are as follows: blindness, confusion, damage resistance, fast digging, fire resistance, harm, heal, hunger, increase damage, invisibility, jump, night vision, poison, regeneration, slow, slow digging, speed, water breathing, weakness, wither. Default is null.
Argument 2
The duration of the effect, in ticks (1/20 of a second). Default is 100. Note that this argument is fairly redundant, as the potion will just be applied constantly.
Argument 3
How powerful the potion will be. Default is 1.


potionradius
Makes all nearby enemies have a potion effect.
args
Argument 1
The radius of the effect.
Argument 2
The type of potion. Possible types are as follows: blindness, confusion, damage resistance, fast digging, fire resistance, harm, heal, hunger, increase damage, invisibility, jump, night vision, poison, regeneration, slow, slow digging, speed, water breathing, weakness, wither. Default is null.
Argument 3
The duration of the effect, in ticks (1/20 of a second). Default is 100. Note that this argument is fairly redundant, as the potion will just be applied constantly.
Argument 4
How powerful the potion will be. Default is 1.


fire
Sets the entity on fire. If you won't want the entity dying from this, you should make it immune to fire ticks.
args
Argument 1
Duration of the fire, in ticks. Default is 100. This value is redundant, as the effect will just be applied constantly.


endersignal
Makes the entity have a cool ender signal effect. The effect is purely visual, and does nothing else.
args
Argument 1
Strength of the signal.


spawnerflames
Makes the entity have a spawner flame effect around it. The effect is purely visual, and does nothing else.
args
Argument 1
Strength of the flames.


smoke
Makes the entity have a smoke effect around it. The effect is purely visual, and does nothing else.
args
Argument 1
Strength of the smoke.

Example skeleton YAML file

Skeleton is used so I can show ALL possible attributes in one file. Zombies can't use the wither or shoot delay attribute.

Type: Skeleton
Name: Insane Bullshit Skeleton of Doom
## 1/4 of your maximum health per hit
Damage: 5
HealthModifier: 10
Range: 1024
Speed: 0.3
WorthModifier: 10
MinimumSpawnWave: 11
## Luckily, it rarely spawns
SpawnChance: .001
Wither: false
## 4 shots per second
ShootDelay: 5
Weapon: bow
Immunities:
## You can't damage it with normal attacks o_o
- entity attack
Armor:
- diamond boots
- diamond leggings
- diamond chestplate
- diamond helmet
DamageEffects:
- potion poison,60,1
- fire 30
SpecialEffects:
## Note: '0' power still deals damage, just slowly.
- potionradius poison,30,0
- endersignal 3
Wither: false