Pigman.gaming Posted March 2, 2025 Share Posted March 2, 2025 I made the "calamity music mod" for don't starve together however there's one issue I don't really know how to fix. For some reason, the song that is supposed to play for ancient guardian plays for the nightmare were pig and for some reason frost jaw and the eye of terror. This is the code used to replace the songs. I got this code form a tutorial package from 'prince chicken hair' on you tube I don't actually know how to code. The music for ancient guardian is near the top under "epicfight_ruins" and the music for the "newer" bosses is at the bottom and I added them as they weren't included in the original package. The ruins epic fight is the default fallback epic fight music as it is labeled in the image however I don't see anything wrong with the new lines that I wrote that would cause them to break. I looked through the games sound files and made sure each directory was correct, I made sure there were no typos and that it was exactly the same as all the other sound remap things. After updating the mod 5 times and even rebuilding my Fmod file I've run out of ideas, does anyone know how I could fix this? Link to comment https://forums.kleientertainment.com/forums/topic/164547-music-mod-same-song-plays-for-different-bosses/ Share on other sites More sharing options...
Pigman.gaming Posted March 2, 2025 Author Share Posted March 2, 2025 This is the code in the image as its kinda hard to see it GLOBAL.continuous_mode = (GetModConfigData("music_mode")~="busy") Assets = { Asset("SOUNDPACKAGE", "sound/music_mod.fev"), Asset("SOUND", "sound/music_mod.fsb"), } GLOBAL.FE_MUSIC = "music_mod/music/music_FE" ---------------------------------------------------- RemapSoundEvent( "dontstarve/music/music_danger", "music_mod/music/music_danger" ) RemapSoundEvent( "dontstarve/music/music_danger_winter", "music_mod/music/music_danger_winter" ) RemapSoundEvent( "dontstarve_DLC001/music/music_danger_spring", "music_mod/music/music_danger_spring" ) RemapSoundEvent( "dontstarve_DLC001/music/music_danger_summer", "music_mod/music/music_danger_summer" ) RemapSoundEvent( "dontstarve/music/music_danger_cave", "music_mod/music/music_danger_cave" ) RemapSoundEvent( "dontstarve/music/music_danger_ruins", "music_mod/music/music_danger_ruins" ) RemapSoundEvent( "dontstarve/music/music_epicfight", "music_mod/music/music_epicfight" ) -- Bearger/"Boss" mob in autumn(*) RemapSoundEvent( "dontstarve/music/music_epicfight_winter", "music_mod/music/music_epicfight_winter" ) -- Deerclops/"Boss" mob in winter(*) RemapSoundEvent( "dontstarve_DLC001/music/music_epicfight_spring", "music_mod/music/music_epicfight_spring" ) -- Moose/Goose/"Boss" mob in spring(*) RemapSoundEvent( "dontstarve_DLC001/music/music_epicfight_summer", "music_mod/music/music_epicfight_summer" ) -- "Boss" mob in summer(*) RemapSoundEvent( "dontstarve/music/music_epicfight_cave", "music_mod/music/music_epicfight_cave" ) -- "Boss" mob in The Caves(*) RemapSoundEvent( "dontstarve/music/music_epicfight_ruins", "music_mod/music/music_epicfight_ruins" ) -- Ancient Guardian/Shadow Pieces/Default Fallback Epic Fight Music RemapSoundEvent( "dontstarve/music/music_epicfight_3", "music_mod/music/music_epicfight_3" ) -- Dragonfly RemapSoundEvent( "dontstarve/music/music_epicfight_4", "music_mod/music/music_epicfight_4" ) -- Bee Queen RemapSoundEvent( "dontstarve/music/music_epicfight_antlion", "music_mod/music/music_epicfight_antlion" ) -- Antlion RemapSoundEvent( "dontstarve/music/music_epicfight_toadboss", "music_mod/music/music_epicfight_toadboss" ) -- Toadstool RemapSoundEvent( "saltydog/music/malbatross", "music_mod/music/malbatross" ) -- Malbatross (RoT:SD) RemapSoundEvent( "dontstarve/music/music_epicfight_crabking", "music_mod/music/music_epicfight_crabking" ) -- Crab King (RoT:SSSS) RemapSoundEvent( "dontstarve/music/music_epicfight_5a", "music_mod/music/music_epicfight_5a" ) -- Klaus P1 RemapSoundEvent( "dontstarve/music/music_epicfight_5b", "music_mod/music/music_epicfight_5b" ) -- Klaus P2 RemapSoundEvent( "dontstarve/music/music_epicfight_moonbase", "music_mod/music/music_epicfight_moonbase" ) -- MoonStone Raid P1 RemapSoundEvent( "dontstarve/music/music_epicfight_moonbase_b", "music_mod/music/music_epicfight_moonbase_b" ) -- MoonStone Raid P2 RemapSoundEvent( "dontstarve/music/music_epicfight_stalker", "music_mod/music/music_epicfight_stalker" ) -- A.FuelWeaver P1 RemapSoundEvent( "dontstarve/music/music_epicfight_stalker_b", "music_mod/music/music_epicfight_stalker_b" ) -- A.FuelWeaver P2 RemapSoundEvent( "moonstorm/creatures/boss/alterguardian1/music_epicfight", "music_mod/music/music_epicfight_alterguardian1" ) -- Celestial Guardian P1 RemapSoundEvent( "moonstorm/creatures/boss/alterguardian2/music_epicfight", "music_mod/music/music_epicfight_alterguardian2" ) -- Celestial Guardian P2 RemapSoundEvent( "moonstorm/creatures/boss/alterguardian3/music_epicfight", "music_mod/music/music_epicfight_alterguardian3" ) -- Celestial Guardian P3 RemapSoundEvent( "music_mod/music/music_pigking_minigame", "music_mod/music/music_pigking_minigame" ) -- Pigking Minigame RemapSoundEvent( "dontstarve/music/music_hoedown", "music_mod/music/music_hoedown" ) -- Woodie Beaver Form RemapSoundEvent( "dontstarve/music/music_hoedown_goose", "music_mod/music/music_hoedown_goose" ) -- Woodie Goose Form RemapSoundEvent( "dontstarve/music/music_hoedown_moose", "music_mod/music/music_hoedown_moose" ) -- Woodie Moose Form RemapSoundEvent( "dontstarve/music/music_work_cave", "music_mod/music/music_work_cave" ) -- Caves Work RemapSoundEvent( "dontstarve/music/music_work_ruins", "music_mod/music/music_work_ruins" ) -- Ruins Work RemapSoundEvent( "turnoftides/music/working", "music_mod/music/working" ) -- Lunar Work RemapSoundEvent( "dontstarve/music/music_work", "music_mod/music/music_work" ) -- Autumn Day Work RemapSoundEvent( "dontstarve/music/music_work_winter", "music_mod/music/music_work_winter" ) -- Winter Day Work RemapSoundEvent( "dontstarve_DLC001/music/music_work_spring", "music_mod/music/music_work_spring" ) -- Spring Day Work RemapSoundEvent( "dontstarve_DLC001/music/music_work_summer", "music_mod/music/music_work_summer" ) -- Summer Day Work RemapSoundEvent( "dontstarve/music/music_dawn_stinger", "music_mod/music/music_dawn_stinger") -- Dawn Intro RemapSoundEvent( "dontstarve/music/music_dusk_stinger", "music_mod/music/music_dusk_stinger") -- Dusk Intro RemapSoundEvent( "hookline_2/characters/hermit/music_island", "music_mod/music/music_island" ) -- Hermit Work RemapSoundEvent( "dontstarve/music/music_epicfight_daywalker", "music_mod/music/music_epicfight_daywalker" ) -- nightmare werepig RemapSoundEvent( "terraria1/common/music_epicfight_eot", "music_mod/music/music_epicfight_eot") -- twins of terror RemapSoundEvent( "dontstarve/music/music_epicfight_sharkboy", "music_mod/music/music_epicfight_sharkboy") -- frostjaw RemapSoundEvent( "dontstarve/together_FE/DST_theme_portaled", "music_mod/music/DST_theme_portaled" ) -- Survival Lobby RemapSoundEvent( "turnoftides/music/sailing", "music_mod/music/sailing" ) -- Sailing AddClassPostConstruct("screens/redux/pausescreen", function(self) local _Oldunpause = self.unpause if self.active then GLOBAL.TheFrontEnd:GetSound():PlaySound("music_mod/music/music_pause", "pausemenu") end function self:unpause() GLOBAL.TheFrontEnd:GetSound():KillSound("pausemenu") _Oldunpause(self) end end) Link to comment https://forums.kleientertainment.com/forums/topic/164547-music-mod-same-song-plays-for-different-bosses/#findComment-1803354 Share on other sites More sharing options...
oregu Posted March 2, 2025 Share Posted March 2, 2025 (edited) Spoiler local modfancy = GLOBAL.KnownModIndex:GetModInfo(modname).name GLOBAL.continuous_mode = (GetModConfigData("music_mode")~="busy") local musicmod = "music_mod/music/" Assets = { Asset("SOUNDPACKAGE", "sound/music_mod.fev"), Asset("SOUND", "sound/music_mod.fsb"), } GLOBAL.FE_MUSIC = musicmod.."music_FE" for _,path in pairs { "dontstarve/together_FE/DST_theme_portaled", -- some main theme "dontstarve/music/music_danger", -- combat "dontstarve/music/music_danger_winter", "dontstarve_DLC001/music/music_danger_spring", "dontstarve_DLC001/music/music_danger_summer", "dontstarve/music/music_danger_cave", "dontstarve/music/music_danger_ruins", "dontstarve/music/music_epicfight", -- giant themes (likely bearger) "dontstarve/music/music_epicfight_winter", -- likely deerclops "dontstarve_DLC001/music/music_epicfight_spring", -- likely moose "dontstarve_DLC001/music/music_epicfight_summer", "dontstarve/music/music_epicfight_cave", "dontstarve/music/music_epicfight_ruins", -- likely ancient guardian "dontstarve/music/music_epicfight_3", -- dragonfly "dontstarve/music/music_epicfight_4", -- beequeen "dontstarve/music/music_epicfight_antlion", "dontstarve/music/music_epicfight_toadboss", -- toadstool "saltydog/music/malbatross", "dontstarve/music/music_epicfight_crabking", "dontstarve/music/music_epicfight_5a", -- klaus "dontstarve/music/music_epicfight_5b", "dontstarve/music/music_epicfight_moonbase", -- moonstone event "dontstarve/music/music_epicfight_moonbase_b", "dontstarve/music/music_epicfight_stalker", -- afw "dontstarve/music/music_epicfight_stalker_b", "music_mod/music/music_pigking_minigame", -- yot pigking event "dontstarve/music/music_epicfight_daywalker", -- nightmare werepig "terraria1/common/music_epicfight_eot", -- eye of terror "dontstarve/music/music_epicfight_sharkboy", -- frostjaw "dontstarve/music/music_hoedown", -- woodie wereforms "dontstarve/music/music_hoedown_goose", "dontstarve/music/music_hoedown_moose", "dontstarve/music/music_work_cave", -- work "dontstarve/music/music_work_ruins", "turnoftides/music/working", "dontstarve/music/music_work", "dontstarve/music/music_work_winter", "dontstarve_DLC001/music/music_work_spring", "dontstarve_DLC001/music/music_work_summer", "hookline_2/characters/hermit/music_island", -- pearl "turnoftides/music/sailing", "dontstarve/music/music_dawn_stinger", -- day phase changes "dontstarve/music/music_dusk_stinger", "moonstorm/creatures/boss/alterguardian1/music_epicfight", -- celestial champion "moonstorm/creatures/boss/alterguardian2/music_epicfight", "moonstorm/creatures/boss/alterguardian3/music_epicfight", } do RemoveRemapSoundEvent(path) local file = path:gsub(".*/", "") for _,annex in pairs { "alterguardian1", -- cc has filename repeats "alterguardian2", "alterguardian3" } do local match = path:match(annex) if match then file = file.."_"..match -- music_epicfight_alterguardian1 for example break end end local newaudio = musicmod..file if not GLOBAL.softresolvefilepath_internal(MODROOT..newaudio, true) then print(path, "->", newaudio) print(newaudio.." is missing! ("..modfancy..")") end RemapSoundEvent(path, newaudio) end AddClassPostConstruct("screens/redux/pausescreen", function(self) local _Oldunpause = self.unpause if self.active then GLOBAL.TheFrontEnd:GetSound():PlaySound("music_mod/music/music_pause", "pausemenu") end function self:unpause() GLOBAL.TheFrontEnd:GetSound():KillSound("pausemenu") _Oldunpause(self) end end) Can you tell me your results with this code, what does it say in the client log? This detects missing files because I'm not sure if RemapSoundEvent tracks that. The client log could be able to tell you. I put RemoveRemapSoundEvent as well in case mods with a lower priority overwrote the sound event so it cant change (maybe that's how it works, dunno). Also unsure if softresolvefilepath_internal works on mods but it's a worth a shot. Try removing MODROOT and see if anything changes. Also try to remove RemoveRemapSoundEvent and see if anything changes. I tested it out and it does seem to remap the sound events correctly both for client and server mods. If "dontstarve/music/music_epicfight_ruins" played, it means the audio file could not be found, because epic fights default to that theme. (dynamicmusic.lua) Edited March 4, 2025 by oregu Link to comment https://forums.kleientertainment.com/forums/topic/164547-music-mod-same-song-plays-for-different-bosses/#findComment-1803484 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now