Update default mods (forgot oops)

This commit is contained in:
Agent X 2024-01-01 16:41:28 -05:00
parent 4be25bfc64
commit f8d15e4ff8
7 changed files with 99 additions and 94 deletions

View File

@ -0,0 +1,70 @@
if SM64COOPDX_VERSION == nil then
local first = false
hook_event(HOOK_ON_LEVEL_INIT, function()
if not first then
first = true
play_sound(SOUND_MENU_CAMERA_BUZZ, gMarioStates[0].marioObj.header.gfx.cameraToObject)
djui_chat_message_create("\\#ff7f7f\\Day Night Cycle is no longer supported with sm64ex-coop\nas it uses sm64coopdx exclusive Lua functionality.\n\\#dcdcdc\\To play this mod, try out sm64coopdx at\n\\#7f7fff\\https://sm64coopdx.com")
end
end)
return
end
-- time constants
SECOND = 30
MINUTE = SECOND * 60
HOUR_SUNRISE_START = 4
HOUR_SUNRISE_END = 5
HOUR_SUNRISE_DURATION = HOUR_SUNRISE_END - HOUR_SUNRISE_START
HOUR_SUNSET_START = 19
HOUR_SUNSET_END = 20
HOUR_SUNSET_DURATION = HOUR_SUNSET_END - HOUR_SUNSET_START
HOUR_DAY_START = 6
HOUR_NIGHT_START = 21
REAL_MINUTE = 1 / 60
-- lighting direction constants
DIR_DARK = 0.6
DIR_BRIGHT = 1
-- color constants
COLOR_NIGHT = { r = 70, g = 75, b = 100 }
COLOR_SUNRISE = { r = 255, g = 255, b = 200 }
COLOR_DAY = { r = 255, g = 255, b = 255 }
COLOR_SUNSET = { r = 255, g = 155, b = 100 }
FOG_COLOR_NIGHT = { r = 30, g = 30, b = 50 }
COLOR_DISPLAY_DARK = { r = 48, g = 90, b = 200 }
COLOR_DISPLAY_BRIGHT = { r = 255, g = 255, b = 80 }
-- skybox constants
SKYBOX_SCALE = 200
SKYBOX_DAY = 0
SKYBOX_SUNSET = 1
SKYBOX_NIGHT = 2
-- standard skyboxes
E_MODEL_SKYBOX_OCEAN_SKY = smlua_model_util_get_id("skybox_ocean_sky_geo")
E_MODEL_SKYBOX_FLAMING_SKY = smlua_model_util_get_id("skybox_flaming_sky_geo")
E_MODEL_SKYBOX_UNDERWATER_CITY = smlua_model_util_get_id("skybox_underwater_city_geo")
E_MODEL_SKYBOX_BELOW_CLOUDS = smlua_model_util_get_id("skybox_below_clouds_geo")
E_MODEL_SKYBOX_SNOW_MOUNTAINS = smlua_model_util_get_id("skybox_snow_mountains_geo")
E_MODEL_SKYBOX_DESERT = smlua_model_util_get_id("skybox_desert_geo")
E_MODEL_SKYBOX_HAUNTED = smlua_model_util_get_id("skybox_haunted_geo")
E_MODEL_SKYBOX_GREEN_SKY = smlua_model_util_get_id("skybox_green_sky_geo")
E_MODEL_SKYBOX_ABOVE_CLOUDS = smlua_model_util_get_id("skybox_above_clouds_geo")
E_MODEL_SKYBOX_PURPLE_SKY = smlua_model_util_get_id("skybox_purple_sky_geo")
E_MODEL_SKYBOX_SUNRISE = smlua_model_util_get_id("skybox_sunrise_geo")
E_MODEL_SKYBOX_SUNSET = smlua_model_util_get_id("skybox_sunset_geo")
E_MODEL_SKYBOX_NIGHT = smlua_model_util_get_id("skybox_night_geo")
-- below clouds skyboxes
E_MODEL_SKYBOX_BELOW_CLOUDS_NIGHT = smlua_model_util_get_id("skybox_below_clouds_night_geo")
E_MODEL_SKYBOX_BELOW_CLOUDS_SUNRISE = smlua_model_util_get_id("skybox_below_clouds_sunrise_geo")
E_MODEL_SKYBOX_BELOW_CLOUDS_SUNSET = smlua_model_util_get_id("skybox_below_clouds_sunset_geo")

