ROM Hack [Release] Mario Kart 7 Online NTR Plugin

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,750
Country
United States
Region (USA/EUR/JPN): EUR
Game version (Rev0/Rev0 1.1/Rev1): Rev0
NTR Version (3.2/3.3/3.4): 3.6
Plugin last updated (date): The latest from yesterday
Codes not working: VR Randomizer , and No disconnect (data abort/fatal crash when launching a race after 3 , 2 , 1)
No disconnect should be fixed. I improved the check on it, so it will return as 0 if it's invalid.
 
  • Like
Reactions: Z0KU

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,750
Country
United States
Added a new stalking code:

Code:
void    stalking(void) // could optimize a little more
{
    unsigned int g_raceCondition = GetRaceCondition(), g_racePointer = GetRacePointer(), tempActive = 0;
    static unsigned int pointer = 0, active = 0, player = 1;
    float dataY = 0, dataZ = 0;
    static bool held = false;
    if (g_raceCondition != 1)
    {
        player = 1;
        active = 0;
        pointer = 0;
        return;
    }
    if (g_raceCondition == 1)
    {
        if (!is_pressed(Y))
        {
            held = false;
        }
        if (is_pressed(Y))
        {
            tempActive = 1;
            if (is_pressed(DU))
            {
                active = 1;
            }   
            if (is_pressed(DD))
            {
                active = 0;
                player = 1;
            }
            if (!held)
            {
                if (is_pressed(DR))
                {
                    held = true;
                    player++;
                }
                if (is_pressed(DL))
                {
                    held = true;
                    player--;
                }
            }
        }
        if (active == 1 || tempActive == 1)
        {
            if (player > 8 || player < 1)
            {
                player = 1;
                return;
            }
            pointer = 0x209C + READU32(0x65DA44) + (player * 0x44);
            if (READU32(pointer) < 0x14000000 || READU32(pointer) > 0x18000000 || READU32(pointer) == g_racePointer || READU32(READU32(pointer) + 0x24) < 0x30000000 || READU32(READU32(pointer) + 0x24) > 0xD0000000 || READU32(READU32(pointer) + 0x2C) < 0x30000000 || READU32(READU32(pointer) + 0x2C) > 0xD0000000)
            {
                player++;
                return;
            }
            if (player > 0 && player < 9 && READU32(pointer) > 0x14000000 && READU32(pointer) < 0x18000000 && g_racePointer > 0x14000000 && g_racePointer < 0x18000000)
            {
                dataY = READFLOAT(READU32(pointer) + 0x28);
                dataY += 38;
                dataZ = READFLOAT(READU32(pointer) + 0x2C);
                if (dataY != 0 && dataY != 38 && dataZ != 0)
                {
                    memcpy((void *)(g_racePointer), (void*)(READU32(pointer)), 0x28);
                    WRITEFLOAT(g_racePointer + 0x28, dataY);
                    WRITEFLOAT(g_racePointer + 0x2C, dataZ);
                }
                else
                {
                    player++;
                }
            }
        }
    }
}
 
D

Deleted User

Guest
Code not Working:

Region (EUR):
Game version (Rev1):
NTR Version (3.6):
Plugin last updated (14. November 2017):
Codes not working:No Disconnect

When you enable No Disconnect you will be twelfth, if you don't restart your Game
 

Deleted member 411764

Well-Known Member
Member
Joined
Jan 15, 2017
Messages
260
Trophies
0
Age
22
XP
495
Country
United Kingdom
Code not Working:

Region (EUR):
Game version (Rev1):
NTR Version (3.6):
Plugin last updated (14. November 2017):
Codes not working:No Disconnect

When you enable No Disconnect you will be twelfth, if you don't restart your Game

You're meant to stay in 12th when using no disconnect to prevent ftwing
hope that answered your question and its a patch not a problem with the code. :)

It would be nice if the game didn't crash when pressing left when there is no blue shell with the blue shell ride code enabled.

use the up-to-date plg, a mem check was added so when you press Left when a blueshell hasn't been spawned it doesn't crash you
hope that answered your question. :)
 

IC_

GBAtemp's ???
Member
Joined
Aug 24, 2017
Messages
1,569
Trophies
1
Location
The Forest
XP
5,426
Country
Antarctica
You're meant to stay in 12th when using no disconnect to prevent ftwing
hope that answered your question and its a patch not a problem with the code. :)



use the up-to-date plg, a mem check was added so when you press Left when a blueshell hasn't been spawned it doesn't crash you
hope that answered your question. :)
Where can I get it?
 
D

Deleted User

Guest
Region (USA/EUR/JPN):EUR
Game version (Rev0/Rev0 1.1/Rev1):Rev1 Update 1.1
NTR Version (3.2/3.3/3.4):3.6/3.3 (older not testet)
Plugin last updated (14 November 2017):
Codes not working:No Disconnect

Problem:You will stay in 12th while using no disconnect
 

Deleted member 411764

Well-Known Member
Member
Joined
Jan 15, 2017
Messages
260
Trophies
0
Age
22
XP
495
Country
United Kingdom
Region (USA/EUR/JPN):EUR
Game version (Rev0/Rev0 1.1/Rev1):Rev1 Update 1.1
NTR Version (3.2/3.3/3.4):3.6/3.3 (older not testet)
Plugin last updated (14 November 2017):
Codes not working:No Disconnect

