Quick Modding Questions Thread

Hi. Hope someone still visits this topic.

I can't add a custom sound event into the game. I've prepared a soundbank following this guide by Milennin:
Except I put my sounds under "actors" because I want to use them as an event sound rather than background music. I tested my .wem files by replacing original audio with them and they worked.

The problem is I would like not to replace original files of existed event but create my own event and call it with UI.PlaySound("Play_MyMod"). I hate that I see no error logs but the command just emit no sound :(

Spoiler MyMod_WC.xml :

XML:
<?xml version="1.0" encoding="utf-8"?>
<SoundBanksInfo Platform="Windows" BasePlatform="Windows" SchemaVersion="10" SoundbankVersion="113">
    <RootPaths>
        <ProjectRoot>E:\Coding\civ6\MyMod\wwise\MyMod\</ProjectRoot>
        <SourceFilesRoot>E:\Coding\civ6\MyMod\wwise\MyMod\.cache\Windows\</SourceFilesRoot>
        <SoundBanksRoot>E:\Coding\civ6\MyMod\wwise\MyMod\GeneratedSoundBanks\Windows\</SoundBanksRoot>
        <ExternalSourcesInputFile></ExternalSourcesInputFile>
        <ExternalSourcesOutputRoot>E:\Coding\civ6\MyMod\wwise\MyMod\GeneratedSoundBanks\Windows\</ExternalSourcesOutputRoot>
    </RootPaths>
    <DialogueEvents/>
    <StreamedFiles>
        <File Id="591978717" Language="SFX">
            <ShortName>bg.wav</ShortName>
            <Path>SFX\bg_9DD16F4E.wem</Path>
        </File>
        <File Id="877195020" Language="SFX">
            <ShortName>results.wav</ShortName>
            <Path>SFX\results_9DD16F4E.wem</Path>
        </File>
        <File Id="944623596" Language="SFX">
            <ShortName>MyMod-voice.wav</ShortName>
            <Path>SFX\MyMod-voice_9DD16F4E.wem</Path>
        </File>
    </StreamedFiles>
    <MediaFilesNotInAnyBank/>
    <SoundBanks>
        <SoundBank Id="2568786128" Language="SFX">
            <ShortName>MyMod_WC</ShortName>
            <Path>MyMod_WC.bnk</Path>
            <IncludedEvents>
                <Event Id="2115524966" Name="Play_MyMod"/>
                <Event Id="3892004756" Name="Play_MyModIntro"/>
                <Event Id="513597801" Name="Play_MyModResult"/>
                <Event Id="1036221836" Name="Stop_MyMod"/>
            </IncludedEvents>
            <ReferencedStreamedFiles>
                <File Id="285826149"/>
                <File Id="591978717"/>
                <File Id="877195020"/>
                <File Id="944623596"/>
            </ReferencedStreamedFiles>
        </SoundBank>
    </SoundBanks>
</SoundBanksInfo>


Spoiler MyModBanks.ini :

I remember to add an empty under the last block, but forum won't show it, so I just put a note there
INI:
[Global]

[Menu]

[InGame]
MyMod_WC.bnk

[2D]

[3D]

[FMV]
-- no text here, this is an empty line --


Spoiler MyMod.civ6proj :

XML:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Default</Configuration>
    <Name>...</Name>
    <Guid>...</Guid>
    <ProjectGuid>...</ProjectGuid>
    <ModVersion>1</ModVersion>
    <Teaser>...</Teaser>
    <Description>...</Description>
    <Authors>...</Authors>
    <SpecialThanks>...</SpecialThanks>
    <AffectsSavedGames>false</AffectsSavedGames>
    <SupportsSinglePlayer>true</SupportsSinglePlayer>
    <SupportsMultiplayer>true</SupportsMultiplayer>
    <SupportsHotSeat>true</SupportsHotSeat>
    <CompatibleVersions>1.2,2.0</CompatibleVersions>
    <AssociationData><![CDATA[<Associations>
  <Dependency type="Dlc" title="Expansion: Gathering Storm" id="4873eb62-8ccc-4574-b784-dda455e74e68" />
</Associations>]]></AssociationData>
    <AssemblyName>MyMod</AssemblyName>
    <RootNamespace>MyMod</RootNamespace>
    <InGameActionData><![CDATA[<InGameActions><ImportFiles id="MyModScripts"><File>DLC/Expansion2/UI/Additions/WorldCongressIntro.lua</File><File>DLC/Expansion2/UI/Additions/WorldCongressPopup.lua</File></ImportFiles><UpdateAudio id="MyModAudio"><File>Platforms/Windows/Audio/MyMod_WC.bnk</File><File>Platforms/Windows/Audio/MyMod_WC.txt</File><File>Platforms/Windows/Audio/MyMod_WC.xml</File><File>Platforms/Windows/Audio/MyModBanks.ini</File></UpdateAudio></InGameActions>]]></InGameActionData>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Default' ">
    <OutputPath>.</OutputPath>
  </PropertyGroup>
  <ItemGroup>
    <None Include="MyMod.Art.xml" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="DLC" />
    <Folder Include="DLC\Expansion2" />
    <Folder Include="DLC\Expansion2\UI" />
    <Folder Include="DLC\Expansion2\UI\Additions" />
    <Folder Include="Platforms\" />
    <Folder Include="Platforms\Windows\" />
    <Folder Include="Platforms\Windows\Audio\" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="DLC\Expansion2\UI\Additions\WorldCongressIntro.lua">
      <SubType>Content</SubType>
    </Content>
    <Content Include="DLC\Expansion2\UI\Additions\WorldCongressPopup.lua">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\285826149.wem">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\591978717.wem">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\877195020.wem">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\944623596.wem">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\MyModBanks.ini">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\MyMod_WC.bnk">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\MyMod_WC.txt">
      <SubType>Content</SubType>
    </Content>
    <Content Include="Platforms\Windows\Audio\MyMod_WC.xml">
      <SubType>Content</SubType>
    </Content>
  </ItemGroup>
  <Import Project="$(MSBuildLocalExtensionPath)Civ6.targets" />
</Project>



---

Extra question: is it ok that to replace a .lua file(ImportFiles in modbuddy) I need to create folders starting from game root (whether it ./Base/... or ./DLC/Expansion2/...) whereas to add my soundbank (UpdateAudio) all guides say to start from mod root (./Platform/... but not ./DLC/MyMod/Platform/...)? Anyway I tried both.
 
Last edited:
Back
Top Bottom