Welcome, Guest. To unlock the rest of the forums
please login or register.
Did you miss your activation email?

Author Topic: X_Voice for MUA1 PC - Community Version - With Instructions  (Read 1182 times)

Offline ak2yny
  • Marvel Modder
  • Astonishing Member
  • **********
  • Posts: 154
  • Upvotes: 10

What is X_Voice?
X_Voice is a soundset used for menu callouts and breaks. All characters and teams must have their menu voices in the X_Voice. That's the reason we want it up-to-date. Find more information on sounds and x_voice here.

What is New?
It's been shown that it is too complicated to keep it updated here, and too complicated for most to update it themselves. I (and others) have also noticed that the quality of the sounds decreases, if x_voice is updated again and again. This is the solution to all of this. Now, you can update x_voice yourself, without quality loss, and with relative ease.
This x_voice download is not a single file anymore. Build your x_voice with a double-click and move it to your game or mod folder.
[MUA installation folder]/sounds/eng/x /_
You need Python 3.8 or newer to build an x_voice.

- Latest x_voice.zss How to check date: Open link, click on three-dot-menu, then on "Details"
- Ceamonks890's Playable Mod Character Roster menu callouts - Frequently updated
- Nikita488's ZSND script Tutorial by Lags

The New X_Voice Guide

1. Prepare the files

Convert any sound files to WAV, mono, 22050hz (stop reading after step 2). You can use any program for this. Strip the WAV of the header. Various versions of Zsnd are able to do that directly, but we're building the x_voice directly, without conversion here (better quality for original sounds).
The quickest way to strip the header of WAV files is to add them in ZSM editor. Make sure to open or create a file in ZSM editor. Then go to the Files tab and add the WAVs by dropping them into the window. In the directory of zsmeditor.exe, there is a folder with the name of the open sound file and in it we can find the WAVs that are now stripped of the header.

Copy or move each file for x_voice to a sub-folder, located next to x_voice.json. To replace an existing sound, replace the appropriate file. It doesn’t matter how the folders are called. If existing folders or files are renamed, the changes need to be reflected in x_voice.json.

2. Prepare x_voice.json

This file dictates what sounds are included in x_voice. Never delete sounds by deleting the file only, but remove the file from x_voice.json.
X_voice.json can be opened with any text editor (eg. Notepad++).

The x_voice.json is divided into two main parts:

Top section (Hashes/Sound information):
The top part, named “sounds” (1), contains all game information.
The important part here is the hash (2), which the game uses to identify which sound it wants to play.
The structure is divided into blocks; let’s call them hash-blocks (3).
We also need to know what “sample_index” (4) is here for. Note that the index always starts at 0 (d).

If you want to add a sound, it’s easiest to copy another hash-block. To copy a full hash-block, start selecting after the comma (a) and select until the next comma (b). Then, make sure to insert after a comma (c).
If you want to add a sound information at the bottom, we’d have the comma at the wrong spot with this method. In this case, start selecting before the comma and select until before the next comma. Then, insert at the end, where the comma is missing (see in the picture below).

Bottom section (Samples/Files information):
The bottom part, named “samples” (1), contains all file information.
All information is important here. We need to use the correct format for the platform which is WAV (2) for PC. The format needs to be 106 (3), as we don’t know yet how to mix channels correctly for MUA PC (106 is WAV mono). Sample_rate (4) has to be 22050 therefore (44100 stereo mixed down to half/one channel).
The structure is divided into blocks; let’s call them file-blocks (5).
Zsnd gives us nice information about where it looks for the file, with sub-folder (6) and filename (7).

To add a sound, you can copy a file-block. The process is identical to copying a hash-block (a, b, c).

Possible (useful) actions:
Change hash information.
Change a file.
Add a file and hash.
Add a hash and link it to an existing file.

For all actions it’s important to have correct index numbers, as this is the only way to link the hash (the only information the game has) to the actual sound file. The index refers to the bottom part of x_voice.json (samples) where the first file-block (from the top down) is the sample-index 0. The second file-block is sample-index 1, etc. This part isn’t numbered and there is no other way to know what index they are, except counting from the top. This is why it’s best to add new sounds at the very bottom.
You could temporary remove all lines below the file-block, which you want to know the index number for, and count all occurrences of file. But subtract 1 from this number, because the index starts at 0.
To better find the correct file that is connected to a certain hash make sure to name the file similar or identical to the hash name.

Change hash information:
Luckily the hashes for x_voice are quite easy. There are only two types of voices inside: announce lines and break lines. There is also menu music inside, but the guide doesn’t cover this and I recommend leaving it unchanged.

Announce lines:
These are the names of the heroes that Fury (or another announcer) calls when we select them in CSS (Character Selection Screen). The hash always starts the same: "COMMON/MENUS/CHARACTER/AN_". Make sure to never use anything else for announces. It’s best to copy/paste a hash-block with an announce hash and go from there.

Break lines:
These are the lines which the heroes shout when we exit the CSS. Again, the hash always starts the same: "COMMON/MENUS/CHARACTER/BREAK_". Make sure to never use anything else for break lines. It’s best to copy/paste a hash-block with a break hash and go from there.

