Join our discord
In partnership with NodeCraft Logo NodeCraft


You are not logged in! Create an account or login to contribute! Log in here!

Difference between revisions of "Custom textures"

From Pixelmon Wiki
m
m (Text replacement - "https://minecraft.gamepedia.com" to "https://minecraft.wiki")
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The Custom Textures feature is for mapmakers and server admins who want to add custom textures to Pokémon or [[Statues]] via resource packs in a similar way that Pixelmon adds [[Special textures]].
+
'''The method for adding Custom Textures has changed in Pixelmon 9.x.x / 1.16.5. Please be aware the instructions on this page may be outdated. See [[Datapack Creation]] for a more updated guide.'''
  
 +
The Custom Textures feature is for mapmakers and server admins who want to add custom textures to Pokémon or [[Statues]] via resource packs in a similar way that Pixelmon adds [[Special textures]]. Check out [https://minecraft.wiki/Tutorials/Creating_a_resource_pack this page] on how to create a resource pack to get started.
  
To use this feature you will need to be capable of editing nbt data using an nbt editor, or a [[sidemod]], or using the command <code>entitydata</code>.
+
Custom textures are loaded from <code>assets/pixelmon/textures/pokemon/custom-%value%/</code> Where <code>%value%</code> is a string value loaded from the nbt tag "CustomTexture" of a Pokémon or a Statue. These folders are to be made in your resource pack.  
  
Custom textures are loaded from <code>assets/pixelmon/textures/pokemon/custom-%value%/</code> Where <code>%value%</code> is a string value loaded from the nbt tag "CustomTexture" of a Pokémon or a Statue.
+
The "CustomTexture" nbt tag's value must be lowercase, but can otherwise be anything you like. For example, if you have a [[Ivysaur]] with the CustomTexture nbt tag value of "shadow" then the full texture path will be <code>assets/pixelmon/textures/pokemon/custom-shadow/ivysaur.png</code>. Or if you have a [[shiny]] [[Tyranitar]] with the CustomTexture tag value of "ghost" then the full path of the texture would be <code>assets/pixelmon/textures/pokemon/custom-ghost/shinytyranitar.png</code>.
 +
 
 +
Once your textures are loaded and the resource pack is enabled, to use this feature, you can use the [[Pokémon spec]] <code>customtexture</code> to give/spawn a Pokémon with the texture, use an NBTEditor, a [[sidemod]] or the <code>/entitydata</code> command.
 +
 
 +
For example, to use the [[Pokémon spec]] <code>customtexture</code>, you would do <code>/pokespawn Zapdos customtexture:galaxy</code>. This command would spawn a Zapdos with the custom texture <code>galaxy</code>.
 +
 
 +
Another example would be <code>/entitydata @e[type=pixelmon:pixelmon,name=Ivysaur] {CustomTexture:"shadow"}</code>. This command will change every Ivysaur out of its [[Poké Balls|Poké Ball]] to the custom texture "<code>shadow</code>", placed in the example above.
  
The "CustomTexture" nbt tag's value must be lowercase, but can otherwise be anything you like. For example, if you have a [[Ivysaur]] with the CustomTexture nbt tag value of "shadow" then the full texture path will be <code>assets/pixelmon/textures/pokemon/custom-shadow/ivysaur.png</code>. Or if you have a [[shiny]] [[Tyranitar]] with the CustomTexture tag value of "ghost" then the full path of the texture would be <code>assets/pixelmon/textures/pokemon/custom-ghost/shinytyranitar.png</code>.
+
=== Loading a Custom Texture with NBTEdit ===
 +
{|class="mw-collapsible mw-collapsed wikitable"
 +
|-
 +
! Step
 +
! class="unsortable" | Example
 +
|-
 +
|style="text-align:center"|Create your custom textures and load them into a resource pack as specified above.
 +
Download [https://github.com/Jay113355/NBTEdit/releases/tag/1.12_v2.0.2 NBTEdit] and put it in your mods folder.
 +
| [[File:NBTTutorial1.png|500px|none]]
 +
|-
 +
|style="text-align:center"|Create the Pokémon or Statue you want to apply the custom texture to.
 +
| [[File:NBTTutorial2.png|500px|none]]
 +
|-
 +
|style="text-align:center"|While looking at the Pokémon/Statue you want to apply the texture to, type in the chat the command <code>/nbtedit</code>. A GUI will pop up.
 +
| [[File:NBTTutorial3.png|500px|none]]
 +
|-
 +
|style="text-align:center"|Select <code>ROOT</code> then select the icon in the top left labelled <code>String</code>.
 +
| [[File:NBTTutorial4.png|500px|none]]
 +
|-
 +
|style="text-align:center"|Click the icon in the top left labelled <code>Edit</code>. In the box that says <code>Name</code> input <code>CustomTexture</code>. In the box that says <code>Value</code> input the name that you put after <code>custom-</code> for the folder your custom texture is in.
 +
| [[File:NBTTutorial5.png|500px|none]]
 +
|-
 +
|style="text-align:center"|Select <code>Save</code> and then <code>Save</code> in the bottom left. You will now have your custom texture applied to that Pokémon/Statue.
 +
| [[File:NBTTutorial6.png|500px|none]]
 +
|}
 +
 
 +
=== Adding in Natural Custom Texture spawns ===
 +
 
 +
It is possible to make Pokémon with custom textures naturally spawn without overriding their default spawns via [[External JSON files]]. Once the external spawning files are enabled, navigate to the <code>pixelmon/spawning/default/standard</code> folder. Here, you will want to edit the desired Pokémon's spawning file with a text editor.
 +
 
 +
Adding in an additional spawning set is simple, as you will be basically cloning the first spawning set and adding an extra spec.
 +
An example has been made for creating a new spawning set for a Galaxy-Textured [[Bulbasaur]].
 +
 
 +
<spoiler text="Show">
 +
<div onload="prettyPrint()">
 +
<pre class="prettyprint">
 +
{
 +
  "id": "Bulbasaur",
 +
  "spawnInfos": [
 +
    {
 +
      "spec": {
 +
        "name": "Bulbasaur"
 +
      },
 +
      "stringLocationTypes": [
 +
        "Land"
 +
      ],
 +
      "minLevel": 10,
 +
      "maxLevel": 16,
 +
      "typeID": "pokemon",
 +
      "condition": {
 +
        "times": [
 +
          "MORNING"
 +
        ],
 +
        "stringBiomes": [
 +
          "forests",
 +
          "birches",
 +
          "rw_emperor_ridge"
 +
        ]
 +
      },
 +
      "rarity": 250.0
 +
    },
 +
{
 +
      "spec": "Bulbasaur customtexture:galaxy",
 +
      "stringLocationTypes": [
 +
        "Land"
 +
      ],
 +
      "minLevel": 10,
 +
      "maxLevel": 16,
 +
      "typeID": "pokemon",
 +
      "condition": {
 +
        "times": [
 +
          "MORNING"
 +
        ],
 +
        "stringBiomes": [
 +
          "forests",
 +
          "birches",
 +
          "rw_emperor_ridge"
 +
        ]
 +
      },
 +
      "rarity": 90.0
 +
    }
 +
  ]
 +
}
 +
</pre>
 +
</div>
 +
</spoiler>
 +
As you can see, Bulbasaur's original file has been cloned and added in underneath the original, but with an extra line. Essentially the <code>name</code> field is removed, and the Pokémon's name is incorporated in to the <code>spec</code> line, along with the custom texture [[Pokémon spec]].
 +
 
 +
Below is another example to show the format for adding a natural spawn to a Pokémon that also has a regional form, such as [[Ponyta]].
 +
 
 +
<spoiler text="Show">
 +
<div onload="prettyPrint()">
 +
<pre class="prettyprint">
 +
{
 +
  "id": "Ponyta",
 +
  "spawnInfos": [
 +
    {
 +
      "spec": {
 +
        "name": "Ponyta",
 +
        "form": 0
 +
      },
 +
      "stringLocationTypes": [
 +
        "Land"
 +
      ],
 +
      "minLevel": 10,
 +
      "maxLevel": 40,
 +
      "typeID": "pokemon",
 +
      "condition": {
 +
        "times": [
 +
          "MORNING"
 +
        ],
 +
        "weathers": [
 +
          "CLEAR"
 +
        ],
 +
        "stringBiomes": [
 +
          "plains",
 +
          "savannas"
 +
        ]
 +
      },
 +
      "rarity": 100.0
 +
    },
 +
    {
 +
      "spec": {
 +
        "name": "Ponyta",
 +
        "form": 2
 +
      },
 +
      "stringLocationTypes": [
 +
        "Land"
 +
      ],
 +
      "minLevel": 10,
 +
      "maxLevel": 40,
 +
      "typeID": "pokemon",
 +
      "condition": {
 +
        "times": [
 +
          "NIGHT"
 +
        ],
 +
        "weathers": [
 +
          "CLEAR"
 +
        ],
 +
        "stringBiomes": [
 +
          "flowery",
 +
          "magical"
 +
        ]
 +
      },
 +
      "rarity": 20.0
 +
    },
 +
    {
 +
      "spec": "Ponyta form:0 customtexture:galaxy",
 +
      "stringLocationTypes": [
 +
        "Land"
 +
      ],
 +
      "minLevel": 10,
 +
      "maxLevel": 40,
 +
      "typeID": "pokemon",
 +
      "condition": {
 +
        "times": [
 +
          "DAY"
 +
        ],
 +
        "weathers": [
 +
          "CLEAR"
 +
        ],
 +
        "stringBiomes": [
 +
          "plains",
 +
          "savannas"
 +
        ]
 +
      },
 +
      "rarity": 90.0
 +
}
 +
  ]
 +
}
 +
</pre>
 +
</div>
 +
</spoiler>
  
For example <code>/entitydata @e[type=pixelmon:pixelmon,name=Ivysaur] {CustomTexture:"shadow"}</code>. This command will change every Ivysaur out of its [[Poké Balls|Poké Ball]] to the custom texture "<code>shadow</code>", placed in the example above.
+
In this example, we can see Kanto Ponyta's set has been duplicated and added at the end of the file. This essentially adds a custom textured Kanto Ponyta spawn to the world without overriding Kanto and Galarian Ponyta's spawning. If instead you wish to make a custom textured Galarian Ponyta spawn, simple replace <code>form:0</code> in the <code>spec</code> line with <code>form:2</code>. The sets can be duplicated again to make both a custom textured Kanto and Galarian Ponyta spawn naturally.  
  
 +
'''As with any JSON file editing, always validate your files with a JSON validator, such as [https://jsonlint.com this one].'''
 
== Special note to server owners ==
 
== Special note to server owners ==
  
This feature was added in Pixelmon Reforged 6.2.0 without a fallback implementation. Any players without your custom resource pack loaded will see the black and purple error texture instead of the default textures. This is planned to be fixed for a future version.
+
This feature was added in Pixelmon Mod 6.2.0 without a fallback implementation, though it was later changed to show the base skin instead if anything goes wrong.
  
 
If you have people capable of making or editing textures, please consider volunteering their time or skills to help the Pixelmon mod. The less the core team has to do the more they can work on development of the mod.
 
If you have people capable of making or editing textures, please consider volunteering their time or skills to help the Pixelmon mod. The less the core team has to do the more they can work on development of the mod.

Latest revision as of 22:00, 24 September 2023

The method for adding Custom Textures has changed in Pixelmon 9.x.x / 1.16.5. Please be aware the instructions on this page may be outdated. See Datapack Creation for a more updated guide.

The Custom Textures feature is for mapmakers and server admins who want to add custom textures to Pokémon or Statues via resource packs in a similar way that Pixelmon adds Special textures. Check out this page on how to create a resource pack to get started.

Custom textures are loaded from assets/pixelmon/textures/pokemon/custom-%value%/ Where %value% is a string value loaded from the nbt tag "CustomTexture" of a Pokémon or a Statue. These folders are to be made in your resource pack.

The "CustomTexture" nbt tag's value must be lowercase, but can otherwise be anything you like. For example, if you have a Ivysaur with the CustomTexture nbt tag value of "shadow" then the full texture path will be assets/pixelmon/textures/pokemon/custom-shadow/ivysaur.png. Or if you have a shiny Tyranitar with the CustomTexture tag value of "ghost" then the full path of the texture would be assets/pixelmon/textures/pokemon/custom-ghost/shinytyranitar.png.

Once your textures are loaded and the resource pack is enabled, to use this feature, you can use the Pokémon spec customtexture to give/spawn a Pokémon with the texture, use an NBTEditor, a sidemod or the /entitydata command.

For example, to use the Pokémon spec customtexture, you would do /pokespawn Zapdos customtexture:galaxy. This command would spawn a Zapdos with the custom texture galaxy.

Another example would be /entitydata @e[type=pixelmon:pixelmon,name=Ivysaur] {CustomTexture:"shadow"}. This command will change every Ivysaur out of its Poké Ball to the custom texture "shadow", placed in the example above.

Loading a Custom Texture with NBTEdit

Step Example
Create your custom textures and load them into a resource pack as specified above.

Download NBTEdit and put it in your mods folder.

NBTTutorial1.png
Create the Pokémon or Statue you want to apply the custom texture to.
NBTTutorial2.png
While looking at the Pokémon/Statue you want to apply the texture to, type in the chat the command /nbtedit. A GUI will pop up.
NBTTutorial3.png
Select ROOT then select the icon in the top left labelled String.
NBTTutorial4.png
Click the icon in the top left labelled Edit. In the box that says Name input CustomTexture. In the box that says Value input the name that you put after custom- for the folder your custom texture is in.
NBTTutorial5.png
Select Save and then Save in the bottom left. You will now have your custom texture applied to that Pokémon/Statue.
NBTTutorial6.png

Adding in Natural Custom Texture spawns

It is possible to make Pokémon with custom textures naturally spawn without overriding their default spawns via External JSON files. Once the external spawning files are enabled, navigate to the pixelmon/spawning/default/standard folder. Here, you will want to edit the desired Pokémon's spawning file with a text editor.

Adding in an additional spawning set is simple, as you will be basically cloning the first spawning set and adding an extra spec. An example has been made for creating a new spawning set for a Galaxy-Textured Bulbasaur.

Show

As you can see, Bulbasaur's original file has been cloned and added in underneath the original, but with an extra line. Essentially the name field is removed, and the Pokémon's name is incorporated in to the spec line, along with the custom texture Pokémon spec.

Below is another example to show the format for adding a natural spawn to a Pokémon that also has a regional form, such as Ponyta.

Show


In this example, we can see Kanto Ponyta's set has been duplicated and added at the end of the file. This essentially adds a custom textured Kanto Ponyta spawn to the world without overriding Kanto and Galarian Ponyta's spawning. If instead you wish to make a custom textured Galarian Ponyta spawn, simple replace form:0 in the spec line with form:2. The sets can be duplicated again to make both a custom textured Kanto and Galarian Ponyta spawn naturally.

As with any JSON file editing, always validate your files with a JSON validator, such as this one.

Special note to server owners

This feature was added in Pixelmon Mod 6.2.0 without a fallback implementation, though it was later changed to show the base skin instead if anything goes wrong.

If you have people capable of making or editing textures, please consider volunteering their time or skills to help the Pixelmon mod. The less the core team has to do the more they can work on development of the mod.

© 2012 - 2025 Pixelmon Mod