Spawn zones

Each zone has its own spawners that depend on its biome. Spawners are active depending on the time of day, weather and world progression. Spawns are prevented with player bases.
==Spawning logic==
===Zones===
The map is split up into 64x64 grid squares with 0,0 being in the center of the first zone. 
Every 4 seconds, zones with a player process their spawners.
===Spawners===
Each spawner tries spawning if enough time has passed since its previous spawning attempt.
Amount of tries is calculated from the elapsed time and capped at creature limit.
For example Deers have a spawn interval of 100 seconds. After 250 seconds, 2 spawn attempts would be made. After 500 seconds, only 4 spawn attempts would be made because the limit is 4.
===Spawn attempts===
A spawn attempt fails if:
*The random roll fails
*Required boss has not been killed
*Wrong weather
*Wrong time of the day
*Too many same creatures already exist in loaded zones (creature limit)
*Valid spawn position is not found after 20 attempts
*There is already the same creature too close to the valid spawn position (suppression limit).
===Valid spawn position===
A spawn position is randomly selected between 40 - 80 meters of a random player in the zone. Spawn position is not valid if:
*Position has wrong biome
*The zone of the position has multiple biome (if full biome is required)
*Covered by a structure
*Blocked by player base
*Wrong altitude
*Wrong terrain angle (max tilt 35 degrees by default)
*Wrong amount of water
*A player exists within 40 meters
*Position is not inside a forest (if a forest is required). Forests are determined on the world generation. Terraforming or trees don't affect it.
Note: Terraforming with Cultivator, Hoe or Pickaxes doesn't directly block spawning but affects terrain altitude and angle.
===Group size===
The amount of creatures is randomly selected from the group size. The amount is capped at creature limit.
With only one creature, the enemy is spawned at the valid spawn position.
With more than one creature, the game tries finding a spawn position two times for each creature. The spawn position is randomly selected from a circle around the initial spawn position (group radius). Same rules apply for determining the validity.
===Spawning===
Each spawned creature has 10% chance to level up (9% for 1 star, 1% for 2 stars), if leveling up is allowed. For some creatures, the leveling up requires enough distance from the world center.
If the spawner is only active during the night, then spawned creatures are set to despawn during the daytime (as long as their zone is active)..
Flying enemies are spawned off the ground depending on the creature. The actual spawn position is still on the ground and can be blocked by player base. 
==List of spawners==
Biome 	Type 	Weather / key 	Time 	Level up 	Other 	Interval 	Creature limit	Chance	Suppression	Altitude 	Group size	Group radius
Meadows 	Boar 	 	 	800 m 	 	2 min 30 sec	4 	50 % 	64 m 	 	1-3 	5 m
Meadows, Black Forest 	Deer 	 	 	Yes 	Only in forests 	1 min 
40 sec	4 	50 % 	64 m 	 	1-3 	5 m
Meadows, Black Forest, Plains 	Fish1 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	2 min 	5 	50 % 	20 m 	From -3 to -1.5 m 	2-6 	2 m
Meadows, Black Forest, Plains 	Fish2 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	2 min 	4 	50 % 	20 m 	From -5 to -2 m 	2-4 	2 m
Ocean 	Fish3 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	2 min 	3 	50 % 	20 m 	Below -5 m 	1-2 	2 m
Meadows 	Greyling 	 	 	 	Only in forests 	5 min 	2 	50 % 	30 m 	 	1 	3 m
Meadows, Black Forest, Plains, Ocean 	Gull 	 	 	 	 	2 min 	5 	50 % 	51 m 	From -4 to 0.2 m 	1-2 	2 m
Meadows 	Neck 	 	 	800 m 	Max water: 1m 	1 min
40 sec	6 	50 % 	5 m 	From −1.5 to 0.5 m	2-4 	5 m
Meadows 	Neck 	Rain, ThunderStorm, LightRain	 	800 m 	 	30 sec 	8 	100 % 	32 m 	From 0 to 10 m 	2-4 	5 m
Black Forest 	FireFlies 	 	Night	 	 	20 sec 	4 	100 % 	10 m 	 	1 	
Black Forest 	Fish5 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	1 min 
20 sec	10 	50 % 	12 m 	Below -5 m 	3-7 	2 m
Black Forest 	Greydwarf 	 	Day 	Yes 	 	2 min 	3 	30 % 	10 m 	 	2-3 	3 m
Black Forest 	Greydwarf 	 	Night	Yes 	 	1 min 	6 	100 % 	10 m 	 	3-4 	10 m
Meadows 	Greydwarf 	defeated_eikthyr 	Night	 	Only in forests 	2 min 	1 	30 % 	10 m 	 	1 	3 m
Meadows 	Greydwarf 	defeated_eikthyr 	Night	 	 	2 min
20 sec	2 	50 % 	20 m 	 	1 	3 m
Black Forest 	Greydwarf brute 	 	Night	2000 m 	 	2 min 	1 	50.6 %	10 m 	 	1 	
Meadows 	Greydwarf brute 	defeated_gdking 	Night	 	 	2 min 	1 	50.6 %	10 m 	 	1 	
Black Forest 	Greydwarf shaman	 	Night	Yes 	 	1 min 	2 	50.6 %	10 m 	 	1 	
Meadows 	Greydwarf shaman	defeated_gdking 	Night	 	 	2 min 	1 	50.6 %	10 m 	 	1 	
Black Forest 	Troll 	 	 	2000 m 	 	66 min
40 sec	1 	5 % 	10 m 	 	1 	3 m
Swamp (full) 	Abomination 	 	 	 	 	66 min
40 sec	1 	35% 	30 m 	From -2 to 5 m 	 	
Swamp 	Blob 	 	 	 	 	8 min
20 sec	2 	20 % 	20 m 	Above -1 m 	1-2 	1 m
Swamp 	Draugr 	 	 	Yes 	 	2 min 	4 	50 % 	10 m 	From -1.5 to 10 m 	1-2 	3 m
Meadows, Black Forest, MountainTechnically possible for Mountains if the player is on an adjacent biome with a misty weather., Plains	Draugr 	Misty, defeated_gdking 	Night	 	 	5 min 	1 	5 % 	10 m 	 	1 	
Swamp (full) 	Draugr elite 	 	Night	 	 	5 min 	1 	5 % 	15 m 	From -1.5 to 10 m 	1 	
Swamp 	Fish6 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	1 min
20 sec	10 	60 % 	10 m 	Below -5 m 	3-7 	2 m
Swamp 	Leech 	 	 	Yes 	 	3 min
20 sec	10 	50 % 	5 m 	From -3 to -0.1 m 	1 	
Swamp 	Oozer 	 	Night	 	 	2 min 	1 	20 % 	20 m 	Above -1 m 	1 	
Swamp 	Skeleton 	 	 	Yes 	 	6 min
40 sec	4 	25 % 	15 m 	From -1 to 10 m 	2-4 	4 m
Meadows, Black Forest, Swamp, Mountain, Plains 	Skeleton 	defeated_bonemass 	Night	 	 	5 min 	3 	25 % 	10 m 	 	1-3 	3 m
Swamp 	Wraith 	 	Night	 	50 m from ground 	3 min
20 sec	2 	30 % 	20 m 	Above -2 m 	1 	
Mountain (full) 	Fenring 	 	Night	 	 	6 min
40 sec	2 	20 % 	10 m 	 	1 	
Mountain (full) 	Stone Golem 	 	 	 	 	2 min 	1 	25.6 %	10 m 	Above 120 m 	1 	
Mountain (full) 	Drake 	 	 	 	Max tilt 66 degrees, 10 m from ground	2 min 	2 	25.6 %	10 m 	Above 100 m 	1 	
Mountain (full) 	Wolf 	 	Night	Yes 	Max tilt 45 degrees 	2 min 	6 	50 % 	30 m 	 	2-4 	5 m
Mountain (full) 	Wolf 	 	Day 	 	Max tilt 45 degrees 	6 min
40 sec	3 	25.6 %	30 m 	 	1-2 	5 m
Plains 	Deathsquito 	 	 	 	No max tilt, 1 m from ground 	8 min
20 sec	3 	20 % 	30 m 	Above 1 m 	1-2 	10 m
Plains 	Fish7 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	1 min
20 sec	7 	60 % 	20 m 	Below -5 m 	3-6 	2 m
Plains 	Fuling 	 	Day 	Yes 	 	16 min
40 sec	2 	33 % 	30 m 	 	1-2 	3 m
Plains 	Fuling 	 	Night	Yes 	 	1 min 	5 	33 % 	30 m 	 	3-5 	3 m
Meadows, Black Forest, Mountain 	Fuling 	defeated_goblinking 	Night	 	Hunt mode 	50 min 	3 	5 % 	10 m 	 	3 	3 m
Plains 	Lox 	 	 	 	 	16 min
40 sec	3 	5 % 	100 m 	Above 1 m 	2-3 	10 m
Mistlands (full) 	Dvergr rogue 	 	Day 	Yes 	 	16 min
40 sec	2 	30 % 	30 m 	 	1-2 	3 m
Mistlands 	Fish9 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	1 min 	5 	50 % 	12 m 	Below -5 m 	2-7 	2 m
Mistlands, Ocean 	Fish12 	 	 	20%, 4 stars	No max tilt, 0.1m from ground 	1 min
20 sec	8 	40 % 	12 m 	Below -6 m 	2-5 	2 m
Mistlands (full) 	Gjall 	 	Day 	 	No max tilt, 6 m from ground 	66 min
40 sec	1 	10 % 	50 m 	 	1 	
Mistlands (full) 	Gjall 	 	Night	Yes 	No max tilt, 6 m from ground 	66 min
40 sec	1 	10 % 	50 m 	 	1 	
Mistlands 	Hare 	 	 	Yes 	 	1 min 	10 	50 % 	10 m 	 	1-3 	6 m
Mistlands (full) 	Seeker 	 	Day 	1 star 	 	3 min
20 sec	2 	30 % 	30 m 	 	2-3 	6 m
Mistlands (full) 	Seeker 	 	Night	Yes 	 	5 min 	6 	20 % 	40 m 	 	2-3 	6 m
Mistlands (full) 	Seeker Soldier 	 	 	Yes 	 	66 min
40 sec	1 	10 % 	40 m 	 	1 	12 m
Ocean 	Fish8 	 	 	20%, 4 stars	No max tilt, 0.1 m from ground 	1 min 
20 sec	10 	50 % 	12 m 	Below -5 m 	2-7 	2 m
Ocean (full) 	Serpent 	 	Night	 	 	16 min
40 sec	1 	5 % 	50 m 	Below -5 m 	1 	
Ocean (full) 	Serpent 	ThunderStorm, Rain 	 	 	 	16 min
40 sec	1 	5 % 	50 m 	Below -5 m 	1 	
Ashlands 	Fish11 	 	 	15%, 4 stars	No max tilt, 0.1 m from ground 	1 min
20 sec	10 	60 % 	8 m 	Below -5 m 	3-7 	2 m
Ashlands 	Surtling 	 	 	 	 	8 s 	10 	100 % 	10 m 	Everywhere 	1 	
Deep North 	Fish10 	 	 	15%, 4 stars	No max tilt, 0.1 m from ground 	1 min
10 sec	10 	60 % 	12 m 	Below -5 m 	3-10 	3 m
Meadows, Black Forest, Plains 	Odin 	defeated_gdking 	Night	 	Always spawns 35 m away 	50 min 	1 	10 % 	10 m 	 	1 	3 m
Meadows, Black Forest, Mountain, Plains 	Seeker 	defeated_queen 	Night	 	Hunt mode 	50 min 	2 	5% 	10 m 	 	3 	3m
Meadows, Black Forest, Mountain, Plains 	Seeker Brood 	defeated_queen 	Night	 	Hunt mode 	50 min 	5 	5% 	10 m 	 	3 	3m
Meadows, Black Forest, Mountain, Plains 	Tick 	defeated_queen 	Night	Yes 	Hunt mode 	50 min 	4 	5% 	10 m 	 	3 	3m
==Example ==
For example Serpents have two spawners which only work when zone is located in Ocean biome. The first spawner works only during the night while the second spawner only works during storms. This means both spawners are active during night time storms giving the best chance for finding a Serpent.
Serpent spawners work every 1000 seconds and only have a 5% chance to work. If you just wait on a spot then it can take hours for a Serpent to spawn. But if you keep moving to new zones then you can easily get a spawn attempt every 12-16 seconds (depending on the speed). However this requires that you haven't visited the area for 1000 seconds.
Serpents can spawn up to 80 meters away so it's good to be in a middle of the ocean. If you are near other biomes then the spawn can fail because of wrong biome. Serpents never spawn as starred variant because the max level is 1.
Serpents that spawn because of storm won't despawn on morning even when spawned during the night (but no way to tell which spawner spawned it).
A serpent suppresses other serpent spawns within 50 meters. It's still possible to spawn more serpents (since they can spawn up to 80 meters away) but the chances are drastically reduced. Serpents detect you up to 50 meters away so most of the time they won't aggro right away.
Category:Mechanics