Tutorials/Regional Forms: Difference between revisions

(Created page with "{{TOC|right}} == Preface == This tutorial will teach you how to create a regional form for '''''an existing Pokémon.''''' Regional forms are a species variant that can have different looks, types, abilities, moves, and spawn locations! '''Knowledge of creating custom pokemon is ''required.''''' Creating a unique model and textures for your form is highly recommended, but not always necessary. Due to regional forms usually requiring files for both data and assets, this...")
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TOC|right}}
{{TOC|right}}
== Preface ==
== Preface ==
This tutorial will teach you how to create a regional form for '''''an existing Pokémon.''''' Regional forms are a species variant that can have different looks, types, abilities, moves, and spawn locations! '''Knowledge of creating custom pokemon is ''required.''''' Creating a unique model and textures for your form is highly recommended, but not always necessary.  
This tutorial will teach you how to create a regional form for '''''an existing Pokémon.''''' Regional forms are a species variant that can have different looks, types, abilities, moves, and spawn locations! '''Knowledge of [[Tutorials/Creating_A_Custom_Pokemon|creating custom Pokémon]] is ''required.''''' Creating a unique model and textures for your form is highly recommended, but not always necessary.  


Due to regional forms usually requiring files for both data and assets, this type of pack will just be called an <code>addon</code> for simplicity. Addons that use data and asset folders will end up needing to have a copy in both the <code>datapacks</code> and <code>resourcepacks</code> game folders. The data and assets can be separated if desired, but are usually bundled together to make sharing easier!
Due to regional forms usually requiring files for both data and assets, this type of pack will just be called an <code>addon</code> for simplicity. Addons that use data and asset folders will end up needing to have a copy in both the <code>datapacks</code> and <code>resourcepacks</code> game folders. The data and assets can be separated if desired, but are usually bundled together to make sharing easier!
Line 8: Line 8:
Due to some files sharing the same names later in this guide, you will be creating the folder structure and <code>pack.mcmeta</code> now. This is to prevent confusion going forward.  
Due to some files sharing the same names later in this guide, you will be creating the folder structure and <code>pack.mcmeta</code> now. This is to prevent confusion going forward.  


# Create a new text file and name it <code>pack.mcmeta</code>
#* Ensure that it doesn't end in other file extensions like .txt
# Open the file and insert the following data:
#* Hover over the underlined text to see more information.
{
  "<abbr title="This lets Minecraft know that it is a datapack">pack</abbr>": {
    "<abbr title="Here you will list the pack format number for a specific version of Minecraft">pack_format</abbr>": <abbr title="As of 1.20.1, the current resourcepack format number is 15. But it will still load if this number isn't correct!">15</abbr>,
    "<abbr title="Here you will write a short description of your datapack">description</abbr>": "<abbr title="Your short datapack description">Example description</abbr>"
  }
}
# <li value=3> Save the file and put it aside for now.
# Create a series of folders arranged like the following example:
# Create a series of folders arranged like the following example:
==== Folder Structure ====
==== Folder Structure ====
Line 33: Line 44:
****species_features
****species_features
</div></br>
</div></br>
# <li value="2">Create your <code>pack.mcmeta</code> file
# <li value="5">Place the <code>pack.mcmeta</code> file into the first folder of your addon next to <code>assets</code> and <code>data</code>
#* Remember to write the necessary data into this file.
# Place this new file into the first folder of your addon next to <code>assets</code> and <code>data</code>
After this folder tree for your addon is made, you can simply drop the files into the associated folders as you create them.  
After this folder tree for your addon is made, you can simply drop the files into the associated folders as you create them.  
Remember that the <code>pack.mcmeta</code> is a file, not a folder to add. It must be one folder deep in order for Minecraft to recognize this pack as a resource pack or data pack when in the appropriate game folders.  
Remember that the <code>pack.mcmeta</code> is a file, not a folder to add. It must be one folder deep in order for Minecraft to recognize this pack as a resource pack or data pack when in the appropriate game folders.  


=== Step 2: Create the assets for your regional variant ===
=== Step 2: Create the assets for your regional variant ===
How you want your regional variant to look depends entirely on you. You can make it use a new texture over the original model. Most of the time, a new model, texture, and animations are created for this regional form. If for some reason you don't want it to have a visual difference at all, then you can skip anything regarding <code>assets</code>.
How you want your regional variant to look depends entirely on you. You can make it use a new texture over the original model. Most of the time, a new model, texture, and animations are created for this regional form. If for some reason you don't want it to have a visual difference at all, then you can skip anything regarding <code>assets</code>. Make sure your assets have a unique name so they don't overwrite any original form assets.


