• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How to edit graphics in Pokemon Gold, Silver, and Crystal with Lunar Compress

ShadowTails

I'm working on a better Avatar
638
Posts
18
Years
    • Age 32
    • Seen Mar 7, 2015
    If you don't like to work with command prompt, hex editors, or tile editing programs, I suggest you turn back now. Also note: Knowledge of pointers for GBC games is required if you wish to use this program to edit graphics.

    You can get Lunar Compress here

    Information
    Why use Lunar Compress over AGIXP?
    AGIXP doesn't work on any Windows 7 computer I have tried using it on, I've gotten all the missing files it says I'm missing, I've installed all the required run times, and I just get an error every time I try to open it.

    So, why make a tutorial for Lunar Compress?
    Lunar Compress is kind of difficult to figure out, and there's not a whole lot of documenting on the internet on how to use it, I was trying to look it up at first, but then I decided to figure it out myself, and I ended up being able to actually work on my Gen 2 hack again.

    What are the benefits of Lunar Compress?
    From what I remember, AGIXP was very limiting, you couldn't control a whole lot with it, and it didn't let you have complete control over where your graphics were being stored. I also seem to recall people telling me when they tried to replace the trainer's back sprite, they had trouble with it being too large for the game and overwriting the Dude's sprite. Using Lunar Compress and understanding how the pointers work, you can bypass this problem easily.

    Lunar Compress can be used to decompress a lot of art that programs like AGIXP won't let you decompress. Such as Ho-oh/Lugia on the title screen or something like Pichu and Wooper from Crystal's intro.

    Pointers (more information about Gameboy Pointers here)
    in Gold and Silver the graphics pointers are located at 48000, in Crystal at 120000. These go in national Pokedex order and are stored in six bytes (three bytes for the front sprite, three for the back sprite)

    The first byte is the bank that the sprite is located in, remember that banks are 4000 bytes per bank, starting with bank 0 (0000-3FFF) for more information about banks click here
    IRREGULARITY In Gold and Silver and Crystal, bank 13 (4C000-4FFFF) is completely blank, there are graphics that point to this bank, but in reality, they're pointing to bank 1F. I have no idea why this is how it is.

    Another Irregularity is with the Unowns, they have a separate pointer bank, which is located at 7C000 their graphics are stored in the B8000-BBFFF bank, which is pointed to with 1F...

    Once you know what bank the graphics you want are in, you can properly tell the game where to load the graphics from. So you could point Bulbasaur's graphics to any Pokemon's graphics in the game that already exist, or, more realistically, you can point to new graphics you have inserted yourself, somewhere in the ROM that has free space in it.

    How to use Lunar Compress
    Lunar Compress comes with three tools that you can use once you bring up the command prompt, decomp.exe, recomp.exe, and sniff.exe. You will definitely use decomp.exe and recomp.exe, but sniff isn't required at any point for this tutorial. I have included what I've figured out while tinkering around in the program, however.

    Now then, how exactly do you use Lunar Compress?
    First, you need a copy of cmd.exe. This will save a lot of hassle with using Lunar Compress, as the entire program uses the command prompt to work. If you don't know how to find cmd.exe, do a search for it on your computer and copy and paste it into the folder Lunar Compress is in.

    Second, you will need a copy of the ROM you are extracting the art from, if you aren't extracting art from the ROM (I recommend you do, just to see how the game originally stores the tiles) Name it something short and simple like Gold.gbc or test.gbc.

    Included Programs and how to use them
    decomp.exe
    Spoiler:

    recomp.exe
    Spoiler:

    sniff.exe
    Spoiler:


    Other helpful information
    Now, you hopefully know how to use Lunar Compress. I will update this later with a new post showing you how to insert custom art and point to it properly, but for now, I just wanted to get a basic tutorial for how to use Lunar Compress. If you got far enough to actually decompressing or recompressing some art, and have enough hex editor knowledge to understand everything I mentioned with pointers Data Crystal has a good article written up about how to calculate pointers on the GameBoy all you really need to know is what to add/subtract from the pointer and what bank the graphics are in.

    Now then, I've documented all of the back art and front art of the Pokemon sprites in Gold, Oddly enough, these same offsets work for Silver, but they'll yield different results. Apparently when these games were being put together, they decided to put sprites of the exact same sizes at each offset, so if you're looking for something in Silver specifically, you can more than likely narrow down the correct offset with this list.

    List of art offsets in Pokemon Gold
    Spoiler:
     
    Last edited:

    Hugo_Cool

    Lucario's trainer
    38
    Posts
    16
    Years
  • This thread is really interesting. I just don't understand why nobody replies. Besides, I've been recently quite interested in what concerns hacking gen II games and, like you, AGIXP doesn't work for me :\
    So, how do youu really insert custom art on a gen II with LunarC?
     

    ThePuffinMan

    Some person who plays games
    13
    Posts
    6
    Years
  • Every time I open decomp I can never really access anything on it because if I do, then the cmd will exit itself. How can I access it?
     
    Back
    Top