Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Ferret on October 29, 2005, 05:10:40 pm
-
I've made some music for FS2 and am currently trying to get it right in-game.
My ambient track is fine, however when an enemy ship warps in it takes about 10+ seconds for the ambience to stop and the battle music to start, and I don't hear the arrival music at all.
Now I read "; format: $Name: filename.wav num_measures (samples_per_measure)" at the top of the file, but have no idea what the last two values even mean.
Anyone care to explain? Oh and heres the table entry as it stands, but probably wont be any help.
#SoundTrack Start ; SoundTrack 7
$Soundtrack Name: Insight: We Saw Them Coming
$Name: ins_mus_amb_1.ogg 14.0 14700 ; * Ambience
$Name: FS2_AArv_A01.wav 1.8 105840 ; * Allied Arrival during Normal
$Name: ins_mus_arv_1.ogg 1.8 294000 ; * Enemy Arrival during Normal
$Name: ins_mus_btl_1.ogg 27.8 294000 ; * Battle 1
$Name: ins_mus_btl_1.ogg 23.8 176400 ; * Battle 2
$Name: ins_mus_btl_1.ogg 22.8 176400 ; * Battle 3
$Name: FS2_AArv_A01.wav 1.8 105840 ; * Allied Arrival during Battle
$Name: ins_mus_arv_1.ogg 1.8 294000 ; * Enemy Arrival during Battle
$Name: FS2_Vict_A01.wav 2.8 52920 ; * Victory 1 ( goal completed )
$Name: FS2_Vict_A02.wav 30.8 52920 ; * Victory 2 ( all enemies dead, goals completed )
$Name: FS2_Dth_A01.wav 23.8 132300 ; * Goal Failed
$Name: FS2_Dth_A01.wav 23.8 132300 ; * Player dies
#SoundTrack End
-
http://dynamic.gamespy.com/~freespace/fsdoc/index.php?pagename=music.tbl
-
Oooh the wiki of course. Anyway thanks for that, I've followed the instructions but now it's even worse, it takes no less than 40 Freespace seconds to even begin playing, and still the arrival music does not play. =/
-
Okay this is total crap, I must be doing something wrong, me and my b/f have been pouring over these instructions for ages now, and I'm getting no closer to fiking this.
Can someone pleaaaaaaase take a look at it for me?
I've uploaded the tracks to here: http://www.ferretgames.com/stupidfreespace.rar
The table entry we managed to come up with is this:
#SoundTrack Start ; SoundTrack 7
$Soundtrack Name: Insight: We Saw Them Coming
$Name: ins_mus_amb_1.ogg 20 117600 ; * Ambience
$Name: FS2_AArv_A01.wav 1.8 105840 ; * Allied Arrival during Normal
$Name: ins_mus_arv_1.ogg 2 88200 ; * Enemy Arrival during Normal
$Name: ins_mus_btl_1.ogg 28.0 88200 ; * Battle 1
$Name: ins_mus_btl_1.ogg 28.0 88200 ; * Battle 2
$Name: ins_mus_btl_1.ogg 28.0 88200 ; * Battle 3
$Name: FS2_AArv_A01.wav 1.8 105840 ; * Allied Arrival during Battle
$Name: ins_mus_arv_1.ogg 2 88200 ; * Enemy Arrival during Battle
$Name: FS2_Vict_A01.wav 2.8 52920 ; * Victory 1 ( goal completed )
$Name: FS2_Vict_A02.wav 30.8 52920 ; * Victory 2 ( all enemies dead, goals completed )
$Name: FS2_Dth_A01.wav 23.8 132300 ; * Goal Failed
$Name: FS2_Dth_A01.wav 23.8 132300 ; * Player dies
#SoundTrack End ; End SoundTrack 7
;
Thanks for any help.
-
Try setting the first field to "1", and the second field to the samplerate of the file, times the length in seconds. Decimals are important, so if its a 22500hz file that lasts 2.63 seconds, you'd have
22500 * 2.63 = 59175
or
$Name: file_name.wav 1 59175
The num_measures variable is mostly used to make stuff fade out nicely, so if it's set to 1, the music will only fade out once the music file has totally played out.
-
Um but WM this is the problem, I've realised that FS is waiting for the ambient to totally finish playing, which I don't want at all. I want it to start when something warps in. The ambient tune is nearly a minute long, I don't want my players to be sitting there for a minute wondering why there is slow quiet ambience playing when there's a missle up thier arse.
-
Did you cutom wtrite the table or hack an exising one ?
Using existing tables as a template tends to be easier, in my experience.
-
I copied the last soundtrack entry and appended it to the table, as you can see by my example up top, there's a bunch of FS2 music defined, I'm trying to put in my tracks one by one, but 'till I fix this there's little point me carrying on with it.
-
OK, I tried replacing my table entry for "1: Genesis" with yours and sticking the music in my data/music directory. I played the first non-training mission of the retail campaign.
It worked surprisingly well; there was a little awkwardness in switching tracks, and repeating the tracks, probably not something you'd notice if you weren't paying attention to it.
Then I tried a custom mission, adding the soundtrack to the original list like you were. Seemed to work there, as well; it took a couple of seconds before the music started playing, but that was it.
-
Ummmmmm......... Might be something dodgy with the testing mission I'm using then.
I'll mess around with it some more.
Thanks for playing with it anyway. Did the arrival music play? And out of curiosity what build are you using?
-
The arrival music played. I used current CVS (Debug/release), as well as the P4 optimized build of 3.6.7 (release). I tested the retail mission on all 3, custom mission just on the last.
-
You know, Ferret, stupid as this sounds; you don't have a second, older copy of music.tbl hanging around somewhere else, do you? You'd be shocked how often changes not taking place is caused by a rogue table or model in Games/Freespace2/
-
Nah. I just tested it on Surrender Belesarius and it works really well, that arrival music is crap though.
Must certainly be the mission I was using, thanks for the help. :)