Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

Tutorial: Making new afc files

Made by modders for modders. Step-by-step instructions on how to achieve specific modding goals with ME3Explorer. We *strongly* encourage you to post new tutorials on the wiki.

Tutorial: Making new afc files

Postby The Fob » 09 Feb 2015, 03:44

Hi guys,

As new mods will surely always be released as DLC with JohnP's dlc adding method and VW's patcher dlls, there may be an increased need to create new afc files for sounds. So here is a little tutorial on how that works:

What you will need:


ME3Explorer - obviously

WWise 10.3.3 (build 3737) - get it here (actually, that link didn't work for me the other day. I'll try to see if I can get it uploaded somewhere.)

afc_creator - I adapted my earlier little command line tool (afc_fileswitch) to be an afc creator instead. It includes the source code. WV, feel free to add this to ME3Explorer, it may come in handy.
When you download the archive, extract it and find afc_creator.exe in the "Release" folder.

Preparation:

In order to add audio, you will need sounds that are formatted with Wwise 10.3.3 (build 3737). To do that, follow the instructions here or my video on the matter here. You just need to get through the part where sounds are converted in wwise. The entire bit about Asset Explorer is obsolete, so forget about that, just focus on the wwise bit.

How to do it:

Ok, when you have your converted sounds, it's time to use afc_creator. It's a command line program, so it's easiest to get all your files together in the folder where the afc_creator.exe is loacted.Start your command prompt window and navigate to the folder where your stuff is.
Here is a little introduction to basic command prompt usage, if you need it.

afc_creator can do two things:
- convert a wwise encoded sound into the format for an afc file
- extract a sound from an existing afc file and put it into a new one

which operation is performed depends on how many arguments you run the program with

afc_creator can be run with 2 or 3 arguments. The arguments are:
1. Input file -> this can be a wwise converted sound file or an afc file
2. Output file - this is always an afc file but it doesn't have to exist yet (see below)
3. (optional) An offset for the Input file - only use this third argument if you want to extract a sound from an existing afc file (see example 3)

It's probably easiest to explain what to do with a few examples:

Example 1:
Spoiler:
Situation: You want to make a new afc file with a sound you converted in wwise:

Steps:
1. Put your sound file into the same folder as afc_creator.exe
Image


2. In the command prompt window, call afc_creator Inputfile Outputfile
Image


Comment: If the Outputfile does not exist, afc_creator will make file.


Example 2:
Spoiler:
Situation: You want to add a new sound to an existing afc file

Steps:
1. Put your sound file and your afc file into the same folder as afc_creator.exe
Image


2. In the command prompt window, call afc_creator Inputfile Outputfile
Image


Comment: If the Outputfile does exist, afc_creator will add the new sound at the end of the file and show you the offset of that sound in the command line


Example 3:
Spoiler:
Situation: You want to add a sound out of an existing afc file to another afc file

Steps:
1. Use soundplorer to find the offset of your sound
Image


2. Put your source afc file and your target afc file into the same folder as afc_creator.exe
Image


3. In the command prompt window, call afc_creator Inputfile Outputfile sound-offset
Image


Comment: If you provide an offset, afc_creator will know that you are reading from an afc file, not from an ogg file. So even if the offset of your source sound is 0, still provide that offset, for example:
 


Comment 2: of course, if your target afc does not exist yet, afc_creator will make one.



How to link the sound in your new afc into the game:


Spoiler:
1. Find the wwise stream object of the sound you want to change in the pcc file


2. Add the name of your new afc file to the namelist of the file
Image

You may need to save (via "File" -> "Save") and then reload the pcc file to see the new name at the end of the name list.
Image


3. Change the "Filename" property of your wwise stream object to the new name
Image


4. The last 4 bytes of the wwise stream object describe the offset of the sound in the afc file, so enter your offset here (keep in mind, the pcc files are coded in big endian, so you may have to flip the hex of your offset)

5. The length of your sound in the afc file is described twice by the next 2 times 4 bytes before the offset (see the image). Enter your new length value here.
Before:
Image

After:
Image

