Sorry for the late reply, I've been in-and-out of the game as of late. ^^;
I have this planned as a feature in my current project. My question is, when do you want sounds/music to be played? looped? I have many ways of doing it, so I'm open to ideas people will actually use contrary to just my own thoughts.
@Karmatose , @ConnorA
I was imagining something where for example you could have different atmospheric tracks play depending on whether you were deep in the forest, or in an open field where you can see and be seen for miles on end. So...locational based, but also event based like for example if you're in a fight with a bear, the track would change, etc...Possibly different tracks for different times of day, as well. I think this could work with either music, or ambient sound (like crickets chirping in a field at night), or a combination of both. Might be interesting to also have the music get more intense as your physical condition gets worse... Like the closer you are to death the more intense the music gets (if you're still in a battle) but if you've left the battle/you're dying for non-injury related reasons, then the closer you get to death the more ominous the music gets, and then at a certain cutoff point the music starts to get very quiet...until it stops completely and you die. But, that might be a tad too advanced to be honest.
My worries are that finding good copyright-free music/ambient might be difficult. Using a site like
https://asoftmurmur.com/ to create ambient mixes might be interesting though, but I'm not sure about their terms of use (despite reading it the legal jargon went a bit over my head..but from what I understand that specific site allows usage for non-commerical use only?) or if you could manage to convert the tracks you make into MP3/WAV files or not.
@Night Is the project you're referring to your URW Mod Extender (
https://www.unrealworld.fi/forums/index.php?topic=6325.msg18406#msg18406) you released recently? I'm looking at the thread and as someone brand new to modding in URW I'm...somewhat lost ^^; How would this be used to add music?
Most of what the mod extender does is providing more access to the games data/functionality. In the case of sounds/music, they could be activated in several different ways, such as when the terrain type changes, or when an game object is near the player (NPC/item/tracks), probably several more options if I think about it. All of these things I detect through a loop/loops dedicated to tracking that data. In the future, I plan to have a scripting system based off of these events, that follows a similar syntax to URW's crafting syntax, some examples might look like:
[START_TerrainChanged]
.MyCustomScript1.
Conditions:
[TERRAIN:pine mire]
Actions:
PlayMusic("PineAmbience.wav")
.MyCustomScript2.
Conditions:
[TERRAIN:village]
Actions:
PlaySound("EnterVillage.wav")
[END_TerrainChanged]
[START_PlayerChanged]
.MyCustomScript3.
Conditions:
[HEALTH:<80]
[SWITCH:HasGrunted] == false
Actions:
PlaySound("Grunt.wav")
[SWITCH:HasGrunted] = true
.MyCustomScript4.
Conditions:
[HEALTH:>=80]
[SWITCH:HasGrunted] == true
Actions:
[SWITCH:HasGrunted] = false
[END_PlayerChanged]
All of the above code would be handled by the mod extender in an script.txt file, when conditions/actions are met. Also, there would be some control mechanisms to repeat actions, or to only execute them once, or to only execute them once everytime the condition is met. I haven't currently implemented it so, the above is just a psuedo version of what it will most likely look like.
Basically, a condition/action system, with functions that will allow for user input, such as PlaySound("SoundFile.wav"). When I've completed more of the project I will document the functionalities more thoroughly, but most of what you said is within scope.
The only thing that might be difficult with what you said is transitioning between ambiences in the case of combat, mostly because I'd have to track the duration of the sounds playing and then transition to the next at the end of the first sound so it would sound smooth, but it is possible to do.
There also may be other areas where I can implement sounds, but this would be the main place.
@Karmatose As for copywrites, I have no clue, It's a big mess when it comes to fan-made projects, but I just assume as long as I'm not profiting off of something it shouldn't be a problem. Probably costs them more to send a C&D to someone using their stuff for non-profit personal/fan based entertainment than ignore it if its not cutting into their dough. I'm not a legal expert though, so don't take anything I say as fact lol. I know that most media type property has a license attached to it, so thats probably what you would want to refer to most of the time. Some just require crediting the source.