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


Karma: 15
Posts: 7/25
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: 2406
Posts: 402/417
Since: 08-17-15
Easily restorable, literally just change like one value.
Posted on 11-11-21, 03:41 pm


Karma: 15
Posts: 8/25
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)
Red Cheep-cheep
MammaMia Team Member

Karma: 571
Posts: 183/213
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.
_________________________
Youtube - GitHub - NSMB Central
Posted on 11-11-21, 09:11 pm


Karma: 15
Posts: 9/25
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: 2406
Posts: 403/417
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: 15
Posts: 10/25
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: 2406
Posts: 404/417
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: 15
Posts: 11/25
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: 2406
Posts: 405/417
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: 15
Posts: 14/25
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
Posted on 12-04-21, 11:23 pm


Karma: 15
Posts: 16/25
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.

Couldn't I do this with an action replay code?
Posted on 12-05-21, 04:14 pm
Giant Red Paratroopa
Not Edible

Karma: 3366
Posts: 1443/1447
Since: 02-12-16
Probably, but if you're using it for a romhack it's much better to use the template.
_________________________
Nothing to say, so jadnjkfmnjamnfjkldnajfnjkanfjdksan jsdnvj m.

Posted on 12-07-21, 12:08 am


Karma: 15
Posts: 19/25
Since: 10-27-21
Posted by poudink
Probably, but if you're using it for a romhack it's much better to use the template.

Yeah, that's probably better now that we think about it. If I do get it to work I'll post the code.
Posted on 12-07-21, 01:55 am (rev. 1 by newluigidev on 12-07-21, 01:55 am)
Nipper Plant


Karma: 2406
Posts: 409/417
Since: 08-17-15
Literally all you need to do is this:
void hook_02004EA8()
{
    u32* vsMode = (u32*)0x02085A84;
    *vsMode = 1;
    return;
}


it will break shit tho as mentioned
Posted on 12-07-21, 02:34 am (rev. 1 by isaacplays on 12-07-21, 02:39 am)


Karma: 15
Posts: 21/25
Since: 10-27-21
How did you find that RAM address? It does not seem to work either.
Posted on 12-07-21, 10:21 am
Nipper Plant


Karma: 2406
Posts: 410/417
Since: 08-17-15
Through IDA. Of course it isn't going to work - that is what we've been trying to tell you.
Posted on 12-08-21, 01:21 am


Karma: 15
Posts: 23/25
Since: 10-27-21
Posted by newluigidev
Through IDA. Of course it isn't going to work - that is what we've been trying to tell you.

It does not even compile tho. I will take a look at IDA, seems pretty interesting (and helpful).
Posted on 12-08-21, 11:10 am
Nipper Plant


Karma: 2406
Posts: 412/417
Since: 08-17-15
so then what is the error - I can't read minds sadly
Posted on 12-08-21, 03:42 pm


Karma: 15
Posts: 24/25
Since: 10-27-21
Posted by newluigidev
so then what is the error - I can't read minds sadly

It says that u32 is some unidentified thing. I used a .cpp file when compiling.
Pages: 12 »