(Created page with "{{TOC|right}} == Preface == The <code>spawn_pool_world</code> folder contains the JSON files that control how a Pokémon spawns naturally. For simplicity, most people call them <code>spawn files</code>. These files dictate which Pokémon will spawn, its rarity , its level, and the conditions it will spawn in. Every implemented Pokémon has at least one set of spawn data. Without this spawn data, a Pokémon can only be spawned through commands. === Spawn File Breakdown...")
 
(Running out of word play. Updated file examples and included new weight multiplier data)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TOC|right}}
{{TOC|right}}
== Preface ==
== Preface ==
The <code>spawn_pool_world</code> folder contains the JSON files that control how a Pokémon spawns naturally. For simplicity, most people call them <code>spawn files</code>. These files dictate which Pokémon will spawn, its rarity , its level, and the conditions it will spawn in. Every implemented Pokémon has at least one set of spawn data. Without this spawn data, a Pokémon can only be spawned through commands.  
The <code>spawn_pool_world</code> folder contains the JSON files that control how a Pokémon spawns naturally. For simplicity, most people call them <code>spawn files</code>. These files dictate which Pokémon will spawn, its rarity , its level, and the [[Spawn_Condition|conditions]] it will spawn in. Every implemented Pokémon has at least one set of spawn data. Without this spawn data, a Pokémon can only be spawned through commands.  


=== Spawn File Breakdown ===
=== Spawn File Breakdown ===
Line 32: Line 32:
     ]
     ]
  }
  }
Bulbasaur is an ultra-rare spawn which occurs 0.1% of the time. It can only spawn on natural blocks, like grass, that are in a jungle biome while the sky is visible. It cannot spawn under trees.  
Bulbasaur is an ultra-rare spawn which occurs 0.2% of the time. It can only spawn on natural blocks, like grass, that are in a jungle biome while the sky is visible. It cannot spawn under trees.  


Here is a list of options that some of the spawn properties can use:  
Here is a list of options that some of the spawn properties can use:  
Line 39: Line 39:
* '''"bucket"''': The rarity pool of the Pokémon. You can choose <code>"common"</code>, <code>"uncommon"</code>, <code>"rare"</code>, or <code>"ultra-rare"</code>
* '''"bucket"''': The rarity pool of the Pokémon. You can choose <code>"common"</code>, <code>"uncommon"</code>, <code>"rare"</code>, or <code>"ultra-rare"</code>
* '''"weight"''': This determines how common the Pokémon will be inside of the assigned rarity pool. Generally, you can treat it like a scale of 0.1 to 10 on how rare it will be in that pool. You can use numbers higher than 10 if you really want that Pokémon to spawn more often.  
* '''"weight"''': This determines how common the Pokémon will be inside of the assigned rarity pool. Generally, you can treat it like a scale of 0.1 to 10 on how rare it will be in that pool. You can use numbers higher than 10 if you really want that Pokémon to spawn more often.  
* '''"condition"''': You can use any of the conditions listed [https://gitlab.com/cable-mc/cobblemon/-/wikis/Spawner/Spawn-Condition here] to make Pokémon spawn
* '''"condition"''': You can use any of the conditions listed [[Spawn_Condition|here]] to make Pokémon spawn
* '''"anticondition"''': You can use any of the conditions listed [https://gitlab.com/cable-mc/cobblemon/-/wikis/Spawner/Spawn-Condition here] to '''PREVENT''' a Pokémon from spawning
* '''"anticondition"''': You can use any of the conditions listed [[Spawn_Condition|here]] to '''PREVENT''' a Pokémon from spawning
* '''"biomes"''': A subcategory of conditions and anticonditions. You can use biome id's or any [https://docs.google.com/document/d/1iB0EJSc2r6mRJXIo1n3XpHbZ5udwJVnrh2pXdhTyH8c/edit biome tags]. Should work with modded biome id's too!
* '''"biomes"''': A subcategory of conditions and anticonditions. You can use biome id's or any [https://docs.google.com/document/d/1iB0EJSc2r6mRJXIo1n3XpHbZ5udwJVnrh2pXdhTyH8c/edit biome tags]. Should work with modded biome id's too!
* '''"weightMultiplier"''': This allows you to multiply the weight of the specific spawn ID provided a second set of conditions are also met. An array that requires a <code>multiplier</code> float value, and an array of conditions and/or anticonditions.
** A snippet example of a weight multiplier from elekid:
            "<abbr title="The normal weight of the spawn. In this case, the weight is 1.8 if in the hills or plains while there is no thunderstorm.">weight</abbr>": 1.8,
            "<abbr title="Here you will specify when to multiply the weights and by how much.">weightMultiplier</abbr>": {
                "<abbr title="The value that will be multiplied with the normal weight. 5 x 1.8 would result in a weight of 9 only if it there is a thunderstorm while in the hills or plains.">multiplier</abbr>": 5.0,
                "<abbr title="The list of conditions that must be met in order for the weight to be multiplied.">condition</abbr>": {
                    "<abbr title="Weather or not a thunderstorm must be present">isThundering</abbr>": true
                }
            },
            "<abbr title="The list of conditions that must be met in order for Elekid to spawn.">condition</abbr>": {
                "<abbr title="Whether or not the spawning context must have a direct route to the sky above it">canSeeSky</abbr>": true,
                "<abbr title="A list of required biomes in order for Elekid to spawn.">biomes</abbr>": [
                    "#cobblemon:is_hills",
                    "#cobblemon:is_plains"
                ]
            }




Line 57: Line 74:
             "pokemon": "buneary",
             "pokemon": "buneary",
             "presets": [
             "presets": [
                 "natural"
                 "natural",
                "wild"
             ],
             ],
             "type": "pokemon",
             "type": "pokemon",
             "context": "grounded",
             "context": "grounded",
             "bucket": "common",
             "bucket": "common",
             "level": "8-35",
             "level": "10-35",
             "weight": 9.9,
             "weight": 9.0,
             "condition": {
             "condition": {
                 "canSeeSky": true,
                 "canSeeSky": true,
Line 69: Line 87:
                     "#cobblemon:is_forest",
                     "#cobblemon:is_forest",
                     "#cobblemon:is_hills",
                     "#cobblemon:is_hills",
                     "#cobblemon:is_snowy"
                     "#cobblemon:is_snowy_forest",
                    "#cobblemon:is_taiga"
                 ]
                 ]
             }
             }
