Custom Spawns and Subbiomes - Thutmose/Pokecube GitHub Wiki
In this tutorial, I will add a subbiome called "route 1" and make it spawn lvl 2-5 rattatas and pidgeys, and also remove rattata and pidgey spawns from any other locations.
The default spawns.xml looks as follows:
<?xml version="1.0"?>
<Spawns>
<Spawn name="Bulbasaur" starter="true" overwrite="true" rate="0.01" min="1" max="2" types="forest"/>
<Spawn name="Squirtle" starter="true" overwrite="true" rate="0.01" min="1" max="2" types="lake" water="true"/>
<Spawn name="Caterpie" overwrite="true" rate="0.2" min="4" max="8" types="forest" typesBlacklist="sparse,cold,dry"/>//Overwrite to clear original
<Spawn name="Caterpie" rate="0.2" min="4" max="8" types="wet" typesBlacklist="sparse,cold,dry"/>//Don't overwrite to add
</Spawns>
I want to add an overwriting entry for rattata and pidgey, with type of "route 1", I will remove the example overwrites as well. This will result in the following xml:
<?xml version="1.0"?>
<Spawns>
<Spawn name="Rattata" overwrite="true" rate="0.5" level="2" variance="3" min="3" max="5" types="route 1"/>
<Spawn name="Pidgey" overwrite="true" rate="0.5" level="2" variance="3" min="3" max="5" types="route 1"/>
</Spawns>
level="2" sets the minimum spawn lvl at 2, and variance="3" allows the level to vary from 2-(2+3), so from 2-5, rate would allow varying how common the mob spawn is in the route.
After making this change, a restart of your minecraft client/server is needed. You can check that your changed worked, but opening the pokedex, searching for the mob you edited, going to page 3, then clicking the mode change button to make it show where that mob spawns. The mod change button is the small dot on the right edge of the pokedex gui.
Once the spawns.xml is set, restart minecraft and get yourself a Sub-Biome Setter, it can be found in the Pokecube creative tab. Right click with the item, and then use the arrow buttons until you see the subbiome you are looking for, then press escape to set it to that subbiome:
Next, you can set the subbiome by right clicking a block to be the first corner of the subbiome, then shift right clicking where you want the second corner, it should display a red box outlining the area being set:
Note that the minimum size of a subbiome is 4x4x4, so the subbiomes will be expanded to fit that size if not aligned with the grid. You can see the grid by pressing f3+g, the subbiomes are aligned on every other yellow line:
Once you have set the subbiome, you can check if it applied with your pokedex, go to page 3, and turn off the mob specific mode (same mode toggle button) and it should display your current subbiome, as well as what will spawn there:
Note that, by default, some pokemobs can spawn in any subbiome, which is why it has Scatterbug, Cresselia and Darkrai spawns listed there. You will need to replace their spawns with the spawns.xml as well if you don't want them in your subbiome.