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 Nov 3, 2013@shaythegoon It's a debug line for a bug I'm having difficulty finding. I've never seen it on my PC so it's hard to work out what causes it.
-
View User Profile
-
Send Message
Posted Nov 3, 2013What does Error at Location 2 mean? I got it in the console after trying to spawn some mobs...
-
View User Profile
-
Send Message
Posted Oct 31, 2013@Fuusko
The default config is pretty much just a simple example of how to structure your config/s, it's best to modify it to suit (or write a new one from scratch).
The way Minecraft chooses random blocks to spawn mobs means that any further conditions you place on that spawning will lower the chances, so try to be as generous as you can be with your conditions.
If you're using some kind of terrain control, pay extra attention to things like the biomes - if you don't have these listed for the mobs you want to spawn then you should either add them to the <biome> condition for each mob, or remove the biome condition to allow spawns in any biome (as discussed below).
If you want slimes to spawn at higher Y than usual, or any mob for that matter, it should be pretty easy with a <Y> condition (I see you wrote some of these already), but what's most important is the <ground> condition... is there any land at all? If not, you could still spawn things on water, or in the air, depends on what kind of terrain you have I suppose.
Slimes should still default spawn in caves IF you have these below Y40 anyhow, but if you want them to spawn higher you'll have to edit the mob (you still have them set to spawn below 40).
I haven't used the chunk-generation feature, so I can't say much about that, I just spawn horses rarely in the regular spawn-cycle and use the <despawn/> condition to stop them from overwhelming the server. That way people can just nametag them if they want to keep them from despawning.
Take your configs, remove the mobs/conditions you don't need to control, add the mobs/conditions you do want to control, check for formatting errors (drag&drop the files into your browser is an easy way to check), and we can probably help you to fine-tune it the way you want. Check the doc's (I have a set of config/s on the examples page that might help too) to learn more about the features so you know exactly what you need.
(note - I have no authority here, I'm just a busybody! C&T is the expert!)
-
View User Profile
-
Send Message
Posted Oct 31, 2013Hello, I really like the possibilites of this plugin but I am stuck at the moment.. Let me explain, I have a world at 120 waterheight (terraincontrol world) instead of vanilla 64 to make for a harder gameplay. This messes with some spawning, Horses, Slimes, Ocelots and Squids can't spawn in this world and that led me here. I have been playing around with the configs but I can only seem to get Squids to spawn, and they only spawn if I am at water when I log in.
Config: http://pastebin.com/XHga139r Mobs: http://pastebin.com/T2FVCYDr Packs: http://pastebin.com/0rvNxiqV
I am probably doing something wrong, please help!
-
View User Profile
-
Send Message
Posted Oct 31, 2013@Chinimala
That was my fault, I'll be submitting a fixed set of examples shortly.
-
View User Profile
-
Send Message
Posted Oct 31, 2013Hi, in the http://spawns.sylian.eu/examples/ page, there are things like <helmet>iron</helmet> while it should be <helmet>iron_helmet</helmet>, I've been duped ^^
-
View User Profile
-
Send Message
Posted Oct 31, 2013@coldandtired
I just wanted to tidy up my configs a bit, then re-submit them for the examples page now that I have everything just right.
I'm in no rush for blocked biomes though, the idea just popped into my head is all.
Thanks!
-
View User Profile
-
Send Message
Posted Oct 31, 2013@Schlutteh No biomes condition would mean all biomes are okay.
Negative conditions have been planned for a while and are coming. Mobs can block spawning based on both kind of conditions if you need something quickly though.
-
View User Profile
-
Send Message
Posted Oct 28, 2013Question about the biome element; If I remove it, will my mobs spawn in all biomes, or none at all?
Just asking for when Bukkit 1.7 is ready, we will have SO many biomes to list!
Can I maybe suggest a <blocked-biomes> condition for the next update...?
-
View User Profile
-
Send Message
Posted Oct 27, 2013@shaythegoon Ah, okay. I'll have a look at that.
-
View User Profile
-
Send Message
Posted Oct 27, 2013Sorry, I meant for Mobs, on the "conditions list" page there is a column called "Values" that is empty
-
View User Profile
-
Send Message
Posted Oct 27, 2013@shaythegoon The glossary page has examples for most of the settings (or at least the types of settings).
I wouldn't have thought XML needed a tutorial as it's far simpler than YAML and most people are already familiar with HTML/XAML. I might add a general one to be shared by all my plugins that use it in the future though.
"Also, on the mobs tutorial page it says "Values" and doesn't give one for the "Condition List" page."
Sorry, I didn't quite understand that - could you show me where it is?
-
View User Profile
-
Send Message
Posted Oct 26, 2013Yep, typing material_armor did the trick, even in b3. Got fully iron-clad skeletons wielding iron swords, pretty cool, thanks!
Now, time to see what I can do with the giants... I'm thinking lederhosen + stone axe.
I'll send an updated config for the examples page, to fix the flawed armor/weapon elements that exist in the current one.
-
View User Profile
-
Send Message
Posted Oct 26, 2013@coldandtired
I was just maybe thinking of an example for each section, just to help the reader on a bit. Maybe giving a mini-tutorial for configs that use xml. Also, on the mobs tutorial page it says "Values" and doesn't give one for the "Condition List" page..
I found an error with mobs though. I'll post the comment on the mobs page...
-
View User Profile
-
Send Message
Posted Oct 26, 2013@shaythegoon As far as I know it's fully up to date. Are you thinking about a particular section?
-
View User Profile
-
Send Message
Posted Oct 26, 2013Ahh, thanks
Great helpful information, although the website could do with an Update! :D
-
View User Profile
-
Send Message
Posted Oct 26, 2013@Schlutteh I always use the internal names for items as it saves me having to keep a separate lookup table. It's also because you can place any block (like wool, pumpkin, etc.) as a helmet.
You can see all the official names here - http://jd.bukkit.org/dev/apidocs/org/bukkit/Material.html
-
View User Profile
-
Send Message
Posted Oct 26, 2013@coldandtired
So wait.... this whole time I was meant to be typing (material)_(armour)?! I was just typing material! Like <helmet>gold</helmet> ...but it's supposed to be <helmet>gold-helmet</helmet> instead?
Ok, I have some experimenting to do, I'll grab b4 tomorrow and give this a try!
-
View User Profile
-
Send Message
Posted Oct 26, 2013@shaythegoon There was a genuine bug that would stop spawning with a weapon unless the mob also had a helmet. That's fixed in b4 (http://dev.bukkit.org/bukkit-plugins/spawns/files/15-1-6-4-b4/)
Spawning armour works fine for me though
which was made with this config:
The name thing seems to be that Minecraft will convert all names to uppercase. Mobs still picked it up though
in the spawns.txt file. You need to use if_mob_name rather than just if_name.
-
View User Profile
-
Send Message
Posted Oct 26, 2013Definitely can't get any mobs to spawn with armor, please fix this, it would make our game great :D. Also, spawns isn't creating the name of the mob correctly, and mobs isn't able to detect the name.
I have this in spawns for the mob:
<mobs> <zombie> <id>lvl1zombie</id> <pack-limit>4</pack-limit> <name>Lvl 1 Zombie</name> <hp>5</hp> <spawn-if> <light>0 to 10</light> <x>-600 to -580</x> <y>60</y> <z>1350 to 1330</z> </spawn-if> </zombie> </mobs>
Its spawning the Zombie but with the name LVL 1 ZOMBIE instead of the one I put in. Mobs can't detect this name and this isn't working in mobs, after the mob is spawned:
<event> <action> <entry if_name="Lvl 1 Zombie" target="killer" action="give" sub="item" item="265" amount="0 to 1"/> </action> </event>
Or this:
<event> <action> <entry if_name="LVL 1 ZOMBIE" target="killer" action="give" sub="item" item="265" amount="0 to 1"/> </action> </event>
Is not doing what it should be...