View Single Post
Old October 28th, 2012 (7:09 AM). Edited January 11th, 2015 by Platinum Lucario.
Platinum Lucario's Avatar
Platinum Lucario Platinum Lucario is offline
The Legendary Master of Light!
Join Date: Jan 2008
Location: Warrnambool, Victoria, Australia.
Gender: Male
Nature: Calm
Posts: 1,560
Hi everyone, welcome to my tutorial. Today I'm going to show you how to edit maps in Generation V.

If you're wanting to learn how to map in Generation IV, this guide may help you with manual extraction of BMD0 files, but I would recommend reading Team Fail's 4th Generation Mapping on how to edit maps for generation IV, this technique will be easier for you.

But as for Generation V, there is NPRE (Nintendo Pokémon ROM Editor) to extract the map data, but I can also show you how to extract them manually, which I will show you how to do so later on in the tutorial.


  1. Getting Started
    1. Exporting a Model to .OBJ
    2. Making a Model
      1. Setting up the Model
      2. Getting used to the Controls
  2. Exporting Model as .imd
  3. Changing Movement Permissions
  4. Changing Objects on the Map
  5. Credits

Alright, first of all, you will need the following tools:
  • A hex editor - for extracting the BMD0 data manually, I'd use HxD.
  • Pokémon Black/White Version or Pokémon Black/White Version 2 ROM.
  • [optional] Pokémon Diamond/Pearl/Platinum/HeartGold/SoulSilver ROM - for importing a map from Black/White or Black 2/White 2.
  • Nintendo Pokémon ROM Editor - for changing movement permissions
  • Discreet 3ds Max 6, Discreet 3ds Max 7, Autodesk 3ds Max 8 or Alias Maya 7 - for editing the model (which I have distributed along with the SDK, but I can't provide the link to it due to the forum rules. Try searching Google for it.) Outdated and no longer needed, use the 2010 version instead.
  • Autodesk 3ds Max 2010, Autodesk Maya 2010 or Autodesk Softimage 2010 - for editing the model (which I have distributed along with the SDK, but I can't provide the link to it due to the forum rules. Try searching Google for it.)
  • OBJ to MAX Plugin for Discreet 3ds Max 6, this is required if you're using Discreet 3ds Max 6. No longer needed, as Autodesk 3ds Max 2010 already contains the ability to import .OBJ files.
  • Nintendo Nitro-System plugins - for using on 3ds Max 6 or Maya for exporting the model as .imd (Which is also included in the package next to NitroSDK, due to the forum rules... I cannot provide the link, Google is your best friend) Also no longer needed, as the latest versions of the plugins can now be used instead.
  • 2009 versions of Nintendo TWL plugins - for using on 3ds Max 2010 or Maya 2010 for exporting the model as .imd (Which is also included in the package next to NitroSDK, due to the forum rules... I cannot provide the link, Google is your best friend)
  • MKDS Course Modifier - For exporting models as .obj so you can get a good idea on how maps are made and maybe start creating the map from it.
  • [optional]Trimble Sketchup Pro or Blender - for creating .obj files and exporting them. If you're using Trimble Sketchup Pro, you'll need this if you're importing .obj files. But since you've already got 3ds Max 6, there really isn't any need for it.

Getting Started

Alrighty, well first of all, before we start... let's put in the 3D plugins for the program that you installed onto your computer. In my case, in the past I used to use Discreet 3ds Max 6, it's old and less functional with newer operating systems. So instead, I use Autodesk 3ds Max 2010 and the 2009 versions of the Nintendo TWL plugins. When installing the plugins, be sure to follow the steps on how to install them in the setup document found in TWL System.

Exporting a Model to .OBJ

Alright, now where to start? OK, if you'd like to get a good idea on how 5th generation maps are like, well there's options you can do; The first option you can do is open up NPRE (Nintendo Pokémon ROM Editor), the map layout binary data is located in a/0/0/8, right click on the 8 file and go to Open as > Narc (3D). Once opened, then you can go to File > Save > Model to save the NSBMD model. As for the second option, you can do it manually by extracting any map data using Tinke in the NARC file in a/0/0/8, once you've extracted that, open up any hex editor such as HxD and select most bytes starting from "BMD0" all the way down to where you can see some Euro cent signs in the text view, once you see the start of them... look around in the starting point in the hex view to see if you can see any "20 00 20" bytes. Once you see them, stop the selection right before those bytes as they indicate the header for (what I assume is) the movement permission data. Copy and paste those values onto a new file and save the file as .nsbmd. After you've done that, open up SDSME (Spiky's DS Map Editor) and import the NSBMD into any map you'd like, by clicking on the Map Editor tab and then where it says "3D Model", click on "Import" and import the NSBMD that you extracted from Black/White or Black 2/White 2. Once you've done that, click "Save ROM". Next, you will need to open up Tinke and first open up the ROM you extracted the model from (either Black/White, Black 2/White 2), and open up the Nitro Archive in a/0/1/4 and extract whichever BTX0 the map model you extracted used, which you can find that out in NPRE (Nintendo Pokémon ROM Editor). After that, open up the ROM that you edited with SDSME, then go to fielddata/areadata/area_map_tex/map_tex_set.narc and unpack the Nitro Archive, after that... select "map_tex_set_6.BTX0" and then click the "Change file" button replace the BTX0 with the one that you exported from Black/White or Black 2/White 2. After you've done that, select map_tex_set.narc and click "Pack" and then "Save ROM". After you have done that open SDSME (Spiky's DS Map Editor), open the ROM that you edited with Tinke earlier and open up the map that you replaced. Under where it says "3D Model" click "Export with Textures". This will export the NSBMD with the textures assigned to it, so after you've exported the NSBMD with textures, open it up with MKDS Course Modifier and then click Export > Model > OBJ. Once exporting as .obj, all the textures assigned to the model will also appear in the same folder where it's saved. The folder where you saved it will also contain a .mtl file, which indicates the texture library. After that, you can open it up with any model editor that supports .obj files, I'd use either Discreet 3ds Max 6 or Autodesk 3ds Max 8.

Making a model (3ds Max tutorial)

Please note that in 3ds Max, textures are called "Materials".

Also, please make sure you are running 3ds Max 2010 as Administrator. To make sure you are, right click 3ds Max 2010 before opening it, then click "Run as Administrator" in the list. Or if you need to keep opening it, then right click, click Properties, click the Compatibility tab and then select "Run this program as Administrator", then click the OK button. Otherwise the Nitro G3D plugins won't work and will display an error.

Setting up the model

OK, well you've decided to open up a .obj file of the model, well the first thing you do when opening up 3ds Max is that you'll see a grid, that's where it shows so that developers can check to see if the model is aligned properly. Alright, now where to start? Well first off, click File > Import, then go to the folder that contains the .obj and open it. Can't see it? Click the drop-down menu below where it says "3D Studio Mesh (*.3DS,*.PRJ)" and select "WaveFront Object (*.OBJ)", then you should be able to see it. If you're using 3ds Max 6 and can't see "WaveFront Object (*.OBJ)", then it means you haven't inserted the OBJ to Max plugin yet or inserted it incorrectly, it can be found at the start of my tutorial. Be sure to put the Obj2Max.dli file in the plugins folder in .\3dsmax6\plugins. Once you've opened up the .obj, it'll come up with a window that will ask you which polygons to import, make sure you have all the Geometry options selected and make sure that the Vertex scale is set to 1.00, otherwise it's going to appear so tiny that you won't be able to see it. So after you've done that, then import the .mtl file that is contained in the same area as the .obj. Go to File > Import and then make sure this time that the drop-down box is set to "WaveFront Material (*.MTL)" and then open up the .mtl file, you'll see a window come up asking where to save it, select "add to library" as the option to where to save it to.

Getting used to the Controls

Now this is one important step to learning how to use 3ds Max, this is essential to building models for your ROM hack.

First at the top, you've got the Material Editor which can edit the materials which can be assigned to objects, which I'll explain about a little later. Incase you're wondering, objects are a group of polygon data that are all bunched together. Then you've got Move, which can move the object around. And next to that... you've got Rotate, which can rotate the object around. Now as we get onto the stuff on the right, next to the model viewer, we have several different stuff in which I can explain about. You've got the tabs in which contain Create (which you can select to make a polygon, whenever it'd be a box or just a simple line), Modify (which can modify the different contents, like UVW that can edit the amount of times a material repeats or changing polygon sizes or vertexes, vertexes are the joints of what a polygon is made of), Hierarchy (I don't know what that does), Motion (which can change the animation, which isn't needed for maps, but probably for structures like wind turbines), Display (which can change the display in 3ds Max for showing the objects, it has no effect on the model when exported as .imd though) and Utilities which contains the extra stuff for modeling.

When creating a polygon, select the Create tab, then select any Object Type, you can also select the drop down box to select many other options which would indeed be helpful for building models on 3ds Max.

After making a polygon, the next thing you need to do is make sure the model is in the proper position, you can use the rotate or move tool to rotate or move it in any direction and then take a look at the bottom of the window where it shows the X, Y and Z values for the position. After making it in the place you want it to be, then you've got it in the right place.

Assigning Materials is quite a great way of getting materials assigned to objects so they can show up in your ROM hack. First open up Material Editor , you will see many options. The only options we'll use is the Shader Basic Parameters, Maps - Diffuse Color and selecting NITRO Standard. First off, select the button where it says "Standard" and then select "NITRO Standard" from the list. After you have done so, collapse the Maps section of the Material Editor, it should be found where it says "Maps", after that click "None" next to Diffuse Color and select Bitmap from the list and open up the image of your choice. After that, click the Assign Material to Selection button, once you've done that, click Show Map in Viewport . If you'd like the polygons to have 2 sides, select "2-sided" in the Shader Basic Parameters.

Exporting Model as .imd

Once you've completed the model you've been working on, it's time to export the model. So how do you do it, you ask? Alright well... click File > Export, now click the drop down box and select "Nintendo NITRO (*.IMD)", and name it whatever you'd like, though you might want to keep it short though. After that, a window will come up with the options. In General Options, make sure you have the Magnify set to 64.0000 rather than 1.0000, this is so that the map doesn't appear tiny when it's imported. Make sure you have MAXScript Listener open before exporting.

If you're getting a an error like this in MAXScript Listener:
Warning: UV range over: [polygon name][2] ([some numbers here].[some numbers here], -[some numbers here].[some numbers here])
That means you have a polygon that is too big with it's small material repeating too often. This can happen often with triangle polygons, make sure that if you're making a polygon big... you must make several small ones to make one big one. If you know what I mean of course.

If you get an error saying this:
An exception occurred! Type:TranscodingException, Message:An invalid multi-byte source text sequence was encountered
g3dcvtr ERROR: Read error M1.imd
file useifp.h, line 108
It probably means that a polygon is too far away outside the perimeter of what the Nintendo DS or DSi can handle.

Note: If you get an error saying this:
An error has occured and the application will now close.
And asking if you'd like to save a copy of the current scene or saying that no scene changes have occured since your last save, then comes up with an error report. If this is happening, then it means that something might be going wrong, I don't know what causes it. I've been having this problem and sorry, I don't know how to fix the issue... all I can say is, use a virtual machine like Oracle VirtualBox or something, like what I did if you're having this problem.

This is no longer needed, as long as you're using 3ds Max 2010 with the 2009 Nintendo TWL plugins.

Once you have exported the model, it's time to import the model into the map you'd like to change. But before we do so, the model is still in .imd format. What you need to do is use g3dcvtr, a program that converts Nitro Intermediate Formats into nsbmd or nsbtx. Now open up a Command Prompt, it can be done by opening the start menu and typing in "cmd" in Windows Vista or Windows 7, if you're using Windows XP or earlier... open the start menu and click Run and then type in "cmd".

Once you have opened up the Command Prompt, cd to the folder you've got the g3dcvtr and the .imd file in, the .imd file and g3dcvtr must be in the same folder together.

If you want to only export the texture, type in this:
g3dcvtr.exe [name].imd -etex [output name].nsbtx
If you want to only export the model, type in this:
g3dcvtr.exe [name].imd -emdl [output name].nsbmd
If you want to export the model with the textures, type in this:
g3dcvtr.exe [name].imd -eboth [output name].nsbmd
For a list of other commands, be sure to put in "g3dcvtr.exe --help".

Note: If you're importing nsbmd models as maps or buildings, you must convert the .imd file to nsbmd without the textures by using the -emdl command, otherwise the game will freeze upon loading the model when imported.

Note: If you're getting an error saying something like this:

"g3dcvtr ERROR: Duplicate resource Name 'world_root'
file make_patricia.cpp, line 265"
Then it means you haven't deleted "world_root" polygon box in 3ds Max 6 or Maya. It needs to be removed in order for it to be converted to .nsbmd. You'll also need to remove the "polysurface1" and "polysurface2" as well, not because they'll cause an error, but because they'll just appear as a white box otherwise.

Note: If you ever get an error that says this:
Warning: Exported material is not NITRO standard or NITRO morpher and will be set to default parameters: "[material name]"
This means that you haven't set the material to NITRO Standard or NITRO Morpher, as the error pretty much says. So check that particular material in Material Editor and click "Standard" button then click "NITRO Standard" in the list. Remember, you need to change all the materials to NITRO Standard.

Note: If you are also getting this error:
Warning: Length of name over 16 characters. texture: [texture name]
Warning: Length of name over 16 characters. palette: [palette name]
This error means that the name of the texture or palette is over 16 characters and you need to rename it to be shorter than 16 characters. Either you don't know what "character" means, or that NDS model editing is really new to you, that's OK... I understand. ^^ Many people have been asking me about this error, so I'll have to put here so that everyone will read this before asking about this error again. Just to let those who don't know what "character" means, "character" means a letter of the alphabet or some symbol listed in any speaking language, makes sense? ;)

Alright then, now that you have an .nsbmd file, now it's time to insert it into the map. And when doing it, you can either do it using NPRE or manually with a hex editor. To do it with NPRE, open up NPRE and open up the ROM you wish to edit, open up the Nitro Archive with the maps (a/0/0/8), select the map you wish to replace, click File > Open > Nsbmd and it will insert the map into the binary, make sure you click save afterwards. To do it manually, open up a hex editor, open both the map binary that you're going to replace the map model with, and open up the .nsbmd file in the hex editor as well. Copy all the hex values from the .nsbmd, go back to the tab with the map binary you opened and select the values starting from BMD0 to right before the "20 00 20" hex values, and then paste the data. And there... you're all done with the map, let's test it out. ^^

Note: Are some textures not displaying on the map when they're supposed to? If you are using textures like flowers in your map, you will need to edit the NSBMD with a hex editor and change the name of the texture, it needs to match the texture name in the NSBTX which you can check using Tinke.

Oh my, you say that your game freezes/locks up upon entering the map? Well that happens when you've converted the .imd to .nsbmd with the textures on there. The map model is not supposed to have textures assigned to it, because the ARM9 already chooses the NSBTX from a different Nitro Archive, and since the textures are already assigned to the model and the ARM9 is trying to use the texture data for the map model, therefore resulting in a freeze/lock up.

Changing Movement Permissions

Note: Please remember that when using NPRE, after inserting a map model into the map binary with a hex editor, you will be unable to open the map model in NPRE unless you know how to fix the issue, which I don't know how to yet. But movement permissions will still be editable, though it will appear blank.

To change movement permissions, you can use NPRE to alter movement permissions. Though you're probably wondering about the ones on Skyarrow Bridge and Castelia City, well those are known as polygon movement permissions... which cannot be editable yet, unless you know how to with a hex editor... which I really do need to research that one. OK for now, I'm going to teach you how to edit the square-by-square movement permissions, which you'd probably remember from Generation 3 using AdvanceMap or Generation 4 with SDSME. OK, now open up NPRE (Nintendo Pokémon ROM Editor), open up the ROM that you choose to edit, then click on the "Movements" tab. You'll see many different numbered blocks with colours on them. Now all you need to do is select one and press any number on the keyboard to change it, exactly like in SDSME (Spiky's DS Map Editor). Also, see the block in the top left corner of the movement permissions? This indicates the size of how many movement permissions you can place on a map. After you have edited the movement permissions, click save to save to the changes to the ROM. And I will list all the different movement permissions you can use on a map.

If you know any more and their effect, please state them here in this thread and I shall edit this post to put more of them in.
0	|	Passable
1	|	Not Passable
2	|	Passable (short grass)
3	|	Passable (Rugged Road Path)
4	|	Passable with Grass Patch effect (Grass Wild Encounters if available)
5	|	-
6	|	Passable with Dark Grass Patch effect (Single or Double Grass Wild Encounters if available)
7	|	-
8	|	-
9	|	-
10	|	Passable (Cave Wild Encounters, if available)
11	|	-
12	|	-
13	|	-
14	|	Passable (Snow movement)
15	|	-
16	|	-
17	|	-
18	|	Not Passable (stops slipery ice movement)
19	|	-
20	|	-
21	|	-
22	|	Passable (Tower Wild Encounters, if available)
23	|	-
24	|	Passable (slippery ice, you move until you hit 1, 18 or land on 14 or 0)
25	|	-
26	|	-
27	|	-
28	|	Passable (Swamp water Wild Encounters, if available)
29	|	Boulder Hole (not passable if boulder is not in, passable if boulder is in)
30	|	-
31	|	Passable (grass edge)
32	|	-
33	|	-
34	|	-
35	|	-
36	|	-
37	|	-
38	|	-
39	|	-
40	|	-
41	|	-
42	|	-
43	|	-
44	|	-
45	|	-
46	|	-
47	|	-
48	|	-
49	|	-
50	|	-
51	|	-
52	|	-
53	|	-
54	|	-
55	|	-
56	|	-
57	|	-
58	|	-
59	|	-
60	|	-
61	|	Requires Surf to pass (Wild Encounters if available, pond water)
62	|	-
63	|	Requires Surf to pass (Wild Encounters if available)
64	|	-
65	|	Requires Surf to pass (Wild Encounters if available, indicates water's edge)
66	|	-
67	|	-
68	|	-
69	|	-
70	|	-
71	|	-
72	|	-
73	|	-
74	|	-
75	|	-
76	|	-
77	|	-
78	|	-
79	|	-
80	|	-
81	|	-
82	|	-
83	|	-
84	|	-
85	|	-
86	|	-
87	|	-
88	|	-
89	|	-
90	|	-
91	|	-
92	|	-
93	|	-
94	|	-
95	|	-
96	|	-
97	|	-
98	|	-
99	|	-
100	|	-
101	|	-
102	|	-
103	|	-
104	|	-
105	|	-
106	|	-
107	|	-
108	|	-
109	|	-
110	|	-
111	|	-
112	|	-
113	|	-
114	|	-
115	|	-
116	|	Ledge (not passable when moving south, jump down if moving north)
117	|	Ledge (not passable when moving north, jump down if moving south)
118	|	-
119	|	-
120	|	-
121	|	-
122	|	-
123	|	-
124	|	-
125	|	-
126	|	-
127	|	-
128	|	-
129	|	-
130	|	-
131	|	-
132	|	-
133	|	-
134	|	-
135	|	-
136	|	-
137	|	-
138	|	-
139	|	-
140	|	-
141	|	-
142	|	-
143	|	-
144	|	-
145	|	-
146	|	-
147	|	-
148	|	-
149	|	-
150	|	-
151	|	-
152	|	-
153	|	-
154	|	-
155	|	-
156	|	-
157	|	-
158	|	-
159	|	-
160	|	-
161	|	-
162	|	-
163	|	Changes from square movement to Polygon movement permissions
164	|	-
165	|	-
166	|	-
167	|	-
168	|	-
169	|	-
170	|	-
171	|	-
172	|	-
173	|	-
174	|	-
175	|	-
176	|	-
177	|	-
178	|	-
179	|	-
180	|	-
181	|	-
182	|	-
183	|	-
184	|	-
185	|	-
186	|	-
187	|	-
188	|	-
189	|	-
190	|	-
191	|	-
192	|	-
193	|	-
194	|	-
195	|	-
196	|	-
197	|	-
198	|	-
199	|	-
200	|	-
201	|	-
202	|	-
203	|	-
204	|	-
205	|	-
206	|	-
207	|	-
208	|	-
209	|	-
210	|	-
211	|	-
212	|	-
213	|	-
214	|	-
215	|	-
216	|	-
217	|	-
218	|	-
219	|	-
220	|	-
221	|	-
222	|	-
223	|	-
224	|	-
225	|	-
226	|	-
227	|	-
228	|	-
229	|	-
230	|	-
231	|	-
232	|	-
233	|	-
234	|	-
235	|	-
236	|	-
237	|	-
238	|	-
239	|	-
240	|	-
241	|	-
242	|	-
243	|	-
244	|	-
245	|	-
246	|	-
247	|	-
248	|	-
249	|	-
250	|	-
251	|	-
252	|	-
253	|	-
254	|	-
255	|	-

Changing Objects on the Map

So you're wanting to change a house or even a sign or wind turbine? Welcome to the objects tab of NPRE! This area is used for whenever you wish to change an object like a house or something. But please remember, if you have inserted a map model manually, all objects will be removed from the map, meaning you'll have to put in all the objects all over again, but remember... you have to have edited the movement permissions first if the movement permissions page is blank. On the right hand side of the objects page, you've got the list of objects on the map. For the columns, Count means the number of the object for the map, Id means the ID of the object used, X8 (probably a typo) means the X position of the object, X-Flag (I'm not sure what this does), Y means the Y position of the object, Y-Flag (I'm not sure what this does), Z means the Z position of the object, Z-Flag (I'm not sure what this does), Height means the height of the object, Length means the length of the object and Width means the width of the object. To add in a new object, click on the add button and put in any number into the count column, make sure that it is in decimal order, like if the one above is 5, it has to be 6 and so on. After that, put in the ID of the object you'd like to use, then followed by the other columns. After you've changed the objects on the map, don't forget to click the save button.

For the IDs of objects you can use for the map, here's a list of them and if you find out any other model IDs and what they are, please list them here in the thread so I can put more of them in the list.
48	|	Player's house
49	|	Aspertia City house style 1
50	|	Aspertia City house style 2
152	|	Aspertia City sign


  • Spiky-Eared Pichu - for helping me learn about changing the names of materials with a hex editor when they don't display
  • pichu2000 - for making Nintendo Pokémon ROM Editor
  • Team Fail - for his tutorial on editing maps in Generation 4
  • Intelligent Systems Co Ltd. - for developing the NITRO and TWL plugins for 3ds Max, Maya and Softimage
  • Game Freak - for developing Pokémon Black/White and Pokémon Black 2/White2
  • Nintendo Co Ltd. - for developing the Nintendo DS

Feel free to copy and paste this tutorial onto other websites, 'cause we surely don't want to lose this free knowledge about editing maps in Generation 5.

If this tutorial has been copy and pasted, please note that this tutorial has originally been made by PokémonShinySilver from PokéCommunity, also known as "Platinum Lucario" on other forums *gets credited automatically*. Please don't remove this message when copy and pasting the tutorial, thanks. ^^
[Platinum Lucario's Signature]
If you need to disable my signature, please give me some advice on how to improve the CSS-DIV code. Thanks!
Signature Status: Strikes: 1/3 | Infractions: 0/3
It's time to change the future...
to a positive direction!

Let's prevent things from getting bad!

I'm a ROM and ISO Researcher
Current Project: Researching Pokémon Mystery Dungeon Adventure Squad games (WiiWare)
Reply With Quote