Configuring Spawns with Myths and Legends
This page serves as a comprehensive guide for configuring Pokémon spawns using JSON files in conjunction with the Myths and Legends addon for Cobblemon. It explains how custom conditions enhance the default Cobblemon spawning system to create more immersive and player-specific encounters.
Preface
Myths and Legends leverages Cobblemon's existing spawn system, located in the `<config>/cobblemon/spawning/` directory or within datapacks at `data/<namespace>/cobblemon/spawning/`. These JSON files (spawn files) define which Pokémon spawn, where they spawn, under what conditions, and how frequently.
While standard Cobblemon Pokémon have their own spawn definitions, Myths and Legends focuses on:
* Legendary, Mythical, and special Pokémon with unique spawn requirements. * Integration of Custom Spawn Conditions like Key Items, inventory checks, and party composition. * Compatibility with systems such as Force Spawning and Item Consumption.
General Usage
Myths and Legends conditions are added inside the `“condition”: { … }` block of a Pokémon's spawn entry. These can be used in combination with standard Cobblemon Spawn Conditions like biomes, time, and weather.
Example:
{ "enabled": true, "spawns": [ { "id": "mythsandlegends-example-spawn-1", "pokemon": "mewtwo", "presets": ["natural"], "type": "pokemon", "context": "grounded", "bucket": "ultra-rare", "level": "70", "weight": 0.1, "condition": { "biomes": ["#cobblemon:is_deep_dark"], "key_item": "mythsandlegends:dr_fujis_diary", "item_requirement": [ {"id": "minecraft:nether_star", "count": 1, "consume": true} ], "pokemon_in_party_requirement": [ {"species": "mew", "count": 1} ] } } ] }
Custom Condition Types
Key Item Condition (`key_item`)
Requires a specific Key Item to be present in the player's persistent data (often tracked automatically).
* Syntax: `“key_item”: “modid:item_id”` * Used for: Gating spawns behind quest items or storyline progression. * Consumption: Controlled by config (`consume_items_on_successful_spawn` and `ignore_key_items`).
Item Requirement (`item_requirement`)
Requires specific items in the player’s inventory. Optionally consumes them.
* Syntax: ```json “item_requirement”: [
{"id": "minecraft:diamond", "count": 2, "consume": true}
] ``` * Inventory Scans: May include items in Shulker Boxes or Bundles if configured.
Zygarde Cube Charge (`required_cells`, `required_cores`)
Requires a Zygarde Cube with a minimum number of stored Cells and/or Cores.
* Syntax: ```json “required_cells”: 95, “required_cores”: 5 ``` * Note: The Cube and its charges are NOT consumed.
Pokémon in Party (`pokemon_in_party_requirement`)
Requires specific Pokémon species to be present in the player’s current party.
* Syntax: ```json “pokemon_in_party_requirement”: [
{"species": "regice", "count": 1}, {"species": "regidrago", "count": 1}
] ```
Item Consumption on Spawn
Item consumption after a successful spawn is controlled by these configuration values:
1. `consume_items_on_successful_spawn`: Master toggle. 2. `ignore_key_items`: If true (default), Key Items are never consumed. 3. Per-item `consume` Flag:
- Only relevant for `item_requirement`.
- Strongly suggests whether the item should be consumed.
If consumption fails (e.g., not enough items in inventory), the spawn may still occur, and a “debt” may be logged internally.
Spawn File Structure
Each spawn file consists of an array of `spawns`, each with:
* `id`: Unique name for the spawn entry. * `pokemon`: Species name (e.g., `moltres`). * `presets`: Optional presets (e.g., `natural`). * `type`: Usually `pokemon`. * `context`: `grounded`, `submerged`, `fishing`, etc. * `bucket`: Rarity group (`common`, `uncommon`, `rare`, `ultra-rare`). * `level`: Single level or range (`50` or `50-60`). * `weight`: Relative frequency within the bucket. * `condition`: Required conditions to be met. * `anticondition`: Conditions that must not be met (optional). * `weightMultiplier`: Additional conditional weighting (optional).
Example Spawn Entries
Articuno (Tidal Bell + 3 Ice Stones)
{ "id": "mythsandlegends-articuno-1", "pokemon": "articuno", "presets": ["natural"], "type": "pokemon", "context": "grounded", "bucket": "ultra-rare", "level": "50-60", "weight": 0.1, "condition": { "biomes": [ "minecraft:frozen_ocean", "minecraft:snowy_taiga" ], "key_item": "mythsandlegends:tidal_bell", "item_requirement": [ {"id": "cobblemon:ice_stone", "count": 3, "consume": true} ] } }
Zygarde (Zygarde Cube Required)
{ "id": "mythsandlegends-zygarde-2", "pokemon": "zygarde", "presets": ["natural"], "type": "pokemon", "context": "grounded", "bucket": "ultra-rare", "level": "70", "weight": 0.1, "condition": { "biomes": ["#cobblemon:is_forest"], "required_cells": 95, "required_cores": 5 } }
Mewtwo (Dr. Fuji's Diary Required)
{ "id": "mythsandlegends-mewtwo-2", "pokemon": "mewtwo", "presets": ["natural"], "type": "pokemon", "context": "grounded", "bucket": "ultra-rare", "level": "70-75", "weight": 0.1, "condition": { "biomes": ["#cobblemon:is_deep_dark"], "key_item": "mythsandlegends:dr_fujis_diary" } }
Regigigas (Party Requirement)
{ "id": "mythsandlegends-regigigas-3", "pokemon": "regigigas", "presets": ["natural"], "type": "pokemon", "context": "grounded", "bucket": "ultra-rare", "level": "70", "weight": 0.1, "condition": { "biomes": ["#cobblemon:is_savanna"], "pokemon_in_party_requirement": [ {"species": "regice"}, {"species": "regidrago"}, {"species": "regieleki"}, {"species": "regirock"}, {"species": "registeel"} ] } }
Force Spawning Compatibility
The Force Spawning system uses `key_item` conditions as the primary trigger. When used, the system looks for spawn entries with a matching `key_item` and validates all other conditions. Only if all criteria are met will the spawn occur.
Combining with Standard Cobblemon Conditions
You are encouraged to combine custom conditions with standard ones (biomes, time, light, etc.) to fine-tune spawns. For more details, consult:
* 0skill Wiki Conditions Page * Official Cobblemon Wiki
By understanding and combining both standard and Myths and Legends conditions, you can create deep, story-driven, and challenge-oriented spawning experiences for players in your Cobblemon world.