PDA

View Full Version : Editing the music in the game?



Eruan
14th Jun 2005, 19:04
Hmm, I was reading through all the files, so please don't point me to them anymore :rolleyes: How can I modify the music files in the game? that are 1.Very limited, and 2.Repetitive :mad: I'll only start modifying providing a good patch comes out, but still, want some proper music of back then :confused:

cossie_fan
14th Jun 2005, 19:31
I'd like that too. The .ogg files were encoded in some funky way, and no matter how I sample the replacement ones I've made, the game crashes every time it tries to load them. :(

Kokopelli
14th Jun 2005, 20:08
Just a probing question, are there any .ini files that reference the data size?

Eruan
14th Jun 2005, 21:53
I don't think so as I checked, yeah the same way happens to me, the game crashes while loading the new samples :mad: why not do mp3 files, that can actually be analyzed using GSpot for example :confused:

Yorkie
16th Jun 2005, 13:58
ive managed to extract the files but they play way too fast. Ive also coverted them but they dont play ... Ive had a quiet game for a bit :(

timetraveller
17th Jun 2005, 12:30
They seem to be using their own encoder tag. They may check for it and this might be the problem.

Bit rate for effects and voice is 140kbs max, variable bit rate, 1 channel. Music is 128kbs max, variable bit rate, 2 channels. Frequency 44100 khz for all sounds.

http://img118.echo.cx/img118/5417/ogginfo7xi.gif

TT

Age of Reason
17th Jun 2005, 12:34
I hope someone figures out how to do it sometime.

I'd love to add some better music to the game to make it more interesting. From playing it, I find that certain musical selections from Beethoven and the Pirates of the Carribean soundtrack are GREAT for the game.

Just my observations....

timetraveller
17th Jun 2005, 19:19
I did some experimenting today with in-game sounds and music. Here is what I found.

MUSIC

All in-game .OGG files have an EIDOS proprietary header prefixed to them. It is usually 24-32 bytes in length. If your new .OGG file doesn't have this extra header it won't play (or may cause a CTD in some cases), which is why we're having no luck in making new .OGG music/sounds for IG. Adding this IG prefixed header to a standard .OGG file might be possible, but nobody knows what's in it yet. And each one is different, which complicates matters. In one case, I found it possible to substitute your own MP3 and have it work. However, what seems to work in most cases and might be a better solution is to substitute a .WAV music file for the .OGG file. You must modify the associated audio.sb file to change the file path reference to the new one. A tip on how to do that is below.

EFFECTS SOUNDS

Effects .OGG sound files have the same proprietary prefixed header and the same problems as music. I found that you can substitute a .WAV file for the effects sound in the cases I tried. You will have to modify the audio.sb file for the effects to change the file path reference. I played around with the cannon impact sounds and was able to substitue my own .WAV file for them. Cool!

Hope this helps you guys who want to modify sounds and music. You may need to do some further experimenting.

----------------------------------
Example to change the menu music.
----------------------------------
Make your new menu music as a .WAV file. The original menu music is MainMenuMusica.ogg and is found in the \Imperial Glory\Audio\MENU folder. Save your new menu .WAV file and there.

Now go to \Imperial Glory\Game\GameModes\MainMenu\AudioScripts folder. Open the AudioMainMenu.sb file in a text editor. Look for the S_MAINMENU_MUSICA section.

Original-----

.AUDIO
[

[
.IDNAME "S_MAINMENU_MUSICA"
.PATH "Audio/Menu/MainMenuMusica.ogg"
.3D FALSE
.LOOP TRUE
.VOLUME 40
.STREAMING TRUE
.TYPE MUSIC
]

Change the file path to the new file name-----

.AUDIO
[

[
.IDNAME "S_MAINMENU_MUSICA"
.PATH "Audio/Menu/MyNewMusic.wav"
.3D FALSE
.LOOP TRUE
.VOLUME 40
.STREAMING TRUE
.TYPE MUSIC
]

Resave the file and run the game. You'll have new menu music. The same idea applies to the in-game effects sounds, although you'll find the effects sounds in different folders. For instance, battle sounds are in the \Imperial Glory\Audio\BATTLE\FX folder. To find the audio.sb file where they are referenced, do a Windows search for the sound's file name and modify the .SB file with the new reference.

TT

cossie_fan
17th Jun 2005, 19:49
I'll try tinkering with that. You rock, Timetraveller! 'British Grenadiers' here I come!


Update:

Success!!! Thanks again TT!!

Sieur_Drewry
17th Jun 2005, 22:58
Very nice, that means I can record new command sousdn for my american faction.

Did you just record the files in wav and then change the audio.sb paths?

cossie_fan
17th Jun 2005, 23:06
I had the music in Mp3 format, converted it to wav with the correct settings (see TT's descriptions) and then edited the appropriate Sb files. I replaced the music for both the main menu and the battles. It really adds an extra dimension to it, when your fighting and listening to the fife drum tunes. :)

I haven't tried changing the voice files yet, (going to start with the "our army is being annihilated' junk) but it should be the same process, which means you can make American sound files.

timetraveller
17th Jun 2005, 23:17
Ah good, glad you guys are getting it to work.

I wish I could get MP3s to work, but haven't had any luck except for one (changing the Credits OGG to MP3). WAVs can get pretty big if they are music files. The game seems to accept different WAV formats, at least for the effects sounds, and probably the music too. Sooo, it should be possible to get the file size down a little and still keep the quality up there. After all, we don't absolutely need 44100khz fidelity. Something in the 20khz's should still sound pretty good.

Looks like most of the IG sound effects are one channel. They might sound pretty good in stereo. The size should be small enough, regardless.

-timetraveller

Sieur_Drewry
17th Jun 2005, 23:56
add me to MSN messenger, dmorris@axedio.com both of you :D

timetraveller
18th Jun 2005, 13:27
add me to MSN messenger, dmorris@axedio.com both of you :D

I would if I could Sieur_Drewry, but I don't do MSN M. e-mail me anytime: timetraveller@bellsouth.net

TT