|31st October 2013, 05:05 PM||#1|
[NDS] Creating, Converting and Importing NDS Maps [D/P/Pt/HG/SS+]
Translated by: Linkandzelda
Creating, Converting and Importing NDS Maps
Welcome to Trifindo's guide to creating and importing maps on NDS. Here we will explain how to create your own NDS Pokémon maps. This is NOT the best method because it does not allow some options such as vertex colors, fog on the map, or the map is dark at night ... However, it's a good way to get started in DS Pokémon hacking.
This tutorial will be split into 2 parts: the first part with the instructions to create a new map and save it as .obj format followed by the conversion to Nsbmd, and the second with instructions to import it into the rom using SDSME.
To follow the tutorial, you will require strong knowledge with the following tools and resources:
Creating The Map
Open SketchUp Pro and with the pen tool draw a square base with dimension 8x8.
Select it, right click and choose "reverse faces". This will show up the case as white. (If the faces are dark, it will not be viewed properly in game even if we change the colour).
Then select the "paint" (a paint pot) tool, this will open a new window. Then we add a new material. Another window will open in which we will import the texture for use as the map flooring. (In this case the texture "ngrass").
To match with the dimensions of the game, make sure the material size is 0.25 x0, 25m.
The face is now painted with our material and divided into 4 equal squares showing the middle point.
Next, select everything and move (with the Move Tool) so that the midpoint of the map matches the origin position in Sketchup Pro.
Now we import the graphics we want for our map (trees, mountains, grass ...). We can follow two methods:
NOTE: The graphics can only be the same as whats in the tileset. (In our case we use the Pokémon Diamond Tileset 6)
Once we know which method to use, open a new window in Sketchup and open the map that contains the graphics that we want to us. The map may appear to form a single object, which we need to right click and "explode" about 3 times until it is possible to select any object on the map.
For this tutorial we will only be copying the tree, but you can copy anything you want into your map. Select the faces with the tree texture, and the faces with soil texture and copy it (Ctrl + C).
Paste the object into our own map (Ctrl + V).
We'll see listed 2 new materials with corresponding textures in the materials box: NOTE: When pasting the graphics on our map we paste 2 times the same texture as SketchUp will create 2 different materials and this will make the map fill more.
Select the tree and divide into 4 equal sides 0,5 x0, 5m and delete the faces and surplus lines, so it looks something like below.
Select all faces of the tree (including shade) and we right click "Create Group". This makes the tree self contained, and prevents it from joining onto other objects and vertices.
Divide the map up into small segments equalling 0,5 x0, 5m. (X0 0.25 On this scale, 25m equals 1 "tile" GBA). This is the same size as the tree we imported, and the size of the tile.
We then remove the faces that we created just now where we want to place our tree objects.
Copy the tree and paste it EXACTLY matching the vertices of the shadow of the tree with the vertices of the face previously deleted, so they line up perfectly with no gaps on either side.
Repeat the same process with the remaining trees and remove the soil on SOME lines, NOT all.
NOTE: In this way, by copying and pasting the tree within our map, the number of materials and textures does not change (in our case 3 materials: soil, shade tree and the tree).
When we finish the map, delete the tree we pasted originally on the outside. Select all, right click and we click "Create Group" to avoid problems with the textures and the map scale when imported later.
Well, we've finished our map, now to export it and create our map in NSBMD.
Exporting And Converting Our Map
We select our map in Sketchup, we go to "File," "Export" and the bottom bar select "File OBJ (*. Obj)".
NOTE: If there is no option to export .obj, then you are not using the Pro version of SketchUp.
We select "Options ..." and put them EXACTLY like this:
Create a new folder and export the map inside with "Export" button. We will get a message showing the results of the export. If all went well, the number of materials should match the texture (in our case 3).
If not, then something went wrong and you should start the guide over again.
Create a new file NSBMD (3D Model Format for NDS) from our map .obj file. We will use the amazing MKDS Course Modifier (Beta 11 or higher). Open the program, select "File", "New" and select "NSBMD".
Select our map .obj file.
Another window will open, select where to save the new .NSBMD file.
In the next window select "Custom" and put in the scale "64". Also create a file NSBTX with the box below. (Files are NSBTX game tilesets textures containing maps).
We've now created our map and converted it from a .obj file into an NDS 3D model file .NSBMD file, ready to be imported.
Importing Our Map Into The Game
To import the map will use the great tool from Spiky, SDSME.
I recommend sticking to the same folder that SDSME is located, putting the rom of Pokémon Diamond, the map .nsbmd and tileset .nsbtx files.
Open the rom with SDSME, it usually takes a few seconds depending on the size of the game. We select "Matrix" and "Map files". This will list a lot of complex numbers, but don't worry, it's simple. If you look closely you can see that the white color is the same route that makes up all the maps in game, ie, this is the map of the region. To simplify the tutorial edit the first map, ie Greenleaf Village, which is map number 0000.
Changing the map around, we need to make sure the numbers match up what is there for the movement permissions (for example, the edge with trees, shown in purple near map 0000, has the number 0173 .. The edge with water has the number 0174 ....).
To view the 3D map double click on it.
To find out which corresponds to the map tileset that will be replaced, we will select "Matrix" and "Headers". In the place where our map is 0000 0411 header appears, double click it. Switch to the window "Headers", where we can edit things like music, the tileset in use ... (Equivalent to the headers of GBA) We will see that the second column indicates the number using the map tileset is ie the Tileset 6.
Select "Maps", "3D view" and select to "Import". We select our map .nsbmd (which must be in the same folder as SDSME) and select the tab to tileset 6.
Adding Back Textures
Do not panic, the map will have no textures loaded and look bad, time to fix it.
To solve the problem we can use two methods:
Each method below is explained:
In SDSME go to "Maps" and then "Tilesets", select the appropriate tileset of our map and go to "import". We will import the file created earlier with our maps .nsbmd, which is the file .nsbtx exported earlier.
If select "3D View" and load the tileset 6 tab on the bottom, we see see the map perfectly (can be somewhat smaller, but in the rom it will correctly load):
For this method we will use a program like Cygnus, a hex editor. We will modify the file .nsbmd and make it use the original game tileset and not alter the appearance of other maps. To do this open the map .nsbmd with Cygnus and save it as another file that can be called mapa_tex.nsbmd. (Make a copy in case it breaks the original).
When opened you will see a combination of numbers and letters very complicated in the left column, but let's just look in the right column. Here we see 3 "blocks" that will give us useful information on the map.
We will edit the 2nd and 3rd so that the name of the textures and palettes are the same as tileset 6 in game. But how do we know what texture is "0_t" or "1_t"? Very easy, open MKDS Course Modifier and open our texture file created with our map .nsbmd, the .nsbtx file.
We can now see which is which. To learn the names of these textures in the game, go to SDSME "Tilesets" section and select the tileset for the map that will be replaced. Now we can search the list of textures and palettes for these names.
Now that we know what they're called in the game and which is each, swap them out in Cygnus and write their names in this way:
NOTE: NEVER delete data in Cygnus as it can break the whole file. (This must be the same size always) Also, you can modify data other than the names of the textures and palettes. If you want to delete the name of the texture because it was wrong, write 00 in the appropriate place in left column.
Now we can import our mapa_tex.nsbmd in SDSME. It will look as follows (may be somewhat smaller, but in the rom will correctly show):
Adjust The Height Of The Map
We have imported our map correctly, now there is only a small step left: Setting the correct height map. (This is because the original map of Greenleaf Village has an elevation of 0.5 m that we have not done in Sketchup).
Go to "Matrices", "Alter edge maps" and the area which is out map, change the 00 for a 02.
We now "Save Current" and "Save ROM ...".
We're done, test the rom on an emulator and this is the result:
mewthree9000 liked this post
|31st October 2013, 05:11 PM||#2|
What does this button do?.....
This must have taken forever to translate! This is definitely one of my favorite tutorials from Whack A Hack. :3
LIVE THE REVOLUTION, PHO!
Gotta Hack'em All!!
My current projects:
-!!Elite FireRed ROM Base!!
Linkandzelda liked this post
|31st May 2014, 07:25 AM||#3|
Remixer/DS Music Hacker
Join Date: Sep 2013
Location: Lilycove City, Hoenn
This will definitely come in handy on my project. Thank you for this translated tutorial as i will have to use sketchup to "build" places like cinnabar island and various other locations from the gen 2 specs. I was dreading figuring this one out lol. On another note, The ability to import parts of a map will be very useful later as i can import many parts of the b2w2 maps on existing HGSS ones to give Kanto that modern feel. Much better than having to texture edit, and very useful as the trees in b2w2 are fully rendered in 3d vs that pseudo 3d tile layer in D/P/PLT/HG/SS
|converting, creating, d or p or pt or hg or ss, importing, maps, nds, [Tutorial]|