spawns
Spawns is a plugin for Bukkit and Minecraft that allows you to fully customize the spawning behaviour of mobs on your server.
Features
- tweak the default Minecraft spawns or replace them completely
- set mobs to spawn under conditions they never normally would
- block certain mobs from ever spawning
- cause mobs to spawn with potion effects, equipment, saddles, etc.
- cause mobs to spawn in different variants, like powered creeper, wither skeleton, etc.
- mobs appear in the world in the same way as they do normally, so are compatible with all other plugins
Dive right in here to see how to make config files or keep reading for an overview of Minecraft spawning.
Default spawning
Minecraft spawning works like this:
Every spawn cycle (1 tick or 1/20 second by default for hostile mobs) the game makes a list of all the chunks around each player, up to a radius of seven chunks. Each chunk will only be counted once, even if that chunk is around several players.
Once this list is complete a mob limit is calculated. The limit is higher the more chunks are in the list. If the limit is lower than the current amount of a mob type in the world then the cycle will be cancelled.
If the limit is not yet reached a random block from each chunk in the list will be calculated and this chunk will be used as the centre point for a pack of mobs to spawn around. In order to continue, this block must be water for water mobs (only squid so far) and air for any other type of mob.
If this block is suitable then a maximum of 12 random blocks are chosen from up to 20 blocks away, but always at the same height as the centre block.
Lastly, The individual blocks are checked that they can physically fit the mob, so they need to be air, have air above and an opaque block below. The type of mob is chosen based upon the matching conditions (biome, height, floor block type, etc.) and the final mob is chosen randomly from all mobs that are eligible to spawn there. All other mobs in the pack will be the same type.
Permissions
spawns.can-reload-config, which allows the user to reload the config. Default is Op.
spawns.can-count-mobs, which allows the user to display a summary of mob amounts in a world. Default is Op.
Commands
/reload-spawns, or /rs, which reloads the config without having to reload the server. Any mobs already in the world will be unaffected by any changes in the config.
/count-mobs, or /cm, which displays a list of mob numbers in the world. Add a world name argument to specify a world (optional if run as a player) and / or a mob type argument to choose one type of mob to count.
Update checking
If you like, you can set the plugin to check for any newer versions that get released. To do this add an element to the config.xml file, like this:
<check-for-newer-version/>
When this element is present the plugin will report if it finds a newer version. This only works for release builds so you won't be bothered by any beta or dev builds. To disable this checking simply remove the element.
Note that no update will be downloaded even with this set.
Examples
I would love to get any example config/packs/mobs files you have created to add to the docs, so if you have one you're proud of send it in and I'll add it.
spawns took a lot of work, so if your server is enriched by it please consider sending some love my way!
<a href="https://www.paypal.com/cgi-bin/webscr?return=http://dev.bukkit.org/server-mods/mobs/&cn=Add special instructions to the addon author(s)&[email protected]&bn=PP-DonationsBF:btndonateCCLG.gif%3ANonHosted&cancelreturn=http%3A%2F%2Fdev.bukkit.org%2Fserver-mods%2Fmobs%2F&lc=US&itemname=spawns+%28from+Bukkit.org%29&cmd=donations&rm=1&noshipping=1¤cycode=USD"><img class="aligncenter" alt="donate" src="https://www.paypalobjects.com/enUS/i/btn/btndonateLG.gif" /></a>
If you're penniless or like spawns but not that much I'm also partial to TF2 items. Send any you don't want my way! STEAM id: coldntired
If you don't know what TF2 is, then start playing! It's free and fun!
For other projects, links, help, etc. please visit the main website.
You can also follow sylian.eu on Twitter for updates.
@coldandtired
Hello, I'm trying to find info on bunnies in the wiki, couldn't find the rabbits in the mobs section. Just curious about rabbit types and spawning the killer bunny. Thanks!
@zachrywilsn No worries :) I've updated the wiki to include it. An example would be
<player-permission>player.can_destroy_blocks / player.can_use_lava</player-permission>
which would result in the condition passing if the player had either of those two conditions.
@coldandtired
Where can I find the wiki info on this! This is more than what I need. You have made a Master-Piece with this plugin My friend!
The stuff you can do... An now with the addition that was well already thing. Im flipping out here!
Thanks and well.. Thanks!
@zachrywilsn Hmmm. I added it to Mobs years ago and thought I had also added it here but it seems not!
Here's a version that should include it - http://dev.bukkit.org/bukkit-plugins/spawns/files/42-1-8-3-b2/
The condition is called player-permission.
Suggestion but not sure if possible.
Could you add a way to have permission based spawns. Example:
Rank: noob zombies and other mobs are set to be weaker in the config. Rank: Vip zombie and other mobs are set to be insane hard in the config.
This is a horrible example but the idea is the higher you get in rank the harder the spawns would get around you. An if you team with a Noob the noob would get Vip spawn and vise versa. This would make epic battles. Since spawns can drop configable items etc. So all mobs can be specific to the players needs based on permissions or rank. Maybe someone wants HardCore mod.. This could then be added with permission. :)
Let me know. This may be to hard to do or just a dumb idea.
Hey new build! I really need to get back into this.
@jakecool19
You have to manually create your spawn .yml files. This is something I suggestion ColdandTired to add in to a updated version.
I believe but do not quote me that he is planning on added a pbasic config that you can tweak on your own. The thing with spawns is a basic config is kinda shitty to have since with spawns you can do so much. So with him having no defualt mobs.yml etc for you to edit this forces you to read his documentation to code your mobs how you want them.
So look at the Wiki and create your .yml files that you need. I needed help with this also but the wiki is well documented and some of us are here to help.
I believe I have a example back in the comments that will spawn 100's of rabbits for testing when 1.8 came out. So I can help you if you find and PM me on www.spigotmc.org I use the same name there as on here.
@coldandtired
Seams 1.8.3 is out! Also could you please move to http://www.spigotmc.org/ they have been doing the updating. I do not see a reason to stay here unless to maintain the users you have here. An for me most have moved and All my info comes from that site.
Thank you very much and I feel I will owe you a donation if you can convert my current config to the new version. :)
I'm trying to use this plugin on my spigot server but all it loads up in the spawns folder is the config.xml. Please help
@zachrywilsn On my PC I have a 90%-done rewrite of Spawns where I've changed it to use the same system as Events.
The advantage is that I like the Events config much more and it's much more advanced than Spawns' one.
The disadvantage (maybe) is that I had to remove the Spawns-specific actions, like hub and pack in favour of a more general looping system.
I also ripped out all the custom stuff in order to let Mobsistence handle it, and along the way updated Mobsistence to handle more levels of metadata (world and plugin).
I still have a couple of things to do (currently debating whether it's worth having a spawn-pack action or just to force multiple spawn-mob ones) and testing everything.
@coldandtired
That would work I believe. Its just a thought. I see a lot confused or maybe even scared to try this due to its Crazy config. I mean that in a good way. If it was simple you could not do as much.
@zachrywilsn How about a command, usable only through the server console. Something like load-example <name> <world-name>. E.g. load-example basic-mob myworld
This would then copy a world file called myworld.xml and a mobs.xml file, and then reload the config. This way the example files could be slowly added to, and referenced from the wiki.
@coldandtired
Suggestion to clear confusion. Make a config that it gives us to edit. A very basic one with all mobs and one special mobs with conditions etc added.
This way when a New person looks at this they can see a better idea of what they can do. I'm not saying make a config that has everything that's not feasible just basic mobs and a custom with potion effects and such added to it maybe.
This does not even have to be made to work on a load just loaded with the files as a how to or if you really wanted just all mobs to spawn normalize you would remove the custom you added an go from there.
Just a thought. Your plugins can do so much to the mobs its hard to know where to starts when you have no file at all to build from. An your wiki is still nothing that you can fully copy paste to make work. It all takes manual edits. I get the reason is to learn to code it not just have you do the work. Well now I'm rambling but maybe add that or a download link to a premade normal mobspawing config.
@Schlutteh A while back I added some code into Spawns to keep track of all the mobs spawned by the plugin and save when and where they were spawned, and which pack/hub/timer they were from, as well as any custom tags the admin wanted.
My plan was to have another plugin (which became Events) be able to read this data and affect game play however the admin wanted. For example, you could spawn a zombie with the tag 'zombieking' and when a zombie attacked a player you could check for the tag, as well as any other conditions, and make it hit harder than normal.
The problem here is that Spawns was required for this behaviour, so Events became less useful without Spawns. Secondly, maybe some admins never planned to change a mob's behaviour after it spawned and so lots of code was running with no use for them. Lastly, by the time I had finished Events the code I put in Events was much more advanced and made the Spawns stuff a bit outdated.
So, I extracted the code into a new plugin and am currently stripping it from Spawns and Events in order to use Mobsistence. Below is how it will work from the next big releases:
Spawns on its own will work exactly the same as before. Your config will set up the mobs and spawn them into the world.
Events on its own (or with Spawns) will be slightly hobbled, as certain conditions (like pack-id, hub-id, spawn-reason, etc.) will not work.
Mobsistence on its own does nothing. No mob is stored unless a plugin adds metadata to it.
Spawns + Mobsistence: Spawns will add some metadata to the mob (the same as the current version does). Mobsistence will save that data and it will be available to any other plugin even if Spawns is disabled.
Events + Mobsistence: Events will be able to grab/edit/remove any metadata set by any other plugin in any event. For example, Events can keep track (by storing metadata through Mobsistence) which players a mob has killed, and when the mob itself is killed, can award more exp the more dead players, for instance).
Mobsistence + any plugin: the API is freely available to plugins can do the same as Events can, or whatever they can think of.
@coldandtired
I'm a bit confused, does Mobsistence mean that Spawns won't work on it's own... or only required to modify the custom spawns beyond their default values?
1..8.0 b3 fixes the mob problem described below.
Also, introducing Mobsistence
@coldandtired
EDIT: Like a Boss ColdAndTired Gets Shit Done! "Thanks for letting me test the Dev-Builds. I like it when I can help out. Gives me the feel goods!"
Rabbits!
http://i.imgur.com/e7JTvQp.png
Confirmed Working in 1.8!
@zachrywilsn Yes. The jars generated by the tool are like the old Bukkit dev builds so they get updated often and don't always have all the necessary code working.
@coldandtired
I assume you mean buildtools. Ill test then Edit this comment, soonish. Still Not Working!
@zachrywilsn Can you try rebuilding your jars and see if it helps?