This is basic configuration that can be left alone, but of course you can customize it yourself.
There's more information in the file itself, this isn't required reading.
At day one, they may have 10% chance. But day two, its 30%. Day three? 60%
The Criterias are used to select players that are matching certain triggers.
For example, we might want to pick someone who is very low on health and deep underground.
Or we want to pick someone who is locked inside their house and refuses to look at the sun.
If you don't set these criterias, then they are ignored.
Examples can be found in the 'criterias' folder.
If you set this to true, they must be able to see the sun.
0.5 means half of their health. 0.75 means three quarters.
So 1 means 20 hearts and 0.5 means 10 hearts if their max health is 20.
They must have this amount of health or more.
This affects what blocks are picked to play sounds from, and what blocks the player must be near.
To reverse the check, so for example instead of choosing Dirt. You want it to pick everything but Dirt. Then prefix your file name with 'Not'
So 'Air.yml' turns into 'NotAir.yml'
The file contents remain the same.
The file works like a normal YAML file, except you're just putting a dash - on each line. Then a material name.
Material names found [here]
Examples can be found in your installation inside the 'blocks' folder.
These are not required to be set, and can be ignored. It allows you to filter what type of events play where.
This is the real juice of the matter.
With these events, you can play sounds, potion effects and messages to the affected player. Other players will not hear the sounds, or see the messages.
Examples can be found in the events folder in your installation.
If each event has 1 chance, and you have 3 events. That means there is 1/3 chance for this event to be played.
But if this event is 0.1 chance, and the others are 1 chance. This event has only 0.1/2.1 chance to be played.
This is a config section that can change how this event is played.
Without it, the event will be played in order. Every effect is played.
But with it, you can randomize which sounds are played.
So 3 effects up to a max of 10 will play.
This is yet another configuration section that can be ignored, or utilized.
Here you can determine what blocks must be nearby, and where the sounds will play.
If you require Stone to be nearby, the sounds will play from the Stone block that was found.
This is a list, so you can use
This is another list, here you add the names of the Criterias you've created and only the players matching this criteria can receive the event.
Ah and finally we get to the real matter, the actual effects themselves.
But that's covered in the next section.
There are currently three effects you can play.
But before we cover the effects themselves, we'll first introduce the basics.
The effects are added to the 'Effects' part of the config as a list, if this is confusing you can look at existing files for a hint.
There are different effects but they do share a few similarities.
First you are adding the effect itself, in the case of Sound we want to play "minecraft:block.grass.break".
Then after that we add the modifiers, there are special modifiers for each event. But two of them are shared.
The first is the tick delay, how long after the last effect should this one be played?
Use a number, then add a t. So '30t' = 30 ticks.
"minecraft:block.grass.break 40t" - Great! Now this will play 40 ticks after the last effect!
If not defined, it will default to 20 ticks. A second.
Sometimes you want an effect to be played four thousand times in a row, but you don't feel like copy pasting it.
So like above, we're doing a number. 30. Then add an 'a'. So '4000a' = Play this effect 4000 times.
This is the equiv to just copy/pasting the exact same line 4000 times.
Those are the two globally shared options.
Now we are going to cover sounds.
Sounds are recognized (but not validated!) if they have a prefix, and a :
Unless you're using a resource pack or modpack or similar, you will be using "minecraft:"
This is the vanilla sounds.
You can find all the sounds ingame with the /playsound command, or at this link: https://minecraft.gamepedia.com/Sounds.json#Java_Edition_values
I like to test it ingame as it means I can find exactly what sound I'm looking for, and the correct pitch to use it on.
Each sound can be modified twice. The first for pitch, the second for volume.
As above, we're first deciding what we want the pitch to be.
Minecraft allows you to define a pitch from 0 to 2. 1 is the normal pitch, and if you pick 0 the sound will become deeper and slower.
But if you pitch 2, the sound will become high pitched and faster.
Lets choose 1.2 to make a higher pitched version of our grass breaking.
Now, add a 'p' to it so it represents pitch.
"1.2p" = A pitch of 1.2!
You're getting the hang of this!
At 0, no one is going to hear it.
But at 15... Well, it doesn't actually blast your eardrums. It just means it will play at full volume even if they moved further away.
A volume of 1 is normal, you can use it like so: 1v
So now we have
"minecraft:block.grass.break 1.2p 1v"
But wait, you do realize that 1v is the normal volume? You could delete that and it'd make no difference.
Yeah ok, lets do that. And lets play it 40 ticks after the other effect.
"minecraft:block.grass.break 1.2p 40t"
Do note that you may need to quote some of these strings as YAML can be a finicky langauge.
So. What about...
Ah! Time to poison my players.
These accept potion names found here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
So if I want to use confusion, I'm doing "CONFUSION"
This is defined by e. Why not l you ask? Or p? That's because L can be misread in some fonts, and p is used by the next effect!
So "4e" means a potion effect that's level 4. By default, it will be level 1.
Potion Effect Duration(top)
This is defined by p. 30p means it will last for 30 ticks.
By default it will last 60 ticks, or 3 seconds.
As such, it's recommended you increase the potion effect duration when you add it to your effects.
So a potion that's level 10, lasts for 10 seconds and is confusion..
"CONFUSION 10e 200p"
Hmm, wasn't there something else?
Oh wait, this might be the most boring one of them all.
There are no options that can be applied on this, and the color codes work as expected with the & operator.
There is one note though, you can use "%days%" and it will replace that with the number of days (rounded down) the player has been awake for.
"&cYou've been awake for %days% days... At 30 days awake, the ancient one shall awake..."
Ok. Lets add that confusion, maybe some sounds and that creepy message!
- "&cYou've been awake for %days% days... At 30 days awake, the ancient one shall awake..."
- "CONFUSION 10e 200p 0t" # 0t means we play it immediately after that message! Not 20 ticks after!
- "minecraft:entity.zombie.ambient 0p 10v 0t" # Lets make this zombie groan really slow and deep, and plays at the same time!
Oh wow, I'm quaking in my socks. Maybe I should sleep.
But maybe you want to repeat the same effects in multiple events, or you want to randomly pick between a sound, and the script?
Scripts follow the same steps as the 'Effects' section, but it's just a list of effects to play.
You can see examples in your installation.
To refer to a script and play it, just call the script name in your effects.
- "&cYou are going to die! Ohhhhhhhh so creepy!"
Then your script called "ActuallyMakeThemDie.yml" has
- "WITHER 10e 100000p 100t" # Lets give them 5 seconds of panic!
But wait. That's only one line. That's a waste!
Yep. You don't need to use scripts, but you might come up with something cool!