The only thing left to add to this part is the character name in capitals. The character name can be found in the herostat:

Make sure to always use “name” and not “charactername”. This is important if they’re not identical.
The full break hash for our example would be: "COMMON/MENUS/CHARACTER/BREAK_CANNONBALL".

A hero can only ever have one break and one announce hash. However, we can add more sounds to the same hash witch the game will randomize. For that we will have to adjust the hash by adding this: "/***RANDOM***/0". Note the “0” here. It is to tell the game that this hash is the first one. For the second file, we would add "/***RANDOM***/1", etc.
The full break hash for our example with multiple files, would be "COMMON/MENUS/CHARACTER/BREAK_CANNONBALL/***RANDOM***/0" for the first file.
The same can be done with the announce hash.

Change a file:
Simply change the filename (7 in the picture above). In our example we could rename "x_voiceVANILLA\\CAPMARVEL_BREAK2.wav" to "x_voiceVANILLA\\break_cannonball.wav", if we assume that we changed the hash accordingly.
We could also change "x_voiceVANILLA\\CAPMARVEL_BREAK2.wav" to "x_voiceVANILLA\\CAPMARVEL_BREAK21.wav" to use a new version of the file.
If we put the new/different file in another folder, but kept the name we would change the folder (6 in the picture above). So we could change "x_voiceVANILLA\\CAPMARVEL_BREAK2.wav" to "x_voiceNEW\\CAPMARVEL_BREAK2.wav" for example. We could also change both, folder and filename.
If the file is in a sub-folder of the sub-folder, we have to add this folder by adding it with the same pattern. Example: If we put ‘break_cannonball.wav’ in the folder ‘Cannonball’ inside sub-folder ‘x_voiceNEW’, the folder and filename would have to be "x_voiceNEW\\Cannonball\\break_cannonball.wav".

Add a file and hash:
As mentioned before, it’s easiest to add a file add the bottom, because of index numbers. Adding in other places will not be covered.
A new file usually requires a new hash, as we can only link one file (index) to each hash-block.

Copy a hash-block and rename (change) its hash. To use the same file as the copied hash-block, don’t do anything else (yes it’s possible to use multiple hashes for the same file). To use a new file, change the sample_index: Use a text editor that can count. Count (2) the occurrences of ‘"file":’ (1). You’ll always find one more than the highest index number, if x_voice.json is not corrupted. This is because the index starts at 0, but the counter starts at 1. Read the count number (3). This number is the sample_index of the new hash-block.

In our example, we would copy this
Code: [Select]

            "sample_index": 454,
            "flags": 31
paste it anywhere in x_voice.json, and change it to this
Code: [Select]

            "sample_index": 458,
            "flags": 31

Now, copy a file-block and change the file information. Change to folder and/or filename to where the new file is.
In our example, we would copy this
Code: [Select]
            "file": "x_voiceVANILLA\\CAPMARVEL_BREAK2.wav",
            "format": 106,
            "sample_rate": 22050
paste it at the end, and change it to this
Code: [Select]
            "file": "x_voiceNEW\\break_cannonball.wav",
            "format": 106,
            "sample_rate": 22050
Note that the filename and hash are identical. They could be similar too (e.g. hash = "COMMON/MENUS/CHARACTER/CANNONBALL_BREAK/***RANDOM***/0"). This, so we can easily find the linked hash-blocks and file-blocks.

Add a hash and link it to an existing file:
Copy a hash-block and rename (change) its hash. To use the same file as the copied hash-block, don’t do anything else. To use another existing file, count the index number and change sample_index accordingly.

3. Build x_voice.zss

When the files are in the correct places and x_voice.json is correctly built, double-click on “build_x_voice.bat”.
Check for possible error messages. They will tell if there’s an error in x_voice.json, or if a file is missing.
If everything is good, x_voice.zss will appear next to x_voice.json (press F5 if you don't see it).
To buld an x_voice with another name (e.g. x_voiceNEW.zss), drag the JSON file (e.g. x_voiceNEW.json) onto “build_x_voice.bat”.

Background Info:
Because we edit original files again and again in x_voice editing, I chose to create this tool with an old version of Zsnd, which allows editing without converting. This way, the original MUA and XML2 x_voice files stay unaltered from the original game files from 2005/2006, no matter how often we edit x_voice. This allows the best sound quality and best game experience.

  • Game developers in the voice, music, and sound compartments for XML, XML2, MUA, MUA2, and many other games
  • Voice talents, especially Ceamonks890, for providing callouts and break lines
  • Teancum, for tutorials and researching sounds
  • Winstrol, for making sound modding possible
  • nikita488, for Zsnd (what this package is built on)
  • nodoubt_jr, for the original x_voice
  • BLaw and fox456, for the latest official x_voice
  • UltraMegaMagnus (and Jaybird), for the latest unofficial x_voice
  • Anyone making character and/or sound mods
« Last Edit: September 06, 2021, 03:07pm by Outsider »