#Code to make Mega Mario use Super Mario's physics/controls

1 messages · Page 1 of 1 (latest)

tranquil thicket
#

although i'm not sure if i want the jump to be so limited as it is here, but maybe

you can get something close to this while Super by setting the Super Mario PowerupParams to the Mega Mario ones, although he can't destroy enemies and the jump is too high:

ncp_over(0x02122c94, 10)
static const Player::PowerupParam powerupTable[8] = {
    
    //Small Mario
    {
        &Player::constantsSmall,
        &Player::sensorsSmall,
        &Player::hitboxSmall,
        1,
        0,
    },
    
    //Super Mario
    {
        &Player::constantsSuper,
        &Player::sensorsSuper,
        &Player::hitboxSuper,
        0,
        0,
    },
    
    //Fire Mario
    {
        &Player::constantsSuper,
        &Player::sensorsSuper,
        &Player::hitboxSuper,
        0,
        1,
    },
    
    //Mega Mario
    {
        &Player::constantsMega,
        &Player::sensorsMega,
        &Player::hitboxMega,
        0,
        0,
    },
    
    //Mini Mario
    {
        &Player::constantsMini,
        &Player::sensorsMini,
        &Player::hitboxMini,
        1,
        0,
    },
    
    //Shell Mario
    {
        &Player::constantsSuper,
        &Player::sensorsSuper,
        &Player::hitboxSuper,
        0,
        0,
    },
    
    //Unused 1
    {
        &Player::constantsSuper,
        &Player::sensorsSuper,
        &Player::hitboxSuper,
        0,
        0,
    },
    
    //Unused 2
    {
        &Player::constantsSuper,
        &Player::sensorsSuper,
        &Player::hitboxSuper,
        0,
        0,
    },
};
dim cove
#

you have to retain the collision sensors first of all

#

those determine whether the player can break blocks and collide in different ways

#

(I think also trigger invisible blocks)

rose raptor
#

this might help ```cpp
ncp_over(0x0212e378,11)
static const PlayerBase::Constants newMegaConstants {
2.0fx, // scale
1.5fx, // max walk velocity
2.25fx, // dash threshold
3.0fx, // max dash velocity
4.03125fx, // max dash velocity starman
0.125fx, // max swim velocity
2.25fx,
0.5625fx, // max walk velocity in water
4.0fx, // jump velocity (3.65625fx is default super)
3.0fx,
3.5fx, // quicksand jump velocity
2.0fx, // in quicksand jump velocity
2.25fx,
32.0fx,
1.0fx, // width
1.0fx // height
};

#

I don't remember which values I modified and which are original though

tranquil thicket
#

Code to make Mega Mario use Super Mario's physics/controls

#

but that should help with limiting the jump

#

basically i'd want mega mario to control like super mario, except he can destroy blocks/enemies like normal

dim cove
#

certain moves cannot be used with mega player

#

such as dashing, skidding and crouching

cosmic quest
#

Those are pretty doable iirc, I managed to make the blue shell moves usable with minimal asm

#

I’ll take a look at it if I have time