Map structure: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
m (Four part -> Fourth part; added to Technical References and Structures)
No edit summary
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://ezapazuhem.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
----
=[http://ezapazuhem.co.cc CLICK HERE]=
----
</div>
[[Category:ROM Hacking]]
[[Category:ROM Hacking]]
[[Category:Structures]]
[[Category:Structures]]
Line 11: Line 19:


{|
{|
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
! Location
! Location
! Description
! Description
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x00
| 0x00
| Permission Size
| Permission Size
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x04
| 0x04
| Object Size
| Object Size
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x08
| 0x08
| Model size
| Model size
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x0c
| 0x0c
| BDHC size
| BDHC size
Line 40: Line 48:
Here's a table of the movement flags represented as hex bytes:
Here's a table of the movement flags represented as hex bytes:


{| border="1" style="border: 1px solid #999; border-collapse: collapse;"
{| border=&quot;1&quot; style=&quot;border: 1px solid #999; border-collapse: collapse;&quot;
|- style="background: #ccc;" align="center"
|- style=&quot;background: #ccc;&quot; align=&quot;center&quot;
! Hex Value
! Hex Value
! Movement type
! Movement type
! Game
! Game
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 00
| 00
| Any Movement
| Any Movement
| HGSS/ DPPt
| HGSS/ DPPt
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 04
| 04
| No special permissions
| No special permissions
| HGSS
| HGSS
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 80
| 80
| No movement
| No movement
Line 60: Line 68:
Here's a table of special permissions represented as hex bytes:
Here's a table of special permissions represented as hex bytes:


{| border="1" style="border: 1px solid #999; border-collapse: collapse;"
{| border=&quot;1&quot; style=&quot;border: 1px solid #999; border-collapse: collapse;&quot;
|- style="background: #ccc;" align="center"
|- style=&quot;background: #ccc;&quot; align=&quot;center&quot;
! Hex Value (decimal)
! Hex Value (decimal)
! Movement type
! Movement type
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 00
| 00
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 02
| 02
| Grass
| Grass
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 03
| 03
| High Grass
| High Grass
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|04-09
|04-09
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|10-12
|10-12
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|13
|13
| Waterfall
| Waterfall
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|14-15
|14-15
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|16
|16
| Go down 1
| Go down 1
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|17
|17
| Water on the foots?
| Water on the foots?
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|18
|18
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|19
|19
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|1A-1B
|1A-1B
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|1C
|1C
| Go down
| Go down
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|1D-20
|1D-20
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|21
|21
| Foot on sand
| Foot on sand
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|22  
|22  
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|23-29
|23-29
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|2A
|2A
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|2B-32
|2B-32
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|33  
|33  
| Blocked
| Blocked
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|34-35
|34-35
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|36-37
|36-37
| Blocked
| Blocked
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|38-39
|38-39
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|3A
|3A
| Jump up 1
| Jump up 1
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|3B
|3B
| Jump under 1
| Jump under 1
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|3C-3F
|3C-3F
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|40
|40
| Rotate right
| Rotate right
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|41
|41
| Rotate left
| Rotate left
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|42
|42
| Rotate up
| Rotate up
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|43
|43
| Rotate down
| Rotate down
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|44-48
|44-48
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|49
|49
| Blocked
| Blocked
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|4A
|4A
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|4B
|4B
| Rock Climb
| Rock Climb
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|4C-4F
|4C-4F
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|50-53
|50-53
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|54-5D
|54-5D
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|5E
|5E
| Stairs down
| Stairs down
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|5F
|5F
| Stairs up
| Stairs up
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|60-63
|60-63
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|64
|64
| Go in without animation door
| Go in without animation door
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|65  
|65  
| Go out of building
| Go out of building
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|66
|66
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|67  
|67  
| Jump and transport in building
| Jump and transport in building
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|68
|68
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|69  
|69  
| Doors opening
| Doors opening
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|6A-6D  
|6A-6D  
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|6E
|6E
| Go in without animation door
| Go in without animation door
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|6F-70
|6F-70
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|71
|71
| Be on bike
| Be on bike
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|72
|72
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|73
|73
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|74-77
|74-77
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|78
|78
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|79-7B
|79-7B
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|7C
|7C
| Surfing
| Surfing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|7D-82
|7D-82
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|83
|83
| Open pc
| Open pc
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|84
|84
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|85
|85
| Open map sinnoh
| Open map sinnoh
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|86
|86
| Battle Watch(Tv program)
| Battle Watch(Tv program)
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|87-A0
|87-A0
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|A1
|A1
| Hiro under snow(Middle)
| Hiro under snow(Middle)
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|A3
|A3
| Hiro under snow(Only hat out)
| Hiro under snow(Only hat out)
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|A4
|A4
| Hiro under mug(middle)
| Hiro under mug(middle)
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|A5
|A5
| Hiro under mug(only hat out)
| Hiro under mug(only hat out)
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|A6
|A6
| Grass mug
| Grass mug
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|A7
|A7
| Under grass mug
| Under grass mug
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|A9
|A9
| Snow low
| Snow low
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|AA-D2
|AA-D2
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|D3-D9
|D3-D9
| Ride jump left
| Ride jump left
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|DB
|DB
| Ride bike
| Ride bike
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|DC-DF
|DC-DF
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|E0
|E0
| It’s lined with Pokémon picture books  
| It’s lined with Pokémon picture books  
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|E1
|E1
| It’s full of Pokemon book
| It’s full of Pokemon book
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|E2
|E2
| Pokémon magazines!  
| Pokémon magazines!  
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|E4
|E4
| The trash can is empty.
| The trash can is empty.
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|E5  
|E5  
|The shelves are jammed with colourful Pokémon Goods
|The shelves are jammed with colourful Pokémon Goods
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|E6-EA
|E6-EA
| Nothing
| Nothing
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|EB
|EB
| There's a ton of convenient item...
| There's a ton of convenient item...
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|EC
|EC
| The shelves brin....
| The shelves brin....
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|ED-FF
|ED-FF
| Free passage
| Free passage
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
|}
|}


Line 318: Line 326:
We find a sequence of 0x30 hex number in which we find all information of objects
We find a sequence of 0x30 hex number in which we find all information of objects


{| border="1" style="border: 1px solid #999; border-collapse: collapse;"
{| border=&quot;1&quot; style=&quot;border: 1px solid #999; border-collapse: collapse;&quot;
|- style="background: #ccc;" align="center"
|- style=&quot;background: #ccc;&quot; align=&quot;center&quot;
! Hex Value (decimal)
! Hex Value (decimal)
! Explanation
! Explanation
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x00-0x01
| 0x00-0x01
| Model number
| Model number
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x05-0x08  
| 0x05-0x08  
| X coordinates
| X coordinates
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x0A-0x0C
| 0x0A-0x0C
| Y coordinates
| Y coordinates
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x0E-0x10
| 0x0E-0x10
| Z coordinates
| Z coordinates
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x1E
| 0x1E
| Model widht
| Model widht
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x22
| 0x22
| Model height
| Model height
|- style="background: #eee;" align="center"
|- style=&quot;background: #eee;&quot; align=&quot;center&quot;
| 0x25
| 0x25
| Model lenght
| Model lenght

Revision as of 09:27, 24 November 2010



UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY


CLICK HERE


Map Structure

Maps in Pokemon Diamond and Pearl are stored in fielddata\landdata directory. List of Maps

Each map is divided in four parts

The first 0x10 bytes give the sizes of each section as such:

Location Description
0x00 Permission Size
0x04 Object Size
0x08 Model size
0x0c BDHC size

FIRST PART- MOVEMENT PERMISSION

First part represents movement permission. It's length depends from maps and is characterized by a sequence of XX YY XX YY ...

XX = special permissions

YY = movement flag

Here's a table of the movement flags represented as hex bytes:

Hex Value Movement type Game
00 Any Movement HGSS/ DPPt
04 No special permissions HGSS
80 No movement HGSS/ DPPt

Here's a table of special permissions represented as hex bytes:

Hex Value (decimal) Movement type
00 Free passage
02 Grass
03 High Grass
04-09 Free passage
10-12 Surfing
13 Waterfall
14-15 Surfing
16 Go down 1
17 Water on the foots?
18 Free passage
19 Surfing
1A-1B Free passage
1C Go down
1D-20 Free passage
21 Foot on sand
22 Surfing
23-29 Free passage
2A Surfing
2B-32 Free passage
33 Blocked
34-35 Free passage
36-37 Blocked
38-39 Free passage
3A Jump up 1
3B Jump under 1
3C-3F Free passage
40 Rotate right
41 Rotate left
42 Rotate up
43 Rotate down
44-48 Free passage
49 Blocked
4A Free passage
4B Rock Climb
4C-4F Free passage
50-53 Surfing
54-5D Free passage
5E Stairs down
5F Stairs up
60-63 Free passage
64 Go in without animation door
65 Go out of building
66 Free passage
67 Jump and transport in building
68 Free passage
69 Doors opening
6A-6D Free passage
6E Go in without animation door
6F-70 Free passage
71 Be on bike
72 Free passage
73 Surfing
74-77 Free passage
78 Surfing
79-7B Free passage
7C Surfing
7D-82 Free passage
83 Open pc
84 Free passage
85 Open map sinnoh
86 Battle Watch(Tv program)
87-A0 Free passage
A1 Hiro under snow(Middle)
A3 Hiro under snow(Only hat out)
A4 Hiro under mug(middle)
A5 Hiro under mug(only hat out)
A6 Grass mug
A7 Under grass mug
A9 Snow low
AA-D2 Free passage
D3-D9 Ride jump left
DB Ride bike
DC-DF Free passage
E0 It’s lined with Pokémon picture books
E1 It’s full of Pokemon book
E2 Pokémon magazines!
E4 The trash can is empty.
E5 The shelves are jammed with colourful Pokémon Goods
E6-EA Nothing
EB There's a ton of convenient item...
EC The shelves brin....
ED-FF Free passage

SECOND PART- 3D OBJECTS

In this parts we find 3d objects that are showed in the map. We find a sequence of 0x30 hex number in which we find all information of objects

Hex Value (decimal) Explanation
0x00-0x01 Model number
0x05-0x08 X coordinates
0x0A-0x0C Y coordinates
0x0E-0x10 Z coordinates
0x1E Model widht
0x22 Model height
0x25 Model lenght

For more information, go to Model list

THIRD PART- NSBMD MODEL MAP

The NSBMD format will have its own page. NSBMD

FOURTH PART- BDHC

Currently the BDHC is known to have two parts. The first part controls base height of entire map. The second part only exists in maps with changes in height (e.g. stairs).