Basic Tutorial 01: Pokemon Editing - haven1433/HexManiacAdvance GitHub Wiki

(Tutorial by Locemo, light editing by Haven)

How to edit Pokémon with HexManiacAdvance

So you’re looking to get into ROM hacking! Good for you! Editing Pokémon games has been a long held tradition for over 20 years now, and luckily unlike our ancestors who had to slog through random hexdec and spaghetti code, we have much more modern tools – HexManiacAdvance!

This tutorial will cover how to edit your favorite little digital critters and change their stats, movesets, gender distribution, EV yield, sprites, pallets, shiny pallets, ability and so much more!

Getting Started

No matter what you want to do you’ll first need to download and open up your version of HexManiac. This tutorial is done in version (0.4.5), but you should always check the GitHub releases for the latest version. Once you’re loaded, load a ROM of a Pokémon GBA game; Ruby, Sapphire, FireRed, LeafGreen or Emerald. This tutorial uses Emerald, so if you’re using FireRed it may not work exactly the same. Note that we cannot provide you with a ROM of a Pokémon game nor link you to anywhere where you can get one on the internet.

Once you load the ROM, you’ll be presented with this screen:

enter image description here

Go ahead and click on the “Pokemon” box, or type “data.pokemon” into the “Explore More” bar. Everything else from here will go from there. By the way, if you ever want to get back to this screen, click the little house in the top left.

Changing Pokémon's stats

When you go to data.pokemon, you’ll be shown a table of Pokemon in the game, and a lot of the stats relevant to them.

Now we want to find a Pokémon we want to edit. If you want, you can scroll down and click on the Pokemon you want. But if you would rather type in their name and search for them, try here:

enter image description here

We’re just going to edit Bulbasaur for now, but this applies the same no matter which ‘mon you’re editing

For now lets focus on this part:

enter image description here.

Here we have the Pokemon’s name, stats, type, and sprite. You can fill in the name and stats to change them, but bear in mind:

  • For names, they can only be 10 characters long max.
  • For stat values, they can’t exceed 255. Also bear in mind the stats are in an odd order: HP, Att, Def, Speed, Sp.A, Sp.D
  • For types if you want a Pokemon to be a mono type, just give it the same type, twice. Also, by default, you can’t make a Pokémon Fairy-Type. Hex Maniac does have a script in the “Resources” folder you can run though to add Fairy Type.

For now I’m going to rewrite my stats and name to be something completely random, lets see...

Perfect.

Other stats

There are a bunch of other important stats with Pokémon that you can change beneath this which I’ll briefly explain the purpose of:

catchRate – This is how likely a Pokémon is to be caught when you throw a Pokéball at it. The lower the number, the lower it’s chances of being caught, with a 0 catch rate Pokémon being uncatchable, and a 255 catch rate Pokémon being un-uncatchable.

baseExp – How much experience you get from defeating a Pokémon in battle. Usually evolved Pokémon or legendaries provide a higher baseExp.

evs – these come in all the stat flavours. You either know about EVs or you don’t. When you defeat a Pokémon in battle, it gives your Pokémon a slight boost to a stat. Un-evolved Pokés give 1, once evolved give 2, and twice evolved give 3.

item(1&2) – When you encounter a Pokemon in the wild, it will be holding one of these. If you make it “????????”, they will hold nothing.

genderratio - This is the chance of a Pokémon being a certain type. 100% Male means it will always be male no matter what. 100% Female means that it'll always be female. Genderless means it won't have a gender, and also that it won't be able to make Eggs (except with Ditto).

steps2hatch - The number of "cycles" required for the Pokémon to hatch from an Egg. A cycle is 256 steps. Maximum value is 255.

basehappiness - How much friendship the Pokémon has when it is first caught. Maximum value is 255.

growthrate - How much exp the Pokémon requires to get to Level 100. Most are Medium Slow.

egg(1&2) - Decides the Pokémon's Egg groups, and thus which Pokémons they can breed with.

ability(1&2) - What abilities the Pokémon can have. Note that Emerald doesn't have Hidden Abilities and thus adding them in would require a new table.

