header
logo

Spawn Balance Utility

Install
screenshot imagescreenshot imagescreenshot imagescreenshot imagescreenshot imagescreenshot imagescreenshot image
  • screenshot thumbnail
  • screenshot thumbnail
  • screenshot thumbnail
  • screenshot thumbnail
  • screenshot thumbnail
  • screenshot thumbnail
  • screenshot thumbnail

Description

 

1. Spawn Balance Utility (SBU)

Major Release for Forge 1.20.X.   Please note these changes.
* All reports now end with ".rpt" instead of ".txt"
* You can rename the ".rpt" to ".csv" and then SBU will read it next run.
* Additional example and help text in reports.
* Addition of "Psuedo" mobs which will let you set up normally unspawnable mobs to spawn a limited number in biomes and structures.   Such as Villagers in Badlands or Snow_Golem's in Snowy_Plains, etc.  See the "Pseudomob.rpt" file for examples.
* All files now support comment lines.  A line that starts with "*" is a comment.

Now with *limited* fabric support for version 1.18.2.  (see more notes below)

Overview

We were having issues balancing all the mob spawn weights in our modpack so I wrote this utility mod.

 

Spawn balance utility ("SBU") will help Modpack Designers, Server Operators, Ordinary people running a personal game with multiple mob mods, and Mod Developers to indentify and adjust spawn balance issues.  SBU will save you endless iterations of trying a value- seeing how it works- and then restarting again.   You'll be able to make better informed choices when editing spawn weights and group sizes in mods.

 

With SBU, you be able to control spawnweights for modded and normal mobs on an individual biome by biome basis.

You'll be able to add any mob in the pack to any biome in the pack.   (The mob still has to pass it's internal spawning requirements tho!) 

Four Common Uses 

Case 1: A new mod makes existing creatures too rare.  Cod have a default weight of 5 in lukewarm oceans and the ImaginaryWaterCreatures mod adds "HappyFish" with a weight of 20.   And now the ocean is full of happy fish and the Cod are gone.  Spawn Balance Utility will help you identify and fix this.

Case 2: A new mod is added but you never see the creatures from it.  SBU will help you see why and let you adjust spawn rates to make the new monster more common.

Case 3: You are writing a new mod and you want some good default spawn weights.  The Spawn Balance Utility will help you to choose better spawnweights easier.

Case 4: You just want to fix the most extreme cases where spawn weights are easy too high or low. Say you just want to drop it in and quickly fix the worst problems of mobs never showing up or showing up way too much.   By default, it sets a floor and cieling spawn weights of 5 and 80.

Some Other Features

SBU now has the option to increase existing spawn weights to a configurable minimum weight.  

SBU can add Zombified Piglin and Ghasts to nether biomes if they are missing.  Some biomes are basically empty now so this helps increase the danger back to normal.

Easy to Use

As a typical user, you may use SBU as a plug and play mod.  Simply drop it in with default values and it will fix the worst problems.  Minecraft creatures won't disappear, some modded creatures will become a little more common while other modded creatures will become a little less common.  You don't need to do anything else.

 

It will create a some files in a folder /spawnbiomeutility that you can use to see what the current spawn rates are.  For example, in our case Mutant Beasts had a value of 45 but they were in biomes with a lot of other modded creatures which had higher spawn rates.  As a result we never saw them.  We raised this to 100 and they were too common.  Then we lowered them to 80 an it was "just right" how often they showed up. 

However...

Powerful with total control if you dig a little deeper.

As a server owner or modpack designer, you can use SBU to gain total control over spawn weights, make mobs more or less common, even add them to biomes they don't currently appear in.  This can be done with a text editor but a spreadsheet makes it easiest. 

2. Documentation

Configuration File

Note: Please Use Wordpad, Notepad++, Textpad to edit Forge config files or they will look like one long line and be hard to read.  Don't use Notepad.
Configuration File(version 3, 1.36.0.3) Summary

 

["Spawn Balance UtilityControl Values"]

#Fix min, max values and add nether creatures 
fixSpawnValues = true
#minimum Spawn Weight #Range: 1 ~ 1000
minSpawnWeight = 5
#maximum Spawn Weight #Range: 1 ~ 1000
maxSpawnWeight = 80
#fixEmptyNether
fixEmptyNether = true
#generateReport
generateReport = true
#Use the BiomeMobWeight.CSV file to balance Biome spawn values
balanceBiomeSpawnValues = true
#Use the StructMobWeight.CSV file to balance structure spawn values
balanceStructureSpawnValues = true
debugLevel = 0 

