Back to Mechstorm.

Mechstorm's Complete Map Making Tutorial or MCM for Short. Covering Mechwarrior4, Mechwarrior4:BK and Mechwarrior4:Mercs. If you have any questions feel free to drop by our Mechstorm Editor/Scripting help Forum after you have registered on our forums.

Back to MCM Menu

Updated April 26 2005

Append Tutorial

First and foremost, you must READ THE INSTRUCTIONS THAT COME WITH THE APPEND TOOL. They are quite comprehensive, and cover almost all the info you’ll need to use it. This guide is meant as supplementary info to the docs Jeho wrote. While I do a quick and dirty job of getting you set up, I won’t be repeating other info in the append tool documentation.

Setup
1) Set up a directory anywhere on your hard-drive. The name and location of it doesn’t really matter, although since the append tool is a DOS program, you’ll probably want to keep the path short since you’ll be typing in the full path every-time you run it. So pick something easy, i.e., C:\append_tool. For those of you not familiar with DOS, this means there is a folder named append_tool in the C drive root folder. For this tutorial, I’ll use the C:\append_tool path and folder.

NOTE: DOS file names cannot have multiple words separated by spaces between them, such as My Map. You would have to name it mymap, or my_map. Also, DOS doesn’t like symbols such as “,”!?, etc. Don’t use any punctuation or ‘special’ symbols. Keep it simple and use letters or number. The underscore _ is the most common way of joining 2 separate names together, as in my_map. Remember this when creating your Mechwarrior mission with the editor. If you don’t follow these instructions, you will not be able to append anything to your mission!

2) Into your append_tool folder, you need to place the mw4append.exe, a folder called mods.files, and a file names mods.manifest. To create the .manifest file, create a text document, and simply name it mods.manifest, and ignore any warnings the operating system may give you. Once you’ve added these 3 items, we go on the next step.

3) Open your mods.files folder. Create 3 folders called textures, ablscripts and audio (if you ran the demo program that came with the append tool in your C:\append_tool folder, you may already have everything except the audio folder). We can also add many other folders to this location, depending upon what you want to mod, such as audio (where we could append new .wav files into the mission), buildings (where we could append in new .damage and .subsystems for buildings, although I believe it’s better to mod the .Contents file in your Mechwarrior Mercenaries\Content\Missions\mymission.contents file. I haven’t fully explored this option though, and it may be that appending new info in may give the mission creator better control over mods than by editing the .contents file. Regardless, the file structure for appending buildings would look like: buildings\base_turret\your_append_files). I suspect that you could append virtually anything if you know the Mercs file structure, although there may be certain limits built into the system. I’m only just beginning to explore the potential of this tool.


4) Create the following directory structure within the audio folder
vo\generic\mp

TEXTURES - TGAs

1) Put any textures you want to append into the textures folder, making sure you’ve entered the proper names in. Read the images.txt that came with the tool for a names list. Note that vehicle textures must start with an underscore to be appended.

2) Some objects require you to mod the yourmission.contents entries. The boxvan vehicle is a good example. Let’s say you put a boxvan on your map, and want to add a new texture to it. Open up your .contents file, and you’ll see the entry for your boxvan will look something like this:

[boxvan]
Model=vehicles\boxvan\boxvan.data
ExecutionState=NeverExecuteState
TileBound=false
Translation=155.447006 230.998535 -1867.180054
Rotation=35.000007 0.000000 0.000000
Alignment=Default
WorldSpaceVelocity=0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
WorldSpaceAcceleration=0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
DamageObjects=vehicles\boxvan\boxvan.damage
Skin=0
TeamDecal=0
PilotDecal=0
DoesHaveInstanceName=false

The bolded line is what you need to change. Your new entry would be: Skin=_

Go through your .contents file, and make this change to every object you want to skin. Many objects already have the Skin=_ entry, so you may not have to change that many entries. Save your .contents file when done.

Go to your Usermissions folder and delete your yourmission.mw4 file. Despite what Jeho’s docs say, you can delete the .dep if you want to.

Start the editor to rebuild your mission. DON’T OPEN YOUR MISSION IN THE EDITOR! If you do, it will undo the changes you’ve just made.

Copy yourmission.mw4 and .dep files and put them in your C:\append_tool folder.

Open up your DOS box, browse to your append_tool directory and type:

mw4append yourmission.mw4 mods.manifest

