1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Wwise editor 2015.1.9 needed for audio modding

Discussion in 'Civ6 - Utilities, Code Snippets & Art Assets' started by notque, Feb 24, 2017.

  1. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    From Ian Schmidt, Audio Engineer @firaxis

    With the SDK out, lemme drop a few words about #Civ6 audio modding. You'll need Wwise editor 2015.1.9 for either WIndows or Mac

    He also adds that in a later release, he will include extensive documentation.

    Wwise 2016 and 2017 major versions are not compatible and will not work / crash Civ.

    To override an existing sound, create an event with the same name that we (Firaxis) used. The game will give mods precedence.

    To create a new sound, give it a unique prefix. Add your events to a new sound bank, generate that bank for Windows...

    and add the .bnk file to your mod. Create an .ini file to tell the game when in game to load it...

    Follow our Poland or Australia DLCs as examples how to setup the ini file and your .modinfo - we ate our own dogfood!

    Then you can use UI.PlaySound() from Lua to play your new sound. Quickie lesson over :)
     
    Last edited: Feb 24, 2017
    Ewok-Bacon-Bits and Gedemon like this.
  2. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
  3. Ewok-Bacon-Bits

    Ewok-Bacon-Bits Chieftain

    Joined:
    Oct 23, 2016
    Messages:
    166
    After a few hours of slogging through I got sound to play in game, Thanks for this! Maybe I should write some quick tutorial.
     
    mrc2022 and notque like this.
  4. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    Please do. Also from Ian - Trivia: the first working #Civ6 audio mod replaced all the civs' music with Rick Astley. I can't distribute it for obvious reasons :)
     
  5. Ewok-Bacon-Bits

    Ewok-Bacon-Bits Chieftain

    Joined:
    Oct 23, 2016
    Messages:
    166
    Ok here is a quick rough tutorial if you want to play your own music or sounds in the game, there might be a more elegant way of doing this but this is the way I did it and it works.

    1. So first download/install Wwise 2015.1.9. This is used to generate 3 files we need a bnk, xml and txt file.

    2. Open it up. Inside "Project Explorer" which is the box in the upper left in the audio tab you will want to right click and "import audio files" this has to be a wav file, but you can convert any audio file with audacity.

    3. After that in the Events tab in project explorer you will want to click the very small button right above the "Events" folder, which when you hover over it will say Create new "Event". So click that to create a new event.

    4. Click on the new event, you will want to rename it, this name is what you will reference when you actually play it via the UI. I'm guessing if you were to replace an already existing event made by Firaxis you will want to rename it too that exact event like "POLA_JA_DEFEAT_B_1" for instance which in this case would replace Jadwiga's speech when she is defeated but I have not tested this exactly yet.

    5. After renaming click browse inside event actions, find your music file. Just set the action as Play which is default. You will most likely just want one file per event.

    6. After that, switch to the SoundBanks tab and above the SoundBanks folder click "Create New Soundbank". Right click the soundbank and select edit. You can rename it also and it will set the file name for the bnk.

    7. Now with that window open click over to events and drag over the event into the window, then exit/save. You can drag over as many events as you like.

    8. Right click that soundbank again and select "Generate Soundbank(s) for current platform".

    9. Now through windows explorer you will want to find your project's path that you set earlier and navigate to GeneratedSoundBanks/Windows inside your project folder.

    10. Ok now there are 3 files you will want to copy paste into your mod folder, the bnk file that you named, the txt file that you named and a xml file called "SoundBanksInfo" which I think you can just rename.

    11. Edit your xml file and comment or delete the group "SoundBank Language" which looks like this (my example)

    Spoiler :
    Code:
    -<SoundBank Language="SFX" Id="1355168291">
    
    <ShortName>Init</ShortName>
    
    <Path>Init.bnk</Path>
    
    </SoundBank>


    12. Ok now you will want to copy paste in a .ini file which you can find in the dlc folders it's contents look like this.

    Spoiler :
    Code:
    ;
    ; Civilization 6 Banks.ini for DLC03
    ;
    ; Sections are defined like so:
    ; Global = banks always resident
    ; Menu = banks loaded only during main menu
    ; InGame = banks loaded during gameplay, either 2D or 3D mode
    ; 2D = banks loaded only during 2D mode gameplay
    ; 3D = banks loaded only during 3D mode gameplay
    ; FMV = banks loaded only during the intro (and outro?) FMV
    ;
    
    [Global]
    
    
    [Menu]
    
    [InGame]
    Event.bnk
    
    
    [2D]
    
    
    [3D]
    
    [FMV]
    



    13. Here you will want to type in the name of your bnk file and when it should load in. My example above is just under [InGame].

    14. Now inside modbuddy or your modinfo file you will want to "UpdateAudio" adding in all 4 files that we have.

    15. In a UI context file put in the command "UI.PlaySound("Your_Event_Name");" inside whatever function you want. And it will play. If you are overriding existing events which I havn't tried yet you can skip this step, it should just play instead of whatever audio was there before when it is called.


    Hope this helps feel free to ask questions.
     
    Infixo likes this.
  6. Oberth

    Oberth Chieftain

    Joined:
    Feb 24, 2017
    Messages:
    2
    Thanks you two this is really excellent. Also thank you for replying to my thread notque.
     
  7. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    More from Ian, our god for audio -

    A quick #Civ6 modding tip: if you want a civ to have the music of a built-in, use Asset Editor to open your civ's Civilizations.artdef and drill down to Audio underneath its entry. Change the name there to match a built-in civ and you'll get their audio.
     
  8. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,210
    Gender:
    Male
    Location:
    Warsaw
  9. SlySlySly

    SlySlySly Chieftain

    Joined:
    Feb 8, 2017
    Messages:
    210
    Gender:
    Female
    Location:
    Denver
    Any decent way to get it into your mod without mod buddy?
     
  10. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,210
    Gender:
    Male
    Location:
    Warsaw
  11. SlySlySly

    SlySlySly Chieftain

    Joined:
    Feb 8, 2017
    Messages:
    210
    Gender:
    Female
    Location:
    Denver
    Oh thanks. Really helps
     
  12. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,210
    Gender:
    Male
    Location:
    Warsaw
    It seems that sounds added this way do not respond to Audio Options, i.e. I cannot change how loud they play. Maybe some binding to sound type is required somewhere. I've checked DLCs and they basically do the same and yet somehow their sounds respond to Audio Options. Any idea?
     
  13. Ewok-Bacon-Bits

    Ewok-Bacon-Bits Chieftain

    Joined:
    Oct 23, 2016
    Messages:
    166
    I have not figured that out yet, mine can be changed only by the Master Volume option but it is probably something that hasn't been revealed yet in the game files.
     
  14. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,210
    Gender:
    Male
    Location:
    Warsaw
    Same here, only Master Volume works. I've carefully looked through all DLCs and see no other options to use. BTW, there are some unused sounds in Poland DLC (Ambience) and since there's separate slider for Ambience sounds, I thought I'd find sth there. Nope. Same format and parameters.
    The only option that remotely could be used for that is Language="SFX". But all files have it, including speeches, etc. And my files have it to, still doesn't work.
     
  15. SlySlySly

    SlySlySly Chieftain

    Joined:
    Feb 8, 2017
    Messages:
    210
    Gender:
    Female
    Location:
    Denver
    Ummm I'm really confused on how exactly you define the music.
     
  16. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,210
    Gender:
    Male
    Location:
    Warsaw
    @SlySlySly
    You have to add a section to .modinfo (in <InGameActions>) that looks like this:
    Code:
        <UpdateAudio id="RND_Audio">
          <File>Sound/SoundbanksInfo.xml</File>
          <File>Sound/RND_Banks.ini</File>
          <File>Sound/RND_Soundbank.bnk</File>
          <File>Sound/RND_Soundbank.txt</File>
        </UpdateAudio>
    
    Ofc the file names are the one you've chosen when working with WWise and they all must be listed in <Files> section as well.
     
  17. SlySlySly

    SlySlySly Chieftain

    Joined:
    Feb 8, 2017
    Messages:
    210
    Gender:
    Female
    Location:
    Denver
    How do I call these in as a civilization's music in the game. In the sound bank I made there is music for all 4 normal music eras. (ancient, medieval, industrial, atomic)
     
  18. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,210
    Gender:
    Male
    Location:
    Warsaw
  19. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,210
    Gender:
    Male
    Location:
    Warsaw
    I have figured out how to make custom sounds respond to Audio Options. I.e. when you use a volume slider to make them louder or quieter.

    First, some theory is needed. All sounds in the game are routed thorugh sound buses. There are several (see the list below), but what matters is that they are organized in a hierarchical tree. At the top there's always Master Audio Bus. It is created by WWise and cannot be changed or removed. That's why our sounds responded only to a master volume slider - it govers this bus.
    Firaxis has designed several other buses, but there are 4 key ones:
    • Ambience Bus (id=4202237879)
    • Master Music Bus (id=48433064)
    • Master SFX Bus (id=3577355056)
    • Speech Bus (id=1472570345)
    You can easily guess what they are for. For each there's also a volume slider in the options.

    To make custom sounds respond to volume sliders you need to tell the engine which sounds go through which buses. And that's all... :)

    Instructions
    1. First you need to create in the project all buses you are going to use. For that use 'Audio' tab, Master-Mixer Hierarchy, select 'Master Audio Bus' and add a child bus (small button above 'Create new audio bus' or right-click/New Child). Do NOT create Auxiliary bus, just Audio Bus.
    1a. You can use all buses that Firaxis designed - just make sure that they are correctly linked in the tree.
    2. Then assign sounds to buses. Again, 'Audio' tab, Actor-Mixer Hierarchy, select your sound. On the right there will be a window and in the middle a section 'Output Bus'. Click '...' to select a desired bus. Repeat for all your sounds.
    3. You can now generate sound bank and it will contain information about the buses to use (point 8 in @Ewok-Bacon-Bits post).
    Important info. This method works because WWise assigns unique IDs to buses based on their names (probably some hash). Anyway, you must use the exact names that Firaxis uses and then the bus ID will be correct as well.
    Important info 2. You still need to remove manually the section about Init.bnk (point 11). I have not testet it, but I suppose that if it stays it will overwrite Firaxis's definitions (which are also in Init.txt) and break all sounds in the game.

    All buses (you can find that info in Init.txt in <game_dir>\Base\Platforms\Windows\audio)
    As you can see, the 4 key buses have children for specific types of sounds. E.g. for Wonders you might wanna use \Master Music Bus\Wonder Music Bus, for units \Master Audio Bus\Master SFX Bus\SFX Bus 3, etc.

    \Master Audio Bus\Ambience Bus
    • \Master Audio Bus\Ambience Bus\Day
    • \Master Audio Bus\Ambience Bus\Gallery
    • \Master Audio Bus\Ambience Bus\Night
    \Master Audio Bus\Cinematics_Music_SFX
    \Master Audio Bus\Cinematics_Speech

    \Master Audio Bus\Master Music Bus
    • \Master Audio Bus\Master Music Bus\Great Music Bus
    • \Master Audio Bus\Master Music Bus\Music Bus
    • \Master Audio Bus\Master Music Bus\Music Stingers Bus
    • \Master Audio Bus\Master Music Bus\Wonder Music Bus
    \Master Audio Bus\Master SFX Bus
    • \Master Audio Bus\Master SFX Bus\Forced_UI Bus
    • \Master Audio Bus\Master SFX Bus\Interface
    • \Master Audio Bus\Master SFX Bus\Notifications Primary
    • \Master Audio Bus\Master SFX Bus\Notifications Secondary
    • \Master Audio Bus\Master SFX Bus\Notifications Tertiary
    • \Master Audio Bus\Master SFX Bus\Notifications_NonDucked
    • \Master Audio Bus\Master SFX Bus\SFX Bus 2D
    • \Master Audio Bus\Master SFX Bus\SFX Bus 3D
    • \Master Audio Bus\Master SFX Bus\SFX Leaders
    • \Master Audio Bus\Master SFX Bus\SFX_Focus_3D
    • \Master Audio Bus\Master SFX Bus\Vocalizations
    \Master Audio Bus\Speech Bus
    • \Master Audio Bus\Speech Bus\Speech_FTUE_Bus
    • \Master Audio Bus\Speech Bus\Speech_Ingame_Advisor
    • \Master Audio Bus\Speech Bus\Speech_Ingame_Narrator
    \Master Audio Bus\Speech_CustomVO_Bus
    \Master Secondary Bus
     
    OneLastTurn and Ewok-Bacon-Bits like this.
  20. SlySlySly

    SlySlySly Chieftain

    Joined:
    Feb 8, 2017
    Messages:
    210
    Gender:
    Female
    Location:
    Denver
    Has anyone figured out custom civilization music yet?
     

Share This Page

Ebates: Get Paid to Shop