Configuration Field Documentation

#Fix min, max values and add nether creatures
fixSpawnValues = true

If this is true, Spawn Balance Utility (SBU) will raise spawnweights to the minimum values and lower spawnweights to the maximum values.

This helps when minecraft defaults to very low spawnweight values like "1" because it only had one mob in the biome.  Then when mods added new monsters with higher spawnweights, normal minecraft creatures became very rare.

#minimum Spawn Weight #Range: 1 ~ 1000
minSpawnWeight = 5

If the default minecraft spawnweight is '1' (like for Cod) then any new mods will make Cod become rare unless those mods also use a spawn weight of '1'.
#maximum Spawn Weight #Range: 1 ~ 1000
maxSpawnWeight = 80

Some mods default to very high spawn weights.   Anything over 50 is probably unnecessary.  The default value limits maximum spawn values to 80.  So if a mob had a weight of 100, it would become 80.   In combination with minSpawnWeight, you end up with spawnweights between 5 and 80.
#fixEmptyNether
fixEmptyNether = true

Some new minecraft nether biomes don't have traditional nether mobs like zombified piglin and ghasts.   This results in a very boring empty nether.   When you set this to true, SBU adds zombified Piglin and Ghasts to all nether biomes using the minSpawnWeight value.  Please note that Ghasts still have a hard time spawning in biomes with no 5x5 sections of open ground.  Also note that Ghasts are limited to 1 successful spawn per chunk.  They have a group size of 4 so they will try to spawn 4 times before giving up.
#generateReport
generateReport = true

this generates the two SBU reports (BiomeMobWeight.txt, StructureMobWeight.txt) which are csv format files to be used for configuration.  NOTE: The structure spawn file is informational at this point.  Using it to add monsters and creatures to structures is coming.   For example: Mansion's don't spawn illagers- they generate them at world build time.  When complete, you could make Mansions spawn Illagers, Broken Nether Portals spawn Hoglins, and Shipwrecks spawn modded water creatures like River Guardians or Slippery Biters from our HostileWaterMobs mod.
#Use the CSV file to balance spawn values
balanceSpawnValues = true

When this is true, SBU will use the BiomeSpawnUtility.csv file if it exists to modify the spawn values.  SBU does this *once* when the world starts.  It never runs again.  It creates no ongoing server load.

#suppressMinecraftMobReporting

suppressMinecraftMobReporting = false

Set this to "true" if you just want to remove minecraft mobs from the .txt report.

#Mod Name set separated by SemiColons of mods to report.

includedReportModsSet = ";"

Type a list of mods separated by semi-colons ";" to include on the report.  When blank (default) , it will report all mods.  Example: "undergarden;greekfantasy;dreamlands".  Used when you are adding a new mod and you just want to see the mobs it is adding so you can add them to the .csv balancing file.

#Debug Level: 0 = Off, 1 = Log, 2 = Chat+Log #Range: 0 ~ 2
debugLevel = 0 

The debugLevel determines how verbose the logging is.   

Level 1 outputs important errors to the log noted by a "SpawnBiomeUtility Error" line.

Level 2 outputs warnings and a *lot* of informational messages (but only once each time the server/world is started).

#list of Mod:MobName,DefaultSpawnweight; #list of Mod:MobName,DefaultSpawnweight;

defaultSpawnWeightList = "minecraft:enderman,5;modname:mobname,6;"

Put the "modname:mobname", a comma, and then an integer.   This will override default minimum and maximum spawnweight values.  It won't add a mob to a biome.

["Spawn Placement Fixes"]["Spawn Placement Fixes"] #Add mobs spawning in the air and falling to this list .

defaultSpawnWeightList = "minecraft:piglin_brute;goblinanddungeon:gob;goblinanddungeon:Hobgob;"
This fixes the problem of mobs naturally spawning in the air because they have no registered spawn placements. (Version 13 and later)

 

3. Total Control: BiomeMobWeight file.

After changing all spawn values, Spawn Balance Utility ("SBU") outputs a file with all spawnweight values titled BiomeMobWeight.txt in the folder /config/spawnbiomeutility.

 

You can rename this file to BiomeMobWeight.CSV and SBU will use it as a configuration file.

 

You can edit this file with a spreadsheet and change spawn weights and group size for mobs line by line or multiple lines at a time.  For example, you could change skeletons to be less common in every biome and then make them more common in forest biomes by using a spreadsheet to sort by the mob name (minecraft:skeleton).. select those lines and use find and replace to change the spawnweights from 80 to 50... and then change the forest category skeleton spawn weights to 90.

 

