Modding rundown: Sound

Started by Noelemahc, December 05, 2006, 11:53PM

Previous topic - Next topic
I had a thought the other day on 'cheating' to give power sounds to the XML2 PSPers.  It's semi-complicated.

1-We know that the first character in the herostat always has his stats loaded.  By default this is defualtman.
2-What we do is make our first character the one we're borrowning _m sounds from.  So if defaultman is still there... (if he's not, we can still theoretically use whoever appears first in the herostat)
2A-We copy nickfury_m from MUA -- then for defaultman we add the line sounddir = nickfury_m
2B-In the PSPer's powerstyle, we change the power sound references.  For instance instead of cable_m/p1_power, it's nickfury_m/p1_power. 
3-We DO NOT change anything else in the herostat.  In this case, Cable's should still read sounddir = cable_m.

Now that's only gonna give you so many sounds, but the theory still sits that if you can find a MUA character with lots of power sounds and some good generic sounds for jumping and dying you can hex-replace specific sounds, giving you at least a few power sounds for each PSPer.

That being said, Dark Phoenix can use Jean's sounds, so that knocks her out.  That leaves you Cable, Cannonball and X-Man.  Since X-Man is a Cable clone he could probably just be forgotten altogether, or put in as one of Cable's skins.

Have I done this?  No.  Am I in the process?  No.  I'm replacing sounds in MUAXBOX at the moment, but thought I might share this because I'll really never have a need to try it.

Hey Blizz, can you repost the link to the x-men voice files, the one in this thread has expired.



has anyone manage to rip the sounds from XML1?

Yeah, we can rip them easy (I did all the playable characters not in XML2/MUA).  It's re-injecting them and making new ZSS/ZSM files that's the tough part.

