Developer Diary #5 - Groovy, Baby! (Changing the in-game Background Music)

John Tiller's Campaign Series exemplifies tactical war-gaming at its finest by bringing you the entire collection of TalonSoft's award-winning campaign series. Containing TalonSoft's West Front, East Front, and Rising Sun platoon-level combat series, as well as all of the official add-ons and expansion packs, the Matrix Edition allows players to dictate the events of World War II from the tumultuous beginning to its climatic conclusion. We are working together with original programmer John Tiller to bring you this updated edition.

Moderators: Jason Petho, Peter Fisla, asiaticus, dogovich

Post Reply
User avatar
Crossroads
Posts: 18564
Joined: Sun Jul 05, 2009 8:57 am

Developer Diary #5 - Groovy, Baby! (Changing the in-game Background Music)

Post by Crossroads »

It's been a bit quiet here so I thought I'd throw a quick diary entry to spice up things a bit. This time we are talking about adding your favourite tunes for game engine to play.

Let's Do: New Background Music!

At the end of the diary you'll know how to rip your favourite CD into OGG sound files to be played when Options -> Background Music option is ON.
WARNING: We'll be using a free sound converter to convert your favourite CD tunes into OGG sound files.

There's plenty of them available, and they all share a common vice: they all want to bloat your PC with all types of questionable search engines and other dubious stuff you absolutely do not want to have installed.

When installing a legit commercial software such as John Tiller's Campaign Series, you can pretty much just hit OK for every question the installer asks.

The opposite is true here! It is safe to assume every question asked is a sneaky way to have your permission to install garbage into your system. I will install a free software called FreeRIP MP3 Converter Basic, and will cover in detail the caveats I happened to see in that particular install.

You have been warned!

With that out of the way, let us get started.

1. Have your favorite tunes available

I happen to own the Essential War Film Themes 2CD:

Image

'The Great Escape', 'Guns Of Navarone', 'The Dambusters', 'Where Eagles Dare', 'The Bridge at Remagen', ...

Essential, indeed! 32 great war film themes I am just itching to install into the game. This will be fun ... [:)]

Attachments
EssentialW..hemes2CD.jpg
EssentialW..hemes2CD.jpg (59.89 KiB) Viewed 903 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.10.20 Available Now (Dec 03, 2025)
CS: Middle East 1948-1985 < v3.10.20 Available Now (Dec 03, 2025)
User avatar
Crossroads
Posts: 18564
Joined: Sun Jul 05, 2009 8:57 am

RE: Developer Diary #5 - Groovy, Baby!

Post by Crossroads »

2. Download A Free Audio Converter Software

If you already have a sound converter available, great. If not, pick one. I just happened to pick this one. I am not saying it is a particularly good software, it did the job for me is all I am saying. Those more knowledgeable about sound converters please chip in!

WARNING: Again, these free softwares are a pain to install!

I will cover the install in steps, see what I mean.

First, downloading stuff from internet is often a bad idea. Whatever utility I want, I make sure to download from an as trustworthy source I can find. Often, from download.cnet.com.

So here we go:

1. Ensure your Virus Prevention software is up to speed and running.

2. Navigate to the proper location: http://download.cnet.com/FreeRip-MP3-Co ... 50140.html

And then, make sure you select the proper download button from the plethora of commercials around it:
Image

3. Then, wait for the download to proceed. Do not click additional buttons.
4. Once the executable is available, in this case freeripmp3-setup.exe as seem in the lower left corner of my Chrome browser, select to run it.

Remember it wants to install tons of other stuff as well. Watch out!

5. Windows Access Control prompt will ask your permission to run it. If you are sure you want to proceed, click Yes.
6. Installation Wizard appears. Select Custom install (advanced). Then, unselect all boxes (otherwise, three (3!) other installs are done as well). Then, click Next.
7. Installation Wizard presents a Terms of Service. It is NOT for FreeRIP. Select: Decline. Otherwise, there's the fourth additional programme you never asked for!
8. Atleast in my case in this particular install: You are done. Press Finish, and the FreeRIP boots up.