Example: BiomeMobWeight (with example header row added to help you understand)

Line#, Biome Category, Biome, Classification, Mod:Monster, Spawnweight, MinGroup#, MaxGroup#

1, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:spider, 80, 4, 4
2, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:zombie, 80, 4, 4
3, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:zombie_villager, 10, 1, 1
4, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:skeleton, 80, 4, 4
5, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:creeper, 80, 4, 4
6, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:slime, 80, 4, 4

  

Friendly

If SBU encounters a bad line- it issues an error message with the bad line and the field where it had the error.

Then it continues with the next line.  Bad data is handled.   It doesn't crash.   So check your logs for these error messages.

 

Adding Mobs to Structures

You can also use SBU to add mobs to structures.  Currently this only works for minecraft structures.  SBU does add them to modded structures but Forge is handling their spawns differently somehow.

I used it to add hostile and peaceful fish to shipwrecks.  And to add some peaceful fish to Underwater Monuments.

 

The same sequence applies.  The first run, SBU creates a StructureMobWeight TXT report file.   You copy it to StructureMobWeight CSV and then edit the values.

 

Example: raw StructureMobWeight csv file.

 

1, minecraft:swamp_hut, HEADING, header:ignore, 0, 0, 0
2, minecraft:swamp_hut, MONSTER, minecraft:witch, 10, 1, 1
4, minecraft:swamp_hut, CREATURE, minecraft:cat, 13, 1, 1
6, minecraft:pillager_outpost, HEADING, header:ignore, 0, 0, 0
7, minecraft:pillager_outpost, MONSTER, minecraft:pillager, 41, 1, 1
9, minecraft:monument, HEADING, header:ignore, 0, 0, 0
10, minecraft:monument, MONSTER, minecraft:guardian, 70, 2, 4
12, minecraft:monument, CREATURE, minecraft:cod, 13, 2, 4
14, minecraft:fortress, HEADING, header:ignore, 0, 0, 0
15, minecraft:fortress, MONSTER, minecraft:blaze, 11, 2, 3
17, minecraft:fortress, MONSTER, minecraft:zombified_piglin, 53, 4, 4
19, minecraft:fortress, MONSTER, minecraft:wither_skeleton, 79, 5, 5
21, minecraft:fortress, MONSTER, minecraft:skeleton, 19, 5, 5
23, minecraft:fortress, MONSTER, minecraft:magma_cube, 33, 4, 4
25, minecraft:mineshaft, HEADING, header:ignore, 0, 0, 0
26, minecraft:mansion, HEADING, header:ignore, 0, 0, 0
27, minecraft:jungle_pyramid, HEADING, header:ignore, 0, 0, 0
28, minecraft:desert_pyramid, HEADING, header:ignore, 0, 0, 0
29, minecraft:igloo, HEADING, header:ignore, 0, 0, 0
30, minecraft:ruined_portal, HEADING, header:ignore, 0, 0, 0
31, minecraft:shipwreck, HEADING, header:ignore, 0, 0, 0
32, minecraft:stronghold, HEADING, header:ignore, 0, 0, 0
33, minecraft:ocean_ruin, HEADING, header:ignore, 0, 0, 0
34, minecraft:endcity, HEADING, header:ignore, 0, 0, 0
35, minecraft:buried_treasure, HEADING, header:ignore, 0, 0, 0
36, minecraft:village, HEADING, header:ignore, 0, 0, 0
37, minecraft:nether_fossil, HEADING, header:ignore, 0, 0, 0
38, minecraft:bastion_remnant, HEADING, header:ignore, 0, 0, 0

 

Adding Mobs to every Biome Easily  

SBU reads the contents of "MassAdditionMobs.CSV" and adds any mobs in the file to biomes based on one of four options (All, Overworld, Nether,End).

SBU will create a template for you to use named "MassAdditionMobs.TXT" in the spawnbalanceutility sub-folder inside the config folder.  It looks like this:

 

Example mob mass addition file. Add mobs with the pattern below and rename file to MassAdditionMobs.csv
Line, Category*, Class**, Namespace:Mob, Weight, Mingroup , Maxgroup

 

1, A, MONSTER, minecraft:phantom, 10, 1, 4

 

* A, O, N, E for All, Overworld, Nether, The End
** MONSTER,CREATURE,AMBIENT

 

