Animated: Sprite Editor

Section 7.I.4

This plugin completely overhauls various metrics parameters, as well as adding entirely new parameters while also removing the need for old ones. This means that the metrics files used for these sprites are totally unique to this plugin, and won't be compatible with vanilla Essentials.

This also means that these metric files are also not inherently compatible with Essentials' default Sprite Editor found in the debug menu. To address this, this plugin entirely overhauls the code for the Sprite Editor; making it compatible with the new metrics data this plugin adds while also implementing a ton of new quality of life features to make editing sprites far more convenient than before.

In this subsection, I'll go over all of the metric files included by this plugin and how they differ from the base files, and all of the new features and components of the improved Sprite Editor.


PBS Data

Upon installing the plugin for the first time, you must recompile your game. This is not an optional step. This will update all of your relevant PBS files with the necessary data. If you're unaware of how to recompile your game, simply hold down the CTRL key while the game is loading in debug mode and the game window is in focus.

Below, I'll cover all of the metric files included in this plugin, as well as how they differ from Essentials' vanilla metrics files.

Plugin Metrics Files

This plugin adds and/or replaces the following metric files in your game:

  • pokemon_metrics.txt

  • pokemon_metrics_forms.txt

  • pokemon_metrics_female.txt

  • pokemon_metrics_gmax.txt

  • pokemon_metrics_Gen_9_Pack.txt

Unlike the metrics found in vanilla Essentials, these are split up for better organization. The first file is your typical metrics file, and will contain metrics for every species up to Generation 8. The second file however, is specifically used for Pokemon forms. This keeps the main metrics file more orderly and less cluttered.

The third file is used specifically for female sprites used by species that have gender differences between male and females, but don't count as separate forms. For example, male and female Sneasel have different sprites, but aren't different forms. Thus, the metrics for female Sneasel will appear in this file, as it's not a base species found in pokemon_metrics.txt, but also not a form that would be found in pokemon_metrics_forms.txt.

The last two files here are to maintain compatibility with other plugins that add specific species and forms. Specifically, the pokemon_metrics_gmax.txt file is implemented to retain compatibility with the Dynamax plugin, while the pokemon_metrics_Gen_9_Pack.txt file is to retain compatibility with the Generation 9 Pack plugin.

If you don't have the Generation 9 Pack installed in your game, then you should delete the pokemon_metrics_Gen_9_Pack.txt file when installing.

Female-Exclusive Metrics

Overview

In vanilla Essentials, only species or forms of species can have metrics set for their sprites. However, there is a more obscure class of Pokemon that don't neatly fit into either category of "base species" or "forms" in regards to sprites. These are species that have female-specific sprites, but don't have actual female forms.

For example, Meowstic has two forms; a base form which is considered "male", and form 1 which is considered "female." Because each gender uses a different form number, it's easy to set metrics for both the male and female forms of Meowstic.

However, a Pokemon like Unfezant only has a base form. Yet, it has wildly different sprites based on whether it's male or female. These sprites do not count as different "forms", and are instead added by simply adding _female to the end of the sprite's file name.

These female sprites are put in an awkward position where they can't be given their own unique metrics in vanilla Essentials since they will always just use the same metrics as the base male sprite because there is no form number assigned to them. This plugin resolves this issue by allowing you to create metrics data that can be exclusively used by female sprites.


Implementation

Whenever you recompile your game, this plugin will read the sprite files for each species. If it discovers that a species has sprites that includes _female in their filename, that species will be automatically given the "HasGenderedSprites" flag.

Species with this flag can now have separate metrics implemented specifically for the female version of its sprites that will not overlap with the metrics used for its default male sprites.

Actually setting metrics for female sprites is implemented in the same exact way as any other metrics. The only difference is that in addition to inputting a form number, the word female must now also be included in the ID for that metrics entry.

Here's an example of the metrics for both male and female Unfezant:

[UNFEZANT]
BackSprite = -12,29
FrontSprite = 8,5
ShadowSprite = 2,14,4
#-------------------------------
[UNFEZANT,,female]
BackSprite = -15,35
FrontSprite = 11,5
ShadowSprite = 2,5,4

