Tutorial - Modifying a modded world spawn
This tutorial will show how to modify an existing world spawner entry, added by another mod.
Note that modifying entries added by mods may or may not be possible / work, depending on how the mod added it. Entries added by mods using Spawn That should always be possible to modify.
Identify what to modify
First of all, to modify a world spawner entry we need to either find the world spawner config file of what we are modifying, or extract a list of what is being loaded.
Since the file might not exist for mods using Spawn That code directly, we will focus on the more sure way of extracting world spawner entries from the game.
To start with, find the
spawn_that.cfg
file in the BepInEx/config folder. If it doesn't exist yet, run the game to have it generate.Set WriteConfigsToFile under
WorldSpawners
totrue
, to tell Spawn That to create a file showing all its loaded configurations, no matter the source.Run the game, and enter a world.
Check the BepInEx/Debug folder, for a file called
spawn_that.world_spawners_loaded_configs.cfg
. If you can't find it, check your logs. There should be a line describing what files are being created and where.Open it up, and find the world spawner entry that you want to change.
Mod the mod
From the extracted file, we can see a few things we might want to change. We have something disabling deer spawns (WORLDSPAWNER.0
), adding a troll spawner (WORLDSPAWNER.10000001
) and boars being dropped from the sky (WORLDSPAWNER.10000000
).
Lets get the deer spawns re-enabled, restrict the troll entry and disable the dropping boars.
Open up the file spawn_that.world_spawners_advanced.cfg
, in the BepInEx/config folder.
Any configuration added to this file will be loaded last by Spawn That (see config load order), and will therefore allow for overriding any configuration coming from other files or mods.
To re-enable the deer, we add this to the file:
[WorldSpawner.0]
Enabled=true
To disable the boars, we add:
[WorldSpawner.10000000]
Enabled=false
And finally, lets keep the trolls, but lets restrict their biome to meadows (as seemed intended in the extracted config, but wasn't actually done), but only in forrested areas. We will also reduce their maximum count a bit, as its a bit excessive, and make them rarer.
[WorldSpawner.10000001]
Biomes=Meadows
SpawnInForest=true
SpawnOutsideForest=false
MaxSpawned=2
SpawnChance=5
SpawnInterval=4000
The final file should now look like this:
(If you don't have the green text above, don't worry. Its just auto-generated comments that gets added when the file is first generated in newer versions of Spawn That, it does nothing)
If we rerun the steps from Identify what to modify, the spawn_that.world_spawners_loaded_configs.cfg
should now show how our changes were applied.