(Created page with "{{TOC|right}} == Preface == The <code>resolver</code> JSON is responsible for assigning a Pokémon <code>species</code> its <code>model</code>, <code>textures</code>, and <code>poser</code>. It is also responsible for assigning <code>aspects</code> to a pokemon to create variants like regional forms. Just about anything related to visuals is linked to the resolver file in some way. The <code>resolver</code> file was previously known as the...")
 
(Resolved some missing property information)
 
(2 intermediate revisions by 2 users not shown)
Line 14: Line 14:
* Vulpix: Very common format for resolvers
* Vulpix: Very common format for resolvers
  {
  {
   "species": "cobblemon:vulpix",
   "<abbr title="Here you are saying what Pokémon species will get the following assets">species</abbr>": "<abbr title="In this example, Vulpix will get the following assets.">cobblemon:vulpix</abbr>",
   "order": 0,
   "<abbr title="This is the load order of the forms in this file. Since this file contains the default variants for this Pokémon, load order should be 0. Addons may create more forms later, and they will use a higher number. This is what '0_' and '_base' in the file name represent. '0_' represents the load order, and '_base' represents that these are the default forms.">order</abbr>": <abbr title="Because this file is for the base form of Vulpix, we want this value to be 0.">0</abbr>,
   "variations": [
   "<abbr title="Here you will list all of your Pokémon's visual variations. This is how the shiny version uses the same model but with a different texture.">variations</abbr>": [
     {
     {
       "aspects": [],
       "<abbr title="'Aspects' are traits a Pokémon has. In this section, we are determining what the Pokémon will look like if it has no aspects. This can be considered the 'default' assets. If another aspect does not specify a poser, model, or texture, then it will use these default assets.">aspects</abbr>": <abbr title="These brackets are left blank since we are defining the default assets.">[]</abbr>,
       "poser": "cobblemon:vulpix",
       "<abbr title="Here you are telling the Pokémon what poser file to use.">poser</abbr>": "<abbr title="In this example, vulpix's model will use the vulpix poser file to assign animations.">cobblemon:vulpix</abbr>",
       "model": "cobblemon:vulpix.geo",
       "<abbr title="Here you are telling the Pokémon what model file to use.">model</abbr>": "<abbr title="In this example, vulpix will use the vulpix model.">cobblemon:vulpix.geo</abbr>",
       "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix.png",
       "<abbr title="Here you are telling the Pokémon what texture PNG to use.">texture</abbr>": "<abbr title="This points towards the vulpix textures. If your model shows up in game with purple and black textures, then it could not find the PNG that you specified in this line.">cobblemon:textures/pokemon/0037_vulpix/vulpix.png</abbr>",
       "layers": []
       "<abbr title="This can be used to add additional textures on top of the main texture like with emissive textures or Arbok's chest patterns.">layers</abbr>": <abbr title="Since we have no texture layers to add, these brackets are left empty.">[]</abbr>
     },
     },
     {
     {
       "aspects": [
       "<abbr title="In this section, we are determining what the Pokémon will look like if it is 'shiny'.">aspects</abbr>": [
         "shiny"
         "<abbr title="Here you are specifying that any shiny Vulpix will use the following texture. If you don't list a model or poser like this example, then it will use the 'default' ones that you created above.">shiny</abbr>"
       ],
       ],
       "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix_shiny.png"
       "<abbr title="Here you are telling the shiny Pokémon what texture PNG to use. The texture will be applied to the default model in this example.">texture</abbr>": "<abbr title="In this example, it will use 'vulpix_shiny.png' from the '0037_vulpix' folder.">cobblemon:textures/pokemon/0037_vulpix/vulpix_shiny.png</abbr>"
     }
     }
   ]
   ]
Line 37: Line 37:
** The Alolan <code>aspect</code> comes from the alolan [[Species_Features|species feature]].
** The Alolan <code>aspect</code> comes from the alolan [[Species_Features|species feature]].
  {
  {
   "species": "cobblemon:vulpix",
   "<abbr title="Here you are saying what Pokémon species will get the following assets. We are targeting vulpix again to assign its alolan form new assets.">species</abbr>": "<abbr title="In this example, Vulpix will get the following assets assigned to its alolan form.">cobblemon:vulpix</abbr>",
   "order": 1,
   "<abbr title="This is the load order of the forms in this file. Since this file contains the alolan variants for Vulpix, load order should be 1. We want the alolan assets to be loaded after the default assets. This is what '1_' and '_alolan' in the file name represent. '1_' represents the load order, and '_alolan' represents that these are the alolan forms assets.">order</abbr>": <abbr title="Because this file is for the alolan form of Vulpix, we want this value to be 1.">1</abbr>,
   "variations": [
   "<abbr title="Here you will list all of your Pokémon's visual variations.">variations</abbr>": [
     {
     {
       "aspects": [
       "<abbr title="In this section, we are determining what Vulpix will look like if it is 'alolan'.">aspects</abbr>": [
         "alolan"
         "<abbr title="Here you are specifying that normal alolan Vulpix will use the following model and texture. If you don't list a poser like this example, then it will use the 'default' one from the 'base' resolver file.">alolan</abbr>"
       ],
       ],
       "model": "cobblemon:vulpix_alolan.geo",
       "<abbr title="Here you are telling alolan Vulpix what model file to use.">model</abbr>": "<abbr title="In this example, alolan vulpix will use the alolan vulpix model.">cobblemon:vulpix_alolan.geo</abbr>",
       "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix_alolan.png"
       "<abbr title="Here you are telling the alolan vulpix what texture PNG to use. The texture will be applied to the alolan model in this example.">texture</abbr>": "<abbr title="In this example, it will use 'vulpix_alolan.png' from the '0037_vulpix' folder.">cobblemon:textures/pokemon/0037_vulpix/vulpix_alolan.png</abbr>"
     },
     },
     {
     {
       "aspects": [
       "<abbr title="In this section, we are determining what Vulpix will look like if it is 'alolan' and 'shiny'!">aspects</abbr>": [
         "alolan",
         "<abbr title="Here you are specifying that shiny alolan Vulpix will use the following texture. The alolan aspect must be written before the shiny aspect. If you don't list a model like this example, then it will use the 'default' one from the 'alolan' variation that is written above.">alolan</abbr>",
         "shiny"
         "<abbr title="The shiny aspect must always be listed last. This is just the way it works.">shiny</abbr>"
       ],
       ],
       "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix_alolan_shiny.png"
       "<abbr title="Here you are telling the shiny alolan vulpix what texture PNG to use. The texture will be applied to the default alolan model in this example.">texture</abbr>": "<abbr title="In this example, it will use 'vulpix_alolan_shiny.png' from the '0037_vulpix' folder.">cobblemon:textures/pokemon/0037_vulpix/vulpix_alolan_shiny.png</abbr>"
     }
     }
   ]
   ]
Line 59: Line 59:
* Charizard: Charizard uses both animated and emissive textures!
* Charizard: Charizard uses both animated and emissive textures!
  {
  {
   "species": "cobblemon:charizard",
   "<abbr title="Here you are saying what Pokémon species will get the following assets">species</abbr>": "<abbr title="In this example, Charizard will get the following assets.">cobblemon:charizard</abbr>",
   "order": 0,
   "<abbr title="This is the load order of the forms in this file. Since this file contains the default variants for this Pokémon, load order should be 0. Addons may create more forms later, and they will use a higher number. This is what '0_' and '_base' in the file name represent. '0_' represents the load order, and '_base' represents that these are the default forms.">order</abbr>": <abbr title="Because this file is for the base form of Charizard, we want this value to be 0.">0</abbr>,
   "variations": [
   "<abbr title="Here you will list all of your Pokémon's visual variations.">variations</abbr>": [
     {
     {
       "aspects": [],
       "<abbr title="'Aspects' are traits a Pokémon has. In this section, we are determining what the Pokémon will look like if it has no aspects. This can be considered the 'default' assets. If another aspect does not specify a poser, model, or texture, then it will use these default assets.">aspects</abbr>": <abbr title="These brackets are left blank since we are defining the default assets.">[]</abbr>,
       "poser": "cobblemon:charizard",
       "<abbr title="Here you are telling the Pokémon what poser file to use.">poser</abbr>": "<abbr title="In this example, charizard's model will use the charizard poser file to assign animations.">cobblemon:charizard</abbr>",
       "model": "cobblemon:charizard.geo",
       "<abbr title="Here you are telling the Pokémon what model file to use.">model</abbr>": "<abbr title="In this example, charizard will use the charizard model.">cobblemon:charizard.geo</abbr>",
       "texture": "cobblemon:textures/pokemon/0006_charizard/charizard.png",
       "<abbr title="Here you are telling the Pokémon what texture PNG to use.">texture</abbr>": "<abbr title="This points towards the Charizard textures. It will use the 'charizard.png' in the '0006_charizard' folder.">cobblemon:textures/pokemon/0006_charizard/charizard.png</abbr>",
       "layers": [
       "<abbr title="This section will let charizard apply layers of textures over the main texture listed above. You can use this layer system to make animated, emissive, and/or translucent textures!">layers</abbr>": [
         {
         {
           "name": "flame",
           "<abbr title="Here we will create the name of this layer">name</abbr>": "<abbr title="This layer will be called 'flame'. It will be used to create charizard's animated tail flame.">flame</abbr>",
           "texture": {
           "<abbr title="Here you will list the texture(s) to use in this layer. In this example, we are going to list multiple textures as frames for charizard's animated tail texture.">texture</abbr>": {
             "frames": [
             "<abbr title="When you want to create an animated texture layer, you must list all the png files as frames. This is considered frame by frame animation and the frames will play in the order listed below.">frames</abbr>": [
               "cobblemon:textures/pokemon/0006_charizard/flame/tail1.png",
               "<abbr title="This is the first frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail1.png</abbr>",
               "cobblemon:textures/pokemon/0006_charizard/flame/tail2.png",
               "<abbr title="This is the second frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail2.png</abbr>",
               "cobblemon:textures/pokemon/0006_charizard/flame/tail3.png",
               "<abbr title="This is the third frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail3.png</abbr>",
               "cobblemon:textures/pokemon/0006_charizard/flame/tail4.png"
               "<abbr title="This is the fourth frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail4.png</abbr>"
             ],
             ],
             "fps": 10,
             "<abbr title="Here you will set the frames per second of this animation. You can change this value until the animation looks good to you.">fps</abbr>": <abbr title="In this example, the animation will play at 10 frames per second. Since there are only 4 frames, the animation will play 2.5 times per second.">10</abbr>,
             "loop": true
             "<abbr title="Controls whether or not the texture animation will loop">loop</abbr>": <abbr title="This animation will loop. You probably want to set this to true always!">true</abbr>
           },
           },
           "emissive": true
           "<abbr title="Controls whether or not the texture is emissive. Meaning whether or not this texture will glow when its dark.">emissive</abbr>": <abbr title="Since this is an animated flame, it will be set to true so the flame will always appear bright. Just like real fire!">true</abbr>
         },
         },
         {
         {
           "name": "glow",
           "<abbr title="Here we will create the name of this second layer">name</abbr>": "<abbr title="This layer will be called 'glow'. It will be used to create the illusion of light from charizard's flame on its tail.">glow</abbr>",
           "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_emissive.png",
           "<abbr title="Here you will list the texture to use in this layer. In this example, we are going to list a single texture which will add some light around charizard's tail flame">texture</abbr>": "<abbr title="Here we are pointing to charizard's emissive PNG.">cobblemon:textures/pokemon/0006_charizard/charizard_emissive.png</abbr>",
           "emissive": true,
           "<abbr title="Controls whether or not the texture is emissive. Meaning whether or not this texture will glow when its dark.">emissive</abbr>": <abbr title="Since this texture is meant to create the illusion of light, it is set to true.">true</abbr>,
           "translucent": true
           "<abbr title="Controls whether or not the texture is translucent. Meaning you can see through this layer if the texture is not at 100% opacity. The texture listed above is not at full opacity. The opacity gets lower the further away it gets from the flame, creating the illusion of bright lights on the tail.">translucent</abbr>": <abbr title="Since this texture was designed to be translucent, it will be set to true.">true</abbr>
         }
         }
       ]
       ]
     },
     },
     {
     {
       "aspects": [
       "<abbr title="In this section, we are determining what the Pokémon will look like if it is 'shiny'.">aspects</abbr>": [
         "shiny"
         "<abbr title="Here you are specifying that any shiny Charizard will use the following texture. If you don't list a model or poser like this example, then it will use the 'default' ones that you created above.">shiny</abbr>"
       ],
       ],
       "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny.png",
       "<abbr title="Here you are telling the Pokémon what texture PNG to use.">texture</abbr>": "<abbr title="This points towards the Charizard shiny textures. It will use the 'charizard_shiny.png' in the '0006_charizard' folder.">cobblemon:textures/pokemon/0006_charizard/charizard_shiny.png</abbr>",
       "layers": [
       "<abbr title="This section will let Charizard apply layers of textures over the main shiny texture listed above. You need to change the 'glow' layer because the colors wont match if you use the normal textures.">layers</abbr>": [
         {
         {
           "name": "glow",
           "<abbr title="Here we will create the name of this shiny layer">name</abbr>": "<abbr title="This layer will be called 'glow'. It will be used to replace default glow for this shiny variant.">glow</abbr>",
           "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny_emissive.png",
           "<abbr title="Here you will list the texture to use in this layer. In this example, we are going to use a shiny version of an emissive texture.">texture</abbr>": "<abbr title="Here we are pointing to charizard's shiny emissive PNG.">cobblemon:textures/pokemon/0006_charizard/charizard_shiny_emissive.png</abbr>",
           "emissive": true,
           "<abbr title="Controls whether or not the texture is emissive. Meaning whether or not this texture will glow when its dark.">emissive</abbr>": <abbr title="Since this texture is meant to create the illusion of light, it is set to true.">true</abbr>,
           "translucent": true
           "<abbr title="Controls whether or not the texture is translucent. Meaning you can see through this layer if the texture is not at 100% opacity. The texture listed above is not at full opacity. The opacity gets lower the further away it gets from the flame, creating the illusion of bright lights on the tail except its shiny this time.">translucent</abbr>": <abbr title="Since this texture was designed to be translucent for the shiny, it will be set to true.">true</abbr>
         }
         }
       ]
       ]
Line 106: Line 106:
   ]
   ]
  }
  }
</br>
=== Special Layer Properties And When To Use Them ===
Cobblemon's layer system can be used for applying special effects to models through textures. You can use it to apply specially made textures that get layered over the model's main texture while assigning the layer certain properties. Only layers can have these special properties, so keep that in mind when creating textures.
==== Emissive ====
The <code>emissive</code> property allows the assigned texture to become emissive. [[Tutorials/Emissive_Textures|Emissive textures]] are unaffected by light levels and give off the illusion of glowing in the dark. These textures are enhanced when combined with shaders and the species property for dynamic lighting.
</br>Some basic examples of emissives are:
* Glowing eyes like on Hoothoot or Patrat
* Light emitting body parts like on the Mareep line or Volbeat
* Flames of the many different fire types
</br>The emissive property can also be combined with the other two properties for enhanced lighting effects. The most common example of emissives are the flames on fire type Pokémon. These layers are often combining the emissive property with the properties associated with [[Tutorials/Animated_Textures|animated textures]]. This property combination is not limited to making fire, so try and get creative.
</br>Below is an example of Charizard's "glow" texture layer with the emissive property applied.
      {
        "name": "glow",
        "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny_emissive.png",
        "emissive": true,
        "translucent": true
      }
<br>
==== Translucent ====
The <code>translucent</code> property allows the assigned texture to become translucent based on the opacity value of each pixel. The closer this value is to 0, the more translucent it becomes.  This property is mainly used to enhance the emissive layer by adding translucent pixels expanding away from the emissive layer's pixels. This creates the effect of light getting dimmer the further you get from a Pokemon's light source.
Translucency has visual bugs when combined with water in game. This has led to it rarely being used to create translucent body parts. While there are some creative solutions to get around these visual bugs, it is simpler to use inverted cubes instead.
Due to the previously mentioned visual bug, there aren't many examples of translucent layers. Some of the few examples of translucency are:
* Secondary emissive textures like those found on Charizard or Umbreon.
</br>Below is an example of Charizard's "glow" texture layer with the translucent property applied.
      {
        "name": "glow",
        "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny_emissive.png",
        "emissive": true,
        "translucent": true
      }
<br>
==== Frames, FPS, and Loop ====
The <code>frames</code>, <code>fps</code>, and <code>loop</code> properties are required in order to create [[Tutorials/Animated_Textures|animated textures]]. Cobblemon's animated textures use frame-by-frame animation, so you will want to use all three of these together.
* <code>frames</code> is where you will list each frame of the animation. You need to create an array of textures to use.
* <code>fps</code> is where you will assign how many frames will player per second. Requires a number value.
* <code>loop</code> is where you will define if the animation will loop or not. Boolean. There's probably no reason you'd want this set to false.
</br>These three properties can be combined with both <code>emissive</code> and <code>translucent</code> to create animated light effects on Pokémon. The most common example of animated textures are the flames on fire Pokémon. Currently, the only other example of animated textures are Elgyem's and Beheeyem's color changing fingers.
Below is an example of Charizard's animated flame texture layer. You can hover over the underlined text to see more details.
        {
          "<abbr title="Here we will create the name of this layer">name</abbr>": "<abbr title="This layer will be called 'flame'. It will be used to create charizard's animated tail flame.">flame</abbr>",
          "<abbr title="Here you will list the texture(s) to use in this layer. In this example, we are going to list multiple textures as frames for charizard's animated tail texture.">texture</abbr>": {
            "<abbr title="When you want to create an animated texture layer, you must list all the png files as frames. This is considered frame by frame animation and the frames will play in the order listed below.">frames</abbr>": [
              "<abbr title="This is the first frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail1.png</abbr>",
              "<abbr title="This is the second frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail2.png</abbr>",
              "<abbr title="This is the third frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail3.png</abbr>",
              "<abbr title="This is the fourth frame of the animation and its folder location. ">cobblemon:textures/pokemon/0006_charizard/flame/tail4.png</abbr>"
            ],
            "<abbr title="Here you will set the frames per second of this animation. You can change this value until the animation looks good to you.">fps</abbr>": <abbr title="In this example, the animation will play at 10 frames per second. Since there are only 4 frames, the animation will play 2.5 times per second.">10</abbr>,
            "<abbr title="Controls whether or not the texture animation will loop">loop</abbr>": <abbr title="This animation will loop. You probably want to set this to true always!">true</abbr>
          },
          "<abbr title="Controls whether or not the texture is emissive. Meaning whether or not this texture will glow when its dark.">emissive</abbr>": <abbr title="Since this is an animated flame, it will be set to true so the flame will always appear bright. Just like real fire!">true</abbr>
        }
</br>
</br>
=== Resolver File Examples ===
=== Resolver File Examples ===
Line 119: Line 180:
* Animated Textures - [https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/resources/assets/cobblemon/bedrock/pokemon/resolvers/0500_emboar/0_emboar_base.json Emboar]
* Animated Textures - [https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/resources/assets/cobblemon/bedrock/pokemon/resolvers/0500_emboar/0_emboar_base.json Emboar]
* Emissive Textures - [https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/resources/assets/cobblemon/bedrock/pokemon/resolvers/0197_umbreon/0_umbreon_base.json Umbreon]
* Emissive Textures - [https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/resources/assets/cobblemon/bedrock/pokemon/resolvers/0197_umbreon/0_umbreon_base.json Umbreon]
{{Addon Creation}}

Latest revision as of 12:57, 3 March 2024

Preface

The resolver JSON is responsible for assigning a Pokémon species its model, textures, and poser. It is also responsible for assigning aspects to a pokemon to create variants like regional forms. Just about anything related to visuals is linked to the resolver file in some way.

The resolver file was previously known as the asset species file or similar. This was changed to prevent confusion between this file and the species files in the data folder. Because of this, many addons created before Cobblemon version 1.4 are using the species folder to hold resolver files.

Resolver File Breakdown

The resolver controls just about everything regarding a Pokémon's assets. Besides the model, animations, and form assets, it is also where you apply the data for animated and emissive textures!

While you can keep all of a Pokémon's resolver data inside of one file, separating resolver data for different forms or variants can help keep things organized. It will also prevent potential conflicts if another addon creator wants to modify something you have made.

Here is a breakdown of three different types of resolver file.

  • Vulpix: Very common format for resolvers
{
 "species": "cobblemon:vulpix",
 "order": 0,
 "variations": [
   {
     "aspects": [],
     "poser": "cobblemon:vulpix",
     "model": "cobblemon:vulpix.geo",
     "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix.png",
     "layers": []
   },
   {
     "aspects": [
       "shiny"
     ],
     "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix_shiny.png"
   }
 ]
}


  • Alolan Vulpix: A second resolver for vulpix to assign its regional form assets
    • Due to its naming scheme, the alolan vulpix resolver loads after the previous vulpix resolver.
    • The Alolan aspect comes from the alolan species feature.
{
 "species": "cobblemon:vulpix",
 "order": 1,
 "variations": [
   {
     "aspects": [
       "alolan"
     ],
     "model": "cobblemon:vulpix_alolan.geo",
     "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix_alolan.png"
   },
   {
     "aspects": [
       "alolan",
       "shiny"
     ],
     "texture": "cobblemon:textures/pokemon/0037_vulpix/vulpix_alolan_shiny.png"
   }
 ]
}


  • Charizard: Charizard uses both animated and emissive textures!
{
 "species": "cobblemon:charizard",
 "order": 0,
 "variations": [
   {
     "aspects": [],
     "poser": "cobblemon:charizard",
     "model": "cobblemon:charizard.geo",
     "texture": "cobblemon:textures/pokemon/0006_charizard/charizard.png",
     "layers": [
       {
         "name": "flame",
         "texture": {
           "frames": [
             "cobblemon:textures/pokemon/0006_charizard/flame/tail1.png",
             "cobblemon:textures/pokemon/0006_charizard/flame/tail2.png",
             "cobblemon:textures/pokemon/0006_charizard/flame/tail3.png",
             "cobblemon:textures/pokemon/0006_charizard/flame/tail4.png"
           ],
           "fps": 10,
           "loop": true
         },
         "emissive": true
       },
       {
         "name": "glow",
         "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_emissive.png",
         "emissive": true,
         "translucent": true
       }
     ]
   },
   {
     "aspects": [
       "shiny"
     ],
     "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny.png",
     "layers": [
       {
         "name": "glow",
         "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny_emissive.png",
         "emissive": true,
         "translucent": true
       }
     ]
   }
 ]
}


Special Layer Properties And When To Use Them

Cobblemon's layer system can be used for applying special effects to models through textures. You can use it to apply specially made textures that get layered over the model's main texture while assigning the layer certain properties. Only layers can have these special properties, so keep that in mind when creating textures.

Emissive

The emissive property allows the assigned texture to become emissive. Emissive textures are unaffected by light levels and give off the illusion of glowing in the dark. These textures are enhanced when combined with shaders and the species property for dynamic lighting.


Some basic examples of emissives are:

  • Glowing eyes like on Hoothoot or Patrat
  • Light emitting body parts like on the Mareep line or Volbeat
  • Flames of the many different fire types


The emissive property can also be combined with the other two properties for enhanced lighting effects. The most common example of emissives are the flames on fire type Pokémon. These layers are often combining the emissive property with the properties associated with animated textures. This property combination is not limited to making fire, so try and get creative.


Below is an example of Charizard's "glow" texture layer with the emissive property applied.

      {
        "name": "glow",
        "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny_emissive.png",
        "emissive": true,
        "translucent": true
      }


Translucent

The translucent property allows the assigned texture to become translucent based on the opacity value of each pixel. The closer this value is to 0, the more translucent it becomes. This property is mainly used to enhance the emissive layer by adding translucent pixels expanding away from the emissive layer's pixels. This creates the effect of light getting dimmer the further you get from a Pokemon's light source.

Translucency has visual bugs when combined with water in game. This has led to it rarely being used to create translucent body parts. While there are some creative solutions to get around these visual bugs, it is simpler to use inverted cubes instead.

Due to the previously mentioned visual bug, there aren't many examples of translucent layers. Some of the few examples of translucency are:

  • Secondary emissive textures like those found on Charizard or Umbreon.


Below is an example of Charizard's "glow" texture layer with the translucent property applied.

      {
        "name": "glow",
        "texture": "cobblemon:textures/pokemon/0006_charizard/charizard_shiny_emissive.png",
        "emissive": true,
        "translucent": true
      }


Frames, FPS, and Loop

The frames, fps, and loop properties are required in order to create animated textures. Cobblemon's animated textures use frame-by-frame animation, so you will want to use all three of these together.

  • frames is where you will list each frame of the animation. You need to create an array of textures to use.
  • fps is where you will assign how many frames will player per second. Requires a number value.
  • loop is where you will define if the animation will loop or not. Boolean. There's probably no reason you'd want this set to false.


These three properties can be combined with both emissive and translucent to create animated light effects on Pokémon. The most common example of animated textures are the flames on fire Pokémon. Currently, the only other example of animated textures are Elgyem's and Beheeyem's color changing fingers.

Below is an example of Charizard's animated flame texture layer. You can hover over the underlined text to see more details.

       {
         "name": "flame",
         "texture": {
           "frames": [
             "cobblemon:textures/pokemon/0006_charizard/flame/tail1.png",
             "cobblemon:textures/pokemon/0006_charizard/flame/tail2.png",
             "cobblemon:textures/pokemon/0006_charizard/flame/tail3.png",
             "cobblemon:textures/pokemon/0006_charizard/flame/tail4.png"
           ],
           "fps": 10,
           "loop": true
         },
         "emissive": true
       }


Resolver File Examples

When creating your own resolvers, it would be easiest to use resolvers similar to what you need as a template.

Here are some examples from the Gitlab you can reference. You may also want to reference the models of each example in game so you can see the effects that their resolver file create.