Custom Mercs
Introduction

Everybody picks his or her IMP-merc to suit their taste. Many people, however, would like to have more that one custom merc, but IMP only lets you go through the registration process once. That’s what this guide is for. I’ll take you step-by-step through the process of creating a new merc.

With a little work it’s possible to have as many custom mercs as you want. For this to work you have to replace AIM and MERC personnel.
You could also ‘move’ some of the new mercs from JA2:UB to JA2. This will enable you for instance to move Gaston from JA2:UB to the JA2 campaign you’re working on.
Replacing RPC’s is also possible, but changing the faces to work in the game is a laborious process, so I suggest you only replace those faces with faces of other RPC’s. For instance change JA RPC faces for JA2:UB RPC faces etc
Of course, if you are very talented and have the right software and equipment, it is possible to create completely new mercs (for example look at the B.A. Barraccus character created by Batman+link). You can create your own face files, record your own voices etc., but that goes beyond the scope of this guide.
For now we’ll only discuss shuffling around existing files to create a custom merc. Creating a merc means replacing mercs’ faces, voices, biography and statistics.
The easiest way to create a new merc is to use the faces normally reserved for your custom IMP merc.

If you come across some term you don’t understand, just read on through the whole guide, most likely it’s explained somewhere.

The process is relatively simple: think up a new merc (statistics, face, voice, biography) and replace an existing merc with this new merc by editing the various files associated with this merc.
As an example I’ll use a new custom merc (Domino) to replace Red. Domino’s face-files are named 214, her voice-files are named 054. Red’s files are named 011. Read on for an explanation of these numbers. For your own custom you’ll replace these numbers for the numbers of the mercs you choose.
In the example I’ll use JA2 and assume you have installed JA2 in the following folder: ‘C:\JA2’. This process can also be used for JA2:UB. I’ll also point to some additional step you need to take when you move a JA2:UB character to JA2.

Merc numbers

First off: you’ll have to understand that in JA2 and JA2:UB all mercs are referred by the game internally by use of numbers. Each merc has his own number. To find the number of the merc to use you have to look them up in Proedit. Red has number 11. All files associated with Red (face, voice etc.) are referred to with this number.
For picking Domino’s face I use STIview to look at the faces available. The faces are stored in the Faces.slf file. For Domino I choose face 214 (IMP female 7).
Note: IMP mercs are referred in ProEdit by their voices (51-56 in JA2, 51-57 in JA2:UB). The faces are numbered 200-215.

Note: this process requires a lot of harddisk space.

Tools needed:

- JA2GDE by …. (available from Freelancer)
- ProEdit by Sir-tech (available from the downloads page)
- STIview by …. (available from ….)
- JA2EDT or JA2BE by Linx (available from LotB)
- Graphics editor of your choice

Files needed:

Files needed (all files are in the ‘JA2\data\’ folder if you choose the maximum install, if you choose another installation option some files still are on the cd):
Faces.slf
Speech.slf
Battlesnds.slf
Binarydata.slf
Mercedt.slf

Copy all the nessecary files and programs to the following folder: ‘C:\JA2\Custom’. You may also keep the tools and files in their original folder, but having them all in one place is the easiest way, especially if you’re unfamiliar with DOS commands.

Step 1. Creating the folder structure needed
Create the following subfolders in your ‘C:\JA2\Data’ folder:
- BinaryData
- Speech
- BattleSNDS
- MercEdt
- Faces
- Faces\33FACE (subfolder of Faces)
- Faces\65FACE (subfolder of Faces)
- Faces\Bigfaces (subfolder of Faces)
Step 2. Face files

Face files are divided into several groups. RPC’s, AIM, MERC and IMP mercs have 4 face-files.
For the faces to be usable as new mercs they have to have the following faces available:
- xxx.sti
- bigfaces_xxx.sti
- 65face_xxx.sti
- 33face_xxx.sti
Where ‘xxx’ is the number of the merc.
For Domino this would mean 214.sti, bigfaces_214.sti, 65face_214.sti and 33face_214.sti.
To extract these faces from ‘Faces.slf’ you’ll have to use JA2GDE. Go to a windows command prompt. In the command prompt go to the ‘C:\JA2\Custom’ folder and type “JA2GDE Faces.slf 214 –n”. This creates the 4 new face-files mentioned above. To have these faces replace the face of Red you’ll have to rename these faces (replace 214 with 11 in the filename).
Move the following files to the following folders and if necessary rename them:
Move ‘11.sti’ to ‘C:\JA2\Data\Faces’
Move ‘bigfaces_11.sti’ to ‘C:\JA2\Data\Faces\Bigfaces’ and rename to ’11.sti’
Move ‘33face_11.sti’ to ‘C:\JA2\Data\Faces\Faces\33FACE’ and rename to ’11.sti’
Move ‘65face_xxx.sti’ to ‘C:\JA2\Data\Faces Faces\65FACE’ and rename to ’11.sti’
The faces of Domino are now available.