When it’s done, rename the files (i.e. Yourmission.mw4.mw4 and Yourmission.dep.mw4) to your USERMISSIONS folder as Yourmission.mw4 and Yourmission.dep.

You WILL NOT be able to use the map editor to edit your mission after this point, as the append tool essentially modifies those two files and the editor has a problem validating them. If you wish to run the editor, you can move the files from USERMISSIONS folder or you can delete the new .mw4 and .dep files for those ‘appended’ files..


AUDIO
The editor has the ability to integrate audio into missions via the sound file. However it’s unclear how to add audio that will work in multiplayer settings at this time without using the append tool.

First there are a limited number of multiplayer sounds triggers that are directly related to multiplayer sound files.

sound_trigger_no_compy                     NoComply_Bet.wav
sound_trigger_negative                         Negative_Bet.wav
sound_trigger_check_fire                     CheckFire_Bet.wav
sound_trigger_friendly_target               FriendlyTarget_Bet.wav
sound_trigger_no_repair                       NoRepair_Bet.wav
sound_trigger_Defended_destoryed      DefendedDestroyed_Bet.wav
sound_trigger_power_restored              PowerRestored_Bet.wav
sound_trigger_ejecting                           Ejecting_Bet.wav
sound_trigger_no_gun                            NoWeapons_Bet.wav
sound_trigger_leg_dead                         LegDestroyed_Bet.wav
sound_trigger_mech_destroyed             MechDestroyed_Bet.wav
sound_trigger_enemy_dead                   EnemyUnitDestroyed_Bet.wav
sound_trigger_ally_dead                       AlliedUnitDestroyed_Bet.wav
sound_trigger_lance_dead                     LancemateDestroyed_Bet.wav
sound_trigger_comm_off                       CommOffline_Bet.wav
sound_trigger_init_repair                       InitRepairs_Bet.wav
sound_trigger_repair_comp                   RepairsComplete_Bet.wav
sound_trigger_enemy_captured             EnemyCaptured_Bet.wav
sound_trigger_nav_alpha                       NavAlpha_Bet.wav
sound_trigger_nav_beta                        NavBeta_Bet.wav
sound_trigger_nav_gamma                   NavGamma_Bet.wav
sound_trigger_nav_delta                       NavDelta_Bet.wav
sound_trigger_nav_epsl                        NavEpsilon_Bet.wav
sound_trigger_extract_point                 ExtractionPoint_Bet.wav
sound_trigger_team_dead                   TeammateDestroyed_Bet.wav
sound_trigger_you_win                        YouWin_Bet.wav
sound_trigger_you_lose                       YouLose_Bet.wav
sound_trigger_victory_baby                VictoryImminent_Bet.wav
sound_trigger_all_hills                         AllHillsCaptured_Bet.wav
sound_trigger_base_captured             BaseCaptured_Bet.wav.

Then there are multiplayer sounds used for special events (these are normally the ones you’d replace)
COLISEUM_AHH_WAV
COLISEUM_AWW_WAV
COLISEUM_BOO1_WAV
COLISEUM_BOO2_WAV
COLISEUM_BOO3_WAV
COLISEUM_CHANT1_WAV
COLISEUM_CHANT3_WAV
COLISEUM_CHEER1_WAV
COLISEUM_CHEER2_WAV
COLISEUM_CHEER3_WAV
COLISEUM_CHEER4_WAV
COLISEUM_CHEER5_WAV
COLISEUM_CHEER8_WAV
COLISEUM_CHEER9_WAV
COLISEUM_CROWD1_WAV
COLISEUM_CROWD2_WAV
COLISEUM_ENERGYZAP_WAV
COLISEUM_HORN_WAV
COLISEUM_JEERS_WAV
COLISEUM_ROAR_WAV
COLISEUM_STADAMB_WAV
COLISEUM_FACTORYHORN
FACTORY_BANG_WAV
FACTORY_BUZZ_WAV
FACTORY_CLANG_WAV
FACTORY_DRILL_WAV
FACTORY_STEAM_WAV
COLISEUMAMB_MUSIC_WAV
COLISEUM_JUNGLEBIRD1_WAV
COLISEUM_JUNGLEBIRD2_WAV
COLISEUM_JUNGLEBIRD3 _WAV
COLISEUM_JUNGLEBIRD4_WAV
COLISEUM_JUNGLEMONKEY1_WAV
COLISEUM_JUNGLEMONKEY2_WAV
SOUND_TRIGGER_TARGETATTACKED_WAV
SOUND_TRIGGER_TARGETDESTROYED_WAV
SOUND_TRIGGER_ALARM1_WAV
SOUND_TRIGGER_ALARM2 _WAV

