I've made and would like to share a code mod that skips cutscenes related to collecting stars. Some are done by just enabling behavior flags, but others (notably the course complete screen and the star door unlocking cutscenes) are done via a hook. I've also added compatibility with king the memer's Star Choose Exit mod by checking if it's active and not disabling star save prompts if it is.
Take note of the star count in the first clip.
Take note of the star count in the first clip.
LUA:
-- name: Skip Star Cutscenes
-- description: Skip Star Cutscenes\nSkips all cutscenes and dialog related to collecting stars.
-- Star Choose Exit compatibility
disable_save = true
for i in pairs(gActiveMods) do
if gActiveMods[i].name == "Star Choose Exit" then
disable_save = false
end
end
-- Don't skip star dialog if SCE is on
if disable_save == true then
gBehaviorValues.ShowStarDialog = false
end
gBehaviorValues.ShowStarMilestones = false
local function before_set_mario_action(m, nextAction)
if m.playerIndex ~= 0 then return end
if nextAction == ACT_EXIT_LAND_SAVE_DIALOG then
-- Skip the course complete screen
mario_set_forward_vel(m, 0)
play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING)
m.faceAngle.y = m.faceAngle.y + 0x8000
-- Fix camera getting stuck for a few seconds after getting a key
if m.area.camera.cutscene == CUTSCENE_EXIT_BOWSER_SUCC then
m.area.camera.cutscene = 0
m.statusForCamera.action = m.action
m.statusForCamera.cameraEvent = 0
soft_reset_camera(m.area.camera)
end
return ACT_JUMP_LAND_STOP
elseif nextAction == ACT_UNLOCKING_KEY_DOOR then
-- Skip the unlock animation
if m.usedObj ~= 0 and ((m.usedObj.oBehParams >> 24) == 1) then
save_file_set_flags(SAVE_FLAG_UNLOCKED_UPSTAIRS_DOOR)
save_file_clear_flags(SAVE_FLAG_HAVE_KEY_2)
else
save_file_set_flags(SAVE_FLAG_UNLOCKED_BASEMENT_DOOR)
save_file_clear_flags(SAVE_FLAG_HAVE_KEY_1)
end
return ACT_WALKING
elseif nextAction == ACT_UNLOCKING_STAR_DOOR then
-- Skip the unlock animation
save_file_set_flags(get_door_save_file_flag(m.usedObj))
return ACT_WALKING
end
end
-- Hooks
hook_event(HOOK_BEFORE_SET_MARIO_ACTION, before_set_mario_action)