Elite Warriors: Vietnam Map/Mission Editing

 

Overview

In Elite Warriors: Vietnam (EWV), maps and missions are different things.  A map is the terrain, objects, and enemies.  A mission takes place on a map and contains objectives that the player must complete to finish the mission.

To create maps you use the nWorld tool.  To create missions you use the MissionEd tool.  The player can play on a map with no mission, but it will never "end", since there will be no objectives to complete.

The basic steps to create a Mission (including a map) for EWV follows:

1) Create a map, either from scratch or by modifying one of the maps included with the game.  This is done by using the nWorld tool.  Make sure the map is placed in the Maps/ directory (usually in a subdirectory).

2) Place enemies on the map.  This is done within nWorld as well.

3) Place triggers on the map.  Triggers are usually mission objectives, although they can also be used to create simple scripted events.  Triggers are also placed within nWorld.

4) Create lightmaps for the map, this is done from within nWorld as well.

5) Generate waypoints, this is done with an external tool called wpgen.

6) Generate a weather surface file if the map has weather effects, this is done with wpgen.

7) Set up the mission using the MissionEd tool, save the mission (.mis file) as mission.mis in a subdirectory under the Maps/ dir, usually the same directory as the mpb file created earlier.

To play the mission simple select the "Single Mission" option from the main menu of the game, your mission will show up there as long as the mission.mis file is in the right place under Maps/

Note that for deathmatch maps, you do not need a mission file.  A single .mpb file with deathmatch start locations and a dm.cfg file that tells the game the location of that deathmatch map are all that is needed.

 

.ZA Files

If you look at the game's files you will see a lot of .za files.  These are "pack" files that contain many other files.  They are simply .zip files that you can open in any .zip program, such as WinZip.  Note that .za files act just like directories, for instance there is a "MultiMaps.za" inside Maps, if you unzip this file to a directory called MultiMaps/ in the Maps/ directory then delete MultiMaps.za the game will still function.  It is suggested you unzip several of the .za files in the Maps directory and load some of the .mpb and .mis files to see how things are made when you are learning how to map using these tools.  Note that if there is a "real" directory and a .za file of the same name, the game will always load the files from the "real" directory first.

 

Multiplayer Start Locations

To make a map work in multiplayer you have to place MULTISTART objects on the map to indicate where the players start.  Each game mode requires different types of MULTISTART objects.  A MULTISTART object is just a waypoint object (located in Maps/SharedObj/Editor/) with a MULTISTART prop on it.  The parameters to the prop determine the game mode that object will be used for.  To see an example of how the MULTISTART properties are used you can load up one of the maps that are included with the game.  Each mode is described below:

Deathmatch:

To make a map work in deathmatch you simply have to place some MULTISTART objects on the map and set up a dm.cfg for it.  To do this follow these steps:

1) Create your deathmatch map, the best place to put it is in Maps/YourMapName/YourMapName.mpb

2) Import a waypoint object by selecting the Object tab, pressing Import Object, and importing Maps/SharedObj/Editor/waypoint.z3d and putting it in a group (or creating a new one)

3) Edit the properties for that object, then hit "Add" and for the name of the property type MULTISTART

4) Place a few of these objects on the map

5) Create a text file called dm.cfg inside Maps/YourMapName that lists YourMapName.mpb on one line (see the dm.cfg files in MultiMaps.za for an example of how to put multiple DM maps in one directory).

Then in the game when you add a map in deathmatch mode your map should show up in the list (make sure you spelled MULTISTART right!)

Team Deathmatch:

Team deathmatch is like normal Deathmatch except you have to place specific MULTISTART objects for each team.  Import several waypoint objects like for Deathmatch, and name them all something like team1, team2, etc.  Instead of just putting MULTISTART on each object, put MULTISTART team1 or MULTISTART team2, etc., up to team8.  Then place team start locations all over the map and players on that team will start in those locations.

Cooperative:

