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 Oct 13, 2013Hi there.
Spawns is a great plugin; it's a lot of fun to poke around with and mess with certain settings. I'd like to be able to start working on getting custom mobs to spawn, but I'm terrible at working from scratch. Do you have any examples?
-
View User Profile
-
Send Message
Posted Oct 13, 2013@Schlutteh I'll add the tame thing today. Saddled is only for pigs.
All mobs have the ability to set equipment in the code but it seems Minecraft ignores most of them. You could try adding a breastplate to a horse and see if it works.
-
View User Profile
-
Send Message
Posted Oct 13, 2013@coldandtired
Ah, I was looking in the glossary section (because it has some mobs listed there) and I completely missed the list under "mobs", thanks!
Now, I figured out why my undead cavalry keep dismounting, but I'm not sure how to fix it. It seems that even though you can't interact with the undead horses normally, if you spawn something riding an undead horse it still wants to throw the rider just like an ordinary untamed horse.
So my question/s are:
Is there a <tame> condition I could use?
And if not, what is the highest figure I can enter for <domestication> ?
Also, does <saddled/> work on horses? (it just says pigs in the guide)
EDIT: Request - would you consider an <armor> condition for horses?
Ex: <armor>gold</armor> to buff up my undead cavalry, that would be awesome!
Thanks!
-
View User Profile
-
Send Message
Posted Oct 12, 2013@Treijim I got the PM and will be looking into this tomorrow afternoon. Hopefully it shouldn't be too difficult to pin down :)
-
View User Profile
-
Send Message
Posted Oct 12, 2013@Schlutteh Magma Cube is a separate mob called magma_cube. All the mob names are on this page (4th paragraph). They are the internal Minecraft names which are sometimes a little different from the popular names (mushroom cow, for example).
-
View User Profile
-
Send Message
Posted Oct 11, 2013How do we spawn a magma cube? I'm not sure if it's a mob by itself or a variant of the slimes, couldn't find it in the guides.
-
View User Profile
-
Send Message
Posted Oct 10, 2013@coldandtired
Thanks. I mostly have it working. My mobs.xml was becoming corrupted whenever I tried to upload it through the control panel of my server host. But now my server crashes hard, and requires a restart to come back. I sent you a message with the error. Did I do something wrong?
-
View User Profile
-
Send Message
Posted Oct 8, 2013@Treijim You don't need to remove the mobs from the mobs file, just their ids from any packs (or pack ids from the config). No mob is used unless it is explicitly linked to.
If you've taken them out and they are still spawning it means either the name of the world is wrong in the config (so the plugin is working but not in the world you think it is - although I might have already added a check for non-existent worlds) or the plugin is disabled due to an XML error. Check the console when the plugin starts and make sure there are no errors.
-
View User Profile
-
Send Message
Posted Oct 7, 2013@Treijim
I'll bet it's the same problem I had when first writing the configs - formatting. Even a (space) in the wrong place can upset everything. Best thing to do is drag&drop your config/s into your internet browser and it will show any obvious errors in formatting.
Or, PM me your config/s and I'll take a look for you, probably save you a heap of time that way.
-
View User Profile
-
Send Message
Posted Oct 7, 2013@coldandtired
Thanks for your help so far, guys. In the config file, I removed the hostile-mobs pack, as well as any mention of skeletons, spiders, and zombies (the only hostile mobs that spawn on my world). In the mobs file, these three mobs have sky-light, light, and block-light (I've tried various combinations of these three) set to 0, and I've even added the inside condition yet they will still spawn above ground at night all over the place. It feels like I'm doing something wrong, as this should work, according to what I've read on the tutorials. These mobs aren't on the allowed-default-spawns list; the only mention of them is in the mobs file, where my conditions I added seem not to affect the spawning. Any ideas?
-
View User Profile
-
Send Message
Posted Oct 6, 2013@Treijim Unlike Mobs (if you're familiar with that one) with Spawns you define when mobs are allowed to spawn, rather than when they are blocked.
Every cycle the plugin chooses blocks (the same way as MC does) and then goes through the packs/mobs to see which mobs are allowed to spawn on those blocks. In the event that multiple mobs can spawn on a block one is chosen randomly (as MC does it).
As Schlutteh wrote, there are a few light conditions to use to allow mobs to spawn in various light conditions. These are light, sky-light, block-light, inside, and outside. Sky-light defines light from the moon or sun, and is pretty accurate (although MC will count one block far above you as reducing your light, despite it having no real impact).
Regarding restricting all mobs, the config file defines what packs can spawn in each world, and the packs file defines which mobs can spawn in each pack. The plugin won't spawn any mob that's not in a pack, but it's possible to allow or deny MC to spawn these like normal.
-
View User Profile
-
Send Message
Posted Oct 5, 2013@Treijim
Try <sky-light>0</sky-light> to make your mobs spawn more than 8 (?) blocks away from the open sky. You might also want to add a <block-light> condition to stop them from spawning inside your builds too. Make sure to remove the mobs from the allowed default spawns in the config.xml, or else they will continue to spawn in addition to your Spawns mobs.
Yeah, this plugin can be very difficult to learn for anyone who doesn't already know programming, but read all the doc's C&T has written, and read them again (and probably one more time), and piece-by-piece you'll pick it up. Trust me, it's worth the effort!
C&T helped me a LOT with learning the configs, and I eventually wrote a set of config's I'm pretty damn happy with. PM me if you want them, you can take them and edit to your liking. I must remember to submit them to the examples page too...
-
View User Profile
-
Send Message
Posted Oct 5, 2013@coldandtired
Perhaps I'm just using it wrong. What I'm trying to do is prevent hostile mobs from spawning beneath the night sky, thus limiting them to very dark spaces such as caves. Do you have any idea how I would do this? And do I simply edit the existing mobs.yml file with the new parameters, and that will restrict the way every hostile mob on the world spawns?
-
View User Profile
-
Send Message
Posted Oct 5, 2013@Treijim YAML isn't really suitable for anything more than simple configs, so it wouldn't work here. XML is still pretty easy, and if you know any HTML you should be fine.
When the plugin starts it creates three XML file, mobs, packs, and config. By default these set up the plugin to act as close as possible to normal Minecraft. Then you add/remove/alter elements to fit it to your needs. The tutorial website with all the details is here.
-
View User Profile
-
Send Message
Posted Oct 4, 2013How do I actually install this plugin? I haven't seen .xml files in a plugin before; they've always been .yml, so I'm not sure what to do with them. Do I just put it in the plugins folder and run the server, and it makes all the files it needs to as per normal? And then I just edit the .xml files with the parameters I want? Sorry for my noobness.
-
View User Profile
-
Send Message
Posted Oct 3, 2013@Deltanon This can be done but approached form the other direction.
There are a couple of ways of doing it, but the simplest would be to setup different packs for different times of day (using the world-time condition) and for the night-time mobs add an additional success-rate condition of 40 (i.e. 2.5 times less likely).
Minecraft tends to naturally spawn mobs in waves as the mob limits are only checked at the beginning of each cycle, which allows the limits to be exceeded for a few cycles.
I'll look at the code and see how easy it would be to allow multiple cycles per world though,
-
View User Profile
-
Send Message
Posted Oct 3, 2013Is there a way in config.xml to have multiple <spawn-cycle>'s with different <cycle_interval>'s set?
I tried having two <world> elements sharing a <name>; That didn't seem to work.
I also tried to have two <spawn-cycle> instances with-in the one <world> element; That didn't seem to work also.
I can get two <world> elements working fine, so-long as they have different <world> names. Thought this isn't what I am trying to achieve.
I'd like to have one spawn-cycle on a low interval, say 1.. maintaining mob-populations and another set higher, say every 2.5 during the night-time, in which mobs will spawn in waves.
This may not be achievable with this plug-in? In which case I will compromise and keep using it anyway, because it's very, very good and I thank-you for that! :)
-
View User Profile
-
Send Message
Posted Sep 30, 2013@SXRWahrheit Just for you :) - http://dev.bukkit.org/bukkit-plugins/spawns/files/12-1-6-4-b1/
-
View User Profile
-
Send Message
Posted Sep 30, 2013@Schlutteh There is a setting is Mobs to stop sheep grazing, which would stop this. Not sure if I added it to Spawns yet though,
-
View User Profile
-
Send Message
Posted Sep 29, 2013Will there be a 1.6.4 build soon?