View Single Post
Old 05-16-07, 03:55 AM   #1
kakemann
Samurai Navy
 
Join Date: Feb 2007
Location: Pretty close to the big german cruiser Blücher in Norway
Posts: 568
Downloads: 29
Uploads: 0
Default [TEC] How to add new music files or change the music cfg

Here a little walkthrough on how to add music tracks, or changing them in the game.
I have also decribed the whole music.cfg file and the different states:

The first thing you have to do is to convert the files from mp3 or wav to ogg. There are a lot of different programs out there. There is also another thing you might have to change, and that is to adjust the volume for the songs you would like to add. The volume for the stock music files are pretty high. But try without changing it first, maybe you don't have to.

To convert or change the volume level I have used this free program:

Open the: http://www.softpedia.com/get/Multime...o-Editor.shtml)

It can both convert and adjust volume without upgrading it to the full version.


__________________________________________________ _
As I said I used this program so I'll tell you have to use this:
Quote:
* Open the program ALO Audio Editor

* Click on "FILE", "OPEN" and browse for the mp3's or wav's you would like to add to the game.

* The file will open and you will get a graphical view of the volume level for that song.

* After you have opened it, just click "FILE", and "SAVE AS".

* Browse to your Silenthunter 4 installation, and find the: DATA/SOUND/MUSIC directory.

* Choose a easy filename, and make sure you change the "FILE TYPE" to *.ogg.

* Wait until the blue bar on the bottom of the program window has filled up. This indicates the convertion prosess.

* Repeat the steps above for all the files you would like to add to the game.

* Close the program
OK! The file is changed to the right format and placed in the right folder.
Now is the time to add the track to the game.

Quote:
* Open the directory DATA/SOUND/MUSIC and open the file music.cfg
This is the file which tells Silenthunter 4 which tracks to play.
There are 8 STATES which the game reads and plays the music which is placed under the right state in this file. The following text will explain what the different states mean. The music files under each state will be played randomly. Here is an explaination for the different states:
Quote:
* [BEGIN] The state which the game is in when starting a new mission. The game will always start with one of the tracks located in this state.

* [NORMAL] This state is the normal state in the game. After the BEGIN state track has ended, the game will enter [NORMAL] state. It will continue in this state as long as you don't meet any enemy etc.

* [BATTLE] When spotting enemy units and reaching a certain distance from the enemy, the game will enter this state and play the music which is added here.

* [TENSION] This is the state the game will enter if you close the enemy undetected and the enemy suddenly detects you and starts searching for you.

* [HIGH TENSION] This state is not used by the Silent hunter 4 game, so you will never hear these tracks unless you move them to the any of the other states (They fit best under the [TENSION] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470

* [VICTORY] This state is not used by the silent hunter 4 game, so you will never hear these tracks unless you move them to any of the other states. (They fit best under the [NORMAL] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470

* [DEFEAT] This state is not used by the silent hunter 4 game, so you will never hear these tracks unless you move them to any of the other states. (They fit best under the [BEGIN] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470

* [JOY] This state is not used by the silent hunter 4 game, so you will never hear these tracks unless you move them to any of the other states. (They fit best under the [NORMAL] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470
OK! Just place your song underneath the other tracks in the track list. FOREXAMPLE: If you made a file called dasboot1.ogg and wants it to be played in the [TENSION] state. Add it to the track list like this:
Quote:
[TENSION]
Tracks=7
Track1=Tension_1.ogg
Track2=Tension_2.ogg
Track3=Tension_3.ogg
Track4=Tension_4.ogg
Track5=Tension_5.ogg
Track6=Tension_5.ogg
Track7=dasboot1.ogg
I've higlighted the two very important lines here. When adding a file to a list you have to change the first line, so the number of tracks in the list matches this number. So because I've added dasboot1.ogg I have to change the TRACKS=6 to TRACKS=7. Makes sense?

This is it! You have now managed to add one song to your Silent Hunter 4 game.

NOTE: If the volume of the song is too high or too low, you have to use the program ALO music editor (or similar) to change the volume level.

If using the ALO music editor you just have to open the file as described above, highlight the whole track area by clicking and dragging. When you have higlighted the whole track just click "OPERATION" and "AMPLIFY +" or "AMPLIFY -" depending on raising or lowering the volume. When you have reached a nice volume level click on "FILE" and "SAVE".

Remember to back up before altering the music.cfg file or changing the volume level on any file just in case!

Hope this helps someone.

I'm planning to release a music mod fixing the missing songs. I'll probably fix it in a day or so. Will post a link here later when it is finished!

Last edited by kakemann; 03-17-11 at 10:26 AM.
kakemann is offline   Reply With Quote