As you can see, the second entry includes two additional elements in the array to form its ID besides just the species ID. The second element is the form for this species' metrics (which is blank in this case, since it's still the base form), and a new third element which can be entered which is simply the word "female." This is what flags this metrics entry to be considered as a separate entry from male Unfezant.

While the "form" element will usually be blank, there are scenarios where you may have a form of a species who itself has gender differences. For example, Sneasel is a unique case where both base Sneasel and Hisuian Sneasel (form 1) have separate gendered sprites for both forms. In these cases, paying attention to the "form" element actually matters.

Metrics for base Sneasel and female Sneasel:

[SNEASEL]
BackSprite = 3,20
FrontSprite = -2,7
ShadowSprite = 0,0,0
#-------------------------------
[SNEASEL,,female]
BackSprite = 6,18
FrontSprite = -3,6
ShadowSprite = 1,0,0

Metrics for Hisuian Sneasel and female Hisuian Sneasel:

[SNEASEL,1]
BackSprite = 2,37
FrontSprite = 4,27
ShadowSprite = 1,-11,-8
AnimationSpeed = 1
#-------------------------------
[SNEASEL,1,female]
BackSprite = 3,16
FrontSprite = -2,8
ShadowSprite = 1,5,0

Note that metrics for female sprites may also be entered via the Sprite Editor in debug mode. So you don't have to worry about how to enter metrics manually in the PBS files if you're confused by any of the above.

Changes to Existing Metric Parameters

Many of the parameters found in the vanilla pokemon_metrics.txt file have been tweaked for compatibility with animated Pokemon sprites.

  • BackSprite This parameter now accepts a third number that corresponds to the level of scaling that should be applied to this sprite. If no third number is entered, it is assumed to be equal to the number entered as BACK_BATTLER_SPRITE_SCALE in the plugin Settings.

  • FrontSprite This parameter now accepts a third number that corresponds to the level of scaling that should be applied to this sprite. If no third number is entered, it is assumed to be equal to the number entered as FRONT_BATTLER_SPRITE_SCALE in the plugin Settings.

  • ShadowX This parameter is no longer used, and serves no purpose. Nothing bad will happen if you manually enter a value for this parameter in the metrics PBS files, but it won't do anything and will not be saved upon compiling or rewriting PBS files.

  • ShadowSize This parameter is now optional, and will not cause any issues if omitted from a species' metrics data. This can now be set to any number ranging from -9 to 9 to control the scaling applied to the species' shadow sprites. If set to 0, this species will have no visible shadow.

Newly-Added Metric Parameters

Several new parameters have been added to be used by the various metrics PBS files for compatibility with animated Pokemon sprites.

  • ShadowPosition This is a new required parameter that sets the positioning of a species' shadow sprites in battle. This is set as an array of three numbers. The first number corresponds to the X-axis coordinates of the shadow sprite, while the next two numbers correspond to the Y-axis coordinates of the back and front shadow sprites, respectively.

  • AnimationSpeed This is a new optional parameter that sets the animation speed for a species' sprites. This is set either as a single number to set the animation speed for both the front and back sprites to the same value, or as an array of two numbers to set the animation speed separately for the back and front sprite, respectively. The numbers entered may range from 0-4. If this parameter is omitted, the animation speed for both sprites is assumed to be set at the default value of 2.

  • SuperShinyHue This is a new optional parameter that sets the hue for the species' Super Shiny sprites. This is set as a number that can range from -255 to 255. If this parameter is omitted, the Super Shiny hue selected for each species and form will be completely randomized. This randomized hue will be re-randomized each time you compile the game.


Sprite Editor

If you're unaware, accessing the Sprite Editor can be done by opening the debug menu and navigating to "PBS file editors..." From here, select "Edit pokemon_metrics.txt" to open the Sprite Editor.

Once open, you'll have a list of all available species to you in alphabetical order to scroll through. Each species you highlight will display its sprites on screen to indicate how they will appear during battle. If you select a species, a list of options will appear which will allow you to customize the battle metrics for this species to tweak how they should be displayed to your liking.

However, there's a variety of noteworthy changes to the Sprite Editor implemented by this plugin that I will outline below.

Search Navigation

In the default Sprite Editor, the only way to navigate the species list is by pressing or holding the Up/Down arrow keys, or by pressing the JUMPUP (A) or JUMPDOWN (S) keys to scroll through entire pages at once.