9. To be safe; run a utility such as Malwarebyte's excellent and free Anti-Malware scan. It is a great little software I make sure my sons for an example run everytime they've installed something on their computers.

OK. I think I've been careful about warning everyone about installing anything on their PCs. Again, if you are not sure of this, it is better to opt out rather than pollute your PC with junk, or worse: viruses.
Attachments
cnet.jpg
cnet.jpg (179.17 KiB) Viewed 903 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.10.20 Available Now (Dec 03, 2025)
CS: Middle East 1948-1985 < v3.10.20 Available Now (Dec 03, 2025)
User avatar
Crossroads
Posts: 18564
Joined: Sun Jul 05, 2009 8:57 am

RE: Developer Diary #5 - Groovy, Baby!

Post by Crossroads »

3. Convert Your Music To OGG format

Next we will convert your CD into OGG format. What is OGG? MP3 is probably the best known audio format. OGG is a license-free format, selected by Talonsoft at the time for sound files.

With FreeRIP running, simply enter your CD into your PC, and following window will pop up.
Image

From left to right:

- Select the Output folder you want to use
- Make sure the target format is OGG
- I chose to have FM Stereo quality sounds, so it looks like this.
- Once ready, click Rip Disc button.
Attachments
freerip.jpg
freerip.jpg (226.08 KiB) Viewed 903 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.10.20 Available Now (Dec 03, 2025)
CS: Middle East 1948-1985 < v3.10.20 Available Now (Dec 03, 2025)
User avatar
Crossroads
Posts: 18564
Joined: Sun Jul 05, 2009 8:57 am

RE: Developer Diary #5 - Groovy, Baby!

Post by Crossroads »

4. OGG It To Me Baby!

As a result of the previous step, at a folder I specified as my target directory, I now have the following OGG files from both CDs I converted.

Image

Here's more info on OGG format in case anyone's interested: Wiki
Attachments
oggs.jpg
oggs.jpg (132.29 KiB) Viewed 903 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.10.20 Available Now (Dec 03, 2025)
CS: Middle East 1948-1985 < v3.10.20 Available Now (Dec 03, 2025)
User avatar
Crossroads
Posts: 18564
Joined: Sun Jul 05, 2009 8:57 am

RE: Developer Diary #5 - Groovy, Baby!

Post by Crossroads »

5. From OGG files to Background Music: SOUNDS.DAT

Movement, Weapons and Explosions sounds were explained in great detail in my Diary #1.

Let us build from there. First, the SOUNDS.DAT file. They vary a bit from game to game, here is what the East Front variant looks like:
5 4 5 5 5 3 1 3 2 2 5 4 5 1 3 2 2 2 1 2 2 1 1 1 1 3 1 5 1 2 1 0 0 0 0
5 4 2 2 1 2 1 5 1 1 1 1 5 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 1 1
3 6 8 17
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
7 6 6 6
6 3 4 4
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
7 5 4 5

From Diary #1, we learnt about movement and weapon sounds. They had to do with the first two rows of parameters.

Third line? It provides the max amount of sound file variants for Assault, load/unload, and mine attack sounds. It is not relevant for this particular exercize.

Background music is the fourth row, highlighted above. Let us study it in detail. 3, 6, 8, and 17. What do they refer to?

I happen to know that all background OGG files have *backg* in their names. Let us do a search for East Front folder:
Image

That is:

- 3 abackg*.OGG files, where * is a numeral from 0 upwards.
- 8 backg*.OGG files,
- 10 nbackg*.OGG files,
- 2 pbackg*.OGG files, and finally,
- 6 xbackg*.OGG files.

And here's what do they stand for:
- backg*.ogg are combat sound files
- nbackg*.ogg are neutral music files
- abackg*.ogg are allied music files
- xbackg*.ogg are axis music files
- pbackg*.ogg are national anthems

Relevant to us are all but the national anthems, as they are not used for Background Music.

