Hard Light Productions Forums

Hosted Projects - Non-FreeSpace => MechCommander OmniTech => Topic started by: warzzone5 on September 04, 2012, 09:58:41 pm

Title: Editing sound files cause game to crash
Post by: warzzone5 on September 04, 2012, 09:58:41 pm
Hello, first post here.  I have a problem when I try to replace some sounds with some of my own creation.  The game will crash when it tries to play the modded sound.

Is there something wrong with my modifications?  Please help a commander in need   :cool:
Title: Re: Editing sound files cause game to crash
Post by: Karl on September 05, 2012, 05:04:48 pm
I will forward your request to ThorC, he did all the sound files for the new mechwarriors in MCO (MCG warriors), just incase he does not see your post
Title: Re: Editing sound files cause game to crash
Post by: ThorC on September 06, 2012, 12:44:52 am
What sound files you are trying to replace?
Title: Re: Editing sound files cause game to crash
Post by: warzzone5 on September 07, 2012, 09:33:18 am
Most music files as well as the Gauss, PPC and machine gun

Edit : I'll get a screenshot of the error as well as the code tomorrow and post it here, it might help you in finding what the problem is.
Title: Re: Editing sound files cause game to crash
Post by: ThorC on September 08, 2012, 12:32:49 pm
The effects files need to be unpacked then repacked using xplist. I had to do it for all the sound files from mcg. Are you naming the music files that you replaced in the proper order?
example=
music00
music01
music02
music03
music04
music05
Title: Re: Editing sound files cause game to crash
Post by: warzzone5 on September 08, 2012, 12:45:33 pm
Ah welp I think you nailed it.  I didn't know that mc2.fx needed to be repacked and I didn't do it, I thought it worked similarily to the Fallout3 system (just create the file in your data directory and place the new file with the same name)

However, I don't know what this xplist program is.  I've never heard of it (I assume it's an unpacker/packer) and google doesn't point me to any program.  Could you give me a link to it?
Title: Re: Editing sound files cause game to crash
Post by: ThorC on September 08, 2012, 01:06:18 pm
There should be a copy in the source code
http://www.microsoft.com/en-us/download/details.aspx?id=11457
If it's not there I will try to find it for you. I might still have a copy of it and the instructions on how to unpack and repack the sound files.
Also make sure your sound files are all in .wav format.
Title: Re: Editing sound files cause game to crash
Post by: warzzone5 on September 08, 2012, 07:58:49 pm
I got the programms, but I have no clue on how to use them so if you happen to find the instructions you mention I would appreciate it  :)
Title: Re: Editing sound files cause game to crash
Post by: ThorC on September 09, 2012, 04:54:33 pm
http://dropshipcommand.com/forum/dcboard.php?az=show_topic&forum=15&topic_id=5362&mesg_id=5362&page=


xplist.exe must be used from command prompt or create file name.bat, enter command to name.bat file and dbl click on it.

xplist parameters:

xplist -l <filename> <heapsize-optional>
xplist -r <responsefile> <outputfile-optional> <-lrb-optional> <heapsize-optional>
xplist -c <responsefile> <outputfile-optional> <-lrb-optional> <heapsize-optional>
xplist -u <filename> <outputfilename> <outputextension> <heapsize-optional>

<<-lrb>>:
-l zlib compression
-r no compression
-b best compression

Parameters:
-l list contents (if you want to see list must be run from command prompt)
-r create packet file from response file
-c create packet file from response file with checksum
-u unpack and write as utputfilename.outputextension
(a000.wav - will unapck all files and create files with names from a000.wav to axxx.wav for sound files)
Title: Re: Editing sound files cause game to crash
Post by: warzzone5 on September 09, 2012, 08:06:11 pm
Alright I got them to work under command prompt by dragging them inside the system32 folder thanks a lot ThorC  :).  However it simply won't open any files, be it a .pak or the .fx.

Opening mc2.fx gets me a "ERROR #0002" File type not supported.

Opening any pak files (I used sound.pak) opens the file with 0 listed items.