However, because there may be as many as 1,500+ species and forms to scroll through, this method of navigating the menu can be extremely tedious and time consuming. Especially if you only need to edit a specific species.

To address this, this plugin implements a new feature that allows you to manually type in a species to search for. By pressing the ACTION (Z) key while the species menu is open, a window will pop up on screen that will allow you to manually type text into. If you enter the name of the desired species you're looking for in this search bar, your cursor will automatically jump to the first species in the list that matches the name you entered. Note that capitalization is irrelevant, so typing in all lowercase is fine.

However, you don't necessarily need to type the entire name of a species. Any text you enter here will search the entire species list for the first species that is even a partial match to what you typed, and move your cursor to that species.

For example, if you only typed in the letters "chu" into the search bar, the menu cursor will find the first species in the list that contains "chu" in its name, which in this case would be Pichu. If you typed in only the letters "pi", then the menu cursor will jump to the first species in the list that contains "pi" in its name, which would be Caterpie.

You can use this shorthand to quickly search for specific species without having to type out the entire name every time. For example, just typing the ":" symbol in the search bar will always jump straight to Type:Null, since that's the only species in the entire list that has the ":" symbol in its name.

Species Icons

The first immediate change you may notice is that the menu icon of the species you're currently viewing will now be displayed in the upper left corner of the screen. This doesn't provide any functional use, but it's displayed here more as a matter of convenience so that you may view all sprites related to a species in once place.

This can prove useful in situations where you're adding a ton of new sprites to your game for custom species, as you'll be able to more easily catch if you accidentally overlooked adding an appropriate menu icon for that new species, or if you named one of the sprites incorrectly.

Female Sprites

Typically, the Sprite Editor will only display unique species or forms of species in the list of all possible sprites to view. However, this doesn't take into account species that have unique female-specific sprites that aren't tied to a form.

For example, Indeedee has unique forms based on its gender, so the Sprite Editor will list Indeedee and Indeedee (form 1) as separate entries, as form 1 is its female form. However, a species like Pyroar has very different looking male and female sprites, but the female version isn't considered a unique form. Hence, it will not appear in the Sprite Editor.

This makes it impossible to set separate metrics for female sprites on species that have different sprites based on gender which aren't tied to unique forms. However, this plugin overhauls the metrics system so that this is now possible.

When scrolling through the species list in the Sprite Editor, you will now see species entries with a (F) next to their name. Any entry that has this are female-exclusive sprites for that species. You may edit the metrics for these sprites, and they will be saved as separate entries from their default male sprites. You can use this to implement wildly different sprites for different genders of the same species, complete with their own metrics.

Shiny Sprite Toggling

While viewing the species list or selecting a menu option for a species, you may now press the SPECIAL (D) key to toggle between the normal, shiny, or super shiny sprites for that species. While viewing the shiny or super shiny variants, a menu box will appear on the lower left half of the screen indicating which variants you're looking at.

While a shiny variant is toggled, all sprites displayed for all species will display that variant instead of their normal sprites. This includes the menu icon sprites in the top left corner of the screen.

You can use this feature to check out how the shiny variants of each species will appear in-game, as well as viewing the type of hues the super shiny variants of a species will have.

Improved Metrics: Ally & Enemy

Typically, when selecting the "Set Ally Position" or "Set Enemy Position" options, you are given the ability to set the X and Y axis coordinates for each respective sprite. This is indicated by a window in the top left corner of the screen that lists the values of these two coordinates. The X axis value may be edited with the Left/Right arrow keys, while Y axis value may be edited with the Up/Down arrow keys.

However, you will notice that this plugin now introduces a third number listed after the X and Y values. This third number relates to the scaling being applied to the particular sprite that you're editing.

To decrease the scaling applied to a sprite, you may press the JUMPUP (A) key. This will lower the scaling value, and decrease the overall size of the sprite. To increase the scaling applied to a sprite, you may press the JUMPDOWN (S) key. This will raise the scaling value, and increase the overall size of the sprite. The maximum scaling that can be applied to a sprite is 10, and the minimum scaling possible is 1.

