-- name: SM64 Title Screen -- description: Brings back the title screen and game over screen from vanilla Super Mario 64.\n\nNote: If a mod you have have a custom entry level set, there's a chance the title screen might not show or the title screen brings you to the wrong spot. gLevelValues.entryLevel = SPECIAL_WARP_TITLE ------- -- The game would normally bring Mario back to the title screen -- because the entry level is the title screen, but with the -- code below, it'll bring Mario to the "game over" variation -- of the title screen. ------- local hasSetLives = false function set_starting_lives() if not hasSetLives then local m = gMarioStates[0] -- Wait until Mario exists if m.marioObj ~= nil then m.numLives = 0 hasSetLives = true end end end hook_event(HOOK_MARIO_UPDATE, set_starting_lives) local sWasGameOver = false local m = gMarioStates[0] function quality_of_life() local isGameOver = get_delayed_warp_op() == WARP_OP_GAME_OVER if isGameOver then if not sWasGameOver then m.marioObj.oTimer = 0 end if m.marioObj.oTimer >= 47 then sWasGameOver = false m.numLives = 0 m.health = 0x880 warp_special(SPECIAL_WARP_GODDARD_GAMEOVER) return end end sWasGameOver = isGameOver end hook_event(HOOK_MARIO_UPDATE, quality_of_life)