Species Additions

Revision as of 07:31, 26 July 2023 by Frank The Farmer (talk | contribs) (Created page with "{{TOC|right}} == Preface == You can create a <code>species_addition</code> JSON to replace or add some new data to an existing <code>species</code> file. Species additions can be a helpful way to add your own regional variants to existing Pokémon. They can also be helpful if you want to rewrite a Pokémon's stats for an addon. This system was created to improve the compatibility between multiple datapacks by allowing datapack developers to target specific species and ap...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Preface

You can create a species_addition JSON to replace or add some new data to an existing species file. Species additions can be a helpful way to add your own regional variants to existing Pokémon. They can also be helpful if you want to rewrite a Pokémon's stats for an addon. This system was created to improve the compatibility between multiple datapacks by allowing datapack developers to target specific species and append or replace depending on the field type without overwriting the base species file.

Species Addition Breakdown

Creating a species addition JSON is very simple. You simply list your target Pokémon, and then list any data that you wish to rewrite or add to the species file of that Pokémon. Forms and evolution data are exceptions to the rewriting. They will always be added instead.

Here is a breakdown of an example species addition. Hover over the underlined text to see more information.

{
   "target": "cobblemon:bulbasaur",
   "primaryType": "fire",
   "secondaryType": "water"
}

The result of loading this file would be Bulbasaur becoming a fire/water type.

Here is a list of tips about species additions:

  • Species additions will rewrite any data if it is already written in the target species file.
    • Example: If you wanted to add a new move to the moves list, you'd have to rewrite the entire move list. If you only write the one new move, it will be the only move that Pokémon can learn.
  • Species additions will also add your written data if it doesn't exist in the target species file yet.
    • You can create a file to add drops for Pokémon that don't drop anything yet.
  • This system was created to help addon creators keep their datapacks compatible with others! Always use them if you wish to edit something about existing Pokémon you didn't create.
    • It will prevent 2 datapacks fighting over who will get to replace the main species file.
    • It can prevent your addon from causing irreparable damage to player save data in certain scenarios!
  • If 2 additions want to rewrite the same thing, like item drops, then only the first file in the load order will have its changes implemented.
  • Using species additions to add special Pokémon forms is the most addon friendly process!
    • If two creators both wanted to add a regional form to Mudkip, and they both used species additions to add the form data, then people can use both addons together without issues!

Datapack Folder Location

These files belong in a folder you might have never seen before. You can place the JSONs in the species additions folder itself, or even create sub folders for your JSONs. Here is how you should arrange your species addition files and folder:

  • (addon name)
    • data
      • (addon name)
        • species_additions
          • <target_pokemon>.json
          • (optional target pokemon/generation folders)
            • <optional target_pokemon>.json


You can also merge the species additions folder into an existing addon pack.

Species Addition Examples

One of the most common uses of species additions by the community is adding extra evolution data to official Pokémon. It is also used often to change the baseScale and hitbox sizes of a pokemon for use with unofficial models.

  • In this example, Eevee will now evolve into Charizard at level 36 and it will maintain all its other eeveelutions!
{
 "target": "cobblemon:eevee",
 "evolutions": [
   {
     "id": "eevee_charizard",
     "variant": "level_up",
     "result": "charizard",
     "consumeHeldItem": false,
     "learnableMoves": [],
     "requirements": [
       {
         "variant": "level",
         "minLevel": 36
       }
     ]
   }
 ]
}


The following is an example of two addons that want to change evolution and form data for an existing Pokémon. In this case, they both want to create a new eeveelution and a new regional form of Eevee that has its own evolution as well. Thanks to species_additions and its special rules, anybody can use both of these hypothetical addons and get the effects of both without issues!

  • A normal Eevee could then evolve into Charizard or Blastoise at level 36.
  • An Alolan Eevee would become an ice type and evolve into Squirtle with a water stone.
  • A Hisuian Eevee would become a fire type and evolve into Bulbasaur with a leaf stone.

Addon #1's species addition:

{
 "target": "cobblemon:eevee",
 "features": ["alolan"],
 "forms": [
   {
     "name": "Alola",
     "primaryType": "ice",
     "abilities": [
       "snowcloak",
       "h:snowwarning"
     ],
     "aspects": ["alolan"],
     "evolutions": [
       {
         "id": "eevee_squirtle",
         "variant": "item_interact",
         "result": "squirtle",
         "consumeHeldItem": false,
         "learnableMoves": [],
         "requirements": [],
         "requiredContext": "cobblemon:water_stone"
       }
     ]
   }
 ],
 "evolutions": [
   {
     "id": "eevee_blastoise",
     "variant": "level_up",
     "result": "blastoise",
     "consumeHeldItem": false,
     "learnableMoves": [],
     "requirements": [
       {
         "variant": "level",
         "minLevel": 36
       }
     ]
   }
 ]
}


Addon #2's species addition:

{
 "target": "cobblemon:eevee",
 "features": ["hisuian"],
 "forms": [
   {
     "name": "Hisui",
     "primaryType": "fire",
     "abilities": [
       "flamebody",
       "h:drought"
     ],
     "aspects": ["hisuian"],
     "evolutions": [
       {
         "id": "eevee_bulbasaur",
         "variant": "item_interact",
         "result": "bulbasaur",
         "consumeHeldItem": false,
         "learnableMoves": [],
         "requirements": [],
         "requiredContext": "cobblemon:leaf_stone"
       }
     ]
   }
 ],
 "evolutions": [
   {
     "id": "eevee_charizard",
     "variant": "level_up",
     "result": "charizard",
     "consumeHeldItem": false,
     "learnableMoves": [],
     "requirements": [
       {
         "variant": "level",
         "minLevel": 36
       }
     ]
   }
 ]
}