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 20, 2013@coldandtired Ok.... it's becoming more & more clear that I should learn the right terms for these things!
Till then, expect some more "would this work?" posts! (and thanks again)
@zachrywilsn Better too many than not enough! Ha, yeah just lower the success-rate or spawn attempts or pack-limit (or any combination of the three of them) for the zombie. Just find any of those in the mobs.xml and packs.xml - lower the number until you get it where you want it. Overwrite your configs with your updates, and just use command RS (or /rs if you're in-game) to reload the configs without having to restart your server.
@Fuusko Let the good times roll! Once you get going, it's hard not to go crazy with it! I just made some ocelot-riding-creepers, hilarity ensued. Enchanted weapons? I haven't seen anything about it in the doc's (and it might be a large effort to add it), so you might ask C&T reeeeealy nicely about this.
-
View User Profile
-
Send Message
Posted Nov 20, 2013@Schlutteh In order for me (the plugin) to use random I have to know the total available choices. Random with a boolean (tamed, saddled, etc.) is easy because there are only two possible choices, yes and no.
Colours are also possible because there are only a small number that can be used (16?) so the plugin simply converts that into a range of 1 to 16 (or whatever it is). The same goes for skeleton type, horse variant, etc.
Integer values (HP, age, etc.) are much harder as the top value is different for each but more importantly I would have to decide a top value which would be unlikely to be the same as the one an admin wants. This is what the range thing is for. Setting an HP of 10 to 20 translates internally to a random number between 10 and 20 inclusive.
You can't use above and below when setting values because I would also need to know the upper and lower (not always 0) limits in order to work out the range.
Conditions are different because I don't need to know the limits to test the current value; I only need to know the value the admin wants and the actual value, so your world-time example would be okay for a condition but not for setting the time.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@Schlutteh
ok ive got it all working no errors! :) :) now can i get a way to make it so i dont have 1500 zombies. there way to many now. not a bad thing but its alot! could be cool idk if my players will like that many though. lemme know if i can get a mob limit. i have set packs a lil lower but still massive amounts.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@Schlutteh
Hey, nice configs, learned alot from them. Is it possible to add enchants to the items i assign to mobs?
-
View User Profile
-
Send Message
Posted Nov 19, 2013Funny update, the thing for me with this plugin was that I couldn't make animals spawn except for squids and I am using a 120y waterlevel custom map.
I found the solution today, somehow the 'plains' biomes on this map isn't really plains, it's ocean.... So when I put ocean as a biome for example on horses i get them to spawn in my plains XD
-
View User Profile
-
Send Message
Posted Nov 19, 2013@Fuusko
Check out the doc's, on the examples page you'll see mine at the bottom, got armor-clad zombies and skeletons you can cut&paste and change to your liking.
http://spawns.sylian.eu/examples/
@zachrywilsn
Send any love to C&T, he taught me all I know! (and was very, very patient with me!)
The error is beyond my knowledge, but if the 1.6.4 build is working for you maybe it's best if you upgrade now, so that you can save the generated structures of your world/s in preparation for the 1.7 update.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@Schlutteh
You F-ing amazing! So are you plugin Dev! Seams to be working good on my backup server. havent tested with a updated 1.6.4 build yet. i have one problem though...... im getting this same old error now. i feel like im back to square one. this maybe a bug in old spawns since i dont know im going to post it. please anyone let me know. thanks.
PasteBin
-
View User Profile
-
Send Message
Posted Nov 19, 2013When I spawn zombies and skeleton they all seem to be without gear, how do I add that?
-
View User Profile
-
Send Message
Posted Nov 19, 2013@coldandtired
Sorry for the off-topic, but yeah I was asking about some conditions and something about how I was using "random" successfully for colored sheep. Message was there, then disappeared later. It's happened to me before with pm's as well, some kinda glitch I suppose. No worries.
Let me see... question was about using ranges/values, is this example something that would work:
<world-time>1000 to 2000, 5000 to 6000, above 9000<world-time/> ...?
(obligatory DBZ ref.)
-
View User Profile
-
Send Message
Posted Nov 19, 2013@Schlutteh I haven't deleted anything.
Are you sure it successfully posted? I didn't get any notifications about new comments and the comment numbers are still in order.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@zachrywilsn
My previous post has mysteriously disappeared (???) so here's the updated files with the changes you wanted:
Link Removed: http://www.mediafire.com/view/ucjgn5lkcfp34lp/(Zachry)packs.xml
Link Removed: http://www.mediafire.com/view/9bu68ttokbab82n/(Zachry)mobs.xml
Removed shroomcows and zombie armor (I left them with a cap just in case they do burn in daylight, remove it if you want), they will spawn randomly day/night, but I'm not aware of any way to make them hit harder without giving them a weapon or changing your difficulty to hard mode. I thought axes might work, looks less like zombie pigmen, and they have a slight damage boost (though I'm not sure if that's just for players or mobs too). You can change the weapons to whatever you want.
Once you get it running, give these configs a try and see if they work the way you want first, and if not then it should be easy to make changes once you know the plugin is running ok.
@ C&T: not sure if/why my prev post is gone, but please pm me if I was being a nuisance.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@zachrywilsn Ah, I see.
I've put an updated version for 1.6.2 on the Tutorial page if you want it. It's the same as 1.6.4 b7 but built for 1.6.2.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@coldandtired
i understand the last builds are 1.6.4, my goal would be to introduce the new zombies to my players before going into a full update with them. An only way i can introduce is to use one of your old builds. i still need to get more help with the config for the mobs/animals i would like. thanks for your quick response. and feel free to delete some of my post to clear up this for more important comments.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@zachrywilsn The last 7 builds have been for 1.6.4 so there should be no difference between them. I've also tested the plugin on 1.6.2 server and 1.6.4 server with no real difference (as far as I can see).
What I meant was that the Spawns file you were testing is old (I can see from the error message). b6 fixed a very bad bug, and b7 fixed a stupid mistake with conditions I made, so I wouldn't recommend any version below those.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@coldandtired
im kinda stuck in updating lemme explain. basically im in 1.6.2. why cant i update? i have a zombie plugin my server depends on to run. i want to replace it with your plug is the goal. but i need to test before i just switch it out. your plugin can get me to 1.7.2 spigot i can see that already. so with your amazingly awesome hard work. my players may be able to see a update on my server. if you can make your spawns for 1.6.2 api and .4 i can update to your next build.
This server is running CraftBukkit version git-Spigot-1107 (MC: 1.6.4) (Implementing API version 1.6.2-R1.1-SNAPSHOT)
-
View User Profile
-
Send Message
Posted Nov 19, 2013@zachrywilsn You seem to be running an older version. Although it won't fix that error there have been a couple of very important fixes lately so I would recommend updating to b7.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@Schlutteh You can't use random in any conditions as it sort of defeats the point of them :)
The success-rate condition is the one to use to add some randomness if you need it.
-
View User Profile
-
Send Message
Posted Nov 19, 2013@Fuusko Good to hear it's sorted and I don't have to trawl through the code :)
-
View User Profile
-
Send Message
Posted Nov 18, 2013@zachrywilsn
Ok, looks like it doesn't like "random" values for some reason, maybe it's the <age> condition that's not allowed to be random but this is a bit beyond my skills so I'll wait for C&T to have a look at it first.
I'll edit this with the updated configs in a couple hours, I just have to go do some stuff right now.
-
View User Profile
-
Send Message
Posted Nov 18, 2013@Schlutteh
idk if it worked or not. i got this error and fig you would know more than me. PasteBin
i dont want zombies to have armor though. i have got them to stop burning with out helmets etc, so i feel armor just makes them not look like zombies anymore. i wondered can you give them more power per hit and not just give them a sword. if not then my goal would be for random day spawns for zombies. some having random swords so there more op or (more power per hit on random or all zombies) and for all tame mobs but mooshroom to spawn.
i fig its not hard and i changed the name in config to my world. just get that error so i cant go any further. this is working with spigot 1.7.2 and would be nice to give my players a update since my main zombie plugin has seamed to lost there dev. thanks agian for your time. and i can see what this pluging can do an the multi world is a great part of it.