Mob Spawning

Discussion in 'Spigot Discussion' started by ChrisLane, Nov 28, 2012.

  1. Hi, just wondering what sort of settings you guys are using for your mob spawning settings and why.
    Do you think that default mob spawning is too high or low? I remember monsters used to spawn in huge amounts on my server with the default settings before.

    Here are the default settings if you have no idea what I'm talking about:

    spawn-limits:
    monsters: 70
    animals: 15
    water-animals: 5
    ambient: 15
    ticks-per:
    animal-spawns: 400
    monster-spawns: 1
     
  2. Please include your Spigot build # ... that plays a vital role in this.

    Right now with:
    Spigot #271
    monsters:95
    spawn-radius:4
    I have 5000 mobs spawned with 65 players online.
     
  3. Yep I'm also using #271, what're your other mob settings at? e.g. animals
     
  4. I'm on build 270 and with 30 players I'm getting about 30k mobs x.x I'm curious if the recent change to in 271 may have fixed that?
     
  5. You have a problem o_o
     
    • Agree Agree x 3
  6. Have PTweaks?
     
  7. No, why?
     
  8. when i install ptweaks have same problem.
     
  9. FYI: I believe my issue was caused by PTweaks keeping chunks loaded for too long. I'm not sure. I did a /timings merged and noticed PTweaks was taking over 250s (which was 3x any other plugin was taking). Removed it and my TPS went back to normal.
     
  10. I still think there's a problem with hostile mob spawning. On dynmap if you turn on the mobs plugin it seems mobs show up at the periphery of the players despawn limit -maybe some mobs get stuck out there? If I am at a location with some hostile mobs and then I teleport far away and then teleport back they are still there... Does this mean Spigot didn't unload those chunks just yet due to caching them if if nobody was around, so the mobs are also still there and they are counting towards the mobcap? I think you mentioned that when a chunk unloads and there's a hostile mob in it that it is NOT saved in the chunk? I know if there are items in a chunk and it unloads those items ARE saved in that chunk? I'm just trying to figure out why the spawn rates are subpar. Right after a reboot spawning seems great and then it quickly deteriorates.

    We have tried to up the mobcap and that seems to help -for a bit until the mobs fill up that cap somehow. There are posts in the Spigot forums from other people about this and they don't seem to be able to fix things. Once someone fixed the code for more natural spawn rates and Aikar reverted the change:

    http://www.spigotmc.org/threads/mob-spawning-oddities-low-spawns.97/#post-780

    Without that, the other guy used a crazy mob limit of 700 -something I don't think is a good work-around... Aikar mentions he uses some chunk garbage collection and some other special code tricks to limit monsters per chunk with a special build... I'm hoping something can be done so that special builds aren't needed for more normal spawning?
     
    • Like Like x 1
  11. md_5

    Administrator Developer

    Merged a fix for this, give it a shot.
     
  12. I ran tons of testing on this. The biggest thing I notice is Monsters try to spawn from the Outside ---> In.

    This causes Monsters to not be near players. Either way below the Player or too far away. Even with the new Fix for SpawnRange. The MonsterLimit is hitting it's limit and not allowing more to spawn.

    I wrote my own plugin to cancel MonsterSpawns that happen too far from the Player (even the y is set to around 12, to make sure Monsters don't spawn too far underground). This is not the best method to fix it, but seems to work a lot better.
     
    • Useful Useful x 2
    • Informative Informative x 1
  13. I'm certainly seeing something wrong with monsters. It would appear that the new fix that was applied has made animals spawn a good amount with the default settings but for monsters I had to set monsters spawn limits to at least 200 to see anything near normal spawns.
     
  14. So what's the solution to get normal/vanilla monster spawns again? Do I just need to increase monster spawn limit?

    Spigot: 396
    spawn-limits:
    monsters: 70
    animals: 15
    water-animals: 5
    ambient: 15
    chunk-gc:
    period-in-ticks: 600
    load-threshold: 0
    ticks-per:
    animal-spawns: 400
    monster-spawns: 1
    autosave: 0
    mob-spawn-range: 9
    viewing distance: 9
     
  15. LiLChris

    LiLChris Retired Moderator
    Retired

    I always had about 2 to 3k mobs spawned with 75 players, and would do regular 30min butcher and everything was fine.
    Tried getting more mobs to spawn and all it did was cut the numbers of mobs in half.
    Reverted the change and it's still low, didn't do any updates to plugins while changing this either. (Most likely Spigot update)

    Both:
    mob-spawn-range: 4
    view-distance: 4
    No ptweaks/nolagg type plugins

    2-3k mobs
    Before:
    Code (Text):
    spawn-limits:
      monsters: 65
      animals: 5
      water-animals: 1
      ambient: 1
    ticks-per:
      animal-spawns: 400
      monster-spawns: 200
      autosave: 36000
    300-500 mobs
    After:
    Code (Text):
    spawn-limits:
      monsters: 75
      animals: 5
      water-animals: 1
      ambient: 1
    ticks-per:
      animal-spawns: 400
      monster-spawns: 100
      autosave: 36000

    I just put it to every 1 tick and hoping for the best, will find out if its acceptable tomorrow when I wake up. (1am now)
    Didn't think I was the next victim of this...
     
    #15 LiLChris, Jan 27, 2013
    Last edited: Jan 27, 2013
    • Useful Useful x 1
  16. md_5

    Administrator Developer

    Try latest build - reverted to Vanilla / CraftBukkit.
     
    • Like Like x 2
  17. LiLChris

    LiLChris Retired Moderator
    Retired

    Thanks, seem to work now with 45 players and 1400 mobs.
    Sorta forgot to lower view distance and ticks per spawn, should be an interesting night, hope this i5 can hold out.

    *Waiting till Friday for E3*
     
  18. Jigsaw

    Supporter

    Anyone else have any luck with the mob "fix" in builds #467 and up?