All Current Star Road Changes (#572)

* Star Road Fixes + Hard Mode Update 12-09-2024

- You now get sent to Zero Life after dying with a life count below Zero instead of at Zero
- Tuxie (Race Penguin) No longer clips through geometry when finishing the race in Colossal Candy Clutter
- Set Number of lives from 4 to 3 to be more accurate
- Implemented a fully functional Hard Mode as the original hack also had one (Hold L within 10 frames of Hosting a lobby to activate it, uses Backup Slot)
- Koopa the Quick in both Koopa Canyon and Mushroom Mountain Town no longer softlocks himself
- Added a signpost in Castle Grounds hinting at Hard Mode
- Fixed a strange warp node in Zero Life to warp you to the start warp
- Moved a Goomba farther from the Warp Pipe in Hidden Palace Finale to prevent him from hitting you immediately (Also makes Hard Mode Possible)

* Star Road Fixes 12/14/2024

- Updated SMSRSpaceBox's behavior so that it has a home, as it constantly snapped to origin before, which was why there were Pushable Metal Boxes in their place in Starlight Runway Act 2

- Added "Hard Mode" as it was part of the original hack. Either hold L Trig then Host with Star Road, or enable it in the mod menu. Hard Mode uses the backup save feature so that normal files wont be affected.

* Needle's Star Road Fixes 12/15/2024

Fixed a faulty Warp Node in Piranha Plant Pond that caused the player to sometimes enter the level origin instead of the level's correct entry warp

* Peachy's Requests (idk)

A bit nitpicky but that's my opinion. Maybe I'm just having an off day or something. Anyways, changes were made. I didn't provide the changes to the bhv and lvl files mainly since they already weren't there (probably to save on space?) I can probably add Star Road's but I have no clue about 74's.

* All Current Star Road Fixes

This is basically every change so far but in one commit

- You now get sent to Zero Life after dying with a life count below Zero instead of at Zero
- Tuxie (Race Penguin) No longer clips through geometry when finishing the race in Colossal Candy Clutter
- Set Number of lives from 4 to 3 to be more accurate
- Implemented a fully functional Hard Mode as the original hack also had one (Hold L and Host a lobby OR select "Hard Mode" in the mod menu  to activate it, uses Backup Slot)
- Koopa the Quick in both Koopa Canyon and Mushroom Mountain Town no longer softlocks himself
- Added a signpost in Castle Grounds hinting at Hard Mode
- Fixed a strange warp node in Zero Life to warp you to the start warp
- Moved a Goomba farther from the Warp Pipe in Hidden Palace Finale to prevent him from hitting you immediately (Also makes Hard Mode Possible)
- Fixed a faulty warp in Piranha Plant Pont Pond
- Added  name coloring to the mod description for easier readability for credits
- Altered the "SMSRSpaceBox" object's behavior to have a home using SET_HOME() so that Star 2, "Climb Through the Machinery", in Starlight Runway was casually possible (was previously just metal boxes with a different model)

* File Removal

Removing Level folders and behaviordata.c via request

* Update bhv_overrides.lua
This commit is contained in:
Mr.Needlemouse 2024-12-23 16:26:45 -05:00 committed by GitHub
parent 459fccea80
commit d6df2ff210
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 377 additions and 207 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,97 @@
gGlobalSyncTable.hardMode = false
function on_level_init()
local m = gMarioStates[0]
local np = gNetworkPlayers[0]
if gGlobalSyncTable.hardMode then
gMarioStates[0].numStars = save_file_get_total_star_count(get_current_save_file_num() - 1, COURSE_MIN - 1,
COURSE_MAX - 1)
gLevelValues.exitCastleArea = gNetworkPlayers[0].currAreaIndex
end
end
burnActions = { --Accounting for when you are on fire since that type of damage is handled differently.
[ACT_BURNING_FALL] = true,
[ACT_BURNING_GROUND] = true,
[ACT_BURNING_JUMP] = true
}
seenPopup = false
local frameCounter = 10
local function mario_update(m)
if m.playerIndex ~= 0 then return end
if network_is_server() and frameCounter > 0 then
if m.controller.buttonDown & L_TRIG ~= 0 then
gGlobalSyncTable.hardMode = true -- Starts up "Hard Mode" on Hack Boot. Hold the L button within 10 frames of loading Star Road to activate it.
frameCounter = 0
save_file_set_using_backup_slot(gGlobalSyncTable.hardMode)
save_file_reload(1)
djui_popup_create("\\#ff0000\\HARD MODE\\#dcdcdc\\ Activated", 1)
play_sound(SOUND_MENU_MARIO_CASTLE_WARP + 1 << 0, { x = 0, y = 0, z = 0 })
end
frameCounter = frameCounter - 1
end
if not gGlobalSyncTable.hardMode then return end
if not seenPopup and not network_is_server() then
save_file_set_using_backup_slot(gGlobalSyncTable.hardMode)
save_file_reload(1)
djui_popup_create("You have joined a \\#ff0000\\HARD MODE\\#dcdcdc\\ lobby.", 3)
play_sound(SOUND_MENU_MARIO_CASTLE_WARP + 1 << 0, { x = 0, y = 0, z = 0 })
seenPopup = true
end
if m.hurtCounter > 0 or burnActions[m.action] then
m.hurtCounter = 64 -- Damage Check. Hard Mode is a OHKO mode.
m.healCounter = 0 -- Prevents you from healing from a coin or any health regen object via landing on one while dying.
end
if not gGlobalSyncTable.hardMode then return false end
end
---@param m MarioState
function air(m)
if gGlobalSyncTable.hardMode then
if m.action & ACT_GROUP_MASK == ACT_GROUP_SUBMERGED and m.area.terrainType ~= TERRAIN_SNOW then
change = (m.pos.y < m.waterLevel - 140 and 1 or -0x1A)
m.health = m.health + change
end
end
end
function hard_mode_menu(_, value)
gGlobalSyncTable.hardMode = value
save_file_set_using_backup_slot(gGlobalSyncTable.hardMode)
save_file_reload(1)
djui_popup_create(value and "\\#ff0000\\HARD MODE\\#dcdcdc\\ Activated" or "You are currently in NORMAL MODE.", 1)
play_sound(SOUND_MENU_MARIO_CASTLE_WARP, { x = 0, y = 0, z = 0 })
warp_to_warpnode(LEVEL_CASTLE_GROUNDS, 1, 0, 128)
end
function dialog_box_colors(id)
if changed_dialogs[id] and gGlobalSyncTable.hardMode then -- red dialog box (Thank you again Emmi)
set_dialog_override_color(255, 100, 100, 180, 255, 255, 255, 255)
else
reset_dialog_override_color()
end
end
if network_is_server() then
hook_mod_menu_checkbox("Hard Mode", gGlobalSyncTable.hardMode, hard_mode_menu)
end
local function menu_hud_render()
if is_game_paused() and gGlobalSyncTable.hardMode then
djui_hud_set_font(FONT_CUSTOM_HUD)
djui_hud_set_color(0xdc, 0xdc, 0xdc, 255)
local height = djui_hud_get_screen_height()
djui_hud_print_text("Hard Mode", 40, height - 130, 4)
end
end
-- Main loop
local function hud_render()
djui_hud_set_resolution(RESOLUTION_DJUI)
menu_hud_render()
end
hook_event(HOOK_ON_HUD_RENDER, hud_render)
hook_event(HOOK_ON_DIALOG, dialog_box_colors)
hook_event(HOOK_ON_LEVEL_INIT, on_level_init)
hook_event(HOOK_MARIO_UPDATE, mario_update)
hook_event(HOOK_BEFORE_MARIO_UPDATE, air)

View file

@ -1,5 +1,5 @@
-- name: Star Road
-- description: Star Road is a romhack created by SKELUX\n\nwww.youtube.com/c/Skelux\n\nThere are 23 custom levels, with a total of 130 stars.\n\nPorted to PC by AloXado320, PeachyPeach, and PrinceFrizzy\n\nPorted to coop by djoslin0, PrinceFrizzy, and Isaac.
-- name: Star Road Dev
-- description: Romhack created by \\#FFD700\\SKELUX\\#DCDCDC\\\n\nwww.youtube.com/c/Skelux\n\nThere are 23 custom levels, with a total of 130 stars.\n\nPorted to PC by AloXado320,\n\\#FFAAFF\\PeachyPeach\\#DCDCDC\\, and \\#8C4AC7\\PrinceFrizzy\\#DCDCDC\\\n\nPorted to coop by \\#093614\\djoslin0\\#DCDCDC\\,\n\\#8C4AC7\\PrinceFrizzy\\#DCDCDC\\, and \\#141699\\Isaac\\#DCDCDC\\.\n\nAdditional Fixes and "\\#FF0000\\Hard Mode\\#DCDCDC\\" addition by \\#2D851C\\Mr.Needlemouse\\#DCDCDC\\.
-- incompatible: romhack
--------------
@ -29,13 +29,24 @@ movtexqc_register('wmotr_1_Movtex_0', LEVEL_WMOTR, 1, 0)
LEVEL_ZERO_LIFE = level_register('level_zerolife_entry', COURSE_NONE, 'ZERO LIFE', 'zl', 28000, 0x28, 0x28, 0x28)
---------------------------
-- race character speed--
---------------------------
--- @param o Object
function bhv_tuxierace_init(o)
if o.oRacingPenguinReachedBottom == 1 then
o.oRacingPenguinWeightedNewTargetSpeed = 10
end
end
hook_behavior(id_bhvRacingPenguin, OBJ_LIST_GENACTOR, false, nil, bhv_tuxierace_init, "bhvRacingPenguin")
---------------------------
-- force server settings --
---------------------------
gLevelValues.fixCollisionBugs = true
gLevelValues.vanishCapSequence = 0x32
gServerSettings.skipIntro = 1
-----------
@ -84,7 +95,7 @@ smlua_audio_utils_replace_sequence(0x24, 0x11, 70, "24_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x25, 0x25, 85, "25_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x26, 0x25, 75, "26_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x27, 0x25, 75, "27_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x28, 0x25, 85, "28_Seq_smsrdeluxe_custom") -- One of Simpleflips outros. (Don't know the actual song name.)
smlua_audio_utils_replace_sequence(0x28, 0x25, 85, "28_Seq_smsrdeluxe_custom") -- One of Simpleflips outros. (Song Name is "Lets Do the Fooka Fooka!" from Super Mario RPG) - Needle
smlua_audio_utils_replace_sequence(0x29, 0x25, 70, "29_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x2A, 0x11, 80, "2A_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x2B, 0x1B, 80, "2B_Seq_smsrdeluxe_custom")
@ -104,13 +115,38 @@ smlua_audio_utils_replace_sequence(0x32, 0x25, 80, "32_Seq_smsrdeluxe_custom")
camera_set_romhack_override(RCO_ALL_EXCEPT_BOWSER)
camera_set_use_course_specific_settings(false)
----------------------------------
-------------------------
-- zero life checks --
-------------------------
function on_death()
local zerolife = false
function on_death(transitionType)
local m = gMarioStates[0]
if m.numLives <= 0 then
if m.numLives < 0 and transitionType == WARP_TRANSITION_FADE_INTO_BOWSER then
zerolife = true
m.numLives = 3
end
end
function void_death()
local m = gMarioStates[0]
if m.numLives < 0 then
zerolife = true
m.numLives = 3
end
end
local startingLives = true
local function lives(m)
if m.playerIndex ~= 0 then return end
if startingLives then
m.numLives = 3
startingLives = false
end
if zerolife then
warp_to_level(LEVEL_ZERO_LIFE, 1, 0)
m.numLives = 4
zerolife = false
startingLives = true
end
end
@ -121,6 +157,8 @@ function on_warp_and_init() -- 130 stars castle grounds music
end
end
hook_event(HOOK_ON_DEATH, on_death)
hook_event(HOOK_ON_SCREEN_TRANSITION, on_death)
hook_event(HOOK_ON_LEVEL_INIT, on_warp_and_init)
hook_event(HOOK_ON_WARP, on_warp_and_init)
hook_event(HOOK_MARIO_UPDATE, lives)
hook_event(HOOK_ON_DEATH, void_death)