This file would add minecraft:phantom to every biome in all dimensions.  It would also print some non-fatal error messages for the text lines.

 

A proper file might look like this:

1, A, MONSTER, minecraft:phantom, 10, 1, 4

1, N, AMBIENT, minecraft:bat, 15, 1, 4 

1, E, CREATURE, abynormalcraft:twistedbunny, 10, 1, 4

1, O, MONSTER, minecraft:silverfish, 5, 3, 6

 

This file would

* add phantoms as a rare monster (you might see 1 per night) in every biome in the game. 

* add bats as ambient mobs too every biome (they would still be restricted to dark low area by the BatEntity rules).

* add twisted bunnies from the (made up) abynormalcraft mod  as creatures (like sheep... cows...) to every End biome.

* Add minecraft silverfish as a very rare spawn in all overworld biomes (but ignore other dimensions).

 

4. Spawn Balance Utility Workflow

Install Spawn Balance Utility

Run Minecraft.  

With the default values, it will raise any spawnweights below 5 up to 5 and lower any spawnweights above 80 down to 80.

If you want to customize further- here is how:

Create a world.

Exit.

Browse to the /config folder and look in the /spawnbalanceutility folder.

 

You will see two reports

  1. BiomeMobWeight.txt
  2. StructMobWeight.txt

Rename BiomeMobWeight.txt to BiomeMobWeight.csv

Edit the BiomeMobWeight.csv file with any text editor, word processor, or spreadsheet. Make sure you save your changes as a *txt* or *csv* txt file with a ".csv" suffix.

Actions

* Add/Insert a line for a new monster in a biome section.

* Change the spawnweight to a higher or lower value to make it more or less common.

* Change the spawnweight to 0 or negative to remove a creature.

* Change the minimum group size to a higher or lower value.

* Change the maximum group size to a higher or lower value.

* Delete the line to remove a creature from a biome (but each Biome needs at least one line or SBU will leave the Biome with default values).

* If you delete *all* the lines in a biome, then it keeps the default values instead of removing monsters (in the end, there must always be one)!

Advanced Actions

* Sort the file in a spreadsheet by the monster column so all spiders are together.   Copy the block and paste it.  Change all minecraft:spiders to the Mod:creature. 

* Note the Line Number is not a "key" field and your edited file can have duplicated line numbers.  It's only there to help you sort the file and to help you fix errors.

* Change the classification (spawn pool) to another legal classification (monster, creature, ambient, or a legal extended classification (like EIBTY in example below)

If you make a mistake on a line- it is no big deal!  The monster/creature on that line won't be put in the spawn tables and you'll get this error message. 

"SpawnBalanceUtility Error reading field "+errorField+" on 394th line of BiomeMobWeight.csv."

 

Sequence of Operation 

* First, if turned on apply the BiomeMobWeight.csv file (and StructureMobWeight when implemented) to spawnweight values.

* Second, if turned on apply the FixSpawnWeight and FixEmptyNether changes

* Third, Produce the BiomeMobWeight.txt file with the final values

Normally,  once you have your BiomeMobWeight.csv file set up, you can turn off the other features.  But it's *okay* to leave them on.   The worst that can happen is you might put in a spawn weight of 100 in the CSV file and then it is lowered to 80. 

Examples

BiomeMobWeight File Contents Example

Line#, Biome Category, Biome, Classification, Mod:Monster, Spawnweight, MinGroup#, MaxGroup#

1, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:spider, 80, 4, 4
2, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:zombie, 80, 4, 4
3, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:zombie_villager, 10, 1, 1
4, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:skeleton, 80, 4, 4
5, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:creeper, 80, 4, 4
6, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:slime, 80, 4, 4
7, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:enderman, 10, 1, 4
8, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:witch, 10, 1, 1
9, taiga, byg:snowy_blue_taiga_hills, MONSTER, minecraft:stray, 80, 4, 4
10, taiga, byg:snowy_blue_taiga_hills, MONSTER, earthmobsmod:lobber_zombie, 10, 2, 4
11, taiga, byg:snowy_blue_taiga_hills, MONSTER, dungeonsmod:notehead, 10, 1, 1
12, taiga, byg:snowy_blue_taiga_hills, MONSTER, nasty:skeleton, 80, 1, 3
13, taiga, byg:snowy_blue_taiga_hills, MONSTER, greekfantasy:shade, 10, 1, 1
14, taiga, byg:snowy_blue_taiga_hills, MONSTER, quark:toretoise, 80, 1, 1
15, taiga, byg:snowy_blue_taiga_hills, MONSTER, quark:stoneling, 80, 1, 1
16, taiga, byg:snowy_blue_taiga_hills, MONSTER, hostilewatermobs:slipperybiter, 15, 1, 2
17, taiga, byg:snowy_blue_taiga_hills, MONSTER, hostilewatermobs:river_guardian, 10, 1, 1
18, taiga, byg:snowy_blue_taiga_hills, MONSTER, hostilewatermobs:gurty, 15, 1, 1
19, taiga, byg:snowy_blue_taiga_hills, CREATURE, minecraft:sheep, 12, 4, 4
20, taiga, byg:snowy_blue_taiga_hills, CREATURE, minecraft:pig, 10, 4, 4
21, taiga, byg:snowy_blue_taiga_hills, CREATURE, minecraft:chicken, 10, 4, 4
22, taiga, byg:snowy_blue_taiga_hills, CREATURE, minecraft:cow, 10, 4, 4
23, taiga, byg:snowy_blue_taiga_hills, CREATURE, minecraft:wolf, 10, 4, 4
24, taiga, byg:snowy_blue_taiga_hills, CREATURE, minecraft:rabbit, 10, 2, 3
25, taiga, byg:snowy_blue_taiga_hills, CREATURE, minecraft:fox, 10, 2, 4
26, taiga, byg:snowy_blue_taiga_hills, CREATURE, greekfantasy:cyprian, 15, 1, 3
27, taiga, byg:snowy_blue_taiga_hills, CREATURE, greekfantasy:dryad, 24, 1, 3
28, taiga, byg:snowy_blue_taiga_hills, EIBTY, classy:creepygiggle, 22, 2, 5
29, taiga, byg:snowy_blue_taiga_hills, AMBIENT, minecraft:bat, 10, 8, 8 

5. Frequently Asked Questions

1) Does SBU bypass the spawn cap?
No.  It only changes spawn weights.  Keep in mind that a lot of humanoid mobs spawn in caves so if you remove them and only have big mobs, they will become very common on the surface!

