Pages: 123 »
Posted on 12-25-14, 11:50 am (rev. 1 by ImageBot on 11-21-16, 03:11 am)
Roy Koopa


Karma: 4011
Posts: 2683/2722
Since: 06-26-11
Welcome to the ultimate Worldmap hacking guide, presented by  Freeze and  ray. Long post ahead.

Since some of you did miss the release of the Worldmap editor in our Adventure Super Mario Bros. thread, I'm creating another thread here, including all the information.


Overview:
1. General Information
2. Worldmap structure
3. 3D Model and NSBCA
4. Nodes
5. Paths
6. Bottom screen Position Icon
7. Other Stuff
8. Additional important Information

--------------------------

1. General Information
When starting to research about worldmap hacking, there was one thing we didn't take into account. The ROM region. Therefore everything posted here is usable for USA ROMS ONLY. Next thing: The file you'll need to edit is overlay9_8.bin, which needs to be decompressed to open it in our editor.


2. Worldmap structure
To understand what you are actually editing, you'll need to understand how a worldmap is build up. Nintendo was quite successful making it as hard as possible for us to edit and understand them.
1. Every worldmap uses a move.nsbca (3D model animation data) which is the path that Mario walks on the map.
2. Every worldmap uses a model.nsbmd (3D model) which ALSO controls the transparent paths that light up when finishing a level. We know how Nintendo did those, but we can't replicate them yet.
3. Every worldmap uses a set amount of nodes for visual effects only. Those nodes are the "level points". Those nodes can control which levels are unlocked after finishing one and where the camera goes when unlocking a level.
4. Every worldmap uses a set amount of data-Nodes, which are the fitting partner for the visual Nodes. Those control which images will show up, which area you're going to enter and some other stuff as well as somehow connecting paths between them (seen as Pointer in the editor).
5. Every worldmap uses paths, which control where to go from one node. They're not fully discovered yet (THOSE ARE NOT THE PATHS USED IN NSBCA).


3. 3D Model and NSBCA
Since you now understand how a worldmap is built up, we can continue with the 3D Model and NSBCA file.
Both can be created using the Nintendo NITRO Plugins for Maya or 3DS Max. A 3D model can be created with the latest MKDS Course Modifier too.
When creating paths Mario walks along, you basicially have to create an Animation for every single path. You don't need to include backward paths, since this is done by the data-paths.
Also, when you make an animation go upwards, Mario will automatically make a jump sound and the corresponding animation (cloud of dust as seen in World 3).
I won't go further in detail, so make sure you can find those plugins yourself.


4. Nodes
This little thing is a Node and at this time the only thing you can edit with the worldmap editor. But as you learned before, Nintendo uses 2 kind of Nodes. The ones that are visible (eg. the image before) and the ones that are not visible and only store information used ingame. It's very important to understand that. Now things get interesting. Let's speak about the VISIBLE NODES first (click to enlarge).

Taken from our Documentation

One cell here represents one byte. So a Node entry is 24 Bytes long. The rest is quite self-explaining. This will explain the stuff inside the editor as well.

One thing which is quite important:
The unlockables are not represented as NODE IDs. They actually are PATH IDs. So what you're unlocking is the path and not the Node itself. Since this can be quite confusing, we made a list of the paths used in World 1. Don't forget that those paths are the ones used in the NSBCA file.

Taken from our Documentation

So this was it about the VISIBLE Nodes. Now we can continue with data-nodes, which are a bit more complicated and still not known by a 100%.

Taken from our Documentation

As you can see, one data-Node is 12 Bytes long. The one on the screenshot is the one used for World 1 - Starting point (The black node with an arrow on it).
Marked in red, we have the pointer. It's still not known what it does exactly. But we do know, that every Node from every world uses 0E 02 as 3rd and 4th Byte for the Pointer. We also do know, that Nodes like Mushroom Houses and Starting Points use 5C as 2nd Byte and normal levels use 62.
Marked in green, we got the Area you'll be entering when entering the level. B9 (185 in Decimal) is the last area and therefore an empty one, which is the reason that levels with that ID are not enterable.
Marked in blue we have the level image that shows up when standing on it (eg. X-1, X-2, X-Cannon, and so on). You got the list on the image
Marked in brown we have some settings for the worldmap, which control the behavior of the Node on the worldmap. The list is your friend here, which is incomplete though.
I think this was it for the Nodes.