View File

@ -1,18 +1,8 @@
if SM64COOPDX_VERSION == nil then return end
-- localize functions to improve performance -- localize functions to improve performance
local play_sound,table_insert,get_skybox,level_is_vanilla_level,math_floor,math_ceil = play_sound,table.insert,get_skybox,level_is_vanilla_level,math.floor,math.ceil local play_sound,table_insert,get_skybox,level_is_vanilla_level,math_floor,math_ceil = play_sound,table.insert,get_skybox,level_is_vanilla_level,math.floor,math.ceil
if SM64COOPDX_VERSION == nil then
local first = false
hook_event(HOOK_ON_LEVEL_INIT, function()
if not first then
first = true
play_sound(SOUND_MENU_CAMERA_BUZZ, gMarioStates[0].marioObj.header.gfx.cameraToObject)
djui_chat_message_create("\\#ff7f7f\\Day Night Cycle is no longer supported with sm64ex-coop\nas it uses sm64coopdx exclusive Lua functionality.\n\\#dcdcdc\\To play this mod, try out sm64coopdx at\n\\#7f7fff\\https://sm64coopdx.com")
end
end)
return
end
function if_then_else(cond, ifTrue, ifFalse) function if_then_else(cond, ifTrue, ifFalse)
if cond then return ifTrue end if cond then return ifTrue end
return ifFalse return ifFalse

View File

@ -1,43 +1,12 @@
-- name: .Day Night Cycle DX -- name: Day Night Cycle DX
-- incompatible: light -- incompatible: light
-- description: Day Night Cycle DX v2.0\nBy \\#ec7731\\Agent X\n\n\\#dcdcdc\\This mod adds a fully featured day night cycle system with night, sunrise, day and sunset to sm64coopdx. Days last 24 minutes and you can switch to and from 24 hour time with /time 24h\n\nSpecial thanks to \\#00ffff\\AngelicMiracles \\#dcdcdc\\for the sunset, sunrise and night time skyboxes -- description: Day Night Cycle DX v2.0.1\nBy \\#ec7731\\Agent X\n\n\\#dcdcdc\\This mod adds a fully featured day night cycle system with night, sunrise, day and sunset to sm64coopdx. Days last 24 minutes and you can switch to and from 24 hour time with /time 24h\n\nSpecial thanks to \\#00ffff\\AngelicMiracles \\#dcdcdc\\for the sunset, sunrise and night time skyboxes
-- deluxe: true -- deluxe: true
--- @diagnostic disable: undefined-global --- @diagnostic disable: undefined-global
if SM64COOPDX_VERSION == nil then return end if SM64COOPDX_VERSION == nil then return end
SECOND = 30
MINUTE = SECOND * 60
HOUR_SUNRISE_START = 4
HOUR_SUNRISE_END = 5
HOUR_SUNRISE_DURATION = HOUR_SUNRISE_END - HOUR_SUNRISE_START
HOUR_SUNSET_START = 19
HOUR_SUNSET_END = 20
HOUR_SUNSET_DURATION = HOUR_SUNSET_END - HOUR_SUNSET_START
HOUR_DAY_START = 6
HOUR_NIGHT_START = 21
local DIR_DARK = 0.6
local DIR_BRIGHT = 1
local COLOR_NIGHT = { r = 70, g = 75, b = 100 }
local COLOR_SUNRISE = { r = 255, g = 255, b = 200 }
local COLOR_DAY = { r = 255, g = 255, b = 255 }
local COLOR_SUNSET = { r = 255, g = 155, b = 100 }
local FOG_COLOR_NIGHT = { r = 30, g = 30, b = 50 }
local COLOR_DISPLAY_DARK = { r = 48, g = 90, b = 200 }
local COLOR_DISPLAY_BRIGHT = { r = 255, g = 255, b = 80 }
local SKYBOX_SCALE = 200
local REAL_MINUTE = 1 / 60
gGlobalSyncTable.dncEnabled = true gGlobalSyncTable.dncEnabled = true
local dncDisplayTime = true local dncDisplayTime = true

