• 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.

Hacking Pokemon Diamond and Pearl (Hex)

153
Posts
18
Years
    • Seen Jan 14, 2016
    Hi, I'm pichu2000 and I want to tell you what I know on hacking DPP and HGSS(All languages) (Sorry for my bad English, I'm Italian)

    PREPARATION

    For hacking Pokemon Nds Roms you must have these things:

    1. An Hex Editor(I suggest Crystal Tile 2 )
    2. A ROM of DPP or HGSS
    3. A lot of patience
    IMPORTANT! MAKE A ROM BACKUP BEFORE HACKING!
    NDS FILE SYSTEM

    Open the Rom with Crystaltile 2, click F6(For open hex editor) and click Ctrl+N (Or the little icon in the shape of Nds).
    You could see a little Windows with a series of lines. Go on the forth Menu(?????V) and clicking on the first name(?????T). Now we should see a series of directories.

    1. MAP DATA
    Maps are located into field-data/land-data/land data release.narc(Dpp) or a/0/6/5(Hgss) (For opening a NARC file, push right button and select forth options)
    Now we see a lot of file(land-data release 0, land data release 1 etc...)
    These are the maps!
    A map is divided into multiple section.
    A map starts with an header lne(0x16 byte) that rapresented the size of every section.
    First section edits Movement Permissions
    Second section edits the 3d object inserted in the maps. In fact buildings,lamps and other object are parted from the main model map.
    We usually find a model in this form:
    We see first model in this form :
    Code:
    0x0-0x4 Model Number(Linked with NSBMD file id into Build_Model.narc(dpp) or bm_field and bm_room(hgss))
    0x5-0x8 X Coordinates
    0x9-0xC Y Coordinates
    0xD-0x10 Z Coordinates
    0x11-0x1C Unknow bytes
    0x1D-0x20 Model widht
    0x21-0x24 Model height
    0x25-0x28 Model wheight

    The third section is a NSBMD model(Search kiwi.NSBMD model documentation)
    The forth section, BDHC, tell us if there's stairs or elevated part of maps. We need still research about it.

    2. EVENT DATA

    I found event data(warp, signs, people) in zone_event-release.narc(dpp) or a/0/1/2(hgss)
    Events are very similar to gba data.
    An event file is usually divided into forth section.

    First section contains Overwords data.
    Overwords are showed as:
    Code:
    0x0-0x2 Overword Id
    0x2-0x4 Overword Sprite
    0x4-0x6 0verword Movement
    0x6-0x8 Unknown Bytes
    0x8-0xA Script Flag
    0xA-0xC Script Number
    0xC-0xE Unknown Bytes
    0xE-0x18 Line of Sights(Trainer)
    0x18-0x20 X coordinates
    0x20-0x22 Y coordinates
    0x22-0x24 Z coordinates

    Second section is warps
    Warps are showed as
    Code:
    0x0-0x2 X coordinates
    0x2-0x4 Y coordinates
    0x4-0x6 Map Id
    0x6-0xa Maybe Warp Flag

    Third section is signs
    Signs are showed as
    Code:
    0x0-0x2 Script
    0x2-0x4 Unknown
    0x4-0x8 X Coordinates
    0x8-0xC Y Coordinates
    0xC-0xF Z Coordinates

    Forth part contains Triggers
    Triggers are showed as:
    Code:
    0x0-0x2 Script
    0x2-0x4 X Coordinates
    0x4-0x6 Y Coordinates
    0x6-0x8 Width
    0x8-0xA Lenght
    0xA-0xC Weight
    0xC-0xF Flag Number
    3. SCRIPTS DATA

    Now, scripts data are relocated in scrip-seq-release.narc(a/0/3/2 for hgss).
    A script file is divided in two main section of variable lenght, divided by a particular costant,0xFD13
    The header, that contains the lenght of every script.
    The commands section, that contains all the script.

    Commands

    Commands are characterized by the command id, followed by 0+ parameters.
    Almost all the commands has a predefined number of parameters.
    Some has variable parameters, different each time.
    We know the 80-85% commands used into dpp, and the 40% used into hgss.

    4. MSG DATA

    Msg data are inserted into msgdata/msg.narc(dpp) and a/0/2/7 (hgss)
    We can extract them with thenewpoketext program, so search a tutorial for it for see how.

    5. GRAPHIC DATA

    Editing Graphic into forth generation is very simple.
    If we open some narc, we can find a NCGR file(RCGN or Tile File), followed usually by a NCLR(RCLN or Palette File) and sometimes by a NCGR(RCGN or Map File), and other two uneditable files(NANR or Animation File and NCER or Cell Animation File).
    In Crystaltile we only go on a Tile file, press BackSpace, then go on a Palette file, and press Backspace, and if we find the NCGR, make the same thing.
    Then we can see the image onto the window of the rom.
    Press Ctrl+e and export image as bmp. Edit with paint, and click Ctrl+I, and we only need to save the rom.
    We need pay attention to not change the palette based map, and respect also the tile.

    Some images are compressed(NCGR.L), like pokedex screen and other.
    We need to decompress the three file associated (right click and press U() option), rebuild a new rom with dslazy, edit image like we done previously, save the three file uncompressed(right click and press E() option), open Crystal tile, go to T and Lz77 compression, select the three file(one for one), and rebuild the new rom.
    This is more complicated, but it's the only way to edit the compressed graphic.

    Now i insert a file contained a lot of useful list that i made.
    (Some are incompleted)
     
    Last edited:

    Gamer2020

    Accept no Imitations!
    1,062
    Posts
    15
    Years
  • This is cool.
    But I wish I could wrap my head around it.
    Maybe someone could design a tool using this data to make it easier...
     

    Joey the Cockroach

    Dino Crisis will never die!!!!
    1,840
    Posts
    19
    Years
  • this is great to what you can find in hex.... it is great, i can say. finding values in hex is quite hard but achieveable. nice one Pichu2000.
     

    Lady Berlitz

    Cinnamon ♪
    1,770
    Posts
    16
    Years
  • Wow, very nice. At the moment, it's not very useful to a lot of ROM hackers out there until tools are made.
    Eventually, this will help more experienced, hex editing hackers with their tools, or other stuff.

    Thanks for posting this, pichu2000.
     

    Argent Crusader

    Isn't Falstad dead?
    300
    Posts
    17
    Years
  • Really nice tutorial! It's a very good documentation. If LU-HO comes here and sees this, it may be interesting. This data is enough to make a little and basic map editor (I guess).
     
    153
    Posts
    18
    Years
    • Seen Jan 14, 2016
    Really nice tutorial! It's a very good documentation. If LU-HO comes here and sees this, it may be interesting. This data is enough to make a little and basic map editor (I guess).

    Thanks Kike, but there is a lot of work to do yet

    Can someone helping me in this works?
     

    LU-HO

    Author of AdvanceMap
    243
    Posts
    19
    Years
  • hello all
    yes, nice to hear ;-)

    the problem is, i'm working on an new version of AdvanceMap at the moment, and i have only 2 hands.^^

    I'm more interested in the Advance-Generation, i have much to do for these Roms...

    But i bookmarked and saved these tutorial on my PC, if i found time i will try to make a DPMAP also.

    pichu2000 tanks for this. but sorry i cannot help on Analyse the data, to busy ...
    but i'm interested on updates for it ;-)

    greetz LU-HO
     

    Lady Berlitz

    Cinnamon ♪
    1,770
    Posts
    16
    Years
  • hello all
    yes, nice to hear ;-)

    the problem is, i'm working on an new version of AdvanceMap at the moment, and i have only 2 hands.^^

    I'm more interested in the Advance-Generation, i have much to do for these Roms...

    But i bookmarked and saved these tutorial on my PC, if i found time i will try to make a DPMAP also.

    pichu2000 tanks for this. but sorry i cannot help on Analyse the data, to busy ...
    but i'm interested on updates for it ;-)

    greetz LU-HO
    A "DPMAP", huh? Sounds interesting.
    I can't wait for the day there will be a 4th Generation mapping tool.

    BUT, this is a very useful document, pichu2000.
     

    CR0SELL

    Banned
    8
    Posts
    15
    Years
    • Seen Oct 27, 2008
    Hey Pichu2000, Im also currently looking for offsets. If you have an MSN, Pm it to me, then we could share our finds, and release more data, so one day, there will be a scripter for DP.
     

    poddish

    Spirit Of Radio
    233
    Posts
    15
    Years
  • The thing about this is, before the advance generation and all the tools for it came out, ALMOST everyone relied more on hex editing than on tools. Because of this, few hacks were made because it was hard to hack, and the hacks that were completed were usually better than the ones made now (assuming graphics and number of pokemon don't matter, although it was possible to add more slots in r/b/y if you move the trainer sprites somewhere else, I know this because I saw coolboyman's new "final" version of pokemon brown on youtube, and he had 251 pokemon, IN A RED HACK, good job coolboyman!) Anyway, the hacks were usually better because they changed a LOT more than we ("toolhackers) (like me) can do with the tools, because someone's not going to make a tool for some nobody hacker just because he/she asked. Besides, what about the fact that tools can't completely change everything about something because they're limited by the skill of the creator and user.

    Anyway, I hope to see some d/p hacks that don't rely on tools soon...
     

    CR0SELL

    Banned
    8
    Posts
    15
    Years
    • Seen Oct 27, 2008
    The thing about this is, before the advance generation and all the tools for it came out, ALMOST everyone relied more on hex editing than on tools. Because of this, few hacks were made because it was hard to hack, and the hacks that were completed were usually better than the ones made now (assuming graphics and number of pokemon don't matter, although it was possible to add more slots in r/b/y if you move the trainer sprites somewhere else, I know this because I saw coolboyman's new "final" version of pokemon brown on youtube, and he had 251 pokemon, IN A RED HACK, good job coolboyman!) Anyway, the hacks were usually better because they changed a LOT more than we ("toolhackers) (like me) can do with the tools, because someone's not going to make a tool for some nobody hacker just because he/she asked. Besides, what about the fact that tools can't completely change everything about something because they're limited by the skill of the creator and user.

    Anyway, I hope to see some d/p hacks that don't rely on tools soon...


    Umm, I was saying that I can help him find offsets, so we can work together. I wasnt asking him for offsets...
     
    153
    Posts
    18
    Years
    • Seen Jan 14, 2016
    Well

    I'm trying to make a simple dp map editor
    but I don't know very much about programming
    I wanna someone helping me to make the program, so also another man helping me to find the offset
    because I must study very much in this year and I haven't much time to spend hacking

    Anyone wanna help me?
    P.m(Crosell i can't send you private message, you don't allowed this feature)
     

    WaterSplash

    Common
    70
    Posts
    16
    Years
  • Very nice, pichu2000. I'm going to try looking these offsets up and seeing what I can alter. This should lay a good foundation for changing the maps, with or without an editing program.
     
    153
    Posts
    18
    Years
    • Seen Jan 14, 2016
    I need help from anyone can give a hand. I must study in this period so I can't update map list, etc...
    I Really need nosgba debugger to make some progress, but the author is disappeared
    There's anyone that can send me this wonderful tool?
    It would be a beautiful dream
    Thanks
     

    gamefreakfatty

    yuo shuld mak an dp map edtior
    92
    Posts
    16
    Years
  • I need help from anyone can give a hand. I must study in this period so I can't update map list, etc...
    I Really need nosgba debugger to make some progress, but the author is disappeared
    There's anyone that can send me this wonderful tool?
    It would be a beautiful dream
    Thanks

    If I can, I would like to request it too. I was looking for it a long time ago, around when he first disappeared and stopped updating. His PayPal account is closed so I can't even try.
     

    SCV

    DPP Game Researcher
    178
    Posts
    16
    Years
  • I need help from anyone can give a hand. I must study in this period so I can't update map list, etc...
    I Really need nosgba debugger to make some progress, but the author is disappeared
    There's anyone that can send me this wonderful tool?
    It would be a beautiful dream
    Thanks
    Well, Martin is VERY strict with his rules about not sharing no$gba debug. Even though he seems to have disappeared, I don't feel comfortable sharing mine.

    I sent him and email asking what can be done so that you (and a few other people I know) can get a copy of no$gba debug. If he does not respond after some time, I will consider giving you a copy of mine.

    However, if you don't know much about programming, I doubt it will be useful to you.
     
    Back
    Top