• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Tool: Yet another map viewer

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
Hi

Here is a screenshot of the tools I wrote in the last two weeks. Essentially it is a BMD0-Viewer, BUT it is designed to write the data back to the rom.
This will be the first map-*editor* for the DS Games. :D

The link is in my signature.

knizz
 
Last edited:
219
Posts
16
Years
Looks it's a great start on Map Edit^^
I know nothing about DS hacking,but
Code:
const double PI=3.141592654;
may better than
Code:
#define PI 3.141592654
in C++...
And other codes just double Dutch to me...
I try to complie the test.cpp,it says about undefined thing.So I change all the include files to *.c.This time it shows tons of errors...
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
You'll have to wait for the exe because I don't have a windows machine. When I get access to one I'll compile it for you.

If you want to compile it yourself on Windows... here are some instructions but the first setup takes up to one hour. First download and install msys and mingw. (these are packages to fake a linux environment for windows which is easier than the other way round) The default locations are C:\msys and C:\MinGW. If you install it to a different drive change the according line in msys/1.0/etc/fstab. Then download the fltk sourcecode version 1.3 and rename the unzipped folder to fltk and put it in the same directory as my code (you need all files, not just "test.cpp"). Now start cmd.exe and navigate to the code folder. Next type C:\msys\1.0\bin\bash.exe. The "bash" is the linux-aquivalent of cmd. Whenever you start the bash type "export PATH=/bin:/mingw/bin". (don't use backslashes here). In the bash "dir" => "ls". Open the fltk-directory by typing "cd fltk" and use the following commands to set up fltk: "./configure" and "make".

Now you have everything to start compiling. Go back to my source code by typing "cd ..". If you want to compile test.cpp type "./build test" and when you want to compile the thing you saw in the screenshot type "./build map_editor fltk/lib/libfltk_gl.a fltk/lib/libfltk.a -lglu32 -lopengl32 -lole32 -luuid -lcomctl32 -lgdi32 -luser32"

As I said I'm not using a windows machine right now so there can be a mistake in these instructions.

About PI... it doesn't really matter but there enough macros in this programm already so I think I'll change that.

If you still get error messages post them. It happens a lot of time though that I break certain parts for a version or two because I want to save my work between coding sessions. (It's a bad habit... I know).

There is also a bug tracker at the project site so if you find a bug you can post it there and the website keeps track of it.

...

Compiling on linux is so much easier ;)
 
Last edited:

m64m

NSMB Hacking Expert
13
Posts
13
Years
  • Seen Oct 24, 2011
when I try to SVN Chckout "http://poke-tools.googlecode.com/svn/trunk/ poke-tools-read-only", it says "Error: URL doesn't exist". Help please? Thanks =D
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
when I try to SVN Chckout "http://poke-tools.googlecode.com/svn/trunk/ poke-tools-read-only", it says "Error: URL doesn't exist". Help please? Thanks =D

I don't know why it doesn't work... It works for me... You probably misspelled it. ("chckout" for example)

Right know I'm adding some features from PPRE to my program. I only created the interface yet so none of the buttons in the next screenshot works... but soon.

I'm still work on the map-editor but I'm having problems with missing triangles
 
Last edited:

m64m

NSMB Hacking Expert
13
Posts
13
Years
  • Seen Oct 24, 2011
sorry, that was my own typo in the post XD

I'm actually using a program called TortoiseSVN. I've used the checkout before (for a New Super Mario Bros. Editor), and it's worked fine. Do you know what the cmd line for SVN checkout is?
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
You have to check out "http://poke-tools.googlecode.com/svn/trunk/" not "http://poke-tools.googlecode.com/svn/trunk/poke-tools-read-only"
 

m64m

NSMB Hacking Expert
13
Posts
13
Years
  • Seen Oct 24, 2011
=D thanks!! Now I just need to build an exe.
 

m64m

NSMB Hacking Expert
13
Posts
13
Years
  • Seen Oct 24, 2011
hm. Tried using it. Dropped some narc files, but only got a flash of a cmd window. Too fast for a proper prntscrn. something about -1, and <ur-mom.nds>. wonder what that's all about XD
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
OH NO! Thats the wrong tool! (I meant the FIRST link in my sig)

I won't be able to post in this forum for a week but I'll continue coding.

Here's a new screenshot that shows a map+buildings.
 
Last edited:

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
The first lines explain everything and as I said in the post about compiling under windows... You need ALL FILES.
 

m64m

NSMB Hacking Expert
13
Posts
13
Years
  • Seen Oct 24, 2011
Hey, will Poke-Tools be able to edit event locations and warp locations?
 

sir.euge

Bunchies Back!
140
Posts
14
Years
  • Age 30
  • Seen Jul 17, 2012
Are we going to be able to switch from pixel view to textures and back? Are we going to be able to drag the objects on the map? I dont really understand this but im trying.
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
Hey, will Poke-Tools be able to edit event locations and warp locations?

Are we going to be able to switch from pixel view to textures and back? Are we going to be able to drag the objects on the map? I dont really understand this but im trying.

All these features will be present in the final version but not in the next 3 months.
I believe PPRE can read and write the event- and wrap-locations. Then I can "copy" it from there.
At the moment I am focusing on textures and the code for writing the data back to the rom.

This week I fixed bugs and the model-reader is finally stable. I already uploaded the changes

I have problems with the scale of the objects on the maps. Can anyone give me a hint where to read the size?

btw the yellow thing on this screenshot is a loading-bar
 

Full Metal

C(++) Developer.
810
Posts
16
Years
hm...did this ever get compiled?
this is looking good dude! are we still be able to load from .narc files though?
and about the size...that sounds like a good question o.o
maybe the game does the sizes itself for models. eg, trees are X height, and this building is X height. Not "this object is Y height, and the same object type over here is Z height". so maybe editing the height/size isn't doable unless we edit the models themselves. if i recall, people changed the twinleaf town houses into a GTS or somethin like that by one byte -- the model number. maybe that info is in a table somewhere.
(not really supposed to be on comp right now, so, yea...)
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
hm...did this ever get compiled?
this is looking good dude! are we still be able to load from .narc files though?
and about the size...that sounds like a good question o.o
maybe the game does the sizes itself for models. eg, trees are X height, and this building is X height. Not "this object is Y height, and the same object type over here is Z height". so maybe editing the height/size isn't doable unless we edit the models themselves. if i recall, people changed the twinleaf town houses into a GTS or somethin like that by one byte -- the model number. maybe that info is in a table somewhere.
(not really supposed to be on comp right now, so, yea...)

This program is *only* able to load .narc files.

What I meant was the scaling-factor not the absolute size because all models have different scales.

A map-file consists of four parts. It's second part lists the models placed on the map. Each entry of the list contains the model-number, the position and the scaling-factors. The factors are this list always 0.25. (I don't know if it actually changes the size in the game but the ProjectPokemon-Wiki and pichu2000 say so.)

On some maps the coordinates have to be doubled. Now both the position and the size are read incorrectly and I have no idea how to fix it. (The models don't use the 0x1B Command either= another way to scale a bmd)
 

m64m

NSMB Hacking Expert
13
Posts
13
Years
  • Seen Oct 24, 2011
Knizz, it seems that they designed the objects 4x the actual display size to deal with crappy texture stretching (much like we see in N64 games and many other DS games). It doesn't help much when the camera zooms in when you enter a building though, as it's very much visible. If I had to take a guess as to where the scaling is done, I'd assume it was done in the infinite blob known as 'land_data.narc'. I may be very, very sadly wrong though. XD

On the brighter side of things, it's looking great!! Definitely keep up the hard work!
 

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
Knizz, it seems that they designed the objects 4x the actual display size

Unfortunately they aren't. The stairs up have 2x the size of the stairs down. (In the pokecenter) It's ridiculous.
 
Back
Top