5. Paths
After we just finished with the Nodes, let's continue with the paths. I'm speaking of the data-paths here and not the ones which declare where Mario is moving to (NSBCA file). Let's take a look at the path leading to 1-1 from 1-Start.


Taken from our Documentation

One path consists out of 4 Bytes. The image is self-explaining, but to understand how the Starting/Ending Node work, you'll need to take a look at that list, which shows the Node IDs for World 1.


Taken from our Documentation

Even though this might sound extremely easy, there are still some paths that seem extremely weird. For example the path from 1-Cannon to 1-Tower:


Taken from our Documentation

As we described there, that path refers to itself and should lead nowhere actually. But it uses the L bit I mentioned in the image before. Also there are paths, that are just
FF 00 00 00
which probably represent a dead end but that is not sure yet.


6. Bottom screen Position Icon
If anyone ever wondered how the fuck the game is placing the "M" or "L" icon on the minimap, here's the answer:
It is saved in the overlay. Even though we only know the offset for World 2 - Starting point, we do speak about it.


Taken from our Documentation

As you can see, it's actually quite simple. Nintendo has one entry for the position of those Icons for every level. The one I just showed stores the data for W2 - Start point.


7. Other Stuff
This is already a lot, but not all. We do know that even the Mushroom Houses, Towers and Castle have a position that can be edited, even though only in Z direction but at least its something. During our research we encountered a lot and this was one of the things but we currently don't know the offsets and need to find them again.


8. Additional important Information
So how does all this help you if you can't edit it? That's the reason why we started making a table for all the offsets, which is incomplete at the moment but we will continue searching for the offsets soon.


Taken from our Documentation

Also, the "Path Data" part is wrong since Nintendo is so insanely stupid that they split "normal paths" (paths for levels) and "special paths" (paths for Mushroom Houses and other stuff). So the offsets in the table are for the "special paths". If you already want some of the "normal path" offsets, check out this image:


Taken from our Documentation

----------------------------------------

That was it. I hope I didn't forget anything. So have fun and enjoy it.
 Freeze and  ray
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 12-25-14, 04:35 pm
Birdo


Karma: 2754
Posts: 1217/2091
Since: 06-26-11
Is this the documentation you were talking about in the spoiler to Dirbaio and StapleButter (on the Worldmap Editor release thread)?

Anyway, this is very well done and interesting.
Posted on 12-25-14, 04:41 pm


Karma: 3752
Posts: 2083/2112
Since: 06-28-11
Yes it is that Documentation. Yet it is still not in a very good form.
We will probably throw a PDF on NSMBHD once we have finally managed to make one (that looks good and is easy to understand)
Posted on 12-26-14, 01:15 pm
Fire Brother
Eugene

Karma: 3646
Posts: 354/1120
Since: 11-29-11
I used the worldmap editor to change some settings in the visible node and the data node, but I'm not sure how to get the overlay back in NSMBe. There isn't a 'Compress overlay' button in NSMBe. Only a 'LZ Compress' and 'LZ Compress with header' button.
How do I have to compress the overlay?
Posted on 12-26-14, 02:45 pm
Mariomaster

Karma: 8528
Posts: 402/1681
Since: 06-09-12
Just don't
_________________________
GitHub - Kuribo64 - YouTube
Posted on 12-26-14, 06:05 pm
Fire Brother
Eugene

Karma: 3646
Posts: 355/1120
Since: 11-29-11
Posted by Mariomaster
Just don't


Yes, it worked! Thanks!
Posted on 01-04-15, 03:14 pm
Cheep-cheep


Karma: 182
Posts: 184/190
Since: 06-13-13
Hmmm looks interesting, but don't work for me. I used USA ROM and I exported overlay9_8.bin, I opened with the editor and:
I used a decompressed overlay too and the same proble.
_________________________
My Youtube channel:
https://m.youtube.com/channel/UCnqXgHywVZoDlHNhFh5Ib3w
Layout by Tierage.

