Breakthrough - Edit and repackage (most) audio successfully! Jan 31, 2019 18:22:17 GMT 10 JTeghius Kittius, Snipz, and 7 more like this
Post by northerner on Jan 31, 2019 18:22:17 GMT 10
After digging around and experimenting for some time now, the process of editing or entirely replacing successfully (read: it works in game.) the sounds running off of .XSEW files, namely, (most) weapon sounds has been rendered clear. To be clear, those are .WAV files by a different name with a few other differences that matter. The .SNGW files you'll find primarily unpackaged are .OGG files with other discrepencies. Yes, I'll go over how to change those and get them to work too! Most of this is info others have found out, but is pretty hard and time consuming to dig up on your own, especially if you don't know where to look and how, so here it is in one spot. Also, some of those weren't exactly written with the layperson in mind. Hopefully these will be as easy to understand to most users as possible. I make no pretense of having discovered all of this on my own. Some parts I thought I found out myself only to find out someone else did earlier. "All glory is fleeting."
Today (01.31.19) I will give you the .XSEW info, this stuff takes a while for me to type up and post. Rest comes soon. No, I really do do other things.
I will presume you are trying to modify the PC version. Some parts of these may seem obvious to some or many, but I've spent enough time in various support roles to presume user error and to recognize the need some may have for
constant specifics. I'll try to compartmentalize as much of the different processes in this post as possible. Hopefully this post does not become too massive to make this a problem, but if so Ctrl-F the file extension eg ".XSEW" to find the relevant instructions.
Step 1 to all parts: BACK UP ORIGINALS OF RELEVANT FILES. Meaning any game files you will be changing. A copy and paste in the same directory will do this with very literally the most minimum effort, although the uninspired "original filename - copy" this produces should fill you with shame. Ugh, at least change the word "copy" to "backup." Or don't. If for whatever reason you choose to not back things up and lose some necessary file(s), you can recover it via two methods:
A.) Completely uninstall the RE HD Remaster, then reinstall it. Not preferable for obvious reasons. Maybe you can't remember which parts are original when you go to edit something and you have now broken the game. Not everyone can avoid the nursing home in later life. Maybe you just didn't back things up. Maybe you should have.
B.) Enter your Steam library, right click on the remaster, go into properties. In the new window, select the "Local Files" tab. There will be an option to "Verify Integrity of Game Files..." Doing this will cause Steam to do a check on the game files and note any that have been removed or EDITED and replace them with the correct file. Again, if you have made some change to a file (read: have installed any mod that is reliant upon modified original game files which in this game is almost any mod), it will make it vanilla again. Just back your stuff up, guy.
We'll start with the .XSEW files, the harder, though less tedious mystery.
Things you will need to do this:
1.) Scroll down to get an approximate sense of how long the post is and oh it is that long and has many, many accompanying pictures of things that may appear like complicated computer science stuff. Begin sweating or produce an audible gulp sound as needed. Okay. Whew...It won't actually be that bad, you will mostly be copying and pasting or dragging files to a different location. On occasion, you will use the plastic board of many keys in front of you. In some circles this is called a buttonbox, even though it is rectangular.
2.) ARCtool and also probably the PC batch file so you don't have to work with the command console because you're lazy. Or maybe you just don't know how. This tool is needed to gain access to the sound files within a particular .ARC file, and also to repackage the edited files into (you guessed it) a .ARC file in such a fashion it will work in game. Put the extracted PC batch file in the same directory as the extracted ARCtool files. It is possible some other .ARC related archival software may do this, but I know for a fact ARCtool will when combined with the other steps. And ARCtool has the word tool built right into it, so right off the bat you know how great it is. ARCtool is tremendous.
3.) Be aware whatever sound file you wish to insert will need to be a .WAV. If it is not than you shall need to convert it to such before proceeding much further. There are many ways to facilitate this which a search of "how do I convert .whatever to .wav" in any major search engine will provide specifics on if you lack the necessary software and know how. You found this forum and now you are reading this post, so I believe in you!
4.) GoldWave. This is a 30 day trial of what is now obvious to me has every appearance of being audio editing software, maybe it does other stuff too. At first I read it as "GoldWeave" and felt let down upon discovering my error. Take note whether your operating system is 32 bit or 64 bit, download and then install the relevant version. We need this so we can actually edit the original .XSEW file and save your relevant replacement .WAV file directly as a .XSEW in its place, as just changing the filename to match the original and filename extension from .WAV to .XSEW will not do the trick. Actually, doing this step alone does not do the trick either. Ha, of course there's more! Using a regular .WAV file would have been
obvious boring, and when you stumbled out of bed this morning afternoon today telling yourself you were finally gonna do something you didn't know this time it was actually gonna be true meant it. Again, maybe some other stuff will do this too, but I know this works. Unlike you.
5.) UltraEdit. This one is a free trial too. We will be using this to do some hex editing, a form of magical dark arts not unlike actual hexing, which I have no interest in. We don't need to go into detail on these things. Again, note the bits of thy OS and correctly download and install the correct version. Now you might be asking yourself, "What does this hex editing look like? Can I do it?"
Well, it looks
But yes, in fact you can do it, it will be very easy and it is the least time consuming part of this.
Those are the tools required to do this. Not necessary but very useful is Audacity, a free audio editing software. It won't be able to save as a .XSEW file directly (Remember, we need GoldWave to screw around in that extension with any useful result!), but there are some things you can also do in GoldWave that some may find more easily first accomplished in Audacity, for instance making a specific section of a .WAV file louder before using it in GoldWave. I would say the general UI of Audacity is more intuitive, if not more user friendly.
You have now gathered your tools. You should also gather your courage since its supposed to be a scary game. If you have not gathered courage, drink until this achieved. Since you have this handy guide you won't need to gather your patience outside of reading through my ramblings to the pertinent information. Which is right now.
Let Us Begin
Let's say we want to alter the firing noise of the 9mm Beretta (and/or all other guns too since this process is applicable to almost all weapons in game) to not sound so, well, fake. Let's say, at some point in time, you've been involved with a scenario where a duty size handgun in 9mm was fired indoors in some circumstance which shall not be elaberated on where you wish you had been somewhere else and it wasn't quiet. At all. You spend lots of time at the range, including indoor ranges, and though you knew its loud as hell, and would be bad to experience it without hearing protection, and even if you had wanted to experience it without it, you realized no one could possibly fully comprehend the reality of the human bodies numerous instant involuntary physical responses (Almost every organ system in you will be involved in the reaction) to even a small caliber firearm discharging indoors, closeby, without hearing protection, and little to no warning. Sensory overload. Your ears rang for days and now you are offended by gunshot noises in most forms of media, movies, video games, etc., because it isn't loud enough, it is nowhere near loud enough, it is never loud enough. And not just because you now have some degree of permenant hearing damage. Well, you still have better hearing than most bartenders will at the end of their career. The inevitable cross to bear is now being obliged to enter into an auditory crusade with every video game that has guns in it that you enjoy on any level and have determined it is possible to fix it to your liking no matter how hard.
The 9mm isn't some little peashooter. It is an ingenius and complicated construction of forged steel and (at least in the custom STARS model) artisan wood, a result of very well educated (and paid) engineers who went through ridiculous amounts of schooling participating together in a very long, complex design schedule concerning literally every part of the weapon and a tedious manufacturing process. The end product sends a metal projectile past the speed of sound at a living thing (Ok, also lots of other fun stuff ) via a controlled explosion which also cycles the action, consisting of over 13 tiny moving parts, over and over. As in real life, in game it is a life saving tool with very much finite ammo and one should feel the price and tension of having even one less bullet, and also the satisfaction and relief of that one less enemy that was just purchased at that price. You probably could have run around it if you hadn't panicked but...you did. We'll presume that, like a real person, you aren't actually willing to just tank a hit and risk infection, grave life-altering injury, or death.
Don't bring up the knife, asshole. This piece is all you got!
Meaning it, and by extension all other firearms shouldn't sound anything at all like this on any level whatsoever (Link starts on 9mm):
Instead, it should be something like this. I've made it a point that the flash now also just barely begins before the shot audio, instead of the same time but you will need to slow the video to notice this anyway. It mattered to me:
Anyway, you see that it can be done and it certainly works. Let's get into this:
1.) As I mentioned, unlike most of the rest of the game audio, audio files for weapons are stored primarily in .ARC files. This is an archive file similar to a .zip or .rar if that concept is not apparent. We shall use ARCtool to export the data inside so we can proceed with our shenanigans. For the 9mm, that is wep02.arc. It (and most other weapon sounds) is located under steamapps/common/Resident Evil Biohazard HD REMASTER/nativePC/arcPC/sound/se/wep/. Make a backup of it, copy and paste it into the directory you put ARCtool in. Now, drag that copy over and onto the batch file, since you put that in the same directory, didn't you? This highlighted file is what you need to put it over:
(continued) Upon doing so, the command line thingy will come up and do some business automatically, don't close it, even if you are that fast or more likely, your computer is that slow. The thing will do its thing and close, upon which you shall note the appearing in the same directory of 2 new things: a new folder matching the name of .arc file you just extracted, and a text document also matching the name of the .arc file. Unlike the new folder, the name of the text file will include the ".arc" The text file is necessary for repackaging the .arc file once you have implemented your changes. You do not need to open it or mess with it in any fashion. Opening it will simply show a list of files and their location within this new folder. Don't edit this info or the file name. Just remember it is there and admire it from afar. If it did not appear, you screwed up. So there's no confusion, In the above image note that the .arc file does not have the "-copy" as I had it correctly and fully repackaged and configured and had copied and replaced the original .arc with it. I'll remind you to do this at the end.
2.) I shall assume your new replacement .wav format sound is prepared for use. Open it with GoldWave. It may say some stuff about the file potentially being corrupted, if so choose yes, then yes again. Do not close GoldWave, return back to the relevant folder in windows explorer. Get into the extracted files and to the relevant file to be changed and open it in GoldWave. The gunshot for the 9mm is 1264.XSEW, so we'll do that one. You can determine what sound it is by opening the unedited .XSEW file in a media player, for instance VLC is what I use. Remember it is just a weird .wav. It will play these without issue or introduce any harm to files integrity. Again, upon opening it GoldWave may say it's messd up, tell it yes twice again if so. Anyway, you have both the new and old audio open in GoldWave at the same time, which will look like this:
(Continued) From here, we're gonna delete the audio in the original file, and then just copy and paste the audio from the new one in it's place. I suppose you can just copy and paste from the new one without even deleting the old one, but I like to be sure. Fortunately, doing this isn't hard to figure out. Just click on (not in) the upper border part the window of the original, the part that has the filename. You will see the new one is a bit grayed out, like the above picture. By default, this will automatically have the entire audio of that selected. If for whatever reason you screwed up and selected only part, you may select all via the button in the actual controls for GoldWave above both windows showing the waveform of each audio file. The buttons near the top of the page, not the drop down menu, although actually you can do it from there too if you so choose. The Cut, Copy, and Paste options, as well as Delete, the giant red X further to the right, will not be grayed out. If you haven't selected all, the "Sel All" button will not be grayed out either. Since the new audio I am introducing contains a slight delay before the actual noise in the file, in my instance I want to just make sure there's no chance of anything old being there and will flat out use the big red delete on the old audio. You will still have the file open in a window, but the waveform of the audio will be notably absent when done correctly. like this:
(Continued) From here, click on the window of the new audio, again, the other window will gray out a bit. Once more, by default the entire audio is selected, which is fine for me! This time choose copy up there. Then click on the old, window, and paste. Yeah, good job. Now close the file that had the new audio originally, keeping 1264.XSEW (in my case anyway), open in GoldWave. Now save (NOT save as) only that file. To do that you will use the button with a diskette button clearly marked save above, or go into file>save. You may now close GoldWave. Now we're gonna work with hex stuff!
3.) In UltraEdit, open now a
copy backup of the original unedited 1264.XSEW or some other unedited .XSEW file from the same .ARC file, either will work just fine. I will use 1265.XSEW to demonstrate this. Begin to scroll down to the bottom using your mousewheel. Note that this is taking too long, these lines of numbers, letters, and symbols goes on forever and this is very slow going doing it this way. Take a second to consider the truly monumental stuff a modern computer can do and recognize it comes down to this stuff doing things in the background. Now that you understand the nature of the universe, you will now, deliberately, by thy own hand, use your mouse to just grab the scroll bar and drag it to the bottom instead. Woops, now you went too far! This time, just use your mousewheel to scroll up just a bit so you see this much, then highlight the portion shown below, which will need to be in the hex of every .XSEW file, in a specific exact spot, while also inside the correctly packaged .ARC file for the game to use it. Since you have highlighted it, right click and copy it!
(Continued) Now, you don't need to keep 1265.XSEW open in the hex editor once you have copied the highlighted information. I will anyway so I can compare the modified 1264.XSEW to it and make sure it was done correctly at the end. Go ahead and open up your modified 1264.XSEW in UltraEdit. If you have 1265.XSEW still open it will do so in a seperate tab akin any contemporary web browser. Scrolling to the end of 1264.XSEW you will see it looks a bit different, specifically, it will look like the below image. Highlight the portion I have highlighted in the same below image, right click, and paste the information you copied over from 1265.XSEW.
(Continued) If you chose to keep 1265.XSEW you may double check and ensure the highlighted end portions now match. You may now save (again, not save as) 1264.XSEW. Close down UltraEdit. Test that the file still plays correctly in a media player of your choice, if you didn't mess up, it should. All that is left now is to repackage your files in the .ARC file, make sure the name now matches the original wep02.ARC and drag or copy and paste it to the original game directory of origin, which, again, is steamapps/common/Resident Evil Biohazard HD REMASTER/nativePC/arcPC/sound/se/wep/
4.) To repackage it as an .ARC, simply drag the extracted directory (folder, whatever you will call it) onto the same batch file you used before. I think it will probably just overwrite the original .ARC if you kept it in the same folder, but I am not sure so I just deleted the old one. Since you did not modify the text file extracting the .ARC originally produced, this will now repackage it correctly. All you now need to do is ensure the filename is correct, and replace the original, as I mentioned above. And that is it!
You did it, champ! Your parents must be proud.