Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tool] Yet another map viewer

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #1    
Old May 11th, 2010 (09:33 AM). Edited October 11th, 2010 by knizz.
knizz's Avatar
knizz
 
Join Date: Aug 2007
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
Attached Images
File Type: gif knizz-tool.gif‎ (48.6 KB, 1047 views) (Save to Dropbox)
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #2    
Old May 13th, 2010 (07:23 PM).
Team Fail
Fly with me
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Ok. All I can find is the source, and I don't know how to compile. Can you post a .exe anywhere so I can actually use it? It sounds like a cool idea and all, but...
__________________
| | | | |
PM | VM



Do the best with whatever you can today.
Then tomorrow, you will have surely progressed.

Reply With Quote
  #3    
Old May 14th, 2010 (03:11 AM).
liuyanghejerry's Avatar
liuyanghejerry
Trainer
 
Join Date: Jan 2008
Location: China,Xi'an
Nature: Calm
Send a message via ICQ to liuyanghejerry Send a message via Windows Live Messenger to liuyanghejerry Send a message via Yahoo to liuyanghejerry
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...
__________________
Zel,thethethethe,LU-HO,Darthatron,HackMew,ZodiacDaGreat,Juan,score_under,JPAN,Tamah-chan,I really appreciate your kindness and your help!:D


I did something that really bad.But made all Chinese can hack Pokemon, too.If you guys hate me, I totally understand,but cannot do anything but force to keep everything.
If there must be someone to undertake all spit and curse, it must be me.
Reply With Quote
  #4    
Old May 14th, 2010 (06:17 AM). Edited May 14th, 2010 by knizz.
knizz's Avatar
knizz
 
Join Date: Aug 2007
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 ;)
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #5    
Old May 16th, 2010 (06:01 AM).
m64m's Avatar
m64m
NSMB Hacking Expert
 
Join Date: May 2010
Gender: Male
Send a message via Windows Live Messenger to m64m
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
Reply With Quote
  #6    
Old May 16th, 2010 (07:23 AM). Edited May 16th, 2010 by knizz.
knizz's Avatar
knizz
 
Join Date: Aug 2007
Quote originally posted by m64m:
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
Attached Images
File Type: png pokemon-editor.png‎ (25.1 KB, 217 views) (Save to Dropbox)
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #7    
Old May 16th, 2010 (08:49 AM).
m64m's Avatar
m64m
NSMB Hacking Expert
 
Join Date: May 2010
Gender: Male
Send a message via Windows Live Messenger to m64m
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?
Reply With Quote
  #8    
Old May 16th, 2010 (01:09 PM).
knizz's Avatar
knizz
 
Join Date: Aug 2007
You have to check out "http://poke-tools.googlecode.com/svn/trunk/" not "http://poke-tools.googlecode.com/svn/trunk/poke-tools-read-only"
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #9    
Old May 16th, 2010 (01:32 PM).
m64m's Avatar
m64m
NSMB Hacking Expert
 
Join Date: May 2010
Gender: Male
Send a message via Windows Live Messenger to m64m
=D thanks!! Now I just need to build an exe.
Reply With Quote
  #10    
Old May 16th, 2010 (04:30 PM).
Team Fail
Fly with me
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Ok. I compiled it, and this is the result. It's attached. Now what? Is it a click-and-drag?
Attached Files
File Type: zip off2path.exe.zip‎ (6.5 KB, 85 views) (Save to Dropbox)
__________________
| | | | |
PM | VM



Do the best with whatever you can today.
Then tomorrow, you will have surely progressed.

Reply With Quote
  #11    
Old May 16th, 2010 (05:53 PM).
m64m's Avatar
m64m
NSMB Hacking Expert
 
Join Date: May 2010
Gender: Male
Send a message via Windows Live Messenger to m64m
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
Reply With Quote
  #12    
Old May 16th, 2010 (07:08 PM). Edited January 22nd, 2012 by knizz.
knizz's Avatar
knizz
 
