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)&business=apodlesna@gmail.com&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.
-
View User Profile
-
Send Message
Posted Feb 6, 2014Would it be possible to add what they drop after death and the rarity of each item by percentage?
-
View User Profile
-
Send Message
Posted Feb 5, 2014@Schlutteh Good catch - I'll fix it now :)
-
View User Profile
-
Send Message
Posted Feb 5, 2014I think this is a typo on the examples page:
<potion-group> </potion_group>
starts with a - (dash), but ends with a _ (underscore)
Are they both meant to be a dash?
-
View User Profile
-
Send Message
Posted Feb 4, 2014@Jaarmitage It is possible to do but it involves messing with CraftBukkit stuff. I'll see about adding it once I've got a couple of other things done.
-
View User Profile
-
Send Message
Posted Feb 3, 2014@coldandtired
I had gone down this route (using potion effects) but was hoping that Bukkit's API included options to handle getting/setting the base movement speed of a mob. I just finished going over it and I see that it does not.
-
View User Profile
-
Send Message
Posted Feb 3, 2014@Jaarmitage You can set potions on a mob. I think there are speed and slow ones available.
-
View User Profile
-
Send Message
Posted Feb 2, 2014Are there any configuration options to set a mob's movement speed? I checked the website and did not find any but I thought I would ask just to be certain.
-
View User Profile
-
Send Message
Posted Jan 21, 2014@coldandtired
Oh!
<dies>
<particle>lava</particle>
</dies>
Eh? Eh?
Sigh, I suppose that will have to wait until MC 1.8!
Edit: Wait, can't particles be added to events right now with Bukkit? Eh, just a minor suggestion.
-
View User Profile
-
Send Message
Posted Jan 21, 2014@Schlutteh Blocked stuff is already there (theoretically :)) as I planned to have the conditions be expressed as both x = 7 and x != 7. The parser is giving me headaches so for now I might just adapt the old system while I work on it.
There's already some test code hidden in the jar (I think in b2 and b3) where I was playing with custom drops/Mobs stuff. Basically you'll tag a mob with one or more tags and then use those later to decide what to do. It will look something like this:
And then later, something like:
Both the tag property and any actions will also be conditional, of course.
This is similar to how Mobs does it but a bit cleaner. This is all scheduled for the major release after the next one.
Other things that will make it into the next release are empty elements (i.e. nothing happens if chosen), and a way to choose whether elements should be chosen randomly from all valid elements (as it is now) or by the first valid one. And a fully customizable/translatable config!
-
View User Profile
-
Send Message
Posted Jan 21, 2014@coldandtired
Wow damn, that's WAY over my head! But I'll learn, might need some examples though! I'll ask more when it comes out, my first question will probably be about blocked-biome conditions.
Thanks!
(Oh and I might also pester you to add some things from Mobs, like custom drops)
-
View User Profile
-
Send Message
Posted Jan 21, 2014@Schlutteh I've made almost everything "conditionable", if desired. So while you can still do this:
You can also do this:
The only things that are static are the blocked-mobs list, and they too will get the treatment in the next update.
That's all working fine except for the condition parsing. I'm currently leaning towards something like
and complicated conditions like
I've added a couple of ways to use packs/mobs as well, so you can do
Where myMob is in the mobs file as usual, but it can also now be in a file called <world_name>_mobs.xml which will take priority over mobs.xml. And/or like this:
Where the mob/pack is defined locally.
There are a lot more minor changes but they don't take up much time.
-
View User Profile
-
Send Message
Posted Jan 21, 20141.7.2 b4 is running great for me, nice consistent spawns. Can I ask what's still on the "to do" list?
-
View User Profile
-
Send Message
Posted Jan 18, 2014@Westz42
Right now there isn't any way to disable the baby zombies alone, you will have to remove zombies from your allowed-default-spawns and write your own zombie into mobs/packs/config. That should be a work-around, I think.
Be thankful they aren't riding chickens... yet...
-
View User Profile
-
Send Message
Posted Jan 18, 2014How do I completely disable spawning of baby zombies? I don't see anything for them in any of the configs.
-
View User Profile
-
Send Message
Posted Jan 16, 2014@coldandtired
Cool, I thought it would be something like that.
I had a deeper dig through my configs to see if I could solve it myself, and finally learned what Bukkit.yml's "spawn-limits" actually means. Seems that it's NOT the total mobs (per type) in the world, it's the spawn limits per tick!
So I increased my Spawns config <start-cycle-if> <hostile-mobs> to a much higher number, that did the trick. Makes it difficult to make rare mobs though (even 1 spawn attempt, pack of 1 and chance of 1 still spawns kinda commonly this way), but I suppose I could throw a few more conditions at the rare ones.
I'm not sure why it was ignoring my errors in b1, but I'm happy with it now that I found my mistake, and I'll try b4 in the next couple days and report back. Thanks!
-
View User Profile
-
Send Message
Posted Jan 16, 2014@Schlutteh The update message is due to a typo I made here. It should be fixed now but it might take some time to update the cache.
Can you try b4 and see if it improves things?
-
View User Profile
-
Send Message
Posted Jan 15, 2014In b3 my custom spawns seem to be happening much less frequently than they should be, only spawning in a sudden wave maybe once in a couple hours, and only in random locations even when there are no location restrictions (other than solid blocks and light levels).
I'm not sure why but b1 was much more consistent with spawn rates.
Also, b3 keeps saying there's a more recent version available... got something hidden away for us?
-
View User Profile
-
Send Message
Posted Jan 9, 2014@shaythegoon The condition system is getting quite an overhaul at the moment so something like this will definitely be included.
-
View User Profile
-
Send Message
Posted Jan 9, 2014@Schlutteh Okay, this should be fixed in 1.7.2 b3, available at the usual places.
-
View User Profile
-
Send Message
Posted Jan 8, 2014Would it be possible for you to add a limiter to a custom mob we have made, for example: <max-lvl1zombies></max-lvl1zombies> and also <max-lvl1zombies-per-player></maxk-lvl1zombies-per-player>. because if I add a boss, or an extremely powerful mob, I can't limit them to just 1 or 2 of them in the world.
Shaythegoon