enter image description here

Changing Evolution Methods

Now to change how and what our Pokémon evolves into. Emerald gives us an excessive 5 evolution slots per Pokémon (shout out to Eevee). However, Emerald only has certain evolution methods available. Some of them are obvious but some of the more obscure one's we'll quickly explain.

Happy Day/Night - The way Espeon/Umbreon evolve. High friendship and what side of 12am-12pm you're on. The "arg" means nothing here, set it to 0.

Trade Item - How Steelix evolves. Trade a Pokémon while it holds an item. The "arg" becomes the item it has to hold. Notice: Trading with a Hacked ROM in a game made 20ish years ago can be difficult, so think before using this evolution method.

Stone - How Cleffable evolves. Use an item on the Pokémon. Notice: It doesn't have to be a Stone! By editing the items, you can make almost any item into an evolution item!

Level High Attack/High Defense/Attack = Defense - This is all Tyrogue's trouble. You can evolve him into Hitmonlee, Hitmonchan or Hitmontop depending on what his Attack and Defense stats are.

Level Odd/Even Personality This is Wurmple's whoopsie. Basically if you want your Pokémon to have two random evolutions, then this is your best option.

Level and/but New Pokémon - And this is Shedinja's shi---- take mushroom? When the Pokémon evolves at a given level, it will evolve into two Pokémon simultaneously. Could be fun!

Beyond these options (and the basic level up, happiness and trade evolutions), there are no other ways to evolve a Pokémon by default. So if you want to have a Pokémon evolve by Location/Level up and Gender/Other you will have to do some hexdec editing (tutorials do exist!).

enter image description here

Editing Learnset

Implementing new moves is also just as easy as everything else in this tutorial. Below where you can implement evolutions, there's a section that shows what moves a Pokémon can learn, and what level they learn it at:

enter image description here

The syntax is pretty simple:

( "Move Name" levelLearned )

If your move doesn't have a space in it's name, you don't need the quotes around it (but it also doesn't hurt).

Above this is also the pointer for the Pokémon's move learnset. Trainers and Wild versions of the Pokémon may call to this to find out what moves a Pokémon should know from level up (usually just learning the "last four".)

If you add more moves than the Pokémon initially knew into it's move pool, then it's pointers will update! For instance...

enter image description here

You'll notice the list is now different, longer, and the pointer has changed! Previously you would have to do all this on your own, but Hex Maniac handles it all ahead of time for you!

Below here, you'll see the TM moves and Tutor moves the Pokémon can learn. They are pretty simple to edit, but if you want to change the actual options on offer, you'll need to go to a different tutorial.

Editing Sprites

