With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Old WQ3 forum - archived. Links may not work.

Adding custom music to a map?

Postby ReD NeCKersoN » Wed Jun 08, 2005 6:56 am

In regular quake3, this is done by putting yoursong.wav in a folder named "music" (added to the pk3) and adding the key "music" with a value of "music/yoursong.wav" to the worldspawn entity in Radiant. This doesn't seem to work for wq3 maps. I notice that all music files for wq3 are located not within each map, but within the wq3_pak0.pk3 file. This seems to suggest that maybe this is a code question and not a map question. I would really like to be able to add custom music to any future levels I might make. :?
Image
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby torhu » Thu Jun 09, 2005 7:25 am

It's definitely a code question, allright. The music stuff in wq3 is higly customized. It only loads the files numbered in wq3_pak0.pk3\music\music.cfg for background music when a map is loaded. They are played in a random order, and there's also play, fade out/in, and duels are silent in the beginning. While Quake 3 just loads the file specified in the map's worldspawn field, and starts it.

If there is a way to differentiate between maps that want the standard music system and maps that want a custom file, I guess it could be easily added. I don't know anything about the map files, but if the music specification field in the standard maps are special, like if they are empty, the music loading system could recognize those files and use the standard system for them. And load another wav if specified, in other maps. The fading and such could still work. And some new music might be good, even if the stock files suit the game just fine.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby ReD NeCKersoN » Thu Jun 09, 2005 3:47 pm

Hmmm, I wonder if a custom music cfg might over-ride the system and save the coding hassle. I'll play around with the idea and see what happens.
Image
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby torhu » Thu Jun 09, 2005 8:50 pm

You can save youself the trouble, Red. If you make new music/music.cfg file and put it in a pk3 (which comes later in the alphabet than wq3_pak0), it will probably override the other one. You could add your song to the list of songs to be selected randomly between. To get just the track you want, it probably has to be the only one mentioned in music.cfg, and then it would be played on all the maps. :(

But anyway, the format of the file is as follows:
MUSICFILE
<number of tracks, max 10 right now>
music/filename.wav <length in msecs> <repeat count>

Just to save you some guesswork.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby ReD NeCKersoN » Thu Jun 09, 2005 9:15 pm

Well that sucks. :(
If this mod ever gets a big patch, say to version 2.1, that's something I would wish to be fixed.
Image
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA




Return to Editor's Forum

Show Sidebar
Show Sidebar

User Control Panel