(Your scientists were so preoccupied with whether or not they could, that they didn't stop to think if they should.)
 
(OOpsie daisy formatted this json wrong. I was in the neighborhood)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
== Preface ==
== Preface ==
The JSONs in the <code>fossils</code> folder control the resulting Pokémon from the <code>fossil machine</code>. These files specify what items are considered a fossil and what Pokémon should be created if these fossils are placed into the machine. They are short files where you simply select any Pokémon and any item in the game.
The JSONs in the <code>fossils</code> folder control the resulting Pokémon from the <code>fossil machine</code>. These files specify what items are considered a fossil and what Pokémon should be created if these fossils are placed into the machine. They are short files where you simply select any Pokémon and any item in the game.
== File And Folder Format ==
Below is an example of how you would arrange a <code>fossil.json</code> into a datapack:
==== Folder Structure ====
<div class="treeview">
*''(addon name)''
** '''pack.mcmeta'''
**data
***cobblemon
****fossils
*****'''<pokemon>.json'''
</div></br>
   
   
=== Fossil Breakdown ===
== Fossil Breakdown ==
The fossil files are able to select any loaded Pokémon [[species]] to come out of the fossil machine. The <code>"result"</code> line functions like the <code>/pokegive</code> or <code>/pokespawn</code> commands, so you can include other data like level or regional forms. You can select up to 3 items you wish to serve as the "fossils."
The fossil files are able to select any loaded Pokémon [[species]] to come out of the fossil machine. The <code>"result"</code> line functions like the <code>/pokegive</code> or <code>/pokespawn</code> commands, so you can include other data like level or regional forms. You can select up to 3 items you wish to serve as the "fossils."
   
   
Line 21: Line 34:
* The <code>fossils</code> list doesn't support NBT data.
* The <code>fossils</code> list doesn't support NBT data.
</br>
</br>
=== Fossil Examples ===
== Fossil Examples ==
Here are some fossil files you can use as a template to generate your own Pokémon.
Here are some fossil files you can use as a template to generate your own Pokémon.


Line 40: Line 53:
         "cobblemon:rare_candy"
         "cobblemon:rare_candy"
     ]
     ]
}




{{Addon Creation}}
{{Addon Creation}}

Latest revision as of 05:23, 16 July 2024

Preface

The JSONs in the fossils folder control the resulting Pokémon from the fossil machine. These files specify what items are considered a fossil and what Pokémon should be created if these fossils are placed into the machine. They are short files where you simply select any Pokémon and any item in the game.

File And Folder Format

Below is an example of how you would arrange a fossil.json into a datapack:

Folder Structure

  • (addon name)
    • pack.mcmeta
    • data
      • cobblemon
        • fossils
          • <pokemon>.json


Fossil Breakdown

The fossil files are able to select any loaded Pokémon species to come out of the fossil machine. The "result" line functions like the /pokegive or /pokespawn commands, so you can include other data like level or regional forms. You can select up to 3 items you wish to serve as the "fossils."


Here is a breakdown of the arctozolt fossil file:

{
 "result": "arctozolt",
 "fossils": [
   "cobblemon:fossilized_dino",
   "cobblemon:fossilized_bird"
 ]
}


Here is some extra info about fossil files:

  • If your result pokemon doesn't exist or includes a typo, then the species will be chose at random from all loaded species.
  • Since the result functions like the commands that generate Pokémon, you can generate them as shiny or with special abilities.
  • The fossils don't need to come out of the suspicious sand or gravel blocks. You can use any item from the game.
  • The fossils list doesn't support NBT data.


Fossil Examples

Here are some fossil files you can use as a template to generate your own Pokémon.

  • Cranidos' fossil file:
{
 "result": "cranidos",
 "fossils": [
   "cobblemon:skull_fossil"
 ]
}


  • A custom Porygon file that will generate as a level 10 shiny:
{
   "result": "porygon shiny=yes level=10",
   "fossils": [
       "cobblemon:upgrade",
       "cobblemon:dubious_disc",
       "cobblemon:rare_candy"
   ]
}