Posted on 01-04-15, 05:47 pm


Karma: 3752
Posts: 2087/2112
Since: 06-28-11
I don't know what's the problem.
But don't worry, this tools is just shit. You can always edit the overlay manually if the tool fails.
I would love if someone could implement a worldmap editing tool into NSMBe.
Posted on 01-04-15, 06:39 pm
この記号は… 解読できないよ…


Karma: 6010
Posts: 1402/2719
Since: 01-17-13
Well this works for me (x86), but not for hamza (x64). Is it only working on x86 computers?
Posted on 01-04-15, 06:54 pm
Birdo


Karma: 2754
Posts: 1233/2091
Since: 06-26-11
Rather than saying your tool is shit when it doesn't work for someone, couldn't you try and work out the problem?
Posted on 01-04-15, 07:33 pm


Karma: 3752
Posts: 2088/2112
Since: 06-28-11
Posted by Thierry
Well this works for me (x86), but not for hamza (x64). Is it only working on x86 computers?
No, there is sure something that hamza does wrong.
Posted by Hiccup
Rather than saying your tool is shit when it doesn't work for someone, couldn't you try and work out the problem?
Well, the problem is that I haven't got a clue about what's wrong. It is very likely that there is something wrong with the overlay file that is being used.

If you have problems using this editor:
Try this overlay file. This file totally works for me or  ray. If it does not work for you, you probably do something wrong when decompressing the file with the old NSMBe revision. Also, make sure you are using a (U) ROM.
Posted on 02-07-15, 10:51 am


Karma: 59
Posts: 50/116
Since: 09-16-14
so guys anyone knows when the paths editor feature are available on worldmap editor?
Posted on 02-07-15, 11:25 am (rev. 2 by Thierry on 02-07-15, 11:27 am)
この記号は… 解読できないよ…


Karma: 6010
Posts: 1461/2719
Since: 01-17-13
Posted by Freeze
Posted by Thierry
Well this works for me (x86), but not for hamza (x64). Is it only working on x86 computers?
No, there is sure something that hamza does wrong.


You don't get it. I directly sent him a decompressed overlay along with your editor in a package. And the stuff stored in the package works for me, but not for him. I told him what to do, but it just wasn't working for him even if he did the stuff that's working for me.


EDIT:
Posted by hamza62240
thierry's version worked though.


What? It does? You didn't tell me. But alright then.
Posted on 02-07-15, 11:25 am
a

Karma: 1579
Posts: 1086/1290
Since: 02-12-13
Posted by Freeze
Posted by Thierry
Well this works for me (x86), but not for hamza (x64). Is it only working on x86 computers?
No, there is sure something that hamza does wrong.


here's what I do:

> download editor
> compress and extract the overlay
> open overlay in editor

it doesn't work though. thierry's version worked though.
Posted on 02-07-15, 12:44 pm (rev. 1 by  Freeze on 02-07-15, 12:46 pm)


Karma: 3752
Posts: 2103/2112
Since: 06-28-11
Posted by hamza62240
here's what I do:

> download editor
> compress and extract the overlay
> open overlay in editor

it doesn't work though. thierry's version worked though.
It seems that you do something wrong when decompressing the overlay9_8.bin. Here are the instructions from the readme.txt:
!!YOUR OVERLAY NEEDS TO BE DECOMPRESSED!! 1. Open up your ROM in NSMBe 2. Go to the file browser 3. Go to FILESYSTEM -> overlay9 4. Decompress overlay9_8.bin 5. Export the file 6. Open the worldmap editor 7. Load your previously exported overlay into the editor 8. Edit whatever you want 9. Save 10. Import the edited overlay 11. DONE!


Keep in mind that you can only correctly decompress the overlay9_8 with this NSMBe Revision. If it still does not work I don't know the problem at all and can't help you furthermore.
Posted on 02-07-15, 01:48 pm
この記号は… 解読できないよ…


Karma: 6010
Posts: 1463/2719
Since: 01-17-13
You should decompress the overlay by the version  Freeze just gave, but IMO you better export it with, like, one of the latest builds of NSMBe. Works fine for me like this.
Posted on 02-07-15, 01:58 pm


