DC Forums

We have moved our forums:

Please re-register there, thank you.
There are many new features available. Some of them include: the advanced profile, reputation system, and the point system. Thank you for waiting patiently, enjoy the update. Plus we are still working on fixing a lot of bugs and stuff that are wrong with the theme.

    Advanced Over World Sprite Editing


    Male Number of posts : 1718
    Age : 26
    Location : Calfornia, United States
    Status : Updating the forum.
    Warning :
    Advanced Over World Sprite Editing Left_bar_bleue90 / 10090 / 100Advanced Over World Sprite Editing Right_bar_bleue

    Reputation : 0
    Points : 25
    Registration date : 2008-09-20

    default Advanced Over World Sprite Editing

    Post by G.K.S. on Sat Sep 20, 2008 10:15 pm

    By: Darthatron
    Everything after this message was written by Darthatron.

    Okay, in this tutorial I will teach you how to repoint, resize and increase the amount of OWS (Over World Sprites) in Pokemon FireRed. Sounds fun, right?

    I haven't tested this in the other Advance Gen Games, but I'm sure it will work just the same.

    For this Tutorial you will need...
    An English FireRed ROM
    A Hex Editor
    The latest version of VBA
    A Free Space Finder
    A Brain

    Lesson 01: Understanding the Data.

    Ok, let's take a quick look at the Layout of the Sprite Data, before we go any further. Here is what the first Sprites Data will look like in FireRed:

    FFFF001102110002100020001001000010373A089C373A0870343A08A0003A08FC1C2308Now, let's break it down, so you can all understand:

    FFFF = Starter Byte
    00 = Palette Number
    11 02 11 = Unknown Data 1
    0002 = Unknown Data Size
    10 = Width
    00 = Unknown Byte 1
    20 = Height
    00 = Unknown Byte 1
    10 01 0000 = Unknown Data 2
    10373A08 = Unknown Pointer 1
    9C373A08 = Unknown Pointer 2
    70343A08 = Unknown Pointer 3
    A0003A08 = Sprite Pointer
    FC1C2308 = Unknown Pointer 4Following the "Sprite Pointer" will lead you to this Data:

    68BB350800010000This is another pointer to where the actual Sprite Hex Art is, don't worry about looking at it, it's pointless unless you look at it in an OWE. Here's the broken up version of the Sprite Data:

    68BB3508 = Hex Art Pointer
    0001 = Data Size
    0000 = Unknown DataThe Data Size is always equal to this algorithm:

    Data Size = (Width x Height) / 2That's about it for this lesson, next we will learn how to resize the OW Sprite! YAY! *Cheers*

    Lesson 02: Resizing an Over World Sprite.

    Right, so if you remember correctly, before we looked at the Sprite Data, and it had the "Height" and "Width" Bytes stored there, so... Let's just change them, and see what happens. Why don't we make it a 32 x 32 Sprite now?

    FFFF = Starter Byte
    00 = Palette Number
    11 02 11 = Unknown Data 1
    0002 = Unknown Data Size
    20 = Width
    00 = Unknown Byte 1
    20 = Height
    00 = Unknown Byte 1
    10 01 0000 = Unknown Data 2
    10373A08 = Unknown Pointer 1
    9C373A08 = Unknown Pointer 2
    70343A08 = Unknown Pointer 3
    A0003A08 = Sprite Pointer
    FC1C2308 = Unknown Pointer 4Now, let's put it back together.

    FFFF001102110002100020001001000010373A089C373A0870343A08A0003A08FC1C2308...And put it back into our Hex Editor. Next we will open up the OWS in our OWE.
    Advanced Over World Sprite Editing 0
    Oh dear! Frame 0 and 1 seemed to have melded together! This means we have to repoint the Frames, YAY!
    Ok, so all you have to do is follow the "Sprite Pointer", which is "A0003A08", or "0x003A00A0" when it's flipped. SO now, goto the offset "0x003A00A0" in your Hex Editor and look at the data. It should look something like this:

    68BB350800010000Now, we need to work out how many frames the OWS has. The Hero Sprite has 20 Frames, so open up your Free Space Finder and search for the Value of this Sum:

    Value = (Height x Width) / 2 x FramesSo, in this case it would be:

    Value = (16 x 16) / 2 x 20
    Value = 256 / 2 x 20
    Value = 128 x 20
    Value = 2560So, we will be searching for 2560 Bytes! YAY! Searching sure is fun.
    Ok, I found the Space I need at the offset: "0x00720A00" Lucky me. Now, I'm going to start Repointing all the Pointers.
    Back to the Offset "0x003A00A0" in your Hex Editor and it's time to start the fun!
    Alright, so replace the First Pointer with "000A7208", which now lead to the Free Space we found earlier. Now, view that Frame and Sprite in your OWE. And see how it turns out.
    Advanced Over World Sprite Editing 1
    Great! We now have a clear Sprite! Next we are going to want to do the same for every frame, so back at the Offset "0x003A00A0" we are going to move 8 more Bytes into the File and Repoint this Frame aswell!

    So with the Free Space we found earlier, which was "0x00720A00", we want to add 128 Bytes, because that is the Value of the Sum we did before:

    Value = (Height x Width) / 2So, the new Offset will be: "0x00720A80"
    And the new Pointer will be: "800A7208"

    So, what we want to do it replace the Pointer at the Offset "0x003A00A0" with our new pointer, in my case: "800A7208".

    Great! The second Frame is now clear as well! Do that for the other 18 Frames, and then you can start painting your new OWS! YAY!

    Lesson 03: Adding for OWS to the game.

    Finally, we can learn how to repoint the OWS and add more into out game! YAY! *Cheers*

    Ok, what we are going to do it open our ROM in our Hex Editor...

    *Opens ROM*

    Right, now Goto the offset: "0x0039FDB0" And you will see a whole bunch of Pointers, right? They should look something... like... this:

    184F3A083C4F3A08604F3A08CC4F3A08F84D3A081C4E3A08404E3A08They look fun... NOT! Ok, so I'll show you what each pointer means...

    B03B3A08 = Pointer to OWS 0
    D43B3A08 = Pointer to OWS 1
    F83B3A08 = Pointer to OWS 2
    1C3C3A08 = Pointer to OWS 3
    58483A08 = Pointer to OWS 4
    A0483A08 = Pointer to OWS 5
    C4483A08 = Pointer to OWS 6
    64453A08 = Pointer to OWS 7
    88453A08 = Pointer to OWS 8
    AC453A08 = Pointer to OWS 9
    D0453A08 = Pointer to OWS 10
    7C483A08 = Pointer to OWS 11
    E8483A08 = Pointer to OWS 12
    0C493A08 = Pointer to OWS 13
    643C3A08 = Pointer to OWS 14
    883C3A08 = Pointer to OWS 15
    AC3C3A08 = Pointer to OWS 16
    D03C3A08 = Pointer to OWS 17
    3C3D3A08 = Pointer to OWS 18
    404E3A08 = Pointer to OWS 150Yes, that's right. Following one of those points will take you to the "Sprite Data", we looked at that data before (Lesson 01 & 02), cool huh? This is the location where AMap reads from, however, this isn't as far back as we can go...

    Now, in your Hex Editor we are going to goto the location that points to this Table, and change it. So, goto this location: "0x0005F2F4", this should have a pointer to the table we just looked at, correct?

    Ok, now open up your ROM in your FSF and search for this number of bytes:

    Value = Number x 4"Number" is how many Sprites you want to have in your game. For this example we will use 151, Which is 1 extra Sprite to the average 151 FireRed has.

    So.... In my FSF I will search for....

    Value = Number x 4
    Value = 152 x 4
    Value = 608...608 Bytes. However, due to my vast amount of laziness, and my really slow computer, I will just use the offset "0x00801000", write that offset down somewhere, alright so... Asuming we are still at the offset "0x0005F2F4", I will set the Pointer there to... "00108008".

    Now, we have copy/paste the Table at the Location "0x0039FDB0", ONLY THE FIRST 151 POINTERS (604 Bytes), to the Location we just found, in my case "0x00801000". Now, if you did everything correctly, there should be at least 4 Free Bytes after the table has been pasted. With this free space we are going to add a new pointer to some free space where we will put our new Sprite Data...

    Once again, open up FSF and search for some free space, this time search for 36 Bytes. Once again, due my huge amount of laziness, I will be using the offset "0x00802000". Back at the 4 Bytes that we have free after pasting the Pointer Table, we are going to add out new pointer. In my case: "00208008".

    Now, in your Hex Editor we are going to look at the Hero's Sprite Data, located at "0x003A3BB0", and we are going to copy it all (36 Bytes). Then we will go back to our new free space, in my case "0x00802000", and we are going to paste the data we just stole from the Hero's Sprite Data.

    Open your ROM up in a Map Editor and make a Sprite with the Picture Number of "151" and you will notice that the Map Editor doesn't appear to show any Sprite. However, opening the ROM in your emulator and looking at the Sprite it will look like the Hero.

    Alright, now you just have to follow Lesson 02, using this Sprite Data instead of the First, and all should be fine. I think... I kind of lost track of where I was up to. If for whatever reason it doesn't work, post and I'll see if I missed anything... xD

      Current date/time is Wed Apr 01, 2020 9:13 pm