The PokéCommunity Forums Fan Games ROM Hacking Tools, Tutorials & Resources
Tutorial [Advanced] Hacking the World Map without the Glitches!

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

Reply
 
Thread Tools
  #1    
Old July 12th, 2012 (2:16 PM). Edited March 15th, 2016 by amcolash.
amcolash's Avatar
amcolash amcolash is offline
     
    Join Date: Jan 2012
    Gender: Male
    Posts: 27
    Hey everyone, so this is my first tutorial on hacking so give me a bit of slack Ask questions and I will answer them to the best of my knowledge.

    I have been struggling with hacking the world map for quite some time now and I finally got my map completed and not glitched in my game. Every tutorial I have found made part of the map glitch, and since I wanted to have the map switcher button, I figured this out. (Many tutorials skip this part to make it not glitch I learned)

    Requirements

    Spoiler:

    A Pokemon Rom
    VBA
    unLZ
    NTME
    Microsoft Paint works, but Photoshop will be much better to use
    Sphere Game Developer
    Microsoft Excel
    Hex Editor (I prefer HxD)
    The resources file at the end of this post
    Time


    Making the Tileset

    Spoiler:

    In order to hack the map, first you will need to make a map, or modify the original. In my case, I am making an extension to the original map. First, I made my map (There are many ways to make the map, just make sure that you have the correct palette at the ene, I will upload this

    Before things get messy, make a folder called World Map so that you can keep things in order, and extract that resources file into the folder too

    Next, you must make the map in the correct palette. You could use paint if you used the eye dropper, but in my case I used photoshop to make sure the image was "indexed" or was using a specific palette. If you want to use the original map as a starting point, I have also uploaded the map below. (You can use a completely new map, but make sure that you know how to edit the palette if needed, and that the map is 208x144)
    Here is my final map
    Spoiler:

    Save your map to your world map folder

    Once the map is made, you need to make a new tilemap of the new map you have made. What I did at this point was figure out what parts were changed and then I changed those tiles later on. So for my map, I had changed this part of the map
    Spoiler:


    After finding what of the original map was changed, you need to select only that part of the map, to make a new tileset of the new areas.
    Spoiler:

    Save this new part of the map, and fill the rest with the blue color.

    Open sphere editor, and click import image to map
    Spoiler:

    Save that map to your world map folder.

    After you have made the tilemap, you must now save it to a usable form. Open up your map in sphere.
    Spoiler:


    Next, use print screen or the snipping tool in windows to take a screenshot of your tilemap. Paste this into your image editing program and crop it to the pixel, so that all you can see is this. Then pencil in or fill bucket the first tile to remove the purple
    Spoiler:


    Here is what your final custom tilemap should look like:
    Spoiler:


    To make things not glitch, we now need to add this tilemap to the original tilemap of the game, which is included in the resources folder. To do this, you need to move all of your tiles onto the extra space below the tiles
    Spoiler:


    Your final tileset will look like this with all tiles on the map. My tile map contains around 384 tiles. This is much larger than the "limit" of 256 tiles, however this may be per tilemap and not tileset. Either way, my map worked but I cannot guarantee results
    Spoiler:



    Making The Tilemap

    Spoiler:

    Now that we have a tilemap and a reference image, it is time to make the map as a raw. This sounds scary, but just takes a bit of time to do. I found a simple way that will not glitch up things, but will take time to do. To make this raw, first open up the excel file in the resources folder. This file has tons of data in it, but we are only concerned with the first table right now. Looking at the table, there are lots of values, these correspond to the values of the tiles on our final tilemap.
    Here is how the tiles work:
    Spoiler:


    The number across the top and down the side are the decimal number of the grid, while the numbers inside are the decimal number of the tile. If you think of counting across the rows, then down the columns, this will make sense. The tiles work like this:
    Spoiler:


    Now that you understand the first grid, let’s move on to the second grid to the right, this one tells the number of the tile in hex. Hex is a base 16 number system, and if you don’t understand this counting, I suggest you stop with this tutorial.

    The third grid, moving down a row on the left side is the hex numbers with the extra zeroes needed to make it 2 bytes (4 total numbers). This is useful so that we can reverse the bytes.
    Spoiler:


    Our next table is where the bytes of the two are reversed, so if a number was 00 01, it would become 01 00. This reversal is how the game figures out which tiles go where, like pointers I believe.
    Spoiler:


    The bottom left table shows the palette used at each square on the grid, the outside uses a palette 2. Normal tiles use a palette 0, and special tiles use palette 1. Each red city dot uses palette 1, and also some certain elevations use palette 1. This is why the tiles in the resources are blue and look wrong, they use another palette, but the image only has one palette.
    Spoiler:


    The palettes were a bit confusing for me to figure out, but I discovered that a palette of 0, would keep the hex as it was. While a palette of 1 would add 10 (16 in decimal) to the smaller byte. This being said, tile 1 in hex turns to 01 00, and with the palette, tile 1 (cities) in raw is 01 10. Sorry that was very technical!

    Finally, our last table on the bottom right shows us the raw data in a table, which means that this is what a program like NTME will generate, but since I have had problems with NTME, I made this.
    Spoiler:


    The fun part about this spreadsheet is that if you change a value in the first table (Decimal tile number), it will change the rest of the tables accordingly. So to make your tiles, you only need to input the decimal version of the tiles into the first table, and the raw data will then be made.

    To go about making the map, simply open up NTME and press open tileset.
    Spoiler:


    Next, find the tiles you need and their numbers with NTME
    Spoiler:

    Because NTME gives you the Hex number, you will need to convert every number into decimal. This is quite tedious, but it is basically the way one would hex edit this map.

    Once the map is done, you can change the palette If needed, but be careful that the tiles will not change themselves if you do this.
    After that, simply copy the final chart, remember not to include the grid numbers on the edges!
    Spoiler:



    Inserting Your Work Into The Game

    Spoiler:

    Open up the default world map raw file, and paste write the values into it. At the end should be a row of 16 0’s, keep these! Then save
    Spoiler:


    Our final steps are inserting our tiles into the game and testing. Open up unLZ and type in 188 (BPRE), somewhere close for other games, but I cant guarantee it working.
    Spoiler:

    Import the tiles you made, not the raw file and choose a free offset using FSF if necessary (I chose 812500). Press write to rom, and check fix pointers. It should say that it moved the pointer for the tiles. Next, load the raw from file-load raw. Choose another offset for this (I chose 813600).
    Spoiler:


    The raw won’t be automatically repointed, so open your rom in the hex editor. Goto offset C035C, and type in your offset reversed. For me, I typed in 00 36 81 08. Save, and you are done!
    Spoiler:



    Results

    Spoiler:

    Now go to test, and you should have a new map. If things didn’t work quite right, check back on the numbers you typed into the spreadsheet. Good luck!

    Spoiler:



    If you have any problems, ask questions and I will try to help out. Have fun
    Attached Files
    File Type: zip Resources.zip‎ (56.8 KB, 64 views) (Save to Dropbox)
    __________________
    Pokemon Ember - an addition to the already wonderful pokemon games
    Coming Soon!

    Reply With Quote

    Relevant Advertising!

      #2    
    Old July 16th, 2012 (9:34 AM).
    ADLFM14's Avatar
    ADLFM14 ADLFM14 is offline
    Legendary Spriter
       
      Join Date: May 2012
      Location: EGYPT
      Gender: Male
      Nature: Bold
      Posts: 42
      thnx dude for the tutorial 10/10 :D
      __________________
      My Tutorials:
      Hacking Ruby Title Screen Completely Step By Step
      How To Insert An OW Sprite In NSE Classic Step By Step.
      Hacks I'm Currently Making


      Join My Hacking Team(D.A.T.S)




      My deviantART


      Reply With Quote
        #3    
      Old July 25th, 2012 (12:00 PM).
      chi23's Avatar
      chi23 chi23 is offline
         
        Join Date: Jul 2012
        Gender: Male
        Nature: Gentle
        Posts: 13
        Wow, this tutorial is superb! Does the same principle work with completely new world maps, for instance a world map I created in Photoshop with the resolution of 240 * 160?
        Reply With Quote
          #4    
        Old July 25th, 2012 (8:19 PM).
        amcolash's Avatar
        amcolash amcolash is offline
           
          Join Date: Jan 2012
          Gender: Male
          Posts: 27
          Quote:
          Originally Posted by chi23 View Post
          Wow, this tutorial is superb! Does the same principle work with completely new world maps, for instance a world map I created in Photoshop with the resolution of 240 * 160?
          Thank you for the feedback! I believe that you should be able to insert a completely new map if you wanted. I would suggest if you wanted to use the islands yet, find only the tiles unused and replace them. I happened upon this technique late one night and I am still unsure if there is a much simpler way, but once you figure things out you are set. Experiment, but make a backup before! I suggest simply adding your sphere tile set below the original, but there apparently have been problems with large tile sets. Good luck, let me know how things work out!
          __________________
          Pokemon Ember - an addition to the already wonderful pokemon games
          Coming Soon!

          Reply With Quote
            #5    
          Old July 26th, 2012 (3:51 AM).
          chi23's Avatar
          chi23 chi23 is offline
             
            Join Date: Jul 2012
            Gender: Male
            Nature: Gentle
            Posts: 13
            Quote:
            Originally Posted by amcolash View Post
            Thank you for the feedback! I believe that you should be able to insert a completely new map if you wanted. I would suggest if you wanted to use the islands yet, find only the tiles unused and replace them. I happened upon this technique late one night and I am still unsure if there is a much simpler way, but once you figure things out you are set. Experiment, but make a backup before! I suggest simply adding your sphere tile set below the original, but there apparently have been problems with large tile sets. Good luck, let me know how things work out!

            Awesome, just to be sure - will this work for Pokemon Ruby (the game I am currently modding) as the map from the tutorial and the game are different?
            Reply With Quote
              #6    
            Old July 26th, 2012 (7:51 PM).
            amcolash's Avatar
            amcolash amcolash is offline
               
              Join Date: Jan 2012
              Gender: Male
              Posts: 27
              Ahh... I was not aware you wanted to do ruby. I believe that the same concepts should apply to this as well. This tutorial was made for fire red, but it should work as long as you deconstruct the map as I did for this game. I would suggest looking at this tutorial for ruby, but I have never hacked ruby so I am unsure. My way is a bit rediculous, but I feel that I learned a lot in the process, and it was the one way I got my map to work. Try the tutorial first, but if it doesn't work, by all means you can figure out the map for ruby using this method. I will add in the info if you do find it out! Once again, good luck and I hope your map looks great after you change it
              __________________
              Pokemon Ember - an addition to the already wonderful pokemon games
              Coming Soon!

              Reply With Quote
                #7    
              Old July 27th, 2012 (4:46 AM).
              chi23's Avatar
              chi23 chi23 is offline
                 
                Join Date: Jul 2012
                Gender: Male
                Nature: Gentle
                Posts: 13
                Ironically I tried that tutorial first but found out I had too many tiles to fit the 128 x 128 square (256 tiles) which mine had over 400 so I am going to have to try this way otherwise I will have to resdesign the map, lol. Hacking a game first time ins't easy! XD Thanks!!
                Reply With Quote
                  #8    
                Old July 27th, 2012 (11:58 PM).
                amcolash's Avatar
                amcolash amcolash is offline
                   
                  Join Date: Jan 2012
                  Gender: Male
                  Posts: 27
                  You are quite welcome. Let me know if you run into problems. Remember that you should not have quite that many tiles if you use sphere to make the tiles into a tilemap.

                  The largest possible amount of tiles in the map is 30*20 = 600. Granted, 600 tiles means every single tile is unique. About 1/3 of your tiles may not be unique. You will need to use sphere though to find out. In total, I used about 384 tiles. It is possible with over 256 using my method... In my experience that is

                  This is my first tutorial and my first attempt at a hack is in progress as well. Once I put the pieces together, things worked out. Getting my map to work took many hours - I don't want to think about how many nights I kept getting problems. Then I decided to try something not in a tutorial and dissembled what I could of my work and found a solution. Quite a process, but quite rewarding in the end. I am glad I was at least able to spark interest in you!
                  __________________
                  Pokemon Ember - an addition to the already wonderful pokemon games
                  Coming Soon!

                  Reply With Quote
                    #9    
                  Old July 28th, 2012 (6:49 AM). Edited July 28th, 2012 by chi23.
                  chi23's Avatar
                  chi23 chi23 is offline
                     
                    Join Date: Jul 2012
                    Gender: Male
                    Nature: Gentle
                    Posts: 13
                    Haha, okay thanks! Now I just have the massive task of trying to understand something I don't know how to do even though I am following your tutorial (which is very detailed and understandable)! What I gather from the tutorial is that I now have to change the data on the Excel document to the numbers of each of the tiles in my tileset which was created in Sphere as per the tutorial? This ended up in giving me a tileset with 440 tiles and no duplicates.

                    -Edit-
                    I see how your tutorial works now, you take the tile number convert and place in the excel file what I have to do is not particularly hard but is very long-winded. Converting 440 tiles from HEX to Decimal, DAMN! xDD
                    Reply With Quote
                      #10    
                    Old July 28th, 2012 (7:38 PM).
                    amcolash's Avatar
                    amcolash amcolash is offline
                       
                      Join Date: Jan 2012
                      Gender: Male
                      Posts: 27
                      Yes, it is simply time consuming. If you look at the excel file, it does convert from decimal to hex with a cell at the bottom. I am sorry that the spreadsheet is that way, but changing it would be quite a pain. I would suggest getting a piece of graphing paper and write in your map. By the end you will understand exactly how the map works I promise!
                      __________________
                      Pokemon Ember - an addition to the already wonderful pokemon games
                      Coming Soon!

                      Reply With Quote
                        #11    
                      Old July 29th, 2012 (5:26 AM). Edited July 29th, 2012 by chi23.
                      chi23's Avatar
                      chi23 chi23 is offline
                         
                        Join Date: Jul 2012
                        Gender: Male
                        Nature: Gentle
                        Posts: 13
                        Quote:
                        Originally Posted by amcolash View Post
                        Yes, it is simply time consuming. If you look at the excel file, it does convert from decimal to hex with a cell at the bottom. I am sorry that the spreadsheet is that way, but changing it would be quite a pain. I would suggest getting a piece of graphing paper and write in your map. By the end you will understand exactly how the map works I promise!
                        That's a great idea! I am recreating the map in HEX in a new Excel spreadsheet and then converting them to decimal later so I know that everything is in the correct place.

                        Thanks for your help!! :D

                        Okay, the problem I have now is with the palette fields in the Excel document, are yellow 1s meant to match up with the towns/cities on the map because my map contains those (and same with the other corresponding colours)?
                        Reply With Quote
                          #12    
                        Old July 30th, 2012 (10:15 AM).
                        amcolash's Avatar
                        amcolash amcolash is offline
                           
                          Join Date: Jan 2012
                          Gender: Male
                          Posts: 27
                          Sounds like you are chugging away at this map. Firstly, making a separate excel spreadsheet is a good idea. Remember to use the DEC2HEX function to convert it all and then copy/paste the numbers into the original spreadsheet.

                          For the palette numbers, yes they are meant to match the cities and towns. I am not sure in ruby, but I believe that it should be similar. There are about 4 cells which may stay yellow (palette 1) so check that it is only highlighting your cities.
                          __________________
                          Pokemon Ember - an addition to the already wonderful pokemon games
                          Coming Soon!

                          Reply With Quote
                            #13    
                          Old July 30th, 2012 (11:34 AM).
                          chi23's Avatar
                          chi23 chi23 is offline
                             
                            Join Date: Jul 2012
                            Gender: Male
                            Nature: Gentle
                            Posts: 13
                            Quote:
                            Originally Posted by amcolash View Post
                            Sounds like you are chugging away at this map. Firstly, making a separate excel spreadsheet is a good idea. Remember to use the DEC2HEX function to convert it all and then copy/paste the numbers into the original spreadsheet.

                            For the palette numbers, yes they are meant to match the cities and towns. I am not sure in ruby, but I believe that it should be similar. There are about 4 cells which may stay yellow (palette 1) so check that it is only highlighting your cities.
                            Yeah, did that pretty quickly as you said by reversing the HEX2DEC function and pasting the values once copied - do I need to worry about the code behind head of the coloured palette fields, would a screen-shot help show you what it currently looks like? Checking the yellow fields, pretty much none of them match up with the cities/towns. I think what may be sending it off is that the maps are different - one contains a blue border whereas my map takes up the whole space of 160 * 240 dimensions.
                            Reply With Quote
                              #14    
                            Old July 30th, 2012 (8:08 PM).
                            amcolash's Avatar
                            amcolash amcolash is offline
                               
                              Join Date: Jan 2012
                              Gender: Male
                              Posts: 27
                              Yes. You need to have your map smaller I believe. You can probably scale it down w/o loss of quality as long as it is indexed. If you use photoshop there is an option to keep the pixels but scale it. Additionally if you would like, pm me your files you have and I'll check it out so I can help the ruby hackers as well. Make sure that the 2nd tile in total is the city tile. Just send me what you has and I'll take a look
                              __________________
                              Pokemon Ember - an addition to the already wonderful pokemon games
                              Coming Soon!

                              Reply With Quote
                                #15    
                              Old August 2nd, 2012 (6:18 AM).
                              chi23's Avatar
                              chi23 chi23 is offline
                                 
                                Join Date: Jul 2012
                                Gender: Male
                                Nature: Gentle
                                Posts: 13
                                Is there any problems with the map I sent you, will it work for the Ruby hack?
                                Reply With Quote
                                  #16    
                                Old August 19th, 2012 (11:44 AM).
                                Vespertine's Avatar
                                Vespertine Vespertine is offline
                                   
                                  Join Date: Aug 2012
                                  Location: United Kingdom
                                  Gender: Male
                                  Posts: 8
                                  Where can I get Sphere Game Developer? I can't find it anywhere!
                                  Reply With Quote
                                    #17    
                                  Old August 19th, 2012 (5:18 PM).
                                  davel777's Avatar
                                  davel777 davel777 is offline
                                     
                                    Join Date: May 2011
                                    Gender: Male
                                    Posts: 23
                                    Where did you download the Sphere Editor or Sphere v1.5 Development Environment?
                                    __________________
                                    This signature has been disabled.
                                    Your Signature is too large. You\'ll need to shrink it down.
                                    Please review and fix the issues by reading the signature rules.

                                    You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                                    Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                                    Reply With Quote
                                      #18    
                                    Old November 18th, 2012 (9:54 PM).
                                    阴魂君's Avatar
                                    阴魂君 阴魂君 is offline
                                    _(:зゝ∠)_ so busy i am…
                                       
                                      Join Date: Nov 2012
                                      Location: China
                                      Age: 21
                                      Gender: Male
                                      Nature: Brave
                                      Posts: 22
                                      Excuse me,amcolash. Could you teel me where I can download the Sphere Game Developer?
                                      I can't find it after search...
                                      Reply With Quote
                                        #19    
                                      Old November 18th, 2012 (10:54 PM).
                                      Kurada's Avatar
                                      Kurada Kurada is offline
                                         
                                        Join Date: Feb 2012
                                        Gender: Male
                                        Posts: 6
                                        Quote:
                                        Originally Posted by 阴魂君 View Post
                                        Excuse me,amcolash. Could you teel me where I can download the Sphere Game Developer?
                                        I can't find it after search...
                                        Google -> Sphere Game Developer.
                                        Click on the first link which should be "Main Page - Spheriki".

                                        Then on the right side you should see a box with links, Click on the "Download" link just to the right of the column for sphere.

                                        I would paste you the link but I am not allowed to.
                                        Reply With Quote
                                          #20    
                                        Old November 19th, 2012 (2:39 AM).
                                        阴魂君's Avatar
                                        阴魂君 阴魂君 is offline
                                        _(:зゝ∠)_ so busy i am…
                                           
                                          Join Date: Nov 2012
                                          Location: China
                                          Age: 21
                                          Gender: Male
                                          Nature: Brave
                                          Posts: 22
                                          Quote:
                                          Originally Posted by Kurada View Post
                                          Google -> Sphere Game Developer.
                                          Click on the first link which should be "Main Page - Spheriki".

                                          Then on the right side you should see a box with links, Click on the "Download" link just to the right of the column for sphere.

                                          I would paste you the link but I am not allowed to.
                                          Thank you,xD.I see... I just searched it by Baidu...Well
                                          Reply With Quote
                                            #21    
                                          Old November 19th, 2012 (2:32 PM).
                                          esperance's Avatar
                                          esperance esperance is offline
                                          • Moderator
                                          • Platinum Tier
                                           
                                          Join Date: Mar 2010
                                          Location: Ohio
                                          Age: 20
                                          Gender: Male
                                          Nature: Relaxed
                                          Posts: 3,807
                                          I'd just like to point out that NTME can open up .rmp files, which are the map files the Sphere saves. It's much simpler than the method you used.
                                          __________________

                                          A Pokemon that is discriminated!
                                          Support squirtle and make it everyone's favourite.
                                          Reply With Quote
                                            #22    
                                          Old November 22nd, 2012 (6:20 PM).
                                          amcolash's Avatar
                                          amcolash amcolash is offline
                                             
                                            Join Date: Jan 2012
                                            Gender: Male
                                            Posts: 27
                                            Thank you for clearing up the issues with finding sphere. In my experience I found that using sphere was the easiest. That was me personally, but your mileage could vary. Thank you for the heads up for NTME though
                                            __________________
                                            Pokemon Ember - an addition to the already wonderful pokemon games
                                            Coming Soon!

                                            Reply With Quote
                                              #23    
                                            Old April 26th, 2015 (12:29 AM).
                                            Lance32497's Avatar
                                            Lance32497 Lance32497 is offline
                                            LanceKoijer of Pokemon_Addicts
                                               
                                              Join Date: Aug 2014
                                              Location: Criscanto town-Ginoa Region xD
                                              Gender: Male
                                              Nature: Adamant
                                              Posts: 793
                                              does anyone here know the palette offset of world map?
                                              __________________
                                              This signature has been disabled.
                                              Scrollbar appears
                                              Please review and fix the issues by reading the signature rules.

                                              You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                                              Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                                              Reply With Quote
                                                #24    
                                              Old December 6th, 2015 (5:09 AM).
                                              BKaiser BKaiser is offline
                                                 
                                                Join Date: Jul 2013
                                                Gender: Male
                                                Posts: 13
                                                It's a wonderful tutorial but is the resource file link broken? Or its just me?
                                                Reply With Quote
                                                  #25    
                                                Old March 10th, 2016 (7:26 PM).
                                                Bricex17 Bricex17 is offline
                                                   
                                                  Join Date: Mar 2014
                                                  Gender: Male
                                                  Posts: 4
                                                  Could the resources.zip be fixed please?
                                                  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:09 PM.