This is probably the hardest part of this tutorial (and it's not really that hard.) Next to all the numbers we've been editing, you've probably seen the Sprites to the side.

enter image description here

This shows Bulbsaur's front sprite, what you see in the wild, and Bulbasuar's back sprite, and if you scroll down further you can see how that displays.

Bulbasaur is cute and all, but we want to tweak him a little. If you hit the "Edit" button under Bulbasuar's Front Sprite.

enter image description here

This is the in-house image editor for Hex Maniac. In here you can change the image using the palette selected for that Pokémon! This is ideal for small tweaks and changes

The tools available are a select tool, a simple pencil, a fill bucket and a color picker tool. Simple, but also very much for touch ups. You'll also notice beneath the tools are a blue dot and an empty hexagon. Switching between the two will change the sprite being displayed, with the first one being the default sprite, and the second one being the "animation" sprite.

Anyway, here's our little touch up!

he put his foot down

Bear in mind if you edit a sprite, it'll get moved (like when we made the length of the list moves longer).

Changing Sprites

If you want to more completely change a sprite, the process is more involved, but still pretty simple. Next to the "Edit" button is "Import" and "Export".

  • Export will provide you with a copy of the spirte of the Pokémon you're using. It's very useful for doing edits in a piece of software you're more comfortable with.
  • Import will push whatever png/sprite file you give it into the space where the old sprite existed, deleting it but giving your edited mon the sprite you wanted.

If you're adding a future 'mon into Emerald, then go to PokeAPI online to download sprites of the Pokémon you want.

If you're drawing your own sprite of a future 'mon or even a fakemon, then that's great! Just bear in mind the following limits:

  • Sprites must be 64x64.
  • Sprites cannot contain more than 16 discrete colors, with the first color at index 0 being used as a transparent color.
  • Opacity is not supported beyond a binary "see-through" / "not see-through" (no half visible pixels here).

enter image description here

Here's the sprite I'll be using that I got of PokéAPI and edited to fit the conditions with Aseprite. Once it's saved, hit the "Import" button annnd...

enter image description here

You'll get this pop up. Hex Maniac automatically changes the stored palette to fit the imported .png, but it gives you options on how to handle it.

  • Greedy completely re-writes the palette. This is what you want if you're changing all the sprites it shows.
  • Cautious doesn't change the palette and keeps the old one. This is what you want if you're not sure if you want to change all the sprites.
  • Smart will balance colors and create a happy middle. This is your option if you weren't expecting to see this pop up.

I'm hitting Greedy.

enter image description here

And just like magic, our boy is in. We're not done quite yet though.

enter image description here

You'll notice Salandit is sitting a little low in the frame and generally looks a little off. We just need to tweak the values!

  • width and height should change the scale of your sprite, but they can be fiddly; I recommend simply making your sprite smaller in the .png if you want it to be smaller.
  • yOffset is how low down the sprite should be. Flying Pokémon should be off the ground, and bigger Pokémon might need to sit a little lower to fit in frame. Remember; bigger number means lower down (cause computers).

enter image description here

Better.

Backsprites are much the same as implementing front sprites, but some important things to bear in mind:

  • Backsprites don't need to show the whole back of the Pokémon, the bottom half is almost always cut off.
  • Backsprites and frontsprites MUST use the same palette, so sorry if you where planning on having a Pokemon half one color and half the other (though you could do that if you were willing to limit to 7/8 colors to each side I guess...)

Changing Shiny Colors

To quickly explain the backroom stuff in a little more detail, basically sprites are like those paint by numbers you can get. A big block of numbers 0 through 15 arranged (or describing) a 64x64 grid. To save calling a 4 byte color string every time, a palette of colors is used. But this means that if we want, we can easily draw the same image again, but in different colors:

And changing Shiny Pokémon is just changing a palette! No uploading 2 or 3 more sprites, just a simple palette code!

Under where you put in the backsprite, you will find two palettes; the first is the default palette, and the second is the shiny palette:

enter image description here

The first has already changed thanks to changing the sprites, but now we need to change the shiny palette. If you click on one of the colored cubes, you will see a color wheel which you can slide and move around. Remember: Changing the first color (index-0) will change nothing as it's always invisible.

If you want to be able to see your sprite as you change the palette to tinker, click the arrow next to the "palette" pointer number. then you can see your shiny Pokémon as you edit.

enter image description here

There are quicker ways to do this using Scripts, but this tutorial is only the basics.

Changing Icons

There's just only little thing, the final bells and whistles with completely editing our Pokémon; their icon that displays when looking at them in Pokéballs. These are a little more fiddly than normal sprites; first they require two sprites in one image, arranged vertically, of size 32x64.

Next, they use weird palettes; there's only three slots in total for icon palettes; 0, 1 or 2. This is mainly just a memory thing, because the game may need to show up to 30 of these sprites at a time. You should be able to make something that looks enough like your Pokémon for it to work. But since the palettes are shared, make sure you use the "Cautious" option if you import an icon.

Use the "Edit" function to adjust the colors of your Pokémon if it looks wrong or weird.

Palette 0  Palette 1  Palette 2
enter image description here enter image description here enter image description here

Here's my Salandit icon using Palette 0; as you can see, not perfect, but recognizable.

enter image description here

That's all folks!

And with that, we've changed everything you could possibly want to about a Pokémon! Granted there are some details that you may not have been able to change quite how you wanted, but this should give you a basic understanding of how to use HexManiac... and if you need, be something you can refer back to!

Happy hacking!