Line 77: Line 96:




* Magikarp's spawn file - A great template for common aquatic pokemon
* Magikarp's spawn file - A great template for common aquatic pokemon both freshwater and saltwater.
  {
  {
     "enabled": true,
     "enabled": true,
Line 101: Line 120:
         {
         {
             "id": "magikarp-2",
             "id": "magikarp-2",
            "pokemon": "magikarp",
            "presets": [
                "freshwater",
                "water_surface"
            ],
            "type": "pokemon",
            "context": "surface",
            "bucket": "common",
            "level": "1-20",
            "weight": 1.98,
            "condition": {
                "canSeeSky": true
            }
        },
        {
            "id": "magikarp-3",
             "pokemon": "magikarp",
             "pokemon": "magikarp",
             "presets": [
             "presets": [
Line 113: Line 148:
                 "canSeeSky": true,
                 "canSeeSky": true,
                 "biomes": [
                 "biomes": [
                     "#minecraft:is_ocean"
                     "#cobblemon:is_ocean"
                ]
            }
        },
        {
            "id": "magikarp-4",
            "pokemon": "magikarp",
            "presets": [
                "water_surface"
            ],
            "type": "pokemon",
            "context": "surface",
            "bucket": "common",
            "level": "1-20",
            "weight": 1.98,
            "condition": {
                "canSeeSky": true,
                "biomes": [
                    "#cobblemon:is_ocean"
                 ]
                 ]
             }
             }
Line 123: Line 176:
* Klink's spawn file - A great template for nearby block requirements, and mod compatibility!
* Klink's spawn file - A great template for nearby block requirements, and mod compatibility!
  {
  {
     "enabled": "true",
     "enabled": true,
     "neededInstalledMods": [],
     "neededInstalledMods": [],
     "neededUninstalledMods": [],
     "neededUninstalledMods": [],
Line 131: Line 184:
             "pokemon": "klink",
             "pokemon": "klink",
             "presets": [
             "presets": [
                 "underground"
                 "natural"
             ],
             ],
             "type": "pokemon",
             "type": "pokemon",
             "context": "grounded",
             "context": "grounded",
             "bucket": "uncommon",
             "bucket": "common",
             "level": "12-30",
             "level": "5-30",
             "weight": 9.0,
             "weight": 9.0,
             "condition": {
             "condition": {
Line 150: Line 203:
             "anticondition": {
             "anticondition": {
                 "biomes": [
                 "biomes": [
                     "#cobblemon:is_abyss"
                     "#cobblemon:is_deep_dark"
                 ]
                 ]
             }
             }
Line 162: Line 215:
             "type": "pokemon",
             "type": "pokemon",
             "context": "grounded",
             "context": "grounded",
             "bucket": "uncommon",
             "bucket": "common",
             "level": "12-30",
             "level": "5-30",
             "weight": 9.0,
             "weight": 9.0,
             "condition": {
             "condition": {
Line 179: Line 232:
     ]
     ]
  }
  }
* Elekid's spawn file - a great example of weight multipliers
{
    "enabled": true,
    "neededInstalledMods": [],
    "neededUninstalledMods": [],
    "spawns": [
        {
            "id": "elekid-1",
            "pokemon": "elekid",
            "presets": [
                "natural"
            ],
            "type": "pokemon",
            "context": "grounded",
            "bucket": "uncommon",
            "level": "11-36",
            "weight": 1.8,
            "weightMultiplier": {
                "multiplier": 5.0,
                "condition": {
                    "isThundering": true
                }
            },
            "condition": {
                "canSeeSky": true,
                "biomes": [
                    "#cobblemon:is_hills",
                    "#cobblemon:is_plains"
                ]
            }
        }
    ]
}
{{Addon Creation}}

Latest revision as of 09:17, 4 March 2024

Preface

The spawn_pool_world folder contains the JSON files that control how a Pokémon spawns naturally. For simplicity, most people call them spawn files. These files dictate which Pokémon will spawn, its rarity , its level, and the conditions it will spawn in. Every implemented Pokémon has at least one set of spawn data. Without this spawn data, a Pokémon can only be spawned through commands.

Spawn File Breakdown

The data in spawn files can be rather self-explanatory. These files can be as simple as spawning in the forest, or as complicated as only spawning at 2:30-3:00AM on top of clay during the new moon in an ocean biome that is south of spawn.

Here is a breakdown of Bulbasaur's spawn file. Hover over the underlined text to see more information.

{
   "enabled": true,
   "neededInstalledMods": [],
   "neededUninstalledMods": [],
   "spawns": [
       {
           "id": "bulbasaur-1",
           "pokemon": "bulbasaur",
           "presets": [
               "natural"
           ],
           "type": "pokemon",
           "context": "grounded",
           "bucket": "ultra-rare",
           "level": "5-32",
           "weight": 9.0,
           "condition": {
               "canSeeSky": true,
               "biomes": [
                   "#cobblemon:is_jungle"
               ]
           }
       }
   ]
}

Bulbasaur is an ultra-rare spawn which occurs 0.2% of the time. It can only spawn on natural blocks, like grass, that are in a jungle biome while the sky is visible. It cannot spawn under trees.

Here is a list of options that some of the spawn properties can use:

  • "presets": You can use any of these presets listed on the Gitlab or you can make your own presets.
  • "context": You can choose between "grounded" for land spawns, "submerged" for underwater spawns, and "surface" for spawns on the surface of water or lava.
  • "bucket": The rarity pool of the Pokémon. You can choose "common", "uncommon", "rare", or "ultra-rare"
  • "weight": This determines how common the Pokémon will be inside of the assigned rarity pool. Generally, you can treat it like a scale of 0.1 to 10 on how rare it will be in that pool. You can use numbers higher than 10 if you really want that Pokémon to spawn more often.
  • "condition": You can use any of the conditions listed here to make Pokémon spawn
  • "anticondition": You can use any of the conditions listed here to PREVENT a Pokémon from spawning
  • "biomes": A subcategory of conditions and anticonditions. You can use biome id's or any biome tags. Should work with modded biome id's too!
  • "weightMultiplier": This allows you to multiply the weight of the specific spawn ID provided a second set of conditions are also met. An array that requires a multiplier float value, and an array of conditions and/or anticonditions.
    • A snippet example of a weight multiplier from elekid:
           "weight": 1.8,
           "weightMultiplier": {
               "multiplier": 5.0,
               "condition": {
                   "isThundering": true
               }
           },
           "condition": {
               "canSeeSky": true,
               "biomes": [
                   "#cobblemon:is_hills",
                   "#cobblemon:is_plains"
               ]
           }


Spawn File Examples

Instead of making spawn files from scratch each time, you can use familiar Pokémon as a template. You can simply swap their names for the id and pokemon properties. Here are some simple examples of different spawn files.

  • Buneary's spawn file - A great template for common land pokemon
{
   "enabled": true,
   "neededInstalledMods": [],
   "neededUninstalledMods": [],
   "spawns": [
       {
           "id": "buneary-1",
           "pokemon": "buneary",
           "presets": [
               "natural",
               "wild"
           ],
           "type": "pokemon",
           "context": "grounded",
           "bucket": "common",
           "level": "10-35",
           "weight": 9.0,
           "condition": {
               "canSeeSky": true,
               "biomes": [
                   "#cobblemon:is_forest",
                   "#cobblemon:is_hills",
                   "#cobblemon:is_snowy_forest",
                   "#cobblemon:is_taiga"
               ]
           }
       }
   ]
}


  • Magikarp's spawn file - A great template for common aquatic pokemon both freshwater and saltwater.
{
   "enabled": true,
   "neededInstalledMods": [],
   "neededUninstalledMods": [],
   "spawns": [
       {
           "id": "magikarp-1",
           "pokemon": "magikarp",
           "presets": [
               "freshwater",
               "underwater"
           ],
           "type": "pokemon",
           "context": "submerged",
           "bucket": "common",
           "level": "1-20",
           "weight": 9.9,
           "condition": {
               "canSeeSky": true
           }
       },
       {
           "id": "magikarp-2",
           "pokemon": "magikarp",
           "presets": [
               "freshwater",
               "water_surface"
           ],
           "type": "pokemon",
           "context": "surface",
           "bucket": "common",
           "level": "1-20",
           "weight": 1.98,
           "condition": {
               "canSeeSky": true
           }
       },
       {
           "id": "magikarp-3",
           "pokemon": "magikarp",
           "presets": [
               "underwater"
           ],
           "type": "pokemon",
           "context": "submerged",
           "bucket": "common",
           "level": "1-20",
           "weight": 9.9,
           "condition": {
               "canSeeSky": true,
               "biomes": [
                   "#cobblemon:is_ocean"
               ]
           }
       },
       {
           "id": "magikarp-4",
           "pokemon": "magikarp",
           "presets": [
               "water_surface"
           ],
           "type": "pokemon",
           "context": "surface",
           "bucket": "common",
           "level": "1-20",
           "weight": 1.98,
           "condition": {
               "canSeeSky": true,
               "biomes": [
                   "#cobblemon:is_ocean"
               ]
           }
       }
   ]
}


  • Klink's spawn file - A great template for nearby block requirements, and mod compatibility!
{
   "enabled": true,
   "neededInstalledMods": [],
   "neededUninstalledMods": [],
   "spawns": [
       {
           "id": "klink-1",
           "pokemon": "klink",
           "presets": [
               "natural"
           ],
           "type": "pokemon",
           "context": "grounded",
           "bucket": "common",
           "level": "5-30",
           "weight": 9.0,
           "condition": {
               "canSeeSky": false,
               "biomes": [
                   "#cobblemon:is_overworld"
               ],
               "neededNearbyBlocks": [
                   "#c:redstone_ores",
                   "minecraft:rail"
               ]
           },
           "anticondition": {
               "biomes": [
                   "#cobblemon:is_deep_dark"
               ]
           }
       },
       {
           "id": "klink-2",
           "pokemon": "klink",
           "presets": [
               "redstone"
           ],
           "type": "pokemon",
           "context": "grounded",
           "bucket": "common",
           "level": "5-30",
           "weight": 9.0,
           "condition": {
               "biomes": [
                   "#cobblemon:is_overworld"
               ],
               "neededNearbyBlocks": [
                   "create:cogwheel",
                   "create:large_cogwheel",
                   "create:gearbox",
                   "create:vertical_gearbox"
               ]
           }
       }
   ]
}


  • Elekid's spawn file - a great example of weight multipliers
{
   "enabled": true,
   "neededInstalledMods": [],
   "neededUninstalledMods": [],
   "spawns": [
       {
           "id": "elekid-1",
           "pokemon": "elekid",
           "presets": [
               "natural"
           ],
           "type": "pokemon",
           "context": "grounded",
           "bucket": "uncommon",
           "level": "11-36",
           "weight": 1.8,
           "weightMultiplier": {
               "multiplier": 5.0,
               "condition": {
                   "isThundering": true
               }
           },
           "condition": {
               "canSeeSky": true,
               "biomes": [
                   "#cobblemon:is_hills",
                   "#cobblemon:is_plains"
               ]
           }
       }
   ]
}