Assets for existing Pokémon can be obtained from the [https://gitlab.com/cable-mc/cobblemon/-/tree/main/common/src/main/resources/assets/cobblemon/bedrock/pokemon/models Gitlab] or the mod's JAR file. This can be helpful if you wanted to make a texture variant, or use the model as a base for the regional form. Just remember that animation files are made for specific models so they may need updating depending on what you make. These assets can be made in Blockbench or any relevant art apps.  
Assets for existing Pokémon can be obtained from the [https://gitlab.com/cable-mc/cobblemon/-/tree/main/common/src/main/resources/assets/cobblemon/bedrock/pokemon/models Gitlab] or the mod's JAR file. This can be helpful if you wanted to make a texture variant, or use the model as a base for the regional form. Just remember that animation files are made for specific models so they may need updating depending on what you make. These assets can be made in Blockbench or any relevant art apps.  
Line 48: Line 57:
# Create the regional form's <code>animations</code>
# Create the regional form's <code>animations</code>
# Export these files and place them into the appropriate folders in your addon pack
# Export these files and place them into the appropriate folders in your addon pack
# Create a <code>poser</code> file for this regional form if new animations were created for the new model. (optional)
# Create a <code>[[poser]]</code> file for this regional form if new animations were created for the new model. (optional)
 
As knowledge of creating custom Pokémon is a requirement for this guide, you are expected to know how to make these files. Help can be found on the Cobblemon discord.


As knowledge of creating custom Pokémon is a requirement for this guide, you are expected to know how to make these files. Help can be found on the Cobblemon discord or in future pages for these files.
=== Step 3: Create a "species feature" ===
=== Step 3: Create a "species feature" ===
On the data side of things, the creation of a regional form starts with the species feature. A species feature is what allows a Pokémon to have a different set of stats and visuals applied to their regional forms. You will be creating a short JSON file that will be named after your custom region or idea. '''The feature can be named whatever you want it to be called.'''
On the data side of things, the creation of a regional form starts with the [[Species_Features|species feature]]. A species feature is what allows a Pokémon to have a different set of stats and visuals applied to their regional forms. You will be creating a short JSON file that will be named after your custom region or idea. '''The feature can be named whatever you want it to be called.'''


# Create a new text file and name it after your region or idea. Include the extension of<code>.json</code>
# Create a new text file and name it after your region or idea. Include the extension of<code>.json</code>
Line 72: Line 81:


<code>"isAspect": true</code> means that this new feature is both a <code>feature</code> and <code>aspect</code>!
<code>"isAspect": true</code> means that this new feature is both a <code>feature</code> and <code>aspect</code>!
Now that the species feature is made, you can apply it to a Pokemon's <code>form</code>
Now that the species feature is made, you can apply it to a Pokémon's <code>form</code>


=== Step 4: Create a "species addition" file with "form" data ===
=== Step 4: Create a "species addition" file with "form" data ===
A <code>species_addition</code> file is an efficient way of ''adding'' data to existing species files without having to rewrite the main species file. This allows your additions to be more compatible with other addons affecting the same Pokémon. You will be adding your regional <code>form</code> data to a species through this method.  
A <code>[[Species_Additions|species_addition]]</code> file is an efficient way of ''adding'' data to existing species files without having to rewrite the main species file. This allows your additions to be more compatible with other addons affecting the same Pokémon. You will be adding your regional <code>form</code> data to a species through this method.  


# Create a new text file and name it after your Pokémon. Include the extension of <code>.json</code>
# Create a new text file and name it after your Pokémon. Include the extension of <code>.json</code>
Line 95: Line 104:
# Change <code>"custom_feature"</code> to the feature you made earlier. It must remain in quotes.  
# Change <code>"custom_feature"</code> to the feature you made earlier. It must remain in quotes.  
# Write all the data for your form inside of the curly brackets
# Write all the data for your form inside of the curly brackets
#* The average form data is too long to list as an example for this guide. It's like writing data for an entirely different Pokémon, which is kind of what a regional variant is like.  
#* The average form data set is too long to list as an example for this guide. It's like writing data for an entirely different Pokémon, which is kind of what a regional variant is like.  
#* If you need an example, you can look at the <code>"forms"</code> data for [https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/resources/data/cobblemon/species/generation1/vulpix.json Vulpix on the Gitlab.] It starts on line 29 and ends on line 204.
#* If you need an example, you can look at the <code>"forms"</code> data for [https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/resources/data/cobblemon/species/generation1/vulpix.json Vulpix on the Gitlab.] It starts on line 29 and ends on line 240.
#* Remember to include evolution data if this regional variant can evolve.
#* Remember to include evolution data if this regional variant can evolve.
# Write your species feature name into the <code>"aspects"</code> section of your <code>"forms"</code> data.  
# Write your species feature name into the <code>"aspects"</code> section of your <code>"forms"</code> data.  
Line 109: Line 118:


=== Step 5: Create the spawns for your regional form ===
=== Step 5: Create the spawns for your regional form ===
The <code>spawn_pool_world</code> folder holds all the spawning files for each Pokémon. You will be creating a new file for your regional variant. It can be as simple or complicated as you make it. It is recommended that you use the normal form's spawn file as a base for your regional form. Those spawn files can be found on the [https://gitlab.com/cable-mc/cobblemon/-/tree/main/common/src/main/resources/data/cobblemon/spawn_pool_world Gitlab.]
The <code>[[Spawn_Pool_World|spawn_pool_world]]</code> folder holds all the spawning files for each Pokémon. You will be creating a new file for your regional variant. It can be as simple or complicated as you make it. It is recommended that you use the normal form's spawn file as a base for your regional form. Those spawn files can be found on the [https://gitlab.com/cable-mc/cobblemon/-/tree/main/common/src/main/resources/data/cobblemon/spawn_pool_world Gitlab.]


To keep things simple, this part of the guide will show you how to recycle a spawn file by changing the pokemon name and biome conditions.  
To keep things simple, this part of the guide will show you how to recycle a spawn file by changing the Pokémon name and biome conditions.  
# Obtain your target pokemon's <code>spawn_pool_world</code> JSON.
# Obtain your target Pokémon's <code>spawn_pool_world</code> JSON.
# Rename the file to anything you want. The name must be different than the original.
# Rename the file to anything you want. The name must be different than the original.
#* Example: <code>regional_bulbasaur</code>
#* Example: <code>regional_bulbasaur</code>
# Open the file and locate all the strings for <code>"id"</code> and <code>"pokemon"</code>
# Open the file and locate all the strings for <code>"id"</code> and <code>"pokemon"</code>
# Edit the Pokémon's name '''and include''' the name of youre species feature after like this example:
# Edit the Pokémon's name '''and include''' the name of your species feature after like this example:
#* You must use a space after the Pokémon name for the <code>"pokemon"</code> string.
#* You must use a space after the Pokémon name for the <code>"pokemon"</code> string.
<syntaxhighlight>
<syntaxhighlight>
Line 132: Line 141:


=== Step 6: Create the resolver file for your regional form ===
=== Step 6: Create the resolver file for your regional form ===
Back in step 2, you should have already made the files for <code>models</code>, <code>textures</code>, <code>animations</code>, and <code>posers</code>. The last thing you need to do is assign them to your regional variant by creating a new <code>resolver</code> file.
Back in step 2, you should have already made the files for <code>models</code>, <code>textures</code>, <code>animations</code>, and <code>posers</code>. The last thing you need to do is assign them to your regional variant by creating a new <code>[[resolver]]</code> file.


# Obtain your target Pokémon's <code>resolver</code> JSON.
# Obtain your target Pokémon's <code>resolver</code> JSON.
Line 143: Line 152:
# Add the name of your species feature to the <code>"aspects"</code> string
# Add the name of your species feature to the <code>"aspects"</code> string
#* Example: <code>"aspects": ["alolan"]</code>
#* Example: <code>"aspects": ["alolan"]</code>
#* This allows any pokemon that spawned with this feature/aspect to use any following model, textures, or poser.
#* This allows any Pokémon that spawned with this feature/aspect to use any following model, textures, or poser.
# Assign any <code>poser</code>, <code>model</code>, or <code>textures</code> that you made in Step 2.
# Assign any <code>poser</code>, <code>model</code>, or <code>textures</code> that you made in Step 2.
# Save the file
# Save the file
Line 162: Line 171:


You should now have a functional regional variant!
You should now have a functional regional variant!
{{Addon Creation}}

Latest revision as of 22:40, 6 June 2024

Preface

This tutorial will teach you how to create a regional form for an existing Pokémon. Regional forms are a species variant that can have different looks, types, abilities, moves, and spawn locations! Knowledge of creating custom Pokémon is required. Creating a unique model and textures for your form is highly recommended, but not always necessary.

Due to regional forms usually requiring files for both data and assets, this type of pack will just be called an addon for simplicity. Addons that use data and asset folders will end up needing to have a copy in both the datapacks and resourcepacks game folders. The data and assets can be separated if desired, but are usually bundled together to make sharing easier!

Step 1: Arrange the folders for this addon

Due to some files sharing the same names later in this guide, you will be creating the folder structure and pack.mcmeta now. This is to prevent confusion going forward.

  1. Create a new text file and name it pack.mcmeta
    • Ensure that it doesn't end in other file extensions like .txt
  2. Open the file and insert the following data:
    • Hover over the underlined text to see more information.
{
 "pack": {
   "pack_format": 15,
   "description": "Example description"
 }
}
  1. Save the file and put it aside for now.
  2. Create a series of folders arranged like the following example:

Folder Structure

  • (addon name)
    • pack.mcmeta
    • assets
      • cobblemon
        • bedrock
          • pokemon
            • animations
              • <target pokemon folder>
            • models
              • <target pokemon folder>
            • posers
            • resolvers
              • <target pokemon folder>
        • textures
          • pokemon
            • <target pokemon folder>
    • data
      • cobblemon
        • spawn_pool_world
        • species_additions
        • species_features


  1. Place the pack.mcmeta file into the first folder of your addon next to assets and data

After this folder tree for your addon is made, you can simply drop the files into the associated folders as you create them. Remember that the pack.mcmeta is a file, not a folder to add. It must be one folder deep in order for Minecraft to recognize this pack as a resource pack or data pack when in the appropriate game folders.

Step 2: Create the assets for your regional variant

How you want your regional variant to look depends entirely on you. You can make it use a new texture over the original model. Most of the time, a new model, texture, and animations are created for this regional form. If for some reason you don't want it to have a visual difference at all, then you can skip anything regarding assets. Make sure your assets have a unique name so they don't overwrite any original form assets.

Assets for existing Pokémon can be obtained from the Gitlab or the mod's JAR file. This can be helpful if you wanted to make a texture variant, or use the model as a base for the regional form. Just remember that animation files are made for specific models so they may need updating depending on what you make. These assets can be made in Blockbench or any relevant art apps.

  1. Create the regional form's model
  2. Create the regional form's texture
  3. Create the regional form's animations
  4. Export these files and place them into the appropriate folders in your addon pack
  5. Create a poser file for this regional form if new animations were created for the new model. (optional)

As knowledge of creating custom Pokémon is a requirement for this guide, you are expected to know how to make these files. Help can be found on the Cobblemon discord.

Step 3: Create a "species feature"

On the data side of things, the creation of a regional form starts with the species feature. A species feature is what allows a Pokémon to have a different set of stats and visuals applied to their regional forms. You will be creating a short JSON file that will be named after your custom region or idea. The feature can be named whatever you want it to be called.

  1. Create a new text file and name it after your region or idea. Include the extension of.json
    • Example: The alolan species feature is named alolan.json
    • Remember to use lowercase and make sure that the file does not end in any other extension like ".txt"
  2. Insert the following data into this new species feature JSON:
    • Remember to change "custom_feature" to match your file name! It must stay in quotes.
{
  "keys": ["custom_feature"],
  "type": "flag",
  "isAspect": true,
  "default": false
}
  1. Save the file
  2. Place this new species feature file into the species_feature folder of your addon

"isAspect": true means that this new feature is both a feature and aspect! Now that the species feature is made, you can apply it to a Pokémon's form

Step 4: Create a "species addition" file with "form" data

A species_addition file is an efficient way of adding data to existing species files without having to rewrite the main species file. This allows your additions to be more compatible with other addons affecting the same Pokémon. You will be adding your regional form data to a species through this method.

  1. Create a new text file and name it after your Pokémon. Include the extension of .json
    • Example: bulbasaur.json
  2. Insert the following data into this new species_addition JSON:
{
  "target": "cobblemon:example",
  "features": ["custom_feature"],
  "forms": [
    {
      example form data
    }
  ]
}
  1. Change "cobblemon:example" to reference the Pokémon you want to add a form to. It must remain in quotes.
    • Example: "cobblemon:bulbasaur"
  2. Change "custom_feature" to the feature you made earlier. It must remain in quotes.
  3. Write all the data for your form inside of the curly brackets
    • The average form data set is too long to list as an example for this guide. It's like writing data for an entirely different Pokémon, which is kind of what a regional variant is like.
    • If you need an example, you can look at the "forms" data for Vulpix on the Gitlab. It starts on line 29 and ends on line 240.
    • Remember to include evolution data if this regional variant can evolve.
  4. Write your species feature name into the "aspects" section of your "forms" data.
    • Include the line for aspects if it doesn't exist yet. It should look like this:
  "aspects": ["custom_feature"]
  1. Save the file.
  2. Place this new species addition file into the species_additions folder of your addon.

Now your target Pokémon's new form should have the data that allows it to function differently in battles. Next you will create the data that allows it to spawn differently.

Step 5: Create the spawns for your regional form

The spawn_pool_world folder holds all the spawning files for each Pokémon. You will be creating a new file for your regional variant. It can be as simple or complicated as you make it. It is recommended that you use the normal form's spawn file as a base for your regional form. Those spawn files can be found on the Gitlab.

To keep things simple, this part of the guide will show you how to recycle a spawn file by changing the Pokémon name and biome conditions.

  1. Obtain your target Pokémon's spawn_pool_world JSON.
  2. Rename the file to anything you want. The name must be different than the original.
    • Example: regional_bulbasaur
  3. Open the file and locate all the strings for "id" and "pokemon"
  4. Edit the Pokémon's name and include the name of your species feature after like this example:
    • You must use a space after the Pokémon name for the "pokemon" string.
            "id": "bulbasaur-alolan-1",
            "pokemon": "bulbasaur alolan",
  1. Locate all the strings for "biomes" if they exist
  2. Change the listed biome(s) to something different!
    • This will allow the regional variant to spawn in biomes the normal variant does not.
    • The list of biome tags can be found here.
  3. Save the file
  4. Place this new spawn file in the spawn_pool_world folder of your addon

This should be the last of the data folder files. By now, your regional variant can stand on its own data-wise. It should have different stats, and spawns. Now it just needs a different look.

Step 6: Create the resolver file for your regional form

Back in step 2, you should have already made the files for models, textures, animations, and posers. The last thing you need to do is assign them to your regional variant by creating a new resolver file.

  1. Obtain your target Pokémon's resolver JSON.
  2. Change the name of this resolver to 1_<pokemon>_base
    • You change the number from 0 to 1 so it can load after the normal variant's data
    • Sometimes a number greater than 1 is needed, especially if your target Pokémon has gender variants.
  3. Open the resolver file and locate the string for "order".
  4. Change the value of "order" from 0 to 1.
    • Again, sometimes this value needs to be greater than 1.
  5. Add the name of your species feature to the "aspects" string
    • Example: "aspects": ["alolan"]
    • This allows any Pokémon that spawned with this feature/aspect to use any following model, textures, or poser.
  6. Assign any poser, model, or textures that you made in Step 2.
  7. Save the file
  8. Place this new resolver in the resolvers folder of your addon

Step 7: Test your addon in game

Load your addon in game to see if your regional form looks different from the normal one. You can have Blockbench open to edit any relevant asset file in the resourcepacks folder if needed.

  1. Copy your addon folder and place it in the "resourcepacks" and "datapacks" folder in the Minecraft root directory.
  2. Start up Minecraft and click on Options, then Resource Packs. Select your pack to load it.
  3. Load/create a Creative world save that contains your addon in the "datapack" folder.
  4. Once in the world, you can run the command /pokespawn <target pokemon> <species feature>.
  5. Ensure your new regional form is working properly.
  6. Check if your regional form spawns where you assigned it to. You can use /checkspawn <rarity> when in the assigned biome.
    • You can run the command /locate biome <assigned biome> to get coordinates to the assigned biome. You can then click on the coordinates it gave you and be teleported instantly.
  7. Make any desired edits to the asset files and save. Refresh resource packs with F3+T to see the changes you make.
  8. Make any desired edits to the data files and save. You need to quit to main menu, and load the world again if you want to see those changes.
    • The command for /reload does not work with Cobblemon addons unfortunately.

You should now have a functional regional variant!