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 Aug 25, 2014@coldandtired
Thanks for the tip!
Meanwhile I found JAS and used it to restrict spawning. Now I am looking the best plugin to edit spawn conditions of mobs (eg. spawn skeletons in daylight).
Does your plugins work well with JAS or do they just get mixed up?
-
View User Profile
-
Send Message
Posted Aug 24, 2014@Templari0n This plugin aims to be used as a replacement for Minecraft's spawning cycle. What this means is you define when mobs should spawn rather than when they shouldn't.
While it is possible to do it with this plugin I would recommend either Mobs or Events (both mine) as it's much simpler to block a few mobs spawning with those plugins.
-
View User Profile
-
Send Message
Posted Aug 21, 2014Hello!
My world has rather much chickens spawning in the plains. It may have something to do with Lycanite's Mob pack.
I was wondering what would be the easiest way to affect only on animal spawns and leave other spawns untouched? My server runs 1.7.10.
I already downloaded dev build and created testWorld.xml, mobs.xml and checking through what next... Exactly how to only affect on the animal spawns?
-
View User Profile
-
Send Message
Posted Aug 16, 2014@johndcastro I'm not sure that's possible at the moment. I'm just finishing another plugin where that is very possible though so I'll see if I can bring it across.
-
View User Profile
-
Send Message
Posted Aug 16, 2014@wisesurviver Spawns doesn't do anything with the mobs after it spawns them but you can easily do it with another plugin. Mobs and Events (both mine) can do it.
Did you read the docs for the beta version? They are on their own site at http://wiki.sylian.eu/spawns
-
View User Profile
-
Send Message
Posted Aug 12, 2014Hi, please help me - how can I spawn a wolf not only aggressive, but with already set target to player around which the wolf spawns? To force wolves' behaviour same as hostile mobs. Is it possible to make wolf hostile towards another player, if he is closer to wolf, than the former player, who triggered spawn?
Thank you.
EDIT: I am using spawns beta. Is there any comprehensive list of all possible identifiers and properties, and values?
-
View User Profile
-
Send Message
Posted Aug 5, 2014Hello @coldandtired
On your new configuration can you give me an example of how to replace the output of count-mobs with the test conditions (if it is possible). i.e. we are trying to determine the number of active mobs in the world (not just if it is above x number)
Thanks and keep up the good work.
-
View User Profile
-
Send Message
Posted Jul 23, 2014Does anyone know a way to incorporate this plugin with "Heroes" so that it registers different monsters for different experience gains?
-
View User Profile
-
Send Message
Posted Jun 23, 2014@shaythegoon There's already a link just above the 'Default spawning' header. I didn't make it too obvious as the new version is still beta.
I have a new plugin in the pipes which is a much better fit for something like that. It's coming along well but I'm currently battling with recursion (which makes my head hurt!)
Once it's in a more stable state and Spawns can come out of beta I should have more time to add this kind of thing.
-
View User Profile
-
Send Message
Posted Jun 22, 2014Pls don't TL:DR ;_;
shaythegoon
-
View User Profile
-
Send Message
Posted Jun 22, 2014Ahh, I forgot you don't play!
Please could you add a link to the Wiki on the overview/main page for the plugin. (Just a bit easier than trying to find it).
Skript allows us non-java coders to write simple scripts that will be run on top of the server. Some plugins can be completely removed from the server with this ability (spawns is too complex, and is nicer and easier to use than make a script for it). Here is an example script I came up with:
That allows us to find signs that will warp the players to another world. This script runs in conjunction with another to teleport the player when they right click on a sign.
Like so.
Skript is very limited when it comes to mob control, and detecting when specific mobs spawn is complicated. Here's one i made just to detect if a mob was zombie/skeleton was riding a horse:
A bit laborious. It would be a lot nicer if we could change a variable when a mob spawns with this plugin. The variables file comes in a .csv format, which from my knowledge of python is pretty easy to scan through and find the correct value.
this is an example of one of the variables.csv files that skript saves:
Looks pretty nasty. A variable with a name::# is a list variable with a certain position in the list 1, 2, 3 for example or John, Steve and Tim. Otherwise it just gives the variable name. Then it gives the variable type. Long is an integer for some reason. Double is a number with a decimal and anything else with a lot of data is stored as a long hex code.
I'm pretty sure the writer of the plugin would be happy to give you hook or an API of some sort (Hopefully) and we can see if we can get this implemented into spawns/mobs (probably mobs).
Some quick fire links:
Wow. That was long
Thanks
Shaythegoon
-
View User Profile
-
Send Message
Posted Jun 22, 2014@shaythegoon I'm not sure what I could do to integrate. Spawns spawns (ha) the mobs as if they were naturally created by Minecraft, so other plugins don't need to know Spawns is on the server.
I don't play Minecraft so I have no idea what those plugins are or do. If you can tell me some specific examples of what should happen and when (e.g. pig spawns, run script blah) I can have a look.
-
View User Profile
-
Send Message
Posted Jun 21, 2014Glad he's better :D
Would it be possible to ever add integration with other plugins, such as WildBoars (which allows us to make passive mobs aggressive) and SkillAPI so we can provide plugin EXP through mobs?
Just thought I would post here to see if we can get any support.
Adding variable support for skript would be cool as well :)
Shaythegoon
-
View User Profile
-
Send Message
Posted Jun 19, 2014He's a bit better today so hopefully tonight I will be able to get a full night's sleep!
b7 is now up with the following features:
Added a workaround to stop Citizens players being counted in conditions. Should fix Fauvic's issue below.
Added the possibility to use vanilla mobs in the pack and in the convert-mobs section. The plugin will first look for a mob in the mobs file and if it doesn't find one will check against the list of vanilla mobs. I would recommend you not give your custom mobs the same ids as vanilla mobs just to keep yourself sane tough! :) Note that vanilla mobs that are added to a pack will still be tracked, and receive the hub/pack/timer id as normal, and their mob-id will be the same as their type.
Added four player conditions, player-name and player-id (old unique name and the new one), food-level (how hungry) and exp-level. It's important to remember that the plugin only knows about a player if you use one for a hub (i.e. the blocks element will not have a player). This means you can't use player conditions to determine whether to start the timer (although they can be used to stop the timer). Example use:
Lastly, condition groups with invalid conditions (e.g. player conditions with no player) will generally fail now.
-
View User Profile
-
Send Message
Posted Jun 19, 2014Hope he gets well soon Cold!
shaythegoon
-
View User Profile
-
Send Message
Posted Jun 18, 2014@coldandtired
Thanx but no need to rush do it when you get some spare time. Hope he gets better soon and good luck :-)
-
View User Profile
-
Send Message
Posted Jun 18, 2014@Fauvic Ah. Damn Citizens :(
I'll get that fixed tomorrow. My little boy is sick and has been vomiting all night and keeping me awake for the past three days so I couldn't even program a permissions plugin at the moment! ;)
-
View User Profile
-
Send Message
Posted Jun 18, 2014@Fauvic
No problem :D
shaythegoon
-
View User Profile
-
Send Message
Posted Jun 18, 2014@shaythegoon @coldandtired
Thanx for the examples shaythegoon. I tried it on my server and the conditions actually worked. So through process of elimination I narrowed it down to the world-has-spawned condition being the reason for it working. If I remove that condition or replace it with any of the other(hub/pack/timer) conditions the mobs keep spawning endlessly.
Also coldandtired, with the condition now working I realized that any Citizen NPCs spawned in the world count towards the "per-player=yes" condition. So if you limit the spawns to 4 mobs per player and you have only 1 player online but 2 NPCs in the world, there will now spawn 12 mobs around that one player.
-
View User Profile
-
Send Message
Posted Jun 18, 2014Yeh sure,
http://pastie.org/9302163 :is my world.xml and http://pastie.org/9302165 :is my mobs.xml
Shaythegoon