Join Date: Aug 2007
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.
Attached Images
File Type: png foo.png‎ (36.4 KB, 216 views) (Save to Dropbox)
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #13    
Old May 16th, 2010 (07:43 PM).
Team Fail
Fly with me
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
map editor.cpp right? This is what I got when I tried to Compile:
Attached Images
File Type: jpg Compile Errors.JPG‎ (117.6 KB, 141 views) (Save to Dropbox)
__________________
| | | | |
PM | VM



Do the best with whatever you can today.
Then tomorrow, you will have surely progressed.

Reply With Quote
  #14    
Old May 16th, 2010 (08:21 PM).
knizz's Avatar
knizz
 
Join Date: Aug 2007
The first lines explain everything and as I said in the post about compiling under windows... You need ALL FILES.
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #15    
Old May 20th, 2010 (03:29 PM).
m64m's Avatar
m64m
NSMB Hacking Expert
 
Join Date: May 2010
Gender: Male
Send a message via Windows Live Messenger to m64m
Hey, will Poke-Tools be able to edit event locations and warp locations?
Reply With Quote
  #16    
Old May 20th, 2010 (04:51 PM).
sir.euge's Avatar
sir.euge
Bunchies Back!
 
Join Date: Jun 2009
Gender: Male
Nature: Naughty
Send a message via Yahoo to sir.euge
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.
__________________
Reply With Quote
  #17    
Old May 20th, 2010 (06:52 PM).
Full Metal's Avatar
Full Metal
C(++) Developer.
Community Supporter
 
Join Date: Jan 2008
Location: In my mind.
Age: 19
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to Full Metal
Quote originally posted by Team Fail:
map editor.cpp right? This is what I got when I tried to Compile:
just put all the source code files in the same folder and compile it again.
that should work (if you'll notice, there's more than one source file...)
__________________

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote
  #18    
Old May 21st, 2010 (10:15 AM).
knizz's Avatar
knizz
 
Join Date: Aug 2007
Quote originally posted by m64m:
Hey, will Poke-Tools be able to edit event locations and warp locations?
Quote originally posted by sir.euge:
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
Attached Images
File Type: gif scale.gif‎ (16.9 KB, 208 views) (Save to Dropbox)
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #19    
Old May 21st, 2010 (12:21 PM).
Full Metal's Avatar
Full Metal
C(++) Developer.
Community Supporter
 
Join Date: Jan 2008
Location: In my mind.
Age: 19
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to Full Metal
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...)
__________________

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote
  #20    
Old May 21st, 2010 (03:14 PM).
knizz's Avatar
knizz
 
Join Date: Aug 2007
Quote originally posted by Full Metal:
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)
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #21    
Old May 21st, 2010 (03:36 PM).
Team Fail
Fly with me
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote originally posted by Full Metal:
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...)
I'm currently working on compiling it right now. I'm having a few issues, though. I'm hoping to have them smoothed out soon.
__________________
| | | | |
PM | VM



Do the best with whatever you can today.
Then tomorrow, you will have surely progressed.

Reply With Quote
  #22    
Old May 21st, 2010 (06:18 PM).
m64m's Avatar
m64m
NSMB Hacking Expert
 
Join Date: May 2010
Gender: Male
Send a message via Windows Live Messenger to m64m
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!
Reply With Quote
  #23    
Old May 22nd, 2010 (01:19 AM).
knizz's Avatar
knizz
 
Join Date: Aug 2007
Quote originally posted by m64m:
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.
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
  #24    
Old May 22nd, 2010 (03:37 AM).
mewthree9000's Avatar
mewthree9000
Booted out - don't be like me!
 
Join Date: Sep 2003
Location: Wastelands Of Johto
Age: 24
Gender: Male
Nature: Bold
Send a message via AIM to mewthree9000 Send a message via Windows Live Messenger to mewthree9000
This looks pretty cool. Is it running under linux?
Reply With Quote
  #25    
Old May 22nd, 2010 (04:50 AM).
knizz's Avatar
knizz
 
Join Date: Aug 2007
Quote originally posted by mewthree9000:
This looks pretty cool. Is it running under linux?
Yes, I develop it on Linux but from time to time I try it on 64-systems and windows. Theoretically it should compile on Mac too.

It works on any little-endian system with at least 32-bits and C-Standard-Libraries (and FLTK for the gui).
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 03:15 AM.