PS : Should I keep posting in this topic or use PMs from now on?

Title: Re: Editing sound files cause game to crash
Post by: ThorC on September 10, 2012, 11:23:28 pm
Your in uncharted territory now :warp:, I only did the sound files for the mechwarriors. I honesty know little about arranging the effects files or how to get them to unpack. It's also been awhile since I played in that area. I would suggest trying out diffrent commands on xplist. Good luck man. :yes:
Title: Re: Editing sound files cause game to crash
Post by: warzzone5 on September 11, 2012, 09:05:11 am
Alright thanks guys, I'll post my findings if I ever make it work.  And keep up the good work with MCO, you guys are awesome :)
Title: Re: Editing sound files cause game to crash
Post by: Starman01 on September 13, 2012, 01:19:30 pm
Alright I got them to work under command prompt by dragging them inside the system32 folder thanks a lot ThorC  :).  However it simply won't open any files, be it a .pak or the .fx.

Opening mc2.fx gets me a "ERROR #0002" File type not supported.

Opening any pak files (I used sound.pak) opens the file with 0 listed items.

PS : Should I keep posting in this topic or use PMs from now on?

Exactly my problem as well. I would kill if I could finally replace that stupid MG sounds, but these *.pak file is a pain in the ass. I think we have to wait till magic finds the time to remove soundfiles from the archives as well, like he did with the other stuff ;)
Title: Re: Editing sound files cause game to crash
Post by: magic on September 14, 2012, 01:08:55 am
Mc2fx does not contain any sound files, only weapon effects and so. It is not PAK file.

MC2 sounds are in sound.pak.

It can be extracted with xplist.

I had it extracted long time ago, I will have to find. The problem with xplist is when you have empty place in pak file it will unpack all files until it finds the empty place and stop. There was a solution for that but I cant remember.

Sound.pak unpacked:
https://rapidshare.com/files/3949706500/MC2%20sounds.rar
Title: Re: Editing sound files cause game to crash
Post by: magic on September 14, 2012, 03:50:18 am
Anyone who can create better sound effects is welcome to do that.
Title: Re: Editing sound files cause game to crash
Post by: Starman01 on September 14, 2012, 04:50:27 am
But how can we "repack" them ? Or do we even have to ? Not sure you "freed" that pak already....
Title: Re: Editing sound files cause game to crash
Post by: magic on September 14, 2012, 04:59:29 am
I will take care of the packing (trying to find prepared files for that). Will probably use mk files from pilot sound file.
Title: Re: Editing sound files cause game to crash
Post by: Starman01 on September 14, 2012, 05:27:23 am
Sounds great :) Remember the new MG Sounds I posted a while back ? I would die to remove the one from vanilla..


What specs do the new files need to have ? Type, length, Hz ?
Title: Re: Editing sound files cause game to crash
Post by: magic on September 14, 2012, 05:48:14 am
Here is unpacked and prepared for packing.
https://rapidshare.com/files/744046853/MC2%20sounds.rar

dbl click mkSound and you get sound.pak.
Title: Re: Editing sound files cause game to crash
Post by: Starman01 on September 14, 2012, 05:53:34 am
You are the man !!!!!  :yes:  Time to light another candle on my "magic" shrine :)
Title: Re: Editing sound files cause game to crash
Post by: Starman01 on September 14, 2012, 07:06:32 am
Awwwww, not working :(  Even when I repack the original files without any change, the game won't start anymore... getting this error :

Quote
STOP      : FAILED (0x80070057 - WINERR_Falscher Parameter. ) - CreateSoundBuffer(0x3351320: DSBCAPS_CTRL3D | DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_LOCSOFTWARE , (PCM 2048-bit, 1 Channel, 11025Hz, 22050bps))

Maybe some files even get damaged in the extraction prozess ?
Title: Re: Editing sound files cause game to crash
Post by: warzzone5 on September 14, 2012, 10:05:19 am
Wow!  Thanks a lot, you ARE the man  :D

EDIT : welp as Starman said it dosen't work.  I'll keep searching for more clues about xplist