Karma: 59
Posts: 51/116
Since: 09-16-14
guys do you know when?
Posted on 02-07-15, 01:58 pm (rev. 1 by  Arisotura on 02-07-15, 02:16 pm)
☭ coffee and cream


Karma: 10398
Posts: 1663/2766
Since: 06-26-11
Interesting that this shit is finally somewhat possible.


I dislike that you took so long to release the documents, though. Even if as you say, "50% of the board won't be able to understand it", the remaining 50% could make good use of it. You look like you're just hiding the information so you can be the ones who come up with the amazing tool and get all the fame.

Maybe I'm wrong, but I'd much rather have gotten the documentations much earlier, even in a messy state. You see, releasing documentation isn't about "hey look, we have nice clean documentation noone else has, we're the best", it's about helping the community move forward. Just look at my finding dump threads. They're far from organized or anything, but they'll be useful to anyone with enough knowledge.

There is no point in keeping information for yourselves other than making yourselves look like some NSMB hacking messiah.


But either way, great job.


Is it also possible to add more levels, paths and whatnot? From what I remember, that was stored in overlays and it was a pain to add more.
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Posted on 02-07-15, 03:49 pm (rev. 1 by  Freeze on 02-07-15, 03:49 pm)


Karma: 3752
Posts: 2104/2112
Since: 06-28-11
 Arisotura: Well, we released this in 25th December, if you look closely (The same time we released the Worldmap Editor). So we weren't hiding anything. The reason why we released it on 25th December is, because we somehow wanted to come up with a sort of complete package of worldmap hacking information. Because it was like in the middle of December when we figured the rest of this out, we thought "Hey, why not wait another week and release it on Christmas as a Present." From now on, when we find something we will post it in this thread. And by the way: You won't change our minds with your moral posts. Never.

Posted by StapleButter
Interesting that this shit is finally somewhat possible.
Is it also possible to add more levels, paths and whatnot? From what I remember, that was stored in overlays and it was a pain to add more.
We cannot add Nodes to a worldmap, because it seems that the number of Nodes is hardcoded. To me it seems like every world has a NodePosition Array and a NodeInfo Array. They seem to reference each other just using the index of the array:
NodePosition[0]: X,Y,Z and unlocked Levels when beat for 1-Arrow NodeInfo[0]: Icon, Dest. Area and other behaviors for 1-Arrow NodePosition[1]: Position for 1-1 NodeInfo[1]: Behavior for 1-1
Note: NodePosition and NodeInfo are just names I came up with, to understand it better.
As you can see here, NodePosition "Objects" don't reference NodeInfo "Objects" in a proper way using a pointer or something. They reference each other using the array index. You can't just add more Nodes to the overlay in HEX, because the length of the array is hardcoded.

You can add more Levels, yes (by reusing some of the unused nodes in the worlds). There are 185 Areas in the game, which you can use. You can set the dest. Area for each Node (So you could put more levels in one area that use the same tileset or something to save areas).

Where Mario/Luigi moves is just an animation on the map. The Paths are probably another array with hardcoded length (so you can't add more of them). The Path "Objects" consist of 2 Node IDs (start and end) and some more behavior stuff. Those don't influence the animation, because the animation is in the file and does not get generated on runtime out of the paths in the overlay.


Note: This is just based on presumptions and it is not 100% clear if this is true. So don't expect this to be 100% accurate.
Posted on 02-07-15, 04:01 pm
☭ coffee and cream


Karma: 10398
Posts: 1664/2766
Since: 06-26-11
Yeah, I saw.

That sounds legit, but
Posted by Freeze
You won't change our minds with your moral posts. Never.


So what is that supposed to mean? "lol fuck you we do what we want"? Maybe we can't change your minds but there are other things we can do if action is needed.


Oh well, atleast this is released. But I keep wondering how much of the same is still hidden, quietly waiting for more 'awesome releases'.


From what I remember, a good part of the overworld path data is stored in overlays, so yeah, you'll have trouble if you want to extend it. It can be done, but you'll need something akin to SM64DSe's ROM patching. Adding more overlays, modifying the game code to load them and take worldmap data from them, etc...
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Pages: 123 »