For a map to work in cooperative mode it has to have a valid mission (.mis) file.  No MULTISTART objects need to be on the map or any special .cfg files for it to work in cooperative mode, it will use the single player start locations.

 

The nWorld Screen Layout

nWorld has several windows and toolbars you need to know about to use it effectively.  In the upper left is the View window.  This shows you the world, using the same engine the game uses.  So what you see in that window is what it will look like in the game.  Going from the top to the bottom of the nWorld window along the right side is the control bar.  This is where all the controls for manipulating the world will appear.  There are four tabs across the top of the control bar, each one is described below.  In the bottom left is the Info window, this shows you info about the map and your current view.  In the bottom right is the overhead view of the map's terrain and shows the water level.

 

The Control Bar

On the right side of the nWorld window is the control bar.  It has four tabs on it, each corresponding to an editing mode.

Move

This is movement mode.  You don't actually do any editing in this mode, it is for getting around your map easily.

Object

Object mode is for adding, deleting, moving, scaling, rotating, or importing objects on your map.

Tiles

Tile mode is for modifying the textures on the terrain.  This includes adding roads, making an area dirt instead of grass, or painting rock on a mountain for example.

Terrain 

Terrain mode is for modifying the terrain itself.  You can create mountains by "pulling" up the terrain, or you can create valleys by "pushing" the terrain down.  You also set the water level in Terrain Mode.  It is best to use an external 2D paint program like Paint Shop Pro or Photoshop to create the actual terrain, then use Terrain mode to just tweak it.  Creating an entire terrain by hand using Terrain mode would take forever.

 

Importing Terrain Bitmaps

The best way to create the rolling hills or sharp cliffs you see in EWV isn't with the Terrain editing tools in nWorld, it is with a 2D paint program such as Photoshop.  Make a 24bit image, and only use grays to generate your terrain bitmap.  White is "high" and black is "low".  For example if you make an all black image with a white point in the middle, that white point will be an extremely tall mountain.  Save the image as a 24bit TGA uncompressed TGA file.  To import it into nWorld go to the File menu, then Import then Terrain TGA.  Pick the TGA you created and your overhead map will update to look just like your image, and the terrain in the View window will match it.

 

Generating Shadows

Say you make a beautiful map full of trees, bushes, houses, fences and everything else that makes a map look cool.  Still doesn't look as good as the ones in the game?  Probably missing shadows.  To generate shadows, just load your map into nWorld and go to the Tools menu and select Generate Shadows.  The default options are generally good for any map, unless you want to achieve a specific effect.  Note that generating shadows can take several hours, depending on the complexity and size of your map.  As an example, most of the maps in the game took about 1 hour on a P4-2Ghz computer.

 

Properties

nWorld works off of an object-based level design model.  You don't craft levels polygon-by-polygon, but rather you place objects on the map.  This means that objects can have properties associated with them, so whenever you place an object it automatically has those properties.  If you right click on an object in the control bar and select Edit Properties you may notice some properties on it.  You can have up to five properties on an object.  You can edit the current ones, remove them or add your own.  For a list of properties and their syntax see Docs/props.txt.

 

Importing Objects

nWorld has a database of objects known as the object DB.  The DB is split into groups, like you may have a group called Trees that has all the trees in it.  To import an object simply click on Import Object when in Object mode.  Navigate to the Maps/SharedObj directory, inside there are many objects you can use.  If you want to create a new type of enemy that has a RPD, you would import an enemy icon from Maps/SharedObj/Editor, like say enemy03.z3d.  Then you just need to put the ENEMY property on it with the correct syntax (you can copy the prop from another enemy or try to get the syntax right yourself using props.txt).

 

Triggers

The mission system in EWV works by setting triggers on certain things in nWorld.  When these triggers are triggered, that objective is complete.  Triggers include things like killing a particular enemy, destroying a particular item in the world, getting near an area, and a few other things.  Each trigger has a unique ID.  If you have more than one trigger with the same ID in the world the map won't load (and you will see an error in z3d.log).