2) Does SBU change any hard coded mob limits?

No.  Night Time mobs still won't spawn during the day.   Mobs with a limited number per chunk are still limited that way.   The classification pool limits for mobs still apply.

3) Does the line number in the SpawnWeight file matter?

No- it can be duplicated.  It's there to help you sort the configuration data when you are editing it in a spreadsheet (such as Libreoffice Calc or Excel). For example, you could sort on mod:mob, use that to quickly set up a new mod:mob by copying all the "minecraft:skeleton" lines and then changing the mod:mob in the copied lines to the new mob you want to add everywhere skeletons are now with the same weight and group size as skeletons have now.

4) Does this mean I can make a mob common in Dark Forests or in a modded Biome and not spawn at all in Plains?

Yes yes yes!  Absolutely!

5) Does this mean I can make Ocelots spawn in the Desert?

Only if that desert has some leaves or grass blocks.   Mobs with hard coded spawn block requirements still require their spawn blocks.   If you add structures with their spawn blocks to otherwise hostile biomes, they'll spawn at those structures.

5) How do SpawnWeights work?

Say you had 3 mobs with spawnweights of 10,30, and 50.   Minecraft sums them and gets 90.  It rolls a 90 sided dice.   It then tries to spawn the mod:mob that it rolled.   When Mojang programmers knows a biome only has one kind of mob, they may use a spawnweight of 1.    This means, the spawn table total is 1, and minecraft rolls a 1 sided dice.   Basically, 1 is the same as 10 or 100 in this case.  But when you add a Mod with a new mob and a spawn weight of 10, now you get 1+10 = 11 and minecraft rolls an 11 sided dice.  And the default mob just went from occurring 100% of the time to occurring 1/11th (about 9%) of the time.    But wait... this can also result in a case where all the spawn cap slots are taken up by other mobs and then until they die or despawn none of the uncommon mobs will occur. 

 

What's Next?  Release Plan

 

It's now feature complete unless I get new feature requests.

 

I hope this will be my first Fabric mod after that.  The first and second attempts to make this a fabric mod failed.   But I think a third attempt (before fall) will succeed.  I've been doing smaller fabric mods to get my feet wet.

Patron Supporters 

Spawn Balance Utility currently has no supporters.  It's available for free on Curseforge and via Github.  Many of our mods are now supported which opens them up to any alternative mod loaders.

 

You can join us on our Discord Server at the link below. 

Discord Logo