View File

@ -1,29 +1,5 @@
if SM64COOPDX_VERSION == nil then return end if SM64COOPDX_VERSION == nil then return end
local SKYBOX_DAY = 0
local SKYBOX_SUNSET = 1
local SKYBOX_NIGHT = 2
-- standard skyboxes
E_MODEL_SKYBOX_OCEAN_SKY = smlua_model_util_get_id("skybox_ocean_sky_geo")
local E_MODEL_SKYBOX_FLAMING_SKY = smlua_model_util_get_id("skybox_flaming_sky_geo")
local E_MODEL_SKYBOX_UNDERWATER_CITY = smlua_model_util_get_id("skybox_underwater_city_geo")
local E_MODEL_SKYBOX_BELOW_CLOUDS = smlua_model_util_get_id("skybox_below_clouds_geo")
local E_MODEL_SKYBOX_SNOW_MOUNTAINS = smlua_model_util_get_id("skybox_snow_mountains_geo")
local E_MODEL_SKYBOX_DESERT = smlua_model_util_get_id("skybox_desert_geo")
local E_MODEL_SKYBOX_HAUNTED = smlua_model_util_get_id("skybox_haunted_geo")
local E_MODEL_SKYBOX_GREEN_SKY = smlua_model_util_get_id("skybox_green_sky_geo")
local E_MODEL_SKYBOX_ABOVE_CLOUDS = smlua_model_util_get_id("skybox_above_clouds_geo")
local E_MODEL_SKYBOX_PURPLE_SKY = smlua_model_util_get_id("skybox_purple_sky_geo")
local E_MODEL_SKYBOX_SUNRISE = smlua_model_util_get_id("skybox_sunrise_geo")
E_MODEL_SKYBOX_SUNSET = smlua_model_util_get_id("skybox_sunset_geo")
E_MODEL_SKYBOX_NIGHT = smlua_model_util_get_id("skybox_night_geo")
-- below clouds skyboxes
local E_MODEL_SKYBOX_BELOW_CLOUDS_NIGHT = smlua_model_util_get_id("skybox_below_clouds_night_geo")
local E_MODEL_SKYBOX_BELOW_CLOUDS_SUNRISE = smlua_model_util_get_id("skybox_below_clouds_sunrise_geo")
local E_MODEL_SKYBOX_BELOW_CLOUDS_SUNSET = smlua_model_util_get_id("skybox_below_clouds_sunset_geo")
gVanillaSkyboxModels = { gVanillaSkyboxModels = {
[BACKGROUND_OCEAN_SKY] = E_MODEL_SKYBOX_OCEAN_SKY, [BACKGROUND_OCEAN_SKY] = E_MODEL_SKYBOX_OCEAN_SKY,
[BACKGROUND_FLAMING_SKY] = E_MODEL_SKYBOX_FLAMING_SKY, [BACKGROUND_FLAMING_SKY] = E_MODEL_SKYBOX_FLAMING_SKY,

View File

@ -166,25 +166,6 @@ function obj_skip_in_view_check(obj)
obj.header.gfx.skipInViewCheck = true obj.header.gfx.skipInViewCheck = true
end end
-- generic
function obj_generate_hitbox_multiply_func(radius, height)
--- @param o Object
local func = function(o)
o.hitboxRadius = o.hitboxRadius * radius
o.hitboxHeight = o.hitboxHeight * height
end
return func
end
-- generic
function obj_generate_health_func(health)
--- @param o Object
local func = function(o)
o.oGmHealth = health
end
return func
end
--- @param o Object --- @param o Object
function obj_sign_hitbox(o) function obj_sign_hitbox(o)
o.hitboxRadius = o.hitboxRadius * 0.75 o.hitboxRadius = o.hitboxRadius * 0.75
@ -218,6 +199,25 @@ function obj_king_bobomb_hitbox(o)
o.hitboxHeight = o.hitboxHeight * 3 o.hitboxHeight = o.hitboxHeight * 3
end end
-- generic
function obj_generate_hitbox_multiply_func(radius, height)
--- @param o Object
local func = function(o)
o.hitboxRadius = o.hitboxRadius * radius
o.hitboxHeight = o.hitboxHeight * height
end
return func
end
-- generic
function obj_generate_health_func(health)
--- @param o Object
local func = function(o)
o.oGmHealth = health
end
return func
end
function gm_hook_behavior(id, override, init, loop) function gm_hook_behavior(id, override, init, loop)
hook_behavior( hook_behavior(
id, id,

View File

@ -1,5 +1,6 @@
-- name: .Gun Mod DX -- name: Gun Mod DX
-- description: Gun Mod DX v3.0.1\nBy \\#ec7731\\Agent X\\#dcdcdc\\\nSpecial thanks to \\#f296af\\PeachyPeach\\#dcdcdc\\\n\nThis is a rewritten & overhauled version of my original Gun Mod for sm64ex-coop. I thought this would make a good mod to bundle with sm64coopdx. If you have two pistols, you are able to dual wield them as well!\n\nPress [\\#3040ff\\Y\\#dcdcdc\\] to shoot\nPress [\\#3040ff\\X\\#dcdcdc\\] to reload\nRun \\#00ffff\\/gm help\\#dcdcdc\\ for help -- incompatible: weapon
-- description: Gun Mod DX v3.0.2\nBy \\#ec7731\\Agent X\\#dcdcdc\\\nSpecial thanks to \\#f296af\\PeachyPeach\\#dcdcdc\\\n\nThis is a rewritten & overhauled version of my original Gun Mod for sm64ex-coop. I thought this would make a good mod to bundle with sm64coopdx. If you have two pistols, you are able to dual wield them as well!\n\nPress [\\#3040ff\\Y\\#dcdcdc\\] to shoot\nPress [\\#3040ff\\X\\#dcdcdc\\] to reload\nRun \\#00ffff\\/gm help\\#dcdcdc\\ for help
-- deluxe: true -- deluxe: true
if SM64COOPDX_VERSION == nil then return end if SM64COOPDX_VERSION == nil then return end
@ -358,8 +359,7 @@ _G.gunModApi = {
bullet_ricochet = bullet_ricochet, bullet_ricochet = bullet_ricochet,
obj_generate_hitbox_multiply_func = obj_generate_hitbox_multiply_func, obj_generate_hitbox_multiply_func = obj_generate_hitbox_multiply_func,
obj_generate_health_func = obj_generate_health_func, obj_generate_health_func = obj_generate_health_func,
shootable_register = shootable_register, shootable_register = shootable_register
gm_hook_behavior = gm_hook_behavior
} }
local fov = mod_storage_load_number("fov") local fov = mod_storage_load_number("fov")

View File

@ -33,7 +33,6 @@ Fixed singleplayer not forcing direct connection\n\
Fixed water camera and TTM star cutscene in first person\n\ Fixed water camera and TTM star cutscene in first person\n\
Fixed random crashes with built-in mods\n\ Fixed random crashes with built-in mods\n\
Lua API Changes:\n\ Lua API Changes:\n\
Allowed luac files to be read\n\
Allowed over exposure (>255) in marioBodyState light and shade values\n\ Allowed over exposure (>255) in marioBodyState light and shade values\n\
Undefined SM64COOPDX_VERSION if sm64ex-coop compatibility is on\n\ Undefined SM64COOPDX_VERSION if sm64ex-coop compatibility is on\n\
Added get_coop_compatibility_enabled()\n\ Added get_coop_compatibility_enabled()\n\
@ -41,7 +40,8 @@ Added gControllers\n\
Mod Changes:\n\ Mod Changes:\n\
Fixed custom music bug and updated rainbow level with Arena\n\ Fixed custom music bug and updated rainbow level with Arena\n\
Updated mQuake\n\ Updated mQuake\n\
Re-added Hide and Seek" Re-added Hide and Seek\n\
Updated Day Night Cycle DX and Gun Mod DX"
); );
struct DjuiText* text = djui_text_create(body, sChangelog); struct DjuiText* text = djui_text_create(body, sChangelog);