Note that because triggers must be unique that means you can't put a trigger prop on an enemy and place two of him on the map.  You have to import more enemies into the DB and give them unique names if you want them all to have different IDs.

The trigger prop is fairly complex, for a full description of it see the Docs/props.txt file. 

 

External Utilities

Generating Waypoints

In order for the enemies to know where to go, you need to generate waypoints on your maps.  If you don't generate waypoints all enemies will be stationary and will never move.  To generate waypoints you need to run wpgen.exe.  Make sure no other program is running then run wpgen like this:

wpgen <mapname>

The map will load.  Then simply hit "G" to generate waypoints.  This operation can take many many hours, depending on the size and complexity of the map.  As an example, most of the maps in the game took 10-20 hours to generate on a P4-3Ghz computer.  Some missions take several days to generate, so beware.

 

Weather Effects

To create those cool weather effects you need to add two files into the same directory your map resides in.  One is a .wfx file, the other is a .sgd file.  The .wfx is a text file describing the weather effect you want.  The format of this file is pretty simple, you should look at the .wfx files included with the game for examples.

The .sgd file is the surface definition file.  This file is needed to tell the game where rain can't fall, such as indoors or under overhangs.  To generate a .sgd file run wpgen and use the "Q" key to generate surface data for your map.

 

Missions

You can play on a map without a mission, it will just never end and there will be no objectives.  As long as waypoints have been generated for the map the enemies will act normally and try to kill the player's squad.

Things get a lot more interesting when you have some objectives, though.  To create a mission you can use the MissionEd program.  It will generate a .mis file that you have to place in the right spot to get your map to show up in the Single Mission menu.  Missions must be called "mission.mis" and be placed in a subdirectory under Maps/ for the Single Mission menu to see them.

Say you want to create a new mission called "Test".  You must make a subdirectory under Maps/ called "Test", then put your .mpb file created in nWorld in there, and your mission.mis file.  Also any .wpg, .sgd, .wfx and any other support files.  Once all the files are in this subdirectory, you can simply zip it up into a .za file and distribute it as a single file that people can drop into their Maps/ dir to play your mission.

Say you wanted to make a map pack that included a single player mission (that can be played in coop) and a deathmatch map.  You want to call the map pack "CoolMapz".  You will need the following directory layout:

Maps/CoolMapz/CoolMapz.mpb
Maps/CoolMapz/CoolMapz.mis
Maps/CoolMapz/CoolDM.mpb
Maps/CoolMapz/dm.cfg

Then simply zip up the CoolMapz directory and call it CoolMapz.za, and tell people to put it in their Maps directory and the maps will show up.

 

Weapons

Creating new weapons or modifying existing ones is quite simple in EWV.  Look in the GameData/Items directory and you will see all the items in the game.  Each item has two files associated with it, a .za file that contains the artwork and sound effects and a .idf file that defines the weapon's statistics and type.  The easiest way to learn how to make weapons is to first modify one of the existing weapons.  For instance load up GameData/Items/9mm.idf and change the number of bullets in the clip to 20, then resave it as 9mm-bigclip.idf.  Then the weapon will be selectable in-game (or in missioned).

To make new weapon artwork it requires the use of an art package like 3D Studio MAX.  A 3DSMAX v6 exporter is included in this package.  Its use is beyond the scope of this document, but should be fairly simple to figure out.  It is suggested you ask for help on the editing forums if you are having troubles, linked below.

Note that if you run a multiplayer server and have any custom weapons or items in your Items directory, clients that do not have those weapons or items will not be able to connect.  So be sure that if you want to play with custom weapon that the people connecting to your server have them as well.

 

Need More Info?

This document is just a quick primer- it is not meant as a full reference on how to modify EWV.  There is an active community of modders out there with a huge wealth of knowledge, and most of them read and post on the nFusion Interactive Forums:

http://www.nfusion-interactive.com:81/phpBB2/

Check out the "Editing" section, feel free to read it and post any questions you may have.  There are plenty of people there that would be glad to help expand the game!