Speech Pack Installation Tutorial

 

A tutorial by Firestorm

 

Speech Pack Installation Tutorial A tutorial by Firestorm

The following instructions should enable to you to add new voice packs to your game. If you follow everything as described you should be able to choose new voices from the voice menu in the character creation screen of Freedom Force.

The first thing to do when you download any add-on for the game is to look for a readme text file included with the zip. It may provide answers to any questions you have.

For voice packs, you will need to add a few lines of code to a text file and add some minor information in the Freedom Force Editor.

It may be helpful to grab a pen and paper or open a blank text document on your computer.

When you download a voice pack, make sure any mp3 files included are unzipped to the Freedom Force\data\sounds\speech\english folder. If the preceding folders do not exist in your computer's Freedom Force directory, simply create a folder called "sounds" in your data folder. Then a folder called "speech" in the "sounds" folder and finally a folder called "english" in the "speech" folder. Again, make sure the mp3 files are put into the Freedom Force\data\sounds\speech\english folder.

There are a number of different actions that the game can play speech files for. The documentation for the editor describes them as such:

Let's look at Alchemiss' dynamic line 'peaches and cream'.

SPEECH_AL_ATTACK1_04, neutral, peaches and cream!

'Speech' tells the game this is a piece of speech. 'AL' is alchemiss' speech id. 'ATTACK1' tells the game what kind of line it is, while '_04' tells the game that this is the fourth attack line that Alchemiss possesses. 'Neutral' describes the default emotion, while the final sentence is the line itself. It is important to follow this convention precisely, since the game is hard-coded to look for speech in that format. There are several different kinds of dynamic speech events.

SPEECH CONTEXT

ALERT The character has spotted an enemy.

ATTACK1 The character initiates an attack

CANTINTEROGATE The character cannot interrogate a target because
enemies are still near (heroes only).

DEFEND1 The character activates an active defense.

DODGE The character dodges an attack.

FRUSTRATION The character cannot do whatever he's just been ordered to
do.

HYPNOSIS The character has been affected by a hypnosis attack.

INACTIVE The character has been standing idly, and has just gotten
bored (heroes only).

INTERROGATEME The character surrenders and is ready to be
interrogated.

KNOCKED OUT The character is knocked out.

MAJOR PAIN The character has just suffered a strong hit.

MENTALBLANK The character has been mental blanked.

PANIC The character has just entered the panic state.

RAGE The character has just entered the enraged state.

SELECT The character has just been selected as the active character
(heroes only)

Many people have named their mp3 files in a way so you can easily figure out what action it is for. Others may need to be played for you to find out what action they best suit.

The next step is to open the speech.txt file. It's usually found in the Freedom Force\data\Lang\English folder.

Looking through the existing lines of code in that document you will notice that they all follow a similar pattern. Scroll down the page until you see the first line that starts with SPEECH. It will probably look like this:

 SPEECH_AC_ALERT_01, speech\english\ACAL01.mp3

For any voice packs you would like to add to the game, all lines you must add should first start with ONE space and then the word SPEECH with an underscore.

The following two-digits pertain to the Speech ID for that character, which will be explained further below. The two-digit number 01, tells you that that is the first ALERT speech file for that action. The text following the comma is the path to the actual mp3 file.

Now let's say again for example that you downloaded a Hero X voice pack. One of the first things we should do is figure out a two-letter Speech ID for him. It is important to note that you should use a Speech ID that is not already used in the game. See the Characters portion of your Editor Documentation for a complete list of Speech ID's within the game. For Hero X, HX is not used by another character, so we may use it.

Assume for example that we know that looking through the mp3 files, that there are 3 ALERT sounds for the HeroX. Named HeroX_AL001.mp3, HeroX_AL002.mp3, and HeroX_AL003.mp3

Scrolling to the bottom of the speech.txt file we must add 3 lines of code to tell the game to play these files when Hero X spots an enemy.

They should be added like this:

 
 SPEECH_HX_ALERT_01, speech\english\HeroX_AL001.mp3
 SPEECH_HX_ALERT_02, speech\english\HeroX_AL002.mp3
 SPEECH_HX_ALERT_03, speech\english\HeroX_AL003.mp3

It is important to make sure that you have a space before every line. Notice also that the two-digit numbers change for every additional ALERT sound. Additional lines for ATTACK and other actions follow the same premise.

When you have added the code for all the mp3 files included within the voice pack, save and close the speech.txt file.

You will now need to open the Freedom Force Editor, also known as FFEdit found in the Start Menu -> Program Files -> Freedom Force -> FFEdit menu.

Go to the "Characters tab" in the editor.

If again, you are creating a voice pack for the Hero X, under "Character Details" and in the box for "Name" type Hero X. Otherwise type the name of a different character that you are adding a voice pack for. Don't worry about the strength, speed, etc. Next type in HX in the "Speech ID" box. Make sure the "Campaign Only" box does NOT have a checkmark in it. If you are creating a different character simply choose a 2-letter Speech ID for the character (it must match up the Speech ID within the code in the speech.txt file) and again, make sure your choice is not already used.

Scroll to the bottom of the page and click the "Save" button. You should now see the character you created pop up in the list of characters in the left-hand side of the screen.

Now, go to the "Options" tab in the editor. Scroll to the bottom of the page and click the "Generate Language Files" button.

A new window should pop up asking you to locate the speech.txt, captions.txt and strings.txt files. The are all found in your C:\Program Files\Irrational Games\Freedom Force\data\Lang\English folder if you installed to the default directory.

After a minute or two, you should receive either a "Success!" message or an error message if there was a problem.

If you got the "Success!" message you're all set and can run the game. In the game, click edit for the character you want to add a new voice from the Characters menu and under the voice lists, you should find a new entry with the name you saved in the editor.

Choosing this will enable you to hear his speech files during gameplay.

 


Freedom Force (TM) is a trademark of Irrational Games, LLC.