[Mod/Feature Request] Custom Music Track by Track

Talk about the mods or features you'd like to see in Daggerfall Unity. Give mod creators some ideas!
Post Reply
User avatar
Johnny4Handsome
Posts: 18
Joined: Wed Jul 24, 2019 9:41 pm

[Mod/Feature Request] Custom Music Track by Track

Post by Johnny4Handsome » Thu Mar 26, 2020 8:24 am

I have seen several mods that replace the original music with remastered versions of the soundtrack, but I have yet to see anything that would allow you to really customize the soundtrack on a song-by-song basis. To my knowledge, all that is available for the casual player is the simple "Music" slider in the pause menu.

After hours of playing DFU, there are certain tracks that tend to really give you fatigue - particularly some of the town overworld & shop tracks; so I thought I'd ask about the prospect of swapping out music at a user-to-user level. The key factor here for me is that the tracks added by the user should be able to be played based on location context, like the originals. I envision sort of a folder system where you add or remove music from each, thus deciding which context the tracks should be played.

ex: I add "creepydungeontrack.wav" to the "DUNGEON MUSIC" folder, so when I enter a dungeon, that track is on the list of potentially being played.

I have no idea how feasible this is, and this whole concept may come off as completely ignorant :lol: , but I figured since there are already people replacing tracks in DFU anyways, it might just be a matter of altering an already known process.
Maybe I just haven't stumbled upon the right forum post that already covers this, but I thought I'd bring it up anyway.

I would love to hear your thoughts! Is it possible? I think the end result would be a widely used feature.

TL;DR - Looking to be able to customize in-game music track by track.

User avatar
King of Worms
Posts: 3238
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [Mod/Feature Request] Custom Music Track by Track

Post by King of Worms » Thu Mar 26, 2020 10:03 am

Hi,

Its possible now.

You find a track u like. Lets say its a dungeon theme and its called DARK STUFF :twisted:

U download a music remake mod (not DREAM because that one is packed in the DFMOD)

Open it and u will see the track names...

you will see list of tracks, so u decide for example "Song_dungeon5.ogg" is the one u want to replace.

Now convert your DARK STUFF track u liked to .ogg format. Use AUDACITY, its free. Rename it to "Song_dungeon5.ogg" and place it in the "..streaming assets/sound" - create that folder if u dont have it already.

Now you have effectively replaced that song and the DARK STUFF will play in the dungeons.



Something more effective and user friendly would be really good idea tho, and I support that. Should not be that hard to create some user interface for it, would make for a nice and used utility.

User avatar
pango
Posts: 2446
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [Mod/Feature Request] Custom Music Track by Track

Post by pango » Thu Mar 26, 2020 12:15 pm

Well, this only allows replacing tracks with custom tracks, but not add new tracks to a pool.

To anyone interested in how it works (and maybe implement that feature), the logic happens in SongManager.cs: It determines the current context (dungeon, shop, temple, etc, but also time of day and weather...), and when it changes determines if the pool of songs to play has changed and what song to play (for example each dungeon has an assigned music).
Lists of songs for each context are also hardcoded there: https://github.com/Interkarma/daggerfal ... er.cs#L584

I see two difficulties to extend that:
  • songs are represented as an enumeration, which is not the most extensible type (but they're workarounds);
  • will the content of the directories be added to existing songs, or replace them?
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Johnny4Handsome
Posts: 18
Joined: Wed Jul 24, 2019 9:41 pm

Re: [Mod/Feature Request] Custom Music Track by Track

Post by Johnny4Handsome » Fri Mar 27, 2020 7:45 am

Thanks for the replies - lot's of helpful info. Thanks for the mini tutorial as well KoW :D
Something more effective and user friendly would be really good idea tho, and I support that. Should not be that hard to create some user interface for it, would make for a nice and used utility.
That is more of the direction I had in mind. I could see it being a nice feature to ship with the vanilla DFU, if possible.

Does anyone know if there are any major plans for retooled audio on the road map in the future? It would be great if we could integrate this feature with whatever system is being planned.

Post Reply