You may use this feature to customize the scaling applied to an individual sprite, rather than relying on the FRONT_BATTLER_SPRITE_SCALE or BACK_BATTLER_SPRITE_SCALE plugin settings that affect all sprites globally.

Improved Metrics: Shadow Position

In vanilla Essentials, this option was only used to set the X axis coordinates of the Front sprite's shadow. However, because shadows are implemented entirely differently by this plugin and no longer use generic dark circles, this option is now much more robust than before.

In the top left corner of the screen, a window will now display three different coordinate values related to shadow positions.

The first value corresponds to the X-axis coordinates of the shadow sprites, and can be adjusted with the Left/Right arrow keys. Note that this value applies to both the shadow cast by the Front and Back sprites simultaneously. The way this works is that whatever X value is set for the Front sprite is simply inverted for the Back sprite. For example, if you set the X value for the Front sprite's shadow to 5, then the value for the Back sprite's shadow will automatically be set to -5. This causes both sprites to be perfectly mirrored, so there is really no reason to have a separate X value to manually set for the Back sprite shadow.

The second value corresponds to the Y-axis coordinate of the shadow cast by the Back sprite, and can be adjusted with the JUMPUP (A) and JUMPDOWN (S) keys. Note that the Back sprite shadow will be entirely hidden during battle by default, and will likely be completely obscured by the default battle UI even if you enabled visibility. So whatever value set here will very rarely matter. But it's available to set if you wish.

The third and final value corresponds to the Y-axis coordinate of the shadow cast by the Front sprite, and can be adjusted with the Up/Down arrow keys. This is typically the value that actually matters most in terms of visibility and having the shadows display correctly.


Shadow Size

In vanilla Essentials, there is a second menu option called "Set Shadow Size" that allows you to set which generic shadow circle should appear beneath the Front sprite out of 3 possible size options. Because shadows are now cast dynamically and no longer used these generic shadow options, there is no longer a use for this setting.

However, there still may be rare scenarios where you may want to increase or decrease the scaling applied to the shadow cast by a Pokemon. If you would like to do so, you can press the ACTION (Z) key while editing the Shadow Position of a sprite to toggle to setting the Shadow Size.

While in this mode, you may use the Up/Down keys to increase or decrease the amount of scaling applied to the shadow sprites of a species. By default, all species use a sprite scaling of 1, but this can be changed to be as high as 9, or as low as -9.

Note that if you set the Sprite Size of the shadow sprites to 0, this will count as having no shadow, and the shadow sprites for this species will be completely hidden in battle.

New Metrics: Animation Speed

A brand new option in the menu list is added by this plugin called "Set Animation Speed." This will allow you to adjust the speed at which a species' sprites will animate when viewed.

When selected, a new window will be displayed with a new list of options to choose from. These options include the following:

  • Still

  • Fast

  • Normal

  • Slow

  • Slowest

When you navigate through this list, both of the displayed sprites will update to show you what they would look like when animating at the highlighted speed. When you select one of these options, you will be open yet another new menu of options that contains the choices of "Both", "Ally", and "Enemy".

When "Both" is selected, the selected animation speed will be applied to both the Front and Back sprites of this species. When "Ally" is selected, the selected animation speed will only be applied to the Back sprite. And lastly, if "Enemy" is selected, the selected animation speed will only be applied to the Front sprite.

During this process, there will be a window displayed in the bottom left portion of the screen that will display the set speeds for both sprites, so you will always have an indication of which speed has been set to each sprite.

New Metrics: Super Shiny Hue

A brand new option in the menu list is added by this plugin called "Set Super Shiny Hue." This will allow you to adjust and set the specific hue which is applied to the sprites of super shiny Pokemon of the viewed species or form.

When selected, a window will appear in the top left corner of the screen displaying the current Super Shiny Hue of the species, and the sprites displayed will automatically toggle to their super shiny variants.

You can press or hold the Up/Down arrow keys to increase or decrease the value of this species' Super Shiny Hue by 1. Or, you may press or hold the Left/Right arrow keys to increase or decrease this value by increments of 10 instead.

The value of a hue cannot exceed 255, and cannot be lower than -255, so the values will cap at those extremes. Once you've settled on a hue value you like, you can just confirm the selection to set it.

Last updated