Problem:You will stay in 12th while using no disconnect

Stop spamming your query has been answered now stop or wait till the OP DarkFlare comes online....
 

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,750
Country
United States
Code not Working:

Region (EUR):
Game version (Rev1):
NTR Version (3.6):
Plugin last updated (14. November 2017):
Codes not working:No Disconnect

When you enable No Disconnect you will be twelfth, if you don't restart your Game
This isn't a glitch. It's intentional.

It would be nice if the game didn't crash when pressing left when there is no blue shell with the blue shell ride code enabled.
It's been fixed. You won't crash anymore
 

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,750
Country
United States
Added a new code, touch screen teleportation/freefly. This was a fun code to make because it was a challenge. The main challenge of it was all the geometry... and trying to find a working, stable pointer to UIMapPos.bin. This file stores the 2 coordinate points that the square map uses (bottom left and top right). I found the difference between the two Y values, divided it by a manually calculated constant of 240, and then multiplied your touch position by this course-specific scale. After that, I had to find a way to calculate the difference between 0,0 on the map and the left, bottom side of the touch screen. I drew this diagram to help: https://i.imgur.com/kjk0e11.png So finally, I figured out that the X axis offset is X1 + ((320.f * MapScale1) - (X1 + X2))). The Y axis offset was simply Y2. The reason the X axis was so complex compared to the Y offset is because the bottom screen is a 4:3 aspect ratio while the map has a 1:1 aspect ratio, so the map position will affect the X bounds differently since the map will never be bigger than the smallest edge (which happens to be Y).



Source :
Code:
void    TouchCode(void)
{
    unsigned int g_raceCondition = GetRaceCondition(), g_racePointer = GetRacePointer();
    if (READU32(READU32(0x6789C8) + 0x1A48) == 1 && g_raceCondition == 1 && g_racePointer > 0x16000000 && g_racePointer < 0x18000000)
    {
        unsigned int touch_pointer = *(unsigned int *)0x6789C8;
        float X_Axis = *(float *)(touch_pointer + 0x1BCC);
        float Y_Axis = *(float *)(touch_pointer + 0x1BD0);
        float MapStatic1 = READFLOAT(READU32(READU32(READU32(READU32(READU32(READU32(0x140002F4) + 0x14) + 0x370) + 0x270) + 0x60) + 0x688) + 0);
        float Map_Scale1 = READFLOAT(READU32(READU32(READU32(READU32(READU32(READU32(0x140002F4) + 0x14) + 0x370) + 0x270) + 0x60) + 0x688) + 4);
        float MapStatic2 = READFLOAT(READU32(READU32(READU32(READU32(READU32(READU32(0x140002F4) + 0x14) + 0x370) + 0x270) + 0x60) + 0x688) + 8);
        float Map_Scale2 = READFLOAT(READU32(READU32(READU32(READU32(READU32(READU32(0x140002F4) + 0x14) + 0x370) + 0x270) + 0x60) + 0x688) + 12);
        Map_Scale1 -= Map_Scale2;
        Map_Scale1 /= 240.f;
        X_Axis *= Map_Scale1;
        Y_Axis *= Map_Scale1;
        float Z = ((320.f * Map_Scale1) - (MapStatic1 + MapStatic2));
        X_Axis -= (Z + MapStatic1);
        // for reference :   https://i.imgur.com/kjk0e11.png
        Y_Axis += Map_Scale2;
        *(float *)(g_racePointer + 0x3C) = 0;
        *(float *)(g_racePointer + 0x24) = X_Axis;
        *(float *)(g_racePointer + 0x2C) = Y_Axis;
    }
}

Download is still in the original post
 

davidBazuka

New Member
Newbie
Joined
Jan 29, 2017
Messages
3
Trophies
0
Age
33
XP
52
Country
United States
Region (USA/EUR/JPN): EUR
Game version (Rev0/Rev0 1.1/Rev1): Rev1(?) Update 1.1
NTR Version (3.2/3.3/3.4): 3.6
Plugin last updated (14 November 2017): Latest
Codes not working: Menu Hotkey

This isn't a 'code' not working, just the plugin in general for me. I go into NTRBoot, I select 3.6, I go back into Mario Kart 7, I press SELECT, and nothing happens. I am in the main MK7 menu when I press SELECT, by the way. I am using N3DS that has Luma3DS and Firmware Ver. 11.6.0-39U.
 

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,750
Country
United States
Region (USA/EUR/JPN): EUR
Game version (Rev0/Rev0 1.1/Rev1): Rev1(?) Update 1.1
NTR Version (3.2/3.3/3.4): 3.6
Plugin last updated (14 November 2017): Latest
Codes not working: Menu Hotkey

This isn't a 'code' not working, just the plugin in general for me. I go into NTRBoot, I select 3.6, I go back into Mario Kart 7, I press SELECT, and nothing happens. I am in the main MK7 menu when I press SELECT, by the way. I am using N3DS that has Luma3DS and Firmware Ver. 11.6.0-39U.
This could be a few things.

1. Ensure that the MarioKart7.plg is inside the appropriate folder (in the original post)
2. Use BootNTR Selector and select option #1 when it asks the plugin directory
3. If you're already using this, you may have accidentally set the boot to method #2, in which case you'll need to move your plugin to the directory in option #2 (I don't have it memorized off the top of my head)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=BjK2lPBzGzo