Jump to content
You need to play a total of 5 battles to post in this section.
Aessaya

[Tutorial] [0.7.10] Sound mod 101 (now with bonus tool)

20 comments in this topic

Recommended Posts

174
[IXM]
Members
187 posts
4,288 battles

This tutorial is aimed mostly at people who already have some experience with creating mods for WoWS client but are stumped by the changes released in the most recent 0.6.13 patch. So, what gives?

Quote

While still not officially supported, we’ve improved the functionality of player-created sound mods -- a control.xml file is created for each mod, which contains paths to all that mod's files.

A single quizzical (and ultimately useless) line blurb about something that pretty much turned the sound mods upside their heads. Moreover, whoever translated this from Russian patch notes introduced a mistake. It's not "a control.xml file", it is supposed to read "a control(ler) XML file". Subtle but big difference. Especially since the file is supposed to be named mod.xml. Which we only find out after digging around the clients packed files.

So what actually happened? Well, those familiar with sound mod structure before 0.6.13 will know that the audio files were organized into a strict but complex directory which described what file is supposed to be played for what event (voice and sfx included). The structure worked, but was a fair bit of a pain to maintain, because folders typically were two-three levels deep and contained just a handful of files per folder on the deepest level. For example, Mermaid's Wrath for 0.6.12 client contained 646 files in 328 folders. That's on average about 1 folder per 2 files. Yikes! In 0.6.13 Wargaming moved away from the folder structure (thank gods), and decided to have an XML file to keep check of which file goes where. XML is a pretty simple and straightforward format, which most people related to programming in one way or another should be well familiar with. And now the sound files ended up all lumped into one directory, with the XML file telling client what it needs to do with them. without this XML file the mod is useless.

The XML file looks roughly like this:

<?xml version="1.0"?>
<AudioModification.xml>
    <AudioModification>
        <Name>EN</Name>
        <ExternalEvent>
            <Name>Play_GoodHit</Name>
            <Container>
                <Name>Voice</Name>
                <ExternalId>VGoodHit</ExternalId>
                <Path>
                    <StateList/>
                    <FilesList>
                        <File>
                            <Name>En_Speech_Hit_Confirmation_1.wem</Name>
                        </File>
                        <File>
                            <Name>En_Speech_Hit_Confirmation_2.wem</Name>
                        </File>
                        <File>
                            <Name>En_Speech_Hit_Confirmation_3.wem</Name>
                        </File>
                        <File>
                            <Name>En_Speech_Hit_Confirmation_4.wem</Name>
                        </File>
                        <File>
                            <Name>En_Speech_Hit_Confirmation_5.wem</Name>
                        </File>
                    </FilesList>
                </Path>
            </Container>
        </ExternalEvent>
        <ExternalEvent>
            <Name>Play_Last_Hope</Name>
            <Container>
                <Name>Voice</Name>
                <ExternalId>VLast_Hope</ExternalId>
                <Path>
                    <StateList/>
                    <FilesList>
                        <File>
                            <Name>En_Speech_Last_Hope_1.wem</Name>
                        </File>
                        <File>
                            <Name>En_Speech_Last_Hope_2.wem</Name>
                        </File>
                    </FilesList>
                </Path>
            </Container>
        </ExternalEvent>
    </AudioModification>
</AudioModification.xml>