I haven't noticed anyone mentioning this, so I'll insert a very useful tip from my brother:
QuoteIf you have an NTFS file system (most Windows 2000 and XP users should have it, as it is used by default), you can save space by creating a hard link to the x_voice.zss instead of copying it.
In order to do that, issue the following command (for simplicity reasons let's say we want to insert sounds for Magneto) :
fsutil hardlink create path_to_MUA_folder\sounds\eng\m\a\magnet_v.zss path_to_XML2_folder\Sounds\eng\x\_\x_voice.zss

Example:
If I had installed MUA to "C:\Program Files\Activision\Marvel - Ultimate Alliance\" and XML2 to "C:\Program Files\Activision\X-Men Legends 2\" then the command should look like this:
fsutil hardlink create "C:\Program Files\Activision\Marvel - Ultimate Alliance\sounds\eng\m\a\magnet_v.zss" "C:\Program Files\Activision\X-Men Legends 2\Sounds\eng\x\_\x_voice.zss"
This example can be also found in my readme file for Magneto.
You may freely use and modify my work as long as you give me proper credit - there's no need to ask for my permission.

so there's no easy way to export character specific voices for xml characters? i only want magneto's voice from the x_voice file.. :(

October 29, 2007, 12:28PM #158 Last Edit: October 29, 2007, 12:30PM by Teancum
Unfortunately not.  In theory you could probably chop down each of the XML2 character's voices into their own individual ones (keeping the unique signatures needed), but x_voice has 1000+ files in it, so I doubt anyone's gonna jump on it.  It involves writing down TONS of offsets, etc, finding a way to keep track of them all, then deleting what you don't need, recalculating offests, and going on from there.  Someday I might try it for one character, but it just seems so monotonous.

How to Edit Sounds:

Suppose you're creating a custom character, but you want to utilize power sounds from more than one character (or several characters).  For example, your character might use Dr. Strange's sound file drstr_m and you want to replace his p7 power sound with the p3 power sound from Mr. Fantastic's sound file, mrfan_m.

1. Open drstr_m and locate the ascii string "p7_power.wav" in a hex editor.  In the hexadecimal panel, this string is preceded "C0 AB 02 00 60 36 00 00 6A". 
2. There are 3 numbers contained in this hexadecimal code and they make sense when written in reverse order:
  First Number = 02ABC0  or  175,040 (when converted to decimal)
  Second Number = 3660  or  13,920 (when converted to decimal)
  Third Number = 6A
3. The meaning of these three numbers is as follows:  The first number is the start location of the p7_power.wav file.  And the second number is the size of the sound file.  The third number seems to always be 6A (which isn't important right now, but it's something to look into possibly)
4. So, the p7_power.wav file starts at decimal location 175,040 and ends at decimal location 188,960.
5. Now, open mrfan_m in a hex editor and write down the corresponding numbers for his p3_power.wav file.
  First Number = 017CE0  or  97,504 (when converted to decimal)
  Second Number = 2B40  or  11,072 (when converted to decimal)
  Third Number = 6A
6. Simply copy and paste the block of code for Mr Fantastic's p3 power over the code for Dr. Strange's p7 power.  Since the former wav file is smaller, you will need to fill in the remaining spaces with  "00 00 00 ..." in the hexadecimal panel.
7. Now whenever Dr. Strange activates his Pixies power, it sounds like he's doing Elastic Crush

Rather than replacing a sound file with another one, I think it is possible to just expand the sound file to include more sounds.  However, adding more sounds would require you to update many many hexadecimal pointers.  It would be like trying to edit a herostat manually - you don't want to do it.  So, I guess now it's in the hands of someone with computer programming skills to make a program that can automatically update pointers to make sound editing more efficient time-wise.


The line of code that one would need to find to make sound editing meaningful would be the one that ties a particular file to an extension. Renaming captam_v to something like, say, hwkeye_v produces the game finding nothing, since internally the file still seems to reference itself as captam_v. We would need to somehow make the file reroute itself to a new location (like hwkeye_v) in order to make sound editing anything other than a somewhat fruitless venture.

Quote from: BliZZ on November 08, 2007, 06:20PM
The line of code that one would need to find to make sound editing meaningful would be the one that ties a particular file to an extension. Renaming captam_v to something like, say, hwkeye_v produces the game finding nothing, since internally the file still seems to reference itself as captam_v. We would need to somehow make the file reroute itself to a new location (like hwkeye_v) in order to make sound editing anything other than a somewhat fruitless venture.

Actually, the game does find the sound file well enough. You can create a custom sound file by starting with an existing one "drstr_m", for example and then renaming it to [character name]_m and putting it in the appropriate folder based on the first 2 letters.  In the herostat file, you would reference the sound file as [character name]_m.  But in the powerstyle file, you would still reference the power sounds using the char/drstr_m filename.  The file extension name seems to be coded (not in ascii) onto the sound file itself.

Yeah, he's saying that if you rename the _m file, then the _v file they won't link up.  So if you did deadpool_m and deadpool_v and renamed them to newguy_m and newguy_v, putting them in /n/e you won't hear voiceovers. 

As far as new voiceovers are concerned the best bet we have is splitting up x_voice.zss so we could at least have the XML2 characters without multiple 133mb files.  Possible, but with over 4000 files it's going to be very tedious.  I've been able to split off an igam_v that doesn't conflict (for the Xbox), but it took me about a week.

Quote from: Teancum on November 09, 2007, 05:20AM
Yeah, he's saying that if you rename the _m file, then the _v file they won't link up.  So if you did deadpool_m and deadpool_v and renamed them to newguy_m and newguy_v, putting them in /n/e you won't hear voiceovers. 

As far as new voiceovers are concerned the best bet we have is splitting up x_voice.zss so we could at least have the XML2 characters without multiple 133mb files.  Possible, but with over 4000 files it's going to be very tedious.  I've been able to split off an igam_v that doesn't conflict (for the Xbox), but it took me about a week.

But you may not even want the voiceover for a custom character if the voiceover is character specific.  I'm talking more about customizing a set of power sounds.

Has anyone read this:

http://64.233.183.104/search?q=cache:kWImFwvvCAcJ:www.writersgallery.com/MXM/White%2520Paper%2520-%2520Plug-in%2520ActionScripts.doc+actionscript+plugin+mxm&hl=en&ct=clnk&cd=1

It seems like the sound files are actually packages (which is probably already known) but it seems like there is an XML header file. I wonder if this could help create new sounds at all?