Pages: 1
Posted on 11-10-21, 04:08 pm


Karma: 10
Posts: 7/15
Since: 10-27-21
Hi, in Mario vs Luigi mode if you get 8 coins a random item will drop from the top of the screen. I am wondering if it is possible to restore this behaviour in the main game mode. I don't know if this is the correct channel to post this in, I apologize if it's incorrect. If anyone knows how to get this to work in the main game please let me know! Thanks.
Posted on 11-11-21, 10:40 am
Nipper Plant


Karma: 2072
Posts: 402/405
Since: 08-17-15
Easily restorable, literally just change like one value.
Posted on 11-11-21, 03:41 pm


Karma: 10
Posts: 8/15
Since: 10-27-21
Posted by newluigidev
Easily restorable, literally just change like one value.

I would but I'm basically a regular person and not a modder so could tell me which value I need to change please?
Posted on 11-11-21, 08:30 pm (rev. 1 by  ItzTacos on 11-11-21, 08:31 pm)
Cheep-cheep


Karma: 521
Posts: 183/183
Since: 04-26-19
Posted by newluigidev
Easily restorable, literally just change like one value.

force setting Game::vsMode to 1 will break the common actors resources loading and a big amount of other mechanics. The best thing would be patching only that part to avoid any further issues.
_________________________
Join the NSMB Hacking Discord!
Posted on 11-11-21, 09:11 pm


Karma: 10
Posts: 9/15
Since: 10-27-21
Posted by ItzTacos
Posted by newluigidev
Easily restorable, literally just change like one value.

force setting Game::vsMode to 1 will break the common actors resources loading and a big amount of other mechanics. The best thing would be patching only that part to avoid any further issues.

Can you tell me how to do that?
Posted on 11-14-21, 03:52 am (rev. 1 by newluigidev on 11-14-21, 03:55 am)
Nipper Plant


Karma: 2072
Posts: 403/405
Since: 08-17-15
Posted by ItzTacos
Posted by newluigidev
Easily restorable, literally just change like one value.

force setting Game::vsMode to 1 will break the common actors resources loading and a big amount of other mechanics. The best thing would be patching only that part to avoid any further issues.


Yeah, that's what I meant, I didn't mean to force the vsMode variable to 1

You can try this, haven't tested it tho.

repl_02020380:
MOV R0, #1
BX LR
Posted on 11-14-21, 04:05 am


Karma: 10
Posts: 10/15
Since: 10-27-21
Posted by newluigidev
Posted by ItzTacos
Posted by newluigidev
Easily restorable, literally just change like one value.

force setting Game::vsMode to 1 will break the common actors resources loading and a big amount of other mechanics. The best thing would be patching only that part to avoid any further issues.


Yeah, that's what I meant, I didn't mean to force the vsMode variable to 1

You can try this, haven't tested it tho.

repl_02020380:
MOV R0, #1
BX LR

Ok thanks, I'll try it in the morning and see how it works. I also know it's a bit weird but how can I set the vsmode variable to 1? Do I have to use a cheat code or something? Trying to learn more about asm but it's very complicated lol.
Posted on 11-14-21, 04:18 am (rev. 3 by newluigidev on 11-14-21, 04:21 am)
Nipper Plant


Karma: 2072
Posts: 404/405
Since: 08-17-15
You would need to force the variable to 1 in a function hook that runs every frame (since Game::vsMode updates alot during runtime).
Basically like this:

void hook_funcEveryFrame()
{
    type* ptrToGameVsMode = (type*)0xaddr;
    ptrToGameVsMode = 1;
    return;
}


Of course tho, as mentioned its not a good idea to force the variable to a value, as it can break alot of the game's functions.
Posted on 11-14-21, 04:31 am (rev. 3 by isaacplays on 11-14-21, 10:23 pm)


Karma: 10
Posts: 11/15
Since: 10-27-21
Posted by newluigidev
You would need to force the variable to 1 in a function hook that runs every frame (since Game::vsMode updates alot during runtime).
Basically like this:

void hook_funcEveryFrame()
{
    type* ptrToGameVsMode = (type*)0xaddr;
    ptrToGameVsMode = 1;
    return;
}


Of course tho, as mentioned its not a good idea to force the variable to a value, as it can break alot of the game's functions.

Thanks a million! I'll be sure to check these out tomorrow. And work on my ASM hacking skills....
UPDATE: The coin drop code works great, thanks a lot! The code that is supposed to change the vsmode does not work and I tried all the file extensions (.c, .cpp, .s). It looks like C++ to me though. I wonder whats wrong with it?
Posted on 11-15-21, 03:30 am
Nipper Plant


Karma: 2072
Posts: 405/405
Since: 08-17-15
Because you need to change it, its just an example
Posted on 11-15-21, 06:37 am (rev. 2 by isaacplays on 11-15-21, 07:37 am)


Karma: 10
Posts: 14/15
Since: 10-27-21
Posted by newluigidev
Because you need to change it, its just an example

So do I need to find some sort of ram address or variable name to change the vsmode variable? I also noticed something else, in normal vs mode if you're losing to the other player, after getting 8 coins you may get a mega mushroom but since you can't lose to the other player in the normal game a mega mushroom is never dropped. I'm pretty sure this is easy to fix tho so I'll look in the ram debugger to find the address and try to use a cheat code. Not a big deal tho, something my limited knowledge can fix lol
Pages: 1