Pages: « 1234
Posted on 06-08-16, 05:16 pm
Fire Snake
Eugene

Karma: 3810
Posts: 812/1156
Since: 11-29-11
When it gets possible to add nodes and paths, we'll have to think of something to make the game take into account those nodes and paths for the Stars on the save file.
Posted on 06-08-16, 06:54 pm (rev. 1 by RicBent on 06-08-16, 06:56 pm)
Mariomaster

Karma: 8573
Posts: 560/1681
Since: 06-09-12
That would require a lot more investigation tho.

We'd have to find every ponter to the arrays  ray and  Freeze found and the values that contain the information for the amount of nodes/path/etc to load. Then we'd have to change the pointers to a location where we can store our new information and change the amounts accordingly.

Without any reverse engeneering, no chance I assume.


But you can already use path forks as level nodes, make them visible and assign a level to them. In that case I don't know how the game handles it.
_________________________
GitHub - Kuribo64 - YouTube
Posted on 06-16-16, 12:21 pm (rev. 2 by  KingYoshi on 06-16-16, 05:06 pm)
Fire Snake
Eugene

Karma: 3810
Posts: 828/1156
Since: 11-29-11
I did some tests with the Y-shifting of the Worldmap (or the Y-shiftig of the camera, but that's actually the same in this case).

There are two bytes (or: four nybbles) reserved by the Y-shifting. In the original game, YY YY = 'FE FF'. I did five tests, but none of the values I tried affected the game.

Test 1Test 2Test 3Test 4Test 5
FE FF
FF FF
FE FF
FE FF
FE FF
FE FE
FE FF
EE FF
FE EF
ED EE
FE FD
FD FF
DE FF
FE DF
DC DD
FE FC
FC FF
CE FF
FE CF
CB CC
FE FB
FB FF
BE FF
FE BF
BA BB
FE FA
FA FF
AE FF
FE AF
A9 AA
FE F9
F9 FF
9E FF
FE 9F
98 99
etc.etc.etc.etc.etc.
Posted on 06-17-16, 08:24 pm
(Words)

Karma: 755
Posts: 45/265
Since: 01-03-16
If there's anything not documented it's the World 2 wind.
(Unless someone already explained it and I'm an idiot who missed it.)

But it's really interesting as it seems to follow Mario if that makes sense.
_________________________
"I strikingly thought you would know how but it clearly seems you have no knowledge of hacking" - MiiU 2017
Posted on 06-17-16, 09:49 pm
Fire Snake
Eugene

Karma: 3810
Posts: 834/1156
Since: 11-29-11
I don't think it follows Mario. And if you start about the W2 wind, you also have to mention the falling snow (w5), and the lava FG effect and the lava bubbles (w8).
Posted on 06-17-16, 11:13 pm
(Words)

Karma: 755
Posts: 46/265
Since: 01-03-16
Posted by KingYoshi
I don't think it follows Mario. And if you start about the W2 wind, you also have to mention the falling snow (w5), and the lava FG effect and the lava bubbles (w8).

That is true, I forgot that W5 and W8 had effects. (I remembered W2 because of the wind.) But I would suppose that the snow effect is shared with the sprite, so I'll look into that.
And you are right, it doesn't follow Mario, I just conveniently moved into different spots that made it seem like it did.
_________________________
"I strikingly thought you would know how but it clearly seems you have no knowledge of hacking" - MiiU 2017
Posted on 08-19-16, 09:50 am
Mariomaster

Karma: 8573
Posts: 628/1681
Since: 06-09-12
The offset of the files that are loaded is at 0x1C4B4 of overlay 8. All entries are 4 bytes long:

Offset: Filename: FileID: 0x00: w1.nsbmd 0x62A 0x04: w1_move.nsbca 0x634 0x08: Nothing 0x0 0x0C: w1.nsbta 0x62B 0x10: w1.nsbtp 0x62C 0x14: w1_tree.nsbmd 0x638 0x18: w1_tree.nsbca 0x637 0x1C: Nothing 0x0 0x1C: w1_tower.nsbmd 0x636 0x20: w1_tower.nsbca 0x635 0x24: w1_castle.nsbmd 0x62E 0x28: w1_castle.nsbca 0x62D 0x2C: w1_kinoka_b.nsbmd 0x630 0x30: w1_kinoko_g.nsbmd 0x631 0x34: w1_kinoko_p.nsbmd 0x632 0x38: w1_kinoko_r.nsbmd 0x633 0x3C: w2.nsbmd 0x639 0x40: w2_move.nsbca 0x641 0x44: Nothing 0x0 0x48: w2.nsbta 0x63A 0x4C: w2.nsbtp 0x63B 0x50: w2_tree.nsbmd 0x644 0x54: w2_tree.nsbca 0x643 0x58: Nothing 0x0 0x5C: w2_tower.nsbmd 0x642 0x60: w2_tower.nsbca 0x635 0x64: w2_castle.nsbmd 0x63C 0x68: w1_castle.nsbca 0x62D 0x6C: w2_kinoko_b.nsbmd 0x63D 0x70: w2_kinoko_g.nsbmd 0x63E 0x74: w2_kinoko_p.nsbmd 0x63F 0x78: w2_kinoko_r.nsbmd 0x640 0x7C: w3.nsbmd 0x645 ...


_________________________
GitHub - Kuribo64 - YouTube
Posted on 10-11-16, 02:29 pm (rev. 1 by RicBent on 10-11-16, 02:30 pm)
Mariomaster

Karma: 8573
Posts: 673/1681
Since: 06-09-12
Seems like there is a very interesting table stored at 0x1B6E4 in overlay 8:

ov8:021A7384 off_21A7384 DCD w1nodeData ; DATA XREF: sub_218D40C+8o ov8:021A7384 ; ov8:off_218D438o ... ov8:021A7388 off_21A7388 DCD w1pathSettings ; DATA XREF: sub_218D3E4+8o ov8:021A7388 ; ov8:off_218D408o ... ov8:021A738C off_21A738C DCD unk_21A5420 ; DATA XREF: WorldmapScene__onCreate+E8o ov8:021A738C ; ov8:off_218FD34o ov8:021A7390 off_21A7390 DCD w1visibleNodes ; DATA XREF: WorldmapScene__onCreate+E0o ov8:021A7390 ; ov8:off_218FD2Co ov8:021A7394 off_21A7394 DCD w1starcoinSigns ; DATA XREF: WorldmapScene__onCreate+E4o ov8:021A7394 ; ov8:off_218FD30o ov8:021A7398 off_21A7398 DCD w1towersCastles ; DATA XREF: WorldmapScene__onCreate+134o ov8:021A7398 ; ov8:off_218FD4Co ov8:021A739C off_21A739C DCD w1mushroomHouses ; DATA XREF: WorldmapScene__onCreate+13Co ov8:021A739C ; ov8:off_218FD50o ov8:021A73A0 off_21A73A0 DCD off_21A591C ; DATA XREF: WorldmapScene__onCreate+168o ov8:021A73A0 ; ov8:off_218FD60o ov8:021A73A4 w1nodeCount DCW 0x13 ; DATA XREF: sub_218D43C+8o ov8:021A73A4 ; ov8:off_218D450o ... ov8:021A73A6 w1pathCount DCB 0x17 ; DATA XREF: WorldmapScene__onCreate+ECo ov8:021A73A6 ; ov8:off_218FD38o ov8:021A73A7 DCB 0 ov8:021A73A8 unk_21A73A8 DCB 0 ; DATA XREF: WorldmapScene__onCreate+C4o ov8:021A73A8 ; ov8:off_218FD18o ov8:021A73A9 DCB 0 ov8:021A73AA DCB 0 ov8:021A73AB DCB 0 ov8:021A73AC DCD w2nodeData ov8:021A73B0 DCD w2pathSettings ov8:021A73B4 DCD unk_21A5414 ov8:021A73B8 DCD w2visibleNodes ov8:021A73BC DCD w2starcoinSigns ov8:021A73C0 DCD w2towersCastles ov8:021A73C4 DCD w2mushroomHouses ov8:021A73C8 DCD off_21A58E0 ov8:021A73CC DCW 0x14 ; w2nodeCount ov8:021A73CE DCB 0x18 ; w2pathCount ov8:021A73CF DCB 0 ov8:021A73D0 DCB 0 ov8:021A73D1 DCB 0 ov8:021A73D2 DCB 0 ov8:021A73D3 DCB 0 ov8:021A73D4 DCD w3nodeData ov8:021A73D8 DCD w3pathSettings ov8:021A73DC DCD unk_21A541C ov8:021A73E0 DCD w3visibleNodes ov8:021A73E4 DCD w3starcoinSigns ov8:021A73E8 DCD w3towersCastles ov8:021A73EC DCD w3mushroomHouses ov8:021A73F0 DCD off_21A5718 ov8:021A73F4 DCW 0x12 ; w3nodeCount ov8:021A73F6 DCB 0x17 ; w3pathCount ov8:021A73F7 DCB 0 ov8:021A73F8 DCB 0 ov8:021A73F9 DCB 0 ov8:021A73FA DCB 0 ov8:021A73FB DCB 0 ov8:021A73FC DCD w4nodeData ov8:021A7400 DCD w4pathSettings ov8:021A7404 DCD unk_21A5418 ov8:021A7408 DCD w4visibleNodes ov8:021A740C DCD w4starcoinSigns ov8:021A7410 DCD w4towersCastles ov8:021A7414 DCD w4mushroomHouses ov8:021A7418 DCD off_21A5790 ov8:021A741C DCW 0x13 ; w4nodeCount ov8:021A741E DCB 0x17 ; w4pathCount ov8:021A741F DCB 0 ov8:021A7420 DCB 0 ov8:021A7421 DCB 0 ov8:021A7422 DCB 0 ov8:021A7423 DCB 0 ov8:021A7424 DCD w5nodeData ov8:021A7428 DCD w5pathSettings ov8:021A742C DCD unk_21A5404 ov8:021A7430 DCD w5visibleNodes ov8:021A7434 DCD w5starcoinSigns ov8:021A7438 DCD w5towersCastles ov8:021A743C DCD w5mushroomHouses ov8:021A7440 DCD off_21A582C ov8:021A7444 DCW 0x18 ; w5nodeCount ov8:021A7446 DCB 0x1E ; w5pathCount ov8:021A7447 DCB 0 ov8:021A7448 DCB 0 ov8:021A7449 DCB 0 ov8:021A744A DCB 0 ov8:021A744B DCB 0 ov8:021A744C DCD w6nodeDataMaybe ov8:021A7450 DCD w6pathSettings ov8:021A7454 DCD unk_21A5408 ov8:021A7458 DCD w6visibleNodes ov8:021A745C DCD w6starcoinSigns ov8:021A7460 DCD w6towersCastles ov8:021A7464 DCD w6mushroomHouses ov8:021A7468 DCD off_21A5D1C ov8:021A746C DCW 0x15 ; w6nodeCount ov8:021A746E DCB 0x1A ; w6pathCount ov8:021A746F DCB 0 ov8:021A7470 DCB 0 ov8:021A7471 DCB 0 ov8:021A7472 DCB 0 ov8:021A7473 DCB 0 ov8:021A7474 DCD w7nodeData ov8:021A7478 DCD w7pathSettings ov8:021A747C DCD unk_21A5424 ov8:021A7480 DCD w7visibleNodes ov8:021A7484 DCD w7starcoinSigns ov8:021A7488 DCD w7towersCastles ov8:021A748C DCD w7mushroomHouses ov8:021A7490 DCD off_21A573C ov8:021A7494 DCW 0x12 ; w7nodeCount ov8:021A7496 DCB 0x18 ; w7pathCount ov8:021A7497 DCB 0 ov8:021A7498 DCB 0 ov8:021A7499 DCB 0 ov8:021A749A DCB 0 ov8:021A749B DCB 0 ov8:021A749C DCD w8nodeData ov8:021A74A0 DCD w8pathSettings ov8:021A74A4 DCD unk_21A540C ov8:021A74A8 DCD w8visibleNodes ov8:021A74AC DCD w8starcoinSigns ov8:021A74B0 DCD w8towersCastles ov8:021A74B4 DCD w8mushroomHouses ov8:021A74B8 DCD off_21A5E44 ov8:021A74BC DCW 0x13 ; w8nodeCount ov8:021A74BE DCB 0x16 ; w8pathCount ov8:021A74BF DCB 0 ov8:021A74C0 DCB 0 ov8:021A74C1 DCB 0 ov8:021A74C2 DCB 0 ov8:021A74C3 DCB 0


The table contains all information that is necessary to load nodes and paths for the maps.


How the table is built up:

- It has 8 sections, 1 for each world
- Each block is 0x28 bytes long

Sections:

Offset Length Function
0x0 0x4 Pointer to Node Data
0x4 0x4 Pointer to Path Settings
0x8 0x4 Pointer to other Node/Path counts
0xC 0x4 Pointer to Visible Nodes
0x10 0x4 Pointer to Starcoin Signs
0x14 0x4 Pointer to Tower/Castle Locations
0x18 0x4 Pointer to Mushroom House Locations
0x1C 0x4 Pointer to Unknow Block
0x20 0x2 Node Count
0x22 0x2 Path Count
0x24 0x4 Unknown (Referenced to, but allways 0x0)


Pointers to other Node/Path counts:

These pointers reffer to 4 byte long blocks that are built like this:

Offset Length Function
0x0 0x2 Node Count (Differs from count in the main block)
0x2 0x2 Path Count (Differs from count in the main block)


Pointers to Unknow Blocks:

The Unknown blocks contain 3-5 4 byte long pointers to 0x10 byte long unknown data blocks.
Worlds 1-5 and 7 have 3 pointers, 6 has 4 and 8 has 5.
_________________________
GitHub - Kuribo64 - YouTube
Posted on 10-11-16, 08:32 pm
Fuzzy
Will never finish a hack

Karma: 1873
Posts: 339/778
Since: 03-25-16
This is brilliant mariomaster! Hopefully we'll get a full worldmap editor soon!
_________________________
hey look, I did a thing
Posted on 11-03-16, 07:04 pm (rev. 4 by RicBent on 11-04-16, 08:11 am)
Mariomaster

Karma: 8573
Posts: 728/1681
Since: 06-09-12
Positions for the Player Icon on the bottom screen:

A table which contains all of them is stored at ov8:021A33A4.

It is structured like this:

Offset Length Function
0x0 0x4 Pointer to player cursor positions for World 1
0x4 0x1 Number of the positions in the positions block
0x5 0x3 Padding
0x8 0x4 Pointer to player cursor positions for World 2
0xC 0x1 Number of the positions in the positions block
0xD 0x3 Padding
0x10 0x4 Pointer to player cursor positions for World 3
0x14 0x1 Number of the positions in the positions block
0x15 0x3 Padding
0x18 0x4 Pointer to player cursor positions for World 4
0x1C 0x1 Number of the positions in the positions block
0x1D 0x3 Padding
0x20 0x4 Pointer to player cursor positions for World 5
0x24 0x1 Number of the positions in the positions block
0x25 0x3 Padding
0x28 0x4 Pointer to player cursor positions for World 6
0x2C 0x1 Number of the positions in the positions block
0x2D 0x3 Padding
0x30 0x4 Pointer to player cursor positions for World 7
0x34 0x1 Number of the positions in the positions block
0x35 0x3 Padding
0x38 0x4 Pointer to player cursor positions for World 8 (only first half)
0x3C 0x1 Number of the positions in the positions block
0x3D 0x3 Padding
0x40 0x4 Pointer to player cursor positions for World 8 (complete)
0x44 0x1 Number of the positions in the positions block
0x45 0x3 Padding


Position Blocks:

Each block that is referenced by the main table is 4 x Number of Positions bytes long.

One position is made from 2 shorts:

Offset Length Function
0x0 0x2 X Position (signed)
0x2 0x2 Y Position (signed)

Nintendo also "removed" some node positions by setting it to (-9/-13)
_________________________
GitHub - Kuribo64 - YouTube
Posted on 11-04-16, 12:34 pm (rev. 1 by  poudink on 11-04-16, 12:34 pm)
Giant Red Paratroopa
Not Edible

Karma: 3386
Posts: 85/1447
Since: 02-12-16
Hey! Seems like the world-map editor allows to transform cannon levels into normal levels with starcoins! Which is good news for my hack...
_________________________
Nothing to say, so jadnjkfmnjamnfjkldnajfnjkanfjdksan jsdnvj m.

Posted on 11-04-16, 02:39 pm
Mariomaster

Karma: 8573
Posts: 729/1681
Since: 06-09-12
I don't know if these star coins are counted to game completion though.
_________________________
GitHub - Kuribo64 - YouTube
Posted on 11-04-16, 05:45 pm (rev. 7 by RicBent on 11-04-16, 11:10 pm)
Mariomaster

Karma: 8573
Posts: 730/1681
Since: 06-09-12
Shameless doublepost incoming because it has an entirely different topic.

I looked a bit more into the worldmap structure. Almost everything of the table 5 posts up is now known.

This is how the worldmap structure looks C like:

#include "nsmb.h"

typedef struct path
{
        u8 endingNodeId;
        u8 animationId;
        u8 settings;
        u8 unk;
} path;

typedef struct node
{
        path *paths;            // As many paths as you want. Last path should be FF 00 00 00
        u8 areaId;
        u8 unk0;                // Allways 0?
        u8 unk1;                // Mostly 0. I only saw 0xB in W1. Is this for the blue mushroom house?
        u8 icon;
        u8 settings;
        u8 unk2[3];             // Allways 0? Probably padding
} node;

typedef struct pathBehavior
{
        u8 animationId;
        u8 starcoinCost;
        u8 visibility;
        u8 unk;                 // Allways 0? Probably padding
} pathBehavior;

typedef struct mapObjects
{
        u8 mapObj1StartNode;
        u8 mapObj1Type;
        u8 mapObj2StartNode;
        u8 mapObj2Type;
} mapObjects;

typedef struct visibleNode
{
        u8 unlockedPaths[4];
        u8 unlockedpathsSecret[4];
        u16 cameraLocation;
        u16 cameraLocationSecret;
        s32 x;
        s32 y;
        s32 z;
} visibleNode;

typedef struct worldmapObject
{
        u8 animationId;
        u8 pad[3];
        s32 x;
        s32 y;
        s32 z;
} worldmapObject;

typedef struct bowserJrNode
{
        u8 animationId;
        u8 behavior;
} bowserJrNode;

typedef struct world
{
        node *nodes;
        pathBehavior *pathBehaviors;
        mapObjects *mapObjs;
        visibleNode *visibleNode;
        worldmapObject *starcoinSigns;          // As many as you want. Last one should be zeroed
        worldmapObject *strongholds;            // ^
        worldmapObject *mushroomHouses;         // ^
        bowserJrNode **bowserJrPaths;
        u16 nodeCount;
        u16 pathCount;
        u32 unk;                                // allways 0
} world;


At 0x1B6E4 in overlay 8 there are 8 of the "world" structures right after each other.

Also thanks to  skawo for finding out the Bowser Jr. Path structure.
_________________________
GitHub - Kuribo64 - YouTube
Posted on 11-04-16, 11:02 pm
Giant Red Paratroopa
Not Edible

Karma: 3386
Posts: 86/1447
Since: 02-12-16
So, I tried to edit the worldmap. I changed the first path so that it goes down and and it works, but it only works when I press right, am I doing anythimg wrong?
_________________________
Nothing to say, so jadnjkfmnjamnfjkldnajfnjkanfjdksan jsdnvj m.

Posted on 11-04-16, 11:10 pm
Mariomaster

Karma: 8573
Posts: 732/1681
Since: 06-09-12
Posted by NSMB World Map Documentation
Now you probably wonder how it is determined what Animation is playing when pressing a button and what actually tells the game what node you end on.


This is done by using the Data-Paths.


Look up how data paths are done in the Doc linked in the first post.
_________________________
GitHub - Kuribo64 - YouTube
Pages: « 1234