Scripts these sounds are called upon using the following syntax

PlayTeamBettySound (Team#, Filename);

i.e.
PlayTeamBettySound(2,Factory_Bang_WAV);


Get your scripts to execute the sounds events first and then when you’re ready to do the append you should create/save your sound as the following type

ADPCM
22,000 kHz Sample Rate
4-bit
Mono / Stereo

Other Values for ADPCM may work but these are the settings used for other sounds within mercs.

Save the file using one of the multiplayer sounds listed above (all caps). The filename should be identical as listed above.

i.e.
FACTORY_BANG_WAV is saved as FACTORY_BANG.WAV

Copy this file into your audio multiplayer subfolder (C:\append_tool\audio\vo\generic\mp).

Edit mods.manifest with a text editor and add the name of the sound file (FACTORY_BANG.WAV) to the list.

Add one line following each sound file that is a duplicate of the line you added but add {handle} to the end of the line. (you need two lines for each sound file you add)

Always the Wav file first followed by the handle.

i.e.
mods.files
audio\vo\generic\mp\Factory_Bang.wav
audio\vo\generic\mp\Factory_Bang.wav{handle}

Then for each wav file you are appending, create a handle file. Use notepad, create a new file and enter 10 digits (0-9) into the file without a return. Save it using the same name you created the wav file for but add {handle} to the end of the filename.

i.e.
Factory_Bang.wav{handle}

We’ll modify this file later, in a second pass.

Once all files are in place and the mods.manifest has been created run the command to begin the append process.

mw4append yourmission.mw4 mods.manifest

You now need to use a HEX editor to examine the MW4 file created by mw4append and identify where the sound file is in the archive so you can make final modifications to the {handle} file. There are FREE hex tools you can download. I use a product called Hex Workshop. I'm not recommending you use one over the other, but on a goggle search the first entry I found and tested was

http://www.chmaas.handshake.de/delphi/free...32.htm#download

i.e. Factory_Bang.wav{handle}

Using Hex editor, open the created .MW4.NEW.MW4 file.

Find the entry for the .wav file (Factory_Bang text description) and the third byte before the path-filename entry is the value you need to add to the corresponding {handle} file of the same name. The example below is for Ahh.wav

EG the first 3 characters before the path and file name in the text display of your hex edit, highlight them and make a note of the hex code in the hex display.

For each sound file you add, find the 3rd byte and document the value.

DO NOT USE THE THIRD BYTE VALUE FOR THE ENTRY OF THE {handle} PATH-FILE NAME use the THIRD BYTE VALUE OF THE .WAV FILE.

As you have added files as the Wav and then the handle in the manifest file you should find each handle entry following the wav file as you browse and document the WAV files sequence in the list. Document each value for the WAV file.
Once you're done reviewing the file, close it and use your HEX editor to open each of the {handle}files you created.
Edit the handle file(s) and modify the values of to reflect the string provided below making the 2nd word value (in bold below) math that of the number you documented for the associated WAV file entry in the previous steps.


0400 0000 0200 0000 0100

00000000 0400 8A00 0200 0000 0100

Save and exit the Hex editor. Repeat these steps for each handle file you have defined in the manifest list.
When the updates are complete, rerun MWAPPEND so it can pick up the changes you made in the handles files.
Copy the newly created .dep and .mw4 files to your Usermissions and rename them accordingly

Common Errors
1)“I ran the tool, but it gave me an error: Could not start file mods.files/”

This is because you haven’t left a space at the bottom of your mods.manifest between your last line and the bottom of the manifest itself. Or, you have too many spaces. Add or remove the space, and it will work fine. If it still isn’t working, check and make sure a) your manifest entries are all spelt correctly, b) the files you’re appending are spelt correctly, and c) your append files are all in their proper folders.

2) “My new mission .mw4 and .dep have a size of 0kb.” See above.

3) Sounds are not playing correctly: If you modify the mods.manifest list, or edit the map and add objects the index counter may need to be modified in the {handle} files. Please do your audio add-ins as the last piece of the append process.