Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

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

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [World War II] >> John Tiller's Campaign Series >> Developer Diary #5 - Groovy, Baby! (Changing the in-game Background Music) Page: [1]
Login
Message << Older Topic   Newer Topic >>
Developer Diary #5 - Groovy, Baby! (Changing the in-gam... - 11/8/2014 8:24:43 AM   
Crossroads


Posts: 16208
Joined: 7/5/2009
Status: offline
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.

quote:

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:



'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 ...




< Message edited by Crossroads -- 1/13/2015 4:17:57 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!
Post #: 1
RE: Developer Diary #5 - Groovy, Baby! - 11/8/2014 8:34:22 AM   
Crossroads


Posts: 16208
Joined: 7/5/2009
Status: offline
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-Converter/3000-2140_4-10050140.html

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



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.


Attachment (1)

< Message edited by Crossroads -- 11/8/2014 5:45:49 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 2
RE: Developer Diary #5 - Groovy, Baby! - 11/8/2014 8:54:26 AM   
Crossroads


Posts: 16208
Joined: 7/5/2009
Status: offline
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.



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.

Attachment (1)

< Message edited by Crossroads -- 11/8/2014 9:55:40 AM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 3
RE: Developer Diary #5 - Groovy, Baby! - 11/8/2014 8:55:52 AM   
Crossroads


Posts: 16208
Joined: 7/5/2009
Status: offline
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.




Here's more info on OGG format in case anyone's interested: Wiki

Attachment (1)

< Message edited by Crossroads -- 11/8/2014 3:06:08 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 4
RE: Developer Diary #5 - Groovy, Baby! - 11/8/2014 8:57:59 AM   
Crossroads


Posts: 16208
Joined: 7/5/2009
Status: offline
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:

quote:

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:



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:

quote:

- 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?

quote:

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.

quote:

With the above numbers-per-file-type I referred to said current SOUNDS.DAT parameters of current line #4: 3 6 8 17


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.

Attachment (1)

< Message edited by Crossroads -- 3/21/2017 5:34:21 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 5
RE: Developer Diary #5 - Groovy, Baby! - 11/8/2014 10:52:55 AM   
Crossroads


Posts: 16208
Joined: 7/5/2009
Status: offline
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:



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:

quote:

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

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!




Attachment (1)

< Message edited by Crossroads -- 11/8/2014 5:58:16 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 6
Page:   [1]
All Forums >> [Current Games From Matrix.] >> [World War II] >> John Tiller's Campaign Series >> Developer Diary #5 - Groovy, Baby! (Changing the in-game Background Music) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.119