View Single Post
Old October 14th, 2008 (5:09 AM). Edited April 19th, 2010 by pichu2000.
pichu2000 pichu2000 is offline
Join Date: Nov 2005
Posts: 153
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)


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

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.

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


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:
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
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
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:
0x0-0x2 Script
0x2-0x4 X Coordinates
0x4-0x6 Y Coordinates
0x6-0x8 Width
0x8-0xA Lenght
0xA-0xC Weight
0xC-0xF Flag Number

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


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.


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)
Attached Files
File Type: zip‎ (224.2 KB, 236 views) (Save to Dropbox)
Reply With Quote