Use STIview and open the ‘11.sti’ file. Under the options menu, select the ‘All pages in one’ option. You’ll notice the complete sti-file contains multiple bmp-files, like a zip-file. The first picture is the complete face; the next 7 pictures are used for the in-game animations (blinking eyes, speaking etc.), 4 for the eye-movements, and 3 for the mouth. Save the file as ‘C:\JA2\custom\domino.bmp’.
Open the ‘domino.bmp’ file in the standard Windows Paint program and click file -> save. Exit Paint. This is done because some graphics programs otherwise don’t display the picture or the colors correctly.
Now open the same picture in the graphics program of your choice. If you don’t have one, download PaintShop Pro from one the numerous download-sites (Tucows, ZDNet etc.). I’ll assume you use PaintShop Pro from now on. Some functions may have different names, depending on the graphics program you use, but you should be able to figure them out.
Use the selection tool and select one of the eye-pictures. Position it over the face-picture so that it makes a complete picture. Now count the pixels from the top-left part of the face to the pixel just 1 left and up from the eye-picture and do the same for the mouth-picture. What you need to measure is the gap. See the picture below to see exactly what you need to measure.
For Domino these values are: eyes: 8,5; mouth: 7,24.
You’ll need these values later on.
Close the Graphics program, we’ll delete the redundant files (like ‘domino.bmp’) later.

Note: face-files don’t all have the “0” in front of them, so Red isn’t “011”, he is “11”. The “0” is only used in mercs who a 1-digit number (for instance Barry is “01”).

Step 3. Voice files

For the voice files the same rules apply for them to be usable as a custom as for faces. This means not all voices in the game are usable. For example NPC’s don’t have comment for an encounter with enemies. They only have voice-files for a few standard responses. They’re therefore not suitable for use as custom voices. For custom voices to be suitable they’ll have to have voice-files in ‘Speech.slf’ and ‘BattleSNDS.slf’. RPC’s AIM, MERC and IMP mercs all have most of the necessary faces.

All voice files are named xxx_yyyy.wav. In this ‘xxx’ is the merc number, ‘yyy’ is the ‘filename’.
All the ‘yyy’ numbers are the same for all mercs.
In ‘Speech.slf’ ‘yyy’ are really numbers.
RPC’s, MERC and IMP mercs numbers go to 78, AIM mercs numbers go to 116, where numbers 79 – 116 mainly concern contracts. These files contain comments (“you want one week or more?”), whether they’ll work for you (“you have Mr.X on your team, I hate him”, “I like working with MR.Y” – you get the idea), if their salary has increased etc.
In ‘Battlesnds.slf’ ‘yyy’ is pretty self explanatory as they are named for the circumstances the voice will be used.
All voice-files have a corresponding *.gap file. This file controls the mouth movements of your mercs when they talk in the game.

To extract the voice-files from ‘Speech.slf’ type in the command prompt window (still in the ‘C:\JA2\Custom’ folder) “JA2GDE Speech.slf 054 –n”. This extract the necessary voice-files. Rename all the voice-files and *.gap-files from ‘054_yyy.*’ to ‘011_yyy.*’.

While we’re still in the command prompt window we’ll also extract the subtitle-file. This is the file that contains the text of the voice files that are displayed when you have subtitles in the game turned on. Type “JA2GDE MercEdt.slf 054 –n”. This extracts the ‘054.edt’-file. Move this file to the ‘C:\JA2\Data\MercEdt’ folder.

If you intend your custom to replace an AIM merc (like Red) you’ll need additional files concerning contracts. MERC-mercs and RPC’s don’t use these files as RPC’s stay the same price throughout the game, and MERC handles it’s contract via e-mail.
To create these files you have 2 options:
1: choose a suitable text fragment and copy it to a new voice-file (for example the laughing voice-file for the “you don’t have enough money”-comment)
2: create empty voice-files (the easiest way): make a new, empty, text document and rename it to ‘xxx_yyy.*’.
When you want to move a JA2:UB to a game involving bugs, you’ll encounter problems as none of the JA2:UB mercs have voice-files for meeting bugs. You’ll have to solve these in the same way as you did the contract issues (new or suitable voice-files). An easy way to solve this problem is to replace bug-encounter-speeches with those for normal enemy-encounter-speeches. You’ll have to be a little creative with other speeches referring to bugs (“smells like bugs were just here” etc.).

