Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Reply
 
Thread Tools
  #1    
Old March 4th, 2012 (10:06 AM). Edited February 8th, 2013 by Quickster.
Quickster's Avatar
Quickster Quickster is offline
Dream or Drop?
     
    Join Date: Oct 2007
    Gender: Male
    Nature: Quiet
    Posts: 351
    Creating new Overworld palettes in Fire Red!
    This is my first tutorial, and I want to make it as simple as possible and easy to follow. Thanks to JPAN for his hacked engine and metapod23 for his overworld tutorial which helped me understand everything better.

    Tools needed for this tutorial:
    Pokemon Fire Red Rom (Unmodified and modified)
    Pokemon Fire Red Hacked Engine
    Hex Editor – I will be using Translhextion.
    Free Space Finder
    Overworld Editor: Rebirth Edition
    Nameless Sprite Editor (I will be using classic)
    Lunar IPS
    (For HackMew's Tools, I suggest downloading PGE)

    I also suggest having a backup of your rom.

    Step 1-Applying the hacked engine.
    Spoiler:
    If you’re reading this, I hope you know how to do this. If not, click here http://www.pokecommunity.com/showthread.php?t=73966 and look at the alternate method of working with patches.


    Step 2 – Understanding the data.
    Spoiler:
    As JPAN states in his guide, a palette pointer consists of PPPPPPPP nn110000, with P = palette pointer and n = palette number. For example, if I wanted to write a pointer to a palette located at 0x800000 with a palette number of 32, I would use this.

    00008008 20110000

    When typing pointers, you need to break the original address into three blocks of two and rearrange them like so. 80 00 00 -> 00 00 80 80. You had the 80 because it is located within the rom.

    20 is actually 32 in hex, so make sure you convert. I would use the calculator that came with your computer.


    Step 3 – Finding the free space needed
    Spoiler:
    In the JPAN rom, the palette table is located at 0x1A2400, giving you room for 256 pointers, so that should be enough.

    Each palette takes up 64 bytes. So multiply 64 by the number of palettes you will be inserting.

    EX. 64 * 12 = 768

    You would need 768 bytes of free space to insert 12 new palettes. But for simplicity, I will be adding 1 so I need 64 bytes of free space.

    I will be using 0x800000.


    Step 4 – Editing Palette
    Spoiler:
    Now my way is a sort of a hassle, so if anyone knows an easier way, please tell me.

    Open your unmodified rom in NSE. Then edit a palette to your liking.

    I just edit the palette of the hero, as it is the first sprite. Once you’re done we can finally move into Hex! Take note that the palette offset is at $H35B968 or x35B968.


    Step 5 – Hex editing
    Spoiler:
    Remember that offset we found for free space, well were going to use it! Open you modified rom into a hex editor and navigate to 0x1A2400.


    Go to the end of the table and insert your pointer before the 00000000 FF110000 as shown. I just rewrote the ending afterwards. Make sure your table ends with that or else in will NOT work at all.


    Save.

    Now open your unmodified rom in a hex editor. Navigate to the palette offset and copy 64 bytes.
    Go back to your hex editor with the modified rom and navigate to 0x800000 and paste the data.

    Save.

    Success!


    Step 6 – Editing the sprites.
    Spoiler:
    Say you wanted to edit the male hero from Ruby’s sprite. See what he sprite offsett is in NSE and write it down. 0x3A3C64

    Go to that address in the modified rom. The palette number is the third byte over. So change that to a 20.


    Save!

    Now open your Overworld Editor Rebirth sprites.ini file. Go down to the English Fire red and change the SpritePaletteHeader pointer to 1A2400.

    Save.

    Open the rom in Overworld Editor Rebirth and go to Ruby hero sprite. As you can see, the palette number is now 32. Edit away. Im just inserting the male Fire Red hero since it will look nice.



    Step 7 – Fixing a glitch!
    Spoiler:
    Follow these instructions to make it work.

    Quote:
    That is a problem I didn't encounter until mentioned, as I always tested with OW palette 0 and A (no reason why, though, just happened). As such, I didn't know about the "forced load" on start that only happens once per map. This should fix it.
    Using a hex editor, replace the following values
    starting at 0x0805E5E0, place 70 88 09 07 09 0f 00 29 01 d0 05 e0,
    then at 0x0805e5f8 place 03 e0

    Also, another "problem" arises from the mist weather. palette slot 0x1, 0x6 to 0x9 and 0xb are reserved for the mist weather effect. If you don't plan on using it on your hack, and need the extra palettes, you can use them after disabling the effect.
    at 0x0805f680 place 22 e0 (for palette slots 0x6-0x9 + 0xb),
    at 0x0805f60c place 20 e0 (for palette slot 0x1, the player mist slot).
    If you wish to have the player enter misty areas, do not apply the last one.
    As a side note, the offset you should use is whatever the offset is but drop the 0x08. Sorry for the confusion. For example; 0x5E5E0.

    And now you are done! Here is the finished product.




    If you have any questions, have suggestions about thread cleanliness, or this tutorial is unclear, be sure to say something! I hope I was able to help!
    __________________
    I laugh looking at this.

    But sometimes I want to come back to it...

    Reply With Quote

    Relevant Advertising!

      #2    
    Old March 6th, 2012 (6:54 AM).
    Hackrex Hackrex is offline
       
      Join Date: Aug 2007
      Gender:
      Posts: 35
      yeah, it works without any problems. Good tutorial. It´s extrem easy to understand it.
      Currently I have inserted 70 new palettes and the rom is working without any problems.
      __________________
      Temporarily not available
      Reply With Quote
        #3    
      Old March 10th, 2012 (1:59 PM).
      Crimson5M's Avatar
      Crimson5M Crimson5M is offline
      what
      • Crystal Tier
       
      Join Date: Feb 2011
      Location: Scotland
      Age: 21
      Gender: Male
      Nature: Quiet
      Posts: 1,101
      Hmm...I'm thinking this could maybe be abused by giving extra palettes to small tiles B]
      Anyway, good tutorial, I'll try it when I get the time. :)
      __________________
      Youtube
      Reply With Quote
        #4    
      Old March 10th, 2012 (3:29 PM).
      esperance's Avatar
      esperance esperance is offline
      • Platinum Tier
       
      Join Date: Mar 2010
      Location: Ohio
      Age: 20
      Gender: Male
      Nature: Relaxed
      Posts: 3,818
      This tutorial is actually quite useful. Thanks for sharing the information!
      __________________

      A Pokemon that is discriminated!
      Support squirtle and make it everyone's favourite.
      Reply With Quote
        #5    
      Old March 10th, 2012 (7:35 PM).
      Quickster's Avatar
      Quickster Quickster is offline
      Dream or Drop?
         
        Join Date: Oct 2007
        Gender: Male
        Nature: Quiet
        Posts: 351
        Quote:
        Originally Posted by Fireworks View Post
        Hmm...I'm thinking this could maybe be abused by giving extra palettes to small tiles B]
        Ooh, that actually sounds quite interesting.

        Quote:
        Anyway, good tutorial, I'll try it when I get the time.
        Quote:
        Originally Posted by agentgeo View Post
        This tutorial is actually quite useful. Thanks for sharing the information!
        Thanks!

        Also, I guess I should say everyone should keep in mind the sixteen palette slots restriction in mind.
        __________________
        I laugh looking at this.

        But sometimes I want to come back to it...

        Reply With Quote
          #6    
        Old March 11th, 2012 (1:09 AM).
        Hackrex Hackrex is offline
           
          Join Date: Aug 2007
          Gender:
          Posts: 35
          Quote:
          Originally Posted by Quickster View Post
          Also, I guess I should say everyone should keep in mind the sixteen palette slots restriction in mind.
          Well this is a problem because you can´t have the OWs in the same Map. You can see that sometimes it load the right palette and sometimes the wrong. So I have to search how I can fix it. If there is a person who no how I can fix it please send me a PM.
          I don´t know if the slots which loads the palettes can be expand or is there a hardware limit. I think there is a limit and this limit is 16. So you can´t load more palettes at the same time.
          __________________
          Temporarily not available
          Reply With Quote
            #7    
          Old March 11th, 2012 (3:05 AM).
          ~Anbuja's Avatar
          ~Anbuja ~Anbuja is offline
          Let's Keep It Simple
             
            Join Date: Oct 2010
            Location: In Snorlax Stomach
            Gender: Male
            Nature: Lonely
            Posts: 321
            Nice tutorial.
            I will try this out without applieing JPANS engines too.
            __________________
            Reply With Quote
              #8    
            Old March 11th, 2012 (7:59 AM).
            Cheve_X's Avatar
            Cheve_X Cheve_X is offline
               
              Join Date: Dec 2010
              Location: Argentina
              Gender: Male
              Posts: 18
              Hi! Great Tutorial! Its a very useful Thing!

              Now, the Hardware supports (16*16) *2 In Total, But, For Minisprites use one Part (16*16) and it have some Palets of Tiles Too.

              For Better Understand of Wath i means, Open Any .gba Rom with VBA and Go to "Tools > Pallete Viewer" The Right Part Its Used By Ow's

              Sorry for My English x'D

              Have a Nice Day
              Reply With Quote
                #9    
              Old March 12th, 2012 (9:29 AM). Edited March 18th, 2012 by Hackrex.
              Hackrex Hackrex is offline
                 
                Join Date: Aug 2007
                Gender:
                Posts: 35
                Quote:
                Originally Posted by Anbuja's_BlooDY View Post
                Nice tutorial.
                I will try this out without applieing JPANS engines too.
                Well I tried this and it doesn´t work. I have made some mistakes. But you have to do the same things as you can see in JPANS engine. I mean you have to do the same things with the pointers, etc. All things JPAN have done in his engine with the OWs data and palettes, you must do, too.


                @Cheve_X: Yes, I know it. But how can I use the palettes on the left side, which aren´t from any tileset? Or how can I use the last three slots on the right side. I have had a look on this with the VBA. I saw that there are only used 13 from 16 palettes. So it must be easier to use this last 3 palettes than using the last palettes from the tilesets. But how can I hack this? How can I use this "free slots"?

                Sorry for bad English!

                Maybe there you can find a solution for insert the palettes without any problems.
                http://nocash.emubase.de/gbatek.htm
                It´s a problem to load more than 16 palettes for the sprites. And how I understand it after read it is it impossible because of the hardware....
                __________________
                Temporarily not available
                Reply With Quote
                  #10    
                Old March 19th, 2012 (6:37 PM).
                dark-96's Avatar
                dark-96 dark-96 is offline
                   
                  Join Date: Aug 2011
                  Location: Sinnoh
                  Gender: Male
                  Posts: 11
                  this best tutorial on Fire Red,and on emerald such it is possible to make?
                  Reply With Quote
                    #11    
                  Old March 20th, 2012 (3:01 PM).
                  Quickster's Avatar
                  Quickster Quickster is offline
                  Dream or Drop?
                     
                    Join Date: Oct 2007
                    Gender: Male
                    Nature: Quiet
                    Posts: 351
                    Quote:
                    Originally Posted by dark-96 View Post
                    this best tutorial on Fire Red,and on emerald such it is possible to make?
                    Well Im sure it is, but I dont know how pesonally. If JPAN didnt do anything other than repoint the table in Fire Red, than it could be that simple. But I dont know what else he did.
                    __________________
                    I laugh looking at this.

                    But sometimes I want to come back to it...

                    Reply With Quote
                      #12    
                    Old March 20th, 2012 (7:02 PM).
                    dark-96's Avatar
                    dark-96 dark-96 is offline
                       
                      Join Date: Aug 2011
                      Location: Sinnoh
                      Gender: Male
                      Posts: 11
                      This tut. remains the best
                      Reply With Quote
                        #13    
                      Old April 16th, 2012 (12:02 PM). Edited April 16th, 2012 by Noririn.
                      Noririn's Avatar
                      Noririn Noririn is offline
                         
                        Join Date: Apr 2010
                        Posts: 15
                        He did just repoint it, I tried repointing the table without the hacked engine and this method works.

                        The orginal palette table is located at 0x3A5158 in FireRed and the pointers to the table that you need to change are at 0x5F4D8, 0x5F570 and 0x5F5C8 for those whom it may interest.

                        I would like to know the sprite offsets for the Fly sprites.

                        Well it seems they're not part of the OW sprite table... I'd like to know how I can repoint their palettes though. :\

                        Seems I didn't need to. Do they just use the current hero OW palette loaded into the RAM?
                        Reply With Quote
                          #14    
                        Old November 22nd, 2012 (6:47 AM).
                        solrecon111's Avatar
                        solrecon111 solrecon111 is offline
                        Didn't do nothing...... yet
                           
                          Join Date: May 2011
                          Location: Everywhere
                          Gender: Male
                          Nature: Brave
                          Posts: 4
                          Quickster, this is an amazing tutorial but one thing I can't seem to do is actual apply it in to Advance Map. It would just appear as the original palette. I would use the emerald male hero as an example. Everything works, it shows up in Overworld Editor rebirth as the new palette but when I put it in advanced map it would show up as palette 0x06 and not 0x32. In NSE it doesn't work either that it can't load the new palette.
                          Reply With Quote
                            #15    
                          Old November 22nd, 2012 (7:24 AM).
                          itman itman is offline
                          Back to ROM hacking. :D
                             
                            Join Date: May 2007
                            Age: 23
                            Nature: Adamant
                            Posts: 100
                            Quote:
                            Originally Posted by solrecon111 View Post
                            Quickster, this is an amazing tutorial but one thing I can't seem to do is actual apply it in to Advance Map. It would just appear as the original palette. I would use the emerald male hero as an example. Everything works, it shows up in Overworld Editor rebirth as the new palette but when I put it in advanced map it would show up as palette 0x06 and not 0x32. In NSE it doesn't work either that it can't load the new palette.
                            You have to change the INI in NSE or OWE for it to show the new palettes (to the new palette table that JPAN made in his patch). Also, it won't show in A-map, but it will show in game. You have to change the OW's palette number in a hex editor though, to change it in the first place.
                            Reply With Quote
                              #16    
                            Old November 22nd, 2012 (2:54 PM).
                            solrecon111's Avatar
                            solrecon111 solrecon111 is offline
                            Didn't do nothing...... yet
                               
                              Join Date: May 2011
                              Location: Everywhere
                              Gender: Male
                              Nature: Brave
                              Posts: 4
                              Quote:
                              Originally Posted by itman View Post
                              Also, it won't show in A-map, but it will show in game. You have to change the OW's palette number in a hex editor though, to change it in the first place.
                              I know you probably don't want to say how but where could I find out how to do that, like point me to a certain forum here or somewhere else.

                              Thank you.
                              Reply With Quote
                                #17    
                              Old November 22nd, 2012 (7:45 PM).
                              Sudeki's Avatar
                              Sudeki Sudeki is offline
                              Can you feel it?
                                 
                                Join Date: Feb 2010
                                Location: Golden Rod
                                Age: 25
                                Gender: Male
                                Nature: Gentle
                                Posts: 321
                                Quote:
                                Originally Posted by solrecon111 View Post
                                I know you probably don't want to say how but where could I find out how to do that, like point me to a certain forum here or somewhere else.

                                Thank you.
                                Open up NSE Classic, go to the sprite you want to change the palette number of. Make sure "Advanced" mode is on.
                                Then you want to find the "Sprite Offset:" Go to that offset in your hex editor.

                                Ripped from Metapod 23's thread
                                Here is what the hero's first overworld data looks like
                                Code:
                                  FFFF001102110002100020001001000010373A089C373A0870343A08A0003A08FC1C2308
                                and is broken down like this (courtesy of GBChacker's post):

                                Code:
                                FFFF     = Starter Byte
                                00     = Palette Number
                                11 02 11 = Sprite validation.
                                0200 = This is equal to the second 4 numbers in the Frame Data Pointer; this is the size of each frame
                                0010 = Width
                                0020     = Height
                                0110 and 0000 = oam data. Do not modify!
                                1@ 10373A08    = Points to @3.
                                2@ 9C373A08    = Void pointer\ unsure.
                                3@ 70343A08    = A pointer to @5 lol.
                                4@ A0003A08    = Sprite Pointer
                                5@ FC1C2308    = Pointer to pointers which point to code that loads the  sprite through the ewram into the sprite block of the vram and its data  into the oam.
                                I bolded the parts you are interested in. Do not forget to put the number in hex and not decimal.
                                __________________
                                Reply With Quote
                                  #18    
                                Old November 23rd, 2012 (11:22 AM).
                                Quickster's Avatar
                                Quickster Quickster is offline
                                Dream or Drop?
                                   
                                  Join Date: Oct 2007
                                  Gender: Male
                                  Nature: Quiet
                                  Posts: 351
                                  Quote:
                                  Originally Posted by Sudeki View Post
                                  Open up NSE Classic, go to the sprite you want to change the palette number of. Make sure "Advanced" mode is on.
                                  Then you want to find the "Sprite Offset:" Go to that offset in your hex editor.

                                  Ripped from Metapod 23's thread
                                  Here is what the hero's first overworld data looks like
                                  Code:
                                    FFFF001102110002100020001001000010373A089C373A0870343A08A0003A08FC1C2308
                                  and is broken down like this (courtesy of GBChacker's post):

                                  Code:
                                  FFFF     = Starter Byte
                                  00     = Palette Number
                                  11 02 11 = Sprite validation.
                                  0200 = This is equal to the second 4 numbers in the Frame Data Pointer; this is the size of each frame
                                  0010 = Width
                                  0020     = Height
                                  0110 and 0000 = oam data. Do not modify!
                                  1@ 10373A08    = Points to @3.
                                  2@ 9C373A08    = Void pointer\ unsure.
                                  3@ 70343A08    = A pointer to @5 lol.
                                  4@ A0003A08    = Sprite Pointer
                                  5@ FC1C2308    = Pointer to pointers which point to code that loads the  sprite through the ewram into the sprite block of the vram and its data  into the oam.
                                  I bolded the parts you are interested in. Do not forget to put the number in hex and not decimal.
                                  Thank you for explaining that. I didnt go into as much depth, but I explained the basics of how to do it under Step 6.
                                  __________________
                                  I laugh looking at this.

                                  But sometimes I want to come back to it...

                                  Reply With Quote
                                    #19    
                                  Old November 23rd, 2012 (12:54 PM).
                                  solrecon111's Avatar
                                  solrecon111 solrecon111 is offline
                                  Didn't do nothing...... yet
                                     
                                    Join Date: May 2011
                                    Location: Everywhere
                                    Gender: Male
                                    Nature: Brave
                                    Posts: 4
                                    For some reason it works with the hero of fire red but it wont work with the hero from emerald. in the picture i didnt edit the fire red hero's palette but as you can see the emerald hero is messed up
                                    Reply With Quote
                                      #20    
                                    Old March 27th, 2013 (10:04 AM).
                                    Spherical Ice's Avatar
                                    Spherical Ice Spherical Ice is offline
                                    • Moderator
                                    • Silver Tier
                                     
                                    Join Date: Nov 2007
                                    Location: Bristol, UK
                                    Age: 19
                                    Posts: 5,186
                                    Is there a fix to the bug where if you go to another screen (most menus in the bag, battles, etc.) and then return to the map the palette reverts to one of the original palettes?
                                    __________________

                                    A Pokemon that is discriminated!
                                    Support squirtle and make it everyone's favourite.
                                    Reply With Quote
                                      #21    
                                    Old March 27th, 2013 (2:13 PM).
                                    itman itman is offline
                                    Back to ROM hacking. :D
                                       
                                      Join Date: May 2007
                                      Age: 23
                                      Nature: Adamant
                                      Posts: 100
                                      Quote:
                                      Originally Posted by Spherical Ice View Post
                                      Is there a fix to the bug where if you go to another screen (most menus in the bag, battles, etc.) and then return to the map the palette reverts to one of the original palettes?
                                      As long as the hero palette is located in the first slot (slot 0), and no other palette overwrites that slot, that should never happen.

                                      In your hex editor, this number is what palette slot the palette takes up.

                                      Spoiler:
                                      FF FF 04 11 FF 11 00 02 20 00 20 00 13 02 00 00 18 37 3A 08 F0 37 3A 08 68 33 3A 08 00 28 90 08 FC 1C 23 08


                                      In that case, it takes up slot number 4 (since 0 is one, etc...).
                                      To make sure it's taking up the right palette, in VBA check: Tools>Palette Viewer.
                                      Reply With Quote
                                        #22    
                                      Old March 27th, 2013 (3:07 PM).
                                      Spherical Ice's Avatar
                                      Spherical Ice Spherical Ice is offline
                                      • Moderator
                                      • Silver Tier
                                       
                                      Join Date: Nov 2007
                                      Location: Bristol, UK
                                      Age: 19
                                      Posts: 5,186
                                      Oh, it's not the overworld for the player but a separate overworld, and the slot that is stays in gets rewritten with the original palette in that slot everytime the map is loaded (exiting menus etc)
                                      __________________

                                      A Pokemon that is discriminated!
                                      Support squirtle and make it everyone's favourite.
                                      Reply With Quote
                                        #23    
                                      Old April 5th, 2013 (6:59 AM).
                                      theRiolvile's Avatar
                                      theRiolvile theRiolvile is offline
                                      Thelucaman
                                         
                                        Join Date: Mar 2013
                                        Location: South Africa
                                        Age: 21
                                        Gender: Male
                                        Nature: Adamant
                                        Posts: 14
                                        I want to put DP overworld sprites but i don't know how it show when I reseized it show only the upper part
                                        Reply With Quote
                                          #24    
                                        Old April 7th, 2013 (5:02 PM).
                                        Quickster's Avatar
                                        Quickster Quickster is offline
                                        Dream or Drop?
                                           
                                          Join Date: Oct 2007
                                          Gender: Male
                                          Nature: Quiet
                                          Posts: 351
                                          Quote:
                                          Originally Posted by Spherical Ice View Post
                                          Oh, it's not the overworld for the player but a separate overworld, and the slot that is stays in gets rewritten with the original palette in that slot everytime the map is loaded (exiting menus etc)
                                          I know this reply is a bit late, but I tried looking into it some. I found that when you have the palette slot set as A-F, the palette refreshes fine, and, as far as I can tell, nothing is messed up.. Ill see if I can find anything else on the matter.

                                          Quote:
                                          Originally Posted by theRiolvile View Post
                                          I want to put DP overworld sprites but i don't know how it show when I reseized it show only the upper part
                                          I dont remember much about resizing, so Ill look into this a bit more also.
                                          __________________
                                          I laugh looking at this.

                                          But sometimes I want to come back to it...

                                          Reply With Quote
                                            #25    
                                          Old April 18th, 2013 (11:25 PM).
                                          Shadowraze's Avatar
                                          Shadowraze Shadowraze is offline
                                          ur mum
                                             
                                            Join Date: Apr 2013
                                            Location: ur mum
                                            Age: 18
                                            Gender: Other
                                            Nature: Lonely
                                            Posts: 798
                                            Just a question but can this be used to have individual palletes for each OW?
                                            Reply With Quote
                                            Reply
                                            Quick Reply

                                            Sponsored Links
                                            Thread Tools

                                            Posting Rules
                                            You may not post new threads
                                            You may not post replies
                                            You may not post attachments
                                            You may not edit your posts

                                            BB code is On
                                            Smilies are On
                                            [IMG] code is On
                                            HTML code is Off

                                            Forum Jump


                                            All times are GMT -8. The time now is 5:52 AM.