Remember, you need to go for "Edit" -> "Save HEX changes" (see last image) and then for "File" -> "Save".
And that's it. You can now load your pcc file in soundplorer and see if the new sound can be played.


Note: Music and streaming sounds (such as ambient sounds) may have a representation in the wwise sound banks, which makes them tougher to change. They may not play in game.
But for short sounds and especially dialogue, this should work. Just be also aware, that sounds are timed, so if you replace a very short sound/dialogue line with a longer one (in terms of time, not data), than you may have to do further adjustments or the sound will be cut off prematurely.

So, I hope this is helpful. Any questions or feedback, just post here.
Cheers! :)

User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Tutorial: Making new afc files

Postby giftfish » 09 Feb 2015, 18:35

@Fob -- Have I mentioned that the only thing I find scarier than code is a cmd prompt? You're killing me, here.

Lol.

This looks awesome, though. Thanks for much for writing this up. Can't wait to try it :D
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Tutorial: Making new afc files

Postby The Fob » 09 Feb 2015, 19:01

With the pictures, even cmd prompt should be easy though. just follow the instructions and you should be fine. :)

Maybe, WV has the time to insert the code into ME3Explorer.

Also, one big advantage of command line tools is that you can batch process many files in a row. Makes mod testing iteration really efficient.

EDIT: Haha, just saw the typo in the soundplorer image in example 3. May the fource be with you. :D
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Tutorial: Making new afc files

Postby Deager » 10 Feb 2015, 04:52

Nice. I was fine in hex but with an afc creator...even better. :)

EDIT: giftfish, you can totally do this. I promise. Super easy.
User avatar
Deager
Modder
 
Posts: 805
Joined: 16 Feb 2013, 01:37
Has thanked: 284 time
Have thanks: 164 time

Re: Tutorial: Making new afc files

Postby Deager » 14 Sep 2015, 04:07

Question for you Fob. Do you know if your afc tools and the old Wwise stuff we use will work in Win10? I've been reluctant to upgrade because I don't want my modding to get screwed up.
User avatar
Deager
Modder
 
Posts: 805
Joined: 16 Feb 2013, 01:37
Has thanked: 284 time
Have thanks: 164 time

Re: Tutorial: Making new afc files

Postby giftfish » 14 Sep 2015, 13:34

Deager wrote:Question for you Fob. Do you know if your afc tools and the old Wwise stuff we use will work in Win10? I've been reluctant to upgrade because I don't want my modding to get screwed up.

Oh, damn. That's a very good question.

Modding tools are one of the many reasons I'm holding off.
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Tutorial: Making new afc files

Postby FemShep » 16 Sep 2015, 20:36

Also the new start menu is terrible and buggy. Though I ran startisback+ on 8.1.
Image
ME3Tweaks has modding guides, tools, forums for mods, a modding wiki, and ModMaker, an online mod creation tool.
ME3 Mod Manager, the civilized way of installing and managing ME3 mods.
ME3Tweaks Facebook Page
User avatar
FemShep
Modder
 
Posts: 1101
Joined: 18 Oct 2012, 20:48
Has thanked: 42 time
Have thanks: 76 time

Re: Tutorial: Making new afc files

Postby The Fob » 16 Sep 2015, 21:29

The tool itself should work because it's just a simple command line prog, nothing fancy.
As for Wwise, no idea. I am sure their latest version will work but since we have to use the older one, I don't know. I am still using Win7, so I can't test it.

The Fob has been thanked by:
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Tutorial: Making new afc files

Postby Deager » 17 Sep 2015, 01:52

The Fob wrote:The tool itself should work because it's just a simple command line prog, nothing fancy.
As for Wwise, no idea. I am sure their latest version will work but since we have to use the older one, I don't know. I am still using Win7, so I can't test it.

I have to upgrade a work laptop from 7 to 10 at some point so I'll slap Wwise that we need onto it and see what happens. Good to know on the afc stuff you wrote.
User avatar
Deager
Modder
 
Posts: 805
Joined: 16 Feb 2013, 01:37
Has thanked: 284 time
Have thanks: 164 time


Return to Modders' Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred