Skip to content

Wild Pokémon Spawn System

Fivemon includes a dynamic and immersive spawn system for wild Pokémon that operates around players, not static world locations. This system ensures a living world that responds to player presence, exploration, and the environment around them.


How Spawns Work

Spawns are player-driven. This means:

  • Pokémon only spawn near players.

  • If no players are nearby, they despawn automatically.

  • Each player has an influence radius around them where spawns are evaluated periodically.


Configuring Spawns — @monsters-wrapper/data/pokemon-spawn.json

This file contains a list of Pokémon that can spawn and the conditions under which they may appear. Each entry looks like:

{
    "id": 1,
    "name": "bulbasaur",
    "minLevel": 5,
    "maxLevel": 10,
    "tier": "S",
    "biomes": ["FOREST"],
    "climates": ["RAIN"],
    "schedule": "X"
}

⚠️ CAUTION - Entries cannot be repeated by either id or name.

Fields:

  • id: Pokédex ID.

  • name: Pokémon name in lowercase with dashes instead of spaces, as defined in pokemon.json.

  • minLevel / maxLevel: The possible level range for the spawn instance.

  • tier: Used to control spawn rarity. Default tiers include:

    • E, D, C, B, A, S, SS
      Higher tiers are rarer by default.
  • biomes: Array of biome names where this Pokémon can appear, as defined in biome.json. You can also use biome "X" to allow any.

  • climates: Weather conditions required for the Pokémon to spawn. You can use climate "X" to allow any. Valid values:

CLEAR, EXTRASUNNY, OVERCAST, CLOUDS, RAIN, CLEARING, NEUTRAL, THUNDER, SMOG, FOGGY, SNOWLIGHT, SNOW, BLIZZARD, XMAS

  • schedule: Time of day the Pokémon may appear.

    • X: Anytime

    • D: Day

    • N: Night

If the weather or schedule conditions stop being met, the Pokémon may despawn.


Biomes — Defining Where Pokémon Spawn

There are two ways to define where biomes exist:

1. Using Zones

You can assign one or more biomes to a specific zone using the biome utility (see Zone Guide). This method overrides all other definitions and offers precise control.

2. Using Biome Images

Create .png images in the maps/biomes folder. Each image should:

  • Match the name of the biome it represents (e.g., forest.png).

  • Add the entry to data/biome.json if not already exist. Use an incremental id and put the biome name.

  • Be based on the reference satellite image (satellite.png).

  • Contain a painted layer using any color to mark the biome area.

  • Be square (equal width and height), with as small a size as possible (e.g., 512x512, 1024x1024, 2048x2048).

  • Avoid using sizes like 8192x8192 to prevent memory issues or performance drops.


Level Maps — Defining Spawn Level Ranges by Area

As with biomes, level ranges can be defined in two ways:

1. Using Zones

Define a zone with the level utility specifying min and max (see Zone Guide). This takes priority over image-based level definitions.

2. Using Level Images

In maps/levels, you can place two images:

  • One for minimum level

  • One for maximum level

These images should be grayscale. The brightness level (L in HSL or V in HSV) defines the level:

  • Pure white (L = 100) = highest level

  • Pure black (L = 0) = lowest level

Only grayscale should be used — do not introduce color hues.

Each image also should:

  • Match the name of the biome it represents (minLevelMap.png, maxLevelMap.png).

  • Be based on the reference satellite image (satellite.png).

  • Be square (equal width and height), with as small a size as possible (e.g., 512x512, 1024x1024, 2048x2048).

  • Avoid using sizes like 8192x8192 to prevent memory issues or performance drops.

Using the Google "Color picker":


Server-Side Spawn Configuration — onlyserverconfig.json

This file (inside @uri-config/data/config/) controls how spawns behave globally.

"spawnChanceByTier": {
    "E": 30,
    "D": 15,
    "C": 10,
    "B": 8,
    "A": 4,
    "S": 2,
    "SS": 1
}
  • The higher the value, the more likely Pokémon of that tier will spawn.

Other important options:

"spawnRandomPeriod": 0.5              // Minutes between every player spawn checks
"spawnCloseDistanceBlock": 15         // Minimum distance from players or other Pokémon to allow spawn
"spawnWildAreaRadius": 100            // Radius around the player considered for spawn limits
"spawnWildAreaMaxCount": 4            // Max Pokémon allowed in the area before spawning is blocked
"spawnWildGlobalMaxCount": 3000       // Max active total wild Pokémon in the whole server

"spawnMinTime": 5                     // Minimum lifespan (in minutes) before a Pokémon can despawn
"spawnSaturedChunkTime": 2            // Time in minutes a chunk is blocked after saturation
"spawnChunkSize": 100                 // Size of chunks for managing spawn density
"spawnChunkMinPokemon": 4             // Pokémon spawned when player entering an empty chunk

"despawnRandomProb": 0.1              // Chance of despawn when medium distance from player (from 0 to 1)
"despawnCloseDistanceBlock": 25       // Distance where presence of a player blocks despawn
"despawnFarDistance": 500             // Distance considered as “far”
"despawnFarRandomProb": 1             // Chance of despawn when far (from 0 to 1)

Client-Side Spawn Configuration — config.json

This file (in the same directory) allows tweaking how spawns are placed around players:

"spawnWildMinDistance": 50,         // Minimum random distance from player to spawn
"spawnWildMaxDistance": 300,        // Maximum random distance from player to spawn
"spawnWildInFrontProb": 0.4         // Chance to spawn in front of the player vs any direction (from 0 to 1)

Summary

  • Spawns are controlled entirely by player proximity and environmental conditions.

  • Biomes and levels can be defined with zones (priority) or maps (scalable).

  • You have full control over spawn frequency, rarity, and distribution.

  • The system is designed to be modular and customizable, supporting every kind of biome, questline, or encounter setup.