For a list of what voice-files are used in which occasion check the voice list.

Note: it’s also possible to create new subtitles to use with any new voice-files you created. You’ll have to use Linx’ JA2EDT program and open the ‘xxx.edt’-file, where “xxx” again stands for the merc’s number (in Domino’s case: ‘054.edt’).
When opening the file, you’ll see a list of the text-files used when subtitling is turned on in the game. Edit the text you want to change.

Step 4. Creating the biography
To change the biography of your merc you’ll have to use either Linx’ JA2BE (Biography Editor, capable of changing biography only) or Linx’ JA2EDT (capable of editing all *.edt files, including biographies). I’ll assume you’re using JA2EDT.
First we’ll need to extract necessary files. In the command prompt type “JA2GDE binarydata.slf –all”. This extracts all files from ‘binarydata.slf’.
Start JA2EDT and open the biography file ‘AIMbios.edt’ (if you want to change MERC personnel you’ll have to use the ‘MERCbios.edt’-file). Search for Red (nr. 11 remember?) and change his biography to the biography of Domino (think up something exciting ;-).
Save, exit JA2EDT and move ‘AIMbios.edt’ to ‘C:\Data\BinaryData’.
Step 5. Using ProEdit

ProEdit is a small editor included (but hidden) in JA2:UB. It is used to change mercs’ statistics, etc. The program is easy to use and, but if you don’t understand some of the values, read the readme I made as part of the ProEdit download package from the downloads page.

Find Red in the list (nr. 11) and change him into Domino. Change his nickname (Red) to the new nickname (Domino), set her statistics (health, marksmanship etc.), change the salary to an appropriate amount and basically, make a new merc.
One of the important parts of the program is under the ‘System Info’ section. Here you set the in-game appearance of the new merc. In the case of Domino, change the body type to ‘Reg female’ and the hair color to ‘Redhead’. You’ll have noticed the ‘Eyes X,Y’ and ‘Mouth X,Y’ fields.
These control the position of the eye and mouth pictures. Remember the gaps we measured in the Face-files section? These are the values you’ll have to enter.

See the readme-file for the other values.

Take care when you set the ‘likes’ and ‘hates’ values. The necessary voice-files may not exist, resulting in errors while playing the game. To solve this, either set all likes/dislikes about your new custom and who your custom likes/dislikes to ‘nobody’ or replace the likes/dislikes voice-files with 0-byte voice-files or suitable comments (see voice-files).

A piece of advice: don’t max out your custom mercs’ stats. This will make the game very unbalanced and too easy, not much fun. I advise you to use an existing mercs’ stats and just shuffle the around. Also pay attention to the salary. Choose this realistically. Don’t make a merc with Gus’ stats and give him the salary of Bull. Again, this makes it unfair and too easy.

Step 6. Cleanup:

Now you’re finished. If all goes well (and it should if you followed all the steps above) you’ll now be able to hire Domino from the AIM website.
All that’s left to do is to delete all the files that are left behind. To do this, simply delete the ‘C:\JA2\Custom’ folder. And to really free up the space, empty the Windows Recycle Bin ;-).

Notes:

For those of you unfamiliar with DOS (= command prompt window) here are the commands to use:
To change between drives (i.e. go from C-disk to D-disk) type: [driveletter]: <press enter>
Go up 1 folder type: cd .. <press enter>
To go to a folder type: cd [foldername] <press enter>
To rename files type: ren [original filename] [new filename] <press enter>. You can use wildcards like “ren 054_*.* 011_*.*” to rename all voice-files at once)

Custom NPC’s

For NPC’s and RPC’s you’ll have to take some additional steps. This mostly concerns extra files.
These files are used when you talk to them in the game.
Use the steps described above to extract these files.
NPC and RPC face-file. All of them have 1 extra face-file, named Bxxx.sti. You’ll need to extract this file from ‘Faces.slf’ and place it in the C:\JA2\Data\Faces’ folder.
NPC and RPC voice-files. These are stored in ‘NPC_speech.slf’. Exctract them in the same way as you did extracting all the other voice-files. These need to be placed in the “C:\JA2\Data\NPC_Speech” folder.
NPC and RPC scripts: NPC’s react in certain ways to the way you talk to them, when you give them an item, etc. These actions are stored in a scriptfile named ‘xxx.edt’. You’ll need to extract this file from ‘NPCData.slf’. For more information about these scripts, check out Snap’s posts on the LotB forum.
Again, the easiest way to replace RPC's it to use files from other RPC's.