I've taken liberty and shortened it up for you to two elements, but you get the structure. It's reminiscent of the folder structure before, with top level directory entries residing in <ExternalEvent> containers, which sports description of what event it is associated with, sound type (Voice or SFX, in the <Name> tag inside the <Container> tag that resides in the <ExternalEvent>. The <ExternalId> tag describes the specific event type, which roughly corresponds to the second-level folder name "VGoodHit" would be the "GoodHit" folder, and so on. The "V" part signifies that it's Voice type. "S" would be for SFX, I'll get to that part later.

Below the two descriptor tags we have the main containers, corresponding to the third level directories in the old folder structures (where applicable, some events did not have this), the <Path> tag. Some events (like "Torpedo_Danger") can have multiple <Path> elements, one for each direction, as it was the case in old folders. <Path> itself contains two final containers: <StateList> and <FilesList>. <FilesList> is pretty much self-explanatory, these are the files associated with particular event and state, each sitting in its own <File> wrapper with filename under <Name> element. <StateList> element, however, is a fair bit more tricky. It can be empty (but it must be present, otherwise the mod will fail) if there are no special conditions, and if there are, it will contain them, one condition per <State> flag.

Some <Path> elements can contain multiple conditions, such as, for example, plane squadron IDs:


                <Path>
                    <StateList>
                        <State>
                            <Name>Plane_Type</Name>
                            <Value>Torpedo</Value>
                        </State>
                        <State>
                            <Name>PlaneID</Name>
                            <Value>id5</Value>
                        </State>
                    </StateList>
                    <FilesList>
                        <File>
                            <Name>En_Speech_Pilots_Torpedo_ID_5.wem</Name>
                        </File>
                    </FilesList>
                </Path>

In order for the event to play, all the conditions must be matched. So it's a logical AND. There can also be special conditions, such as crew member names for voiceovers specific to special captains (the ARP/HSF ones, Steven Seagal, etc.).

One special note on the <File> element, the <Name> can contain relative path to a file in a subdirectory relative to the mod.xml or the mod's root directory. Path separator should be "/" (forward slash).

Omitting a specific <ExternalId> and/or <State> for an event will result in default voiceover/sound playing for it. If an event is specified, but none of the files provided are found in the directory, default sound will be played.

 

I know some modders embraced this similarity between the XML structure and folder structure in order to make tools for automatic mod.xml file generation. But I, personally, embraced the ability to not have gazillion of folders inside and reorganized Mermaid's Wrath into a much more handleable directory structure. I've also made a tool of my own to facilitate ease of editing the mod.xml, which I intend to release a bit later once I have it polished up.

 

And finally, Wargaming was nice to include a special descriptor mod.xml file in the client's res/banks folder on the main path, and this file appears to have all of the moddable event names and external IDs, which also includes a lot of SFX events as well, so this tutorial may prove useful for the SFX modders out there as well, who are willing to experiment with these. I'll likely include this functionality in my tool at some point if there's any demand for it. Unfortunately, the event descriptors are all in Russian.

 

Of course, the launch didn't go without its fair share of problems, since the client turned out to be very fickle about the leftover paths, and XML files specifically. Caveats to be aware of:

  • For example, a malformed or wrongly placed (or even non-existant one) mod.xml can easily break not only player mods, but also Wargaming's official voiceovers, such as ARP captain voices. If it is, you can try this workaround first if that happened to your client.
  • The client expects the file to be in ANSI encoding. If you try to feed it a file encoded in UTF-8 with BOM, it'll fail silently.
  • Apparently the much vaunted mp3 support for sound mods is broken, so we're all stuck with the proprietary WEM format for now. MP3 files are recognized, but never play.

 

0.6.14 changes

0.6.14 has landed! So far no major changes have been spotted. Default languages mod.xml has finally regained parts for module activation/deactivation voiceovers, and that's about it. Looks like the new OP does not have any exposed voice over lines, or any voice overs for that matter.

0.7.0-0.7.2 changes

0.7.0 saw a random disappearance of all Operations tasks voiceovers. Luckily they returned soon in 0.7.1. And as for 0.7.1.1 I have noticed some new voiceover options in the mod.xml, namely some game mode and class specific tips. Stand by for more information on that one!

0.7.2-0.7.5 changes

Nothing much happened since last update. The aforementioned game/class tips are still suspiciously absent from being triggered by the client, so no additional info on them so far. Even though the lines are present in default language mod.xml files, at least for Russian and English languages, haven't checked the rest.

0.7.6-0.7.7 changes

Starting from 0.7.6 the battle end condition lines found for some HSF captains are now being triggered for all mods who have them set up, so that's some news for you. Here's a code fragment for those wanting to introduce their own lines in their mods for all captains:

Spoiler

 



        <ExternalEvent>
            <Name>Play_Result</Name>
            <Container>
                <Name>Voice</Name>
                <ExternalId>VResult</ExternalId>
                <Path>
                    <StateList>
                        <State>
                            <Name>Result</Name>
                            <Value>Lose</Value>
                        </State>
                    </StateList>
                    <FilesList>
                        <File>
                            <Name>Combat/Defeat_1.wem</Name>
                        </File>
                        <File>
                            <Name>Combat/Defeat_2.wem</Name>
                        </File>
                        <File>
                            <Name>Combat/Defeat_3.wem</Name>
                        </File>
                    </FilesList>
                </Path>
                <Path>
                    <StateList>
                        <State>
                            <Name>Result</Name>
                            <Value>Win</Value>
                        </State>
                    </StateList>
                    <FilesList>
                        <File>
                            <Name>Combat/Victory_1.wem</Name>
                        </File>
                        <File>
                            <Name>Combat/Victory_2.wem</Name>
                        </File>
                        <File>
                            <Name>Combat/Victory_3.wem</Name>
                        </File>
                    </FilesList>
                </Path>
                <Path>
                    <StateList>
                        <State>
                            <Name>Result</Name>
                            <Value>Draw</Value>
                        </State>
                    </StateList>
                    <FilesList>
                        <File>
                            <Name>Combat/Draw_1.wem</Name>
                        </File>
                        <File>
                            <Name>Combat/Draw_2.wem</Name>
                        </File>
                        <File>
                            <Name>Combat/Draw_3.wem</Name>
                        </File>
                    </FilesList>
                </Path>
            </Container>
        </ExternalEvent>

 

As of 0.7.10 the main battery fire, torpedo fire, and torpedo hit audio cues are working with all captains, so feel free to use:

Spoiler


        <ExternalEvent>
            <Name>Play_MGshot</Name>
            <Container>
                <Name>Voice</Name>
                <ExternalId>VMGshot</ExternalId>
                <Path>
                    <StateList />
                    <FilesList>
                        <File>
                            <Name>SoundOfSilence.wem</Name>
                        </File>
                    </FilesList>
                </Path>
            </Container>
        </ExternalEvent>
        <ExternalEvent>
            <Name>Play_TAshot</Name>
            <Container>
                <Name>Voice</Name>
                <ExternalId>VTAshot</ExternalId>
                <Path>
                    <StateList />
                    <FilesList>
                        <File>
                            <Name>SoundOfSilence.wem</Name>
                        </File>
                    </FilesList>
                </Path>
            </Container>
        </ExternalEvent>
        <ExternalEvent>
            <Name>Play_TorpedoHit</Name>
            <Container>
                <Name>Voice</Name>
                <ExternalId>VTorpedoHit</ExternalId>
                <Path>
                    <StateList />
                    <FilesList>
                        <File>
                            <Name>SoundOfSilence.wem</Name>
                        </File>
                    </FilesList>
                </Path>
            </Container>
        </ExternalEvent>

 

There have also been another audio cue spotted out in the wild, and appears to be working on 0.7.10, the player ship destroyed audio bit:

Spoiler

 


        <ExternalEvent>
            <Name>Play_Death</Name>
            <Container>
                <Name>Voice</Name>
                <ExternalId>VDeath</ExternalId>
                <Path>
                    <StateList />
                    <FilesList>
                        <File>
                            <Name>Combat/En_Speech_Ship_Destroyed_1.wem</Name>
                        </File>
                    </FilesList>
                </Path>
            </Container>
        </ExternalEvent>

Some extra linkages:

 

Feel free to ask and suggest what I should add to this tutorial.

Edited by Aessaya
0.7.10 update
  • Cool 2

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles

Allrighty, I believe it's time to make my tool public. Assuming there's still interest in it from people. It's still pretty barebones, but it has everything I need for now. I'll update it over time given public interest and my own needs.

5a1c95d312c77_mainwindow.thumb.png.fc79ff5d32659a3388cf17260c586e2a.png

Usage guide:

  1. Download and extract the attached .rar file. It's a windows executable compiled against .NET framework v4.0, so should work on any modern Windows machine (may or may not work under windows emulators, YMMV).
  2. Launch and load mod.xml file either using the default (attached for EN language from 0.6.13.1 release) or your custom one.
  3. On the right hand is the event/state tree. You can set mod's name there by editing the root element (two single clicks).
  4. Select the state you want to edit (<DefaultState> means there are no specific states for this event), a list of associated files will appear on the right part.
  5. You can clear them all or remove specific file by selecting and rightclicking.
  6. Add files from dragging and dropping them from your file manager program into the righthand menu when file list is displayed.
    • File list will honor relative paths as long as they are in the same folder or in sub-folder of the loaded mod.xml file.
  7. Drop Mode menu defines the behaviour of the program when new files are dropped into the right hand panel
    •  Add mode will add them to existing ones.
    • Replace mode will clear out the list and replace it with the files being dropped.
  8. Save the file.

 

This is the same tool I used to generate the mod.xml file for the Mermaid's Wrath mod, so it is known to be working. Unless you find a bug, in which case you should report it here!

 

Download it by clicking the linky below!

 

WoWS VO Mod XML Editor.rar

Edited by Aessaya
Updated for 0.7.1.1
  • Cool 4

Share this post


Link to post
Share on other sites
3
[B-W-M]
Members
21 posts
4,926 battles

Thank you, I am fairly dumb when it comes to computer programming or application modding but for the most part, I could understand what you said. I am, for my own personal enjoyment, attempting to "modernize" a sound mod that was sadly left out in the cold as of 0.6.13. Much appreciated.

( I mean no disrespect, just that you presented your information in a very clear manner.) 

Edited by Angry_Dalek
Clarity

Share this post


Link to post
Share on other sites
3
[B-W-M]
Members
21 posts
4,926 battles

" And finally, Wargaming was nice to include a special descriptor mod.xml file in the client's res/banks folder on the main path, and this file appears to have all of the moddable event names and external IDs, which also includes a lot of SFX events as well, so this tutorial may prove useful for the SFX modders out there as well, who are willing to experiment with these. I'll likely include this functionality in my tool at some point if there's any demand for it. Unfortunately, the event descriptors are all in Russian. "

Did you ever decide to include this feature in your tool? Will SFX mods not work if the standard XML is generated? 

Share this post


Link to post
Share on other sites
4,620
[ERN]
[ERN]
Modder, Alpha Tester, In AlfaTesters, Beta Testers
10,150 posts
4,400 battles
On 2/19/2018 at 12:07 AM, Angry_Dalek said:

" And finally, Wargaming was nice to include a special descriptor mod.xml file in the client's res/banks folder on the main path, and this file appears to have all of the moddable event names and external IDs, which also includes a lot of SFX events as well, so this tutorial may prove useful for the SFX modders out there as well, who are willing to experiment with these. I'll likely include this functionality in my tool at some point if there's any demand for it. Unfortunately, the event descriptors are all in Russian. "

Did you ever decide to include this feature in your tool? Will SFX mods not work if the standard XML is generated? 

yes it will work, try this

 

  • Cool 1

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles

Hey all, thanks for the interest in the tool/tutorial, and sorry for the late reply. I've kinda fallen off the grid lately, have a lot of other stuff going on, so the tool has been put back waaaaay down the list.

On 2/19/2018 at 8:07 AM, Angry_Dalek said:

" And finally, Wargaming was nice to include a special descriptor mod.xml file in the client's res/banks folder on the main path, and this file appears to have all of the moddable event names and external IDs, which also includes a lot of SFX events as well, so this tutorial may prove useful for the SFX modders out there as well, who are willing to experiment with these. I'll likely include this functionality in my tool at some point if there's any demand for it. Unfortunately, the event descriptors are all in Russian. "

Did you ever decide to include this feature in your tool? Will SFX mods not work if the standard XML is generated? 

Well, it's still "out there". The standard XML is just for voices so it should not affect SFX mods in any way.

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles
On 2/16/2018 at 1:15 AM, Angry_Dalek said:

Thank you, I am fairly dumb when it comes to computer programming or application modding but for the most part, I could understand what you said. I am, for my own personal enjoyment, attempting to "modernize" a sound mod that was sadly left out in the cold as of 0.6.13. Much appreciated.

( I mean no disrespect, just that you presented your information in a very clear manner.) 

You're welcome!

On 2/16/2018 at 4:57 PM, Fan_for_SebVettel said:

How to make music as torpedo warning?

You'll have to convert the audio clip from WAV to WEM, as per the sound conversion tutorial linky found in my main post, and then replace the VTorpedo_Danger files with your own! Then pack everything and put into res_mods\banks\yourmodnamehere. Voila!

  • Cool 1

Share this post


Link to post
Share on other sites
Members
5 posts
7 battles

I'm sorry however the link of the post about coverting MP3s to WEM is lost, it comes to the error notice: page not found.

Shall I register a russian realm account to confirm it?

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles
9 hours ago, EpisodeSane said:

I'm sorry however the link of the post about coverting MP3s to WEM is lost, it comes to the error notice: page not found.

Shall I register a russian realm account to confirm it?

It would appear the original guide has been removed. My guess is they are trying to get us to use the sound mod creator thingy. Anyway, I've found a mirrored guide in English on this very forum (shock horror), so I put that one instead. thanks for bringing this to my attention!

  • Cool 1

Share this post


Link to post
Share on other sites
1,336
[NDA]
[NDA]
Supertester
6,191 posts
4,869 battles

I'll have to give this a try since I've been using such an old version of something like this I think it's what broke my squadron numbers on carrier voices.

Maybe not the best place to ask, but do the special voices, ie: Arpeggio, HSF, still work like the default National Voice+ after making a custom mod with this tool?

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles
On 5/29/2018 at 7:30 PM, Jinxed_Katajainen said:

I'll have to give this a try since I've been using such an old version of something like this I think it's what broke my squadron numbers on carrier voices.

Maybe not the best place to ask, but do the special voices, ie: Arpeggio, HSF, still work like the default National Voice+ after making a custom mod with this tool?

No, unfortunately ATM any custom voice mod will break ARP/HSF voiceovers, unless the mod itself has been built to include those voices in its mod.xml. My guess is because ARP/HSF voices are treated as VO mod internally, so any custom VO mod will override that one.

Also sorry for late reply, I haven't been around much lately.

Share this post


Link to post
Share on other sites
4,444
[SOUP]
Beta Testers, In AlfaTesters
7,749 posts
36 minutes ago, Aessaya said:

I haven't been around much lately.

 

:Smile_hiding:

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles
Just now, Chobittsu said:

:Smile_hiding:

Shhh. While that may have contributed, it's not the main problem :)

Share this post


Link to post
Share on other sites
1,336
[NDA]
[NDA]
Supertester
6,191 posts
4,869 battles
22 hours ago, Aessaya said:

No, unfortunately ATM any custom voice mod will break ARP/HSF voiceovers, unless the mod itself has been built to include those voices in its mod.xml. My guess is because ARP/HSF voices are treated as VO mod internally, so any custom VO mod will override that one.

Also sorry for late reply, I haven't been around much lately.

I was afraid of that.  Thank for the answer =)

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles
On 6/3/2018 at 1:16 AM, Jinxed_Katajainen said:

I was afraid of that.  Thank for the answer =)

You're welcome! I'll post in here if anything changes.

Share this post


Link to post
Share on other sites
1,336
[NDA]
[NDA]
Supertester
6,191 posts
4,869 battles
On 6/4/2018 at 10:46 AM, Aessaya said:

You're welcome! I'll post in here if anything changes.

Looks like they fixed the issue with 7.6.
With my own voice mod selected, but using the HSF captains, the HSF voices are playing.


Edit: Nevermind, they didn't...  If there's any events I don't have set in my personal mod and the HSF captains do, then those will play, but otherwise it's the personal mod.

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles
4 hours ago, Jinxed_Katajainen said:

Looks like they fixed the issue with 7.6.
With my own voice mod selected, but using the HSF captains, the HSF voices are playing.


Edit: Nevermind, they didn't...  If there's any events I don't have set in my personal mod and the HSF captains do, then those will play, but otherwise it's the personal mod.

Yeah, that's about what my own experience says. Looks like for now you'll have to put empty structures for the unused events.

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles

Updated the first post with some findings for 0.7.6 and 0.7.7.

@Jinxed_Katajainen you might be interested in giving the new two code snippets a read. I've tried empty structures but the client did not agree with it, so I've put a blank sound in it. While I cannot 100% confirm it worked, from what I had tested in training room with Nelson, it appears to be working. Currently about 85% sure it works :)

Share this post


Link to post
Share on other sites
174
[IXM]
Members
187 posts
4,288 battles

Updates on a few changes: main battery fire, torpedo launch, torpedo hit audio cues are 100% working, but WG has decreased the frequency the main battery fire audio is triggered. There's also audio cue for player's ship destruction, and hydro/radar activation/deactivation, but some of latter are not 100% working.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×