So, we have pretty much cracked the code for the fourth row of SOUNDS.DAT file. I can confirm the current line #4 refers to, in this order:

- 3 abackg*.ogg files, all present,
- 6 xbackg*.ogg files, all present,
- 8 backg*.ogg, all present, and finally:
- 17(!) nbackg*.ogg files, of which 10 are available to be played. Again, an anomaly in the legacy data I only now spotted. Something to be fixed for 2.1 then.

One more question before we proceed, though. How are they used?
First, the code checks if Background Music is toggled ON in the Options menu.

- If yes: a first die roll: 50% chance for still playing one of the combat sound files, or 50% chance for playing a background music sound file.

- If combat sound wins: a random die roll from 0 to 7 to play a respective backg[0-7].OGG file.
- If background music wins, another 50% die roll is cast: for a neutral music file or a side specific music file.

- If neutral music wins: a random die roll from 0-16 to play a nbackg[0-15].OGG file, so many times no sound played at all I think as currently there's only 10 of them.
- If side specific music wins: a random die roll either from 0-2 for Allied abackg[0-2].OGG files or 0-5 to play one of the xbackg[0-5].OGG files.
With the above numbers-per-file-type I referred to said current SOUNDS.DAT parameters of current line #4: 3 6 8 17
Edit, ten years(!) later: Background Music option now (as of VN1.31/ME2.31) only plays music, with 50% chance of neutral or side-specific kept.

Special case: xbackg1.OGG is also played for the Main Menu background music. This is the tune you will hear when selecting which scenario to play from the menu. So going forward, let us pay special attention to this one.
Attachments
backg.jpg
backg.jpg (206.48 KiB) Viewed 905 times
Last edited by Crossroads on Wed Jul 17, 2024 5:12 pm, edited 2 times in total.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.10.20 Available Now (Dec 03, 2025)
CS: Middle East 1948-1985 < v3.10.20 Available Now (Dec 03, 2025)
User avatar
Crossroads
Posts: 18564
Joined: Sun Jul 05, 2009 8:57 am

RE: Developer Diary #5 - Groovy, Baby!

Post by Crossroads »

6. EF - My East Front Movie Themes Mod

While a bit unhappy to find the anomaly in the stock SOUNDS.DAT file, I am still happy to provide the game with completely new music.

Having looked at my CD content, I rename the OGG files from step #4 (see my post above) to include:
- 8 allies (abackg[0-7].OGG),
- 8 axis (xbackg[0-7].OGG), and
- 16 neutral (nbackg[0-15].OGG) background music files.

Combat background sound changes? None.

Here's the end result:
Image

Particularly, I chose 'Where Eagles Dare' as xbackg1.OGG, so that's the one played when using menus too.

Here's my new SOUNDS.DAT content from the mod folder:
5 4 5 5 5 3 1 3 2 2 5 4 5 1 3 2 2 2 1 2 2 1 1 1 1 3 1 5 1 2 1 0 0 0 0
5 4 2 2 1 2 1 5 1 1 1 1 5 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 1 1
8 8 8 16
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
7 6 6 6
6 3 4 4
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
7 5 4 5

This is it, then. Anything we've missed?

Let us find out!

Enable to mod with JSGME, launch East Front, and what do you know: Where Eagles Dare starts to play when opening up the East Front Main Menu!

It is such a great tune, and also: it opens up slowly so if I just want to hit on with the game I am not bothered with music at all.

But often now, I just sit back to listen to it in its full awesomeness [&o]

Then, once you select a scenario to play, and opt to have the Background Music ON, you will get one of the 32 tunes randomly played. Isn't that great or what!

Groovy, Baby!

Image
Attachments
moviemod.jpg
moviemod.jpg (243.88 KiB) Viewed 903 times
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.10.20 Available Now (Dec 03, 2025)
CS: Middle East 1948-1985 < v3.10.20 Available Now (Dec 03, 2025)
Post Reply

Return to “John Tiller's Campaign Series”