This is basically an introduction to modding Battlefront II and getting a map set up based on the Getting Started.doc from the documentation in the mod tools. (If you have difficulty understanding this, the actual document has pictures, which might be helpful.) The document has been split up for the sake of readability in the wiki format, for such topics as adding command posts and adding vehicles see their own separate pages.
ModTools VisualMunge.exe is a re-designed version of the tool that was used in creating Battlefront II, re-designed to make the process of creating a new mod directory, and setting up your new map as simple as a few mouse clicks. This eliminates the 30 or 40 steps that had to be taken when creating new maps while actually working on the game.
First, unzip your BF2_ModTools zip file into the root of your C: drive. We can’t be held responsible should you put it somewhere else, and things don’t work, so just take our advice, this is where you want to put your BF2 Mod Tools files. It can however it can go into any file directory without spaces in the name. Inside, you’ll find the following folders:
This folder contains many of the original assets from Battlefront II, many of which you’ll need to copy into your mod directory manually if you wish to make mods using these files. Note: it would be wise not to directly edit these files without copying them into your mod folder first. Keep these as the original data, meaning, DO NOT MODIFY ANY FILES IN THIS FOLDER.
This folder contains most of the files actually needed to make a working level mod in Battlefront II. These files will be copied to your new mod folder (which VisualMunge.exe will create, this will also be explained later) DO NOT MODIFY ANY FILES IN THIS FOLDER. VisualMunge will create a copy of this database, and there will be the files that you’ll want to modify.
This folder contains many useful documents which will help you along your way to creating some nifty Battlefront II mods. Many of these have been transposed to this website, but be sure to check out these docs as they will certainly be helpful when endeavoring to create some spiffy new Battlefront II content. Many of the game’s systems are documented in these files.
This folder is basically the same as the assets folder, except for space maps and assets. DO NOT MODIFY ANY FILES IN THIS FOLDER.
This folder contains the template files that VisualMunge uses to create your new world. The game mode, world files, and script files are stored here. DO NOT MODIFY ANY FILES IN THIS FOLDER.
A bunch of tools related files that you don’t have to worry too much about in creating new levels for Battlefront II.
Contains the Pandemic addon for XSI that adds commands such as edit flags and an exporter.
To be copied over to the same folder that contains BattlefrontII.exe (in almost all cases \Star Wars Battlefront II\GameData). Run this in that folder while testing a map to get a debug log (BFront2.log) that will help you find the errors in a map. There are a few extra steps to get a debug log if you're using the DVD version.
\BF2_ModTools\jedi side example.zip
Under the root of the mod tools folder you’ll also find the EULA (End User Licensing Agreement) called license.txt and README.txt.
ModTools VisualMunge.exe- Creating a World
To begin, browse to your \BF2_ModTools\data\_BUILD folder, and run the program called ModTools VisualMunge.exe
The first time you run ModTools VisualMunge.exe, it will try to automatically detect your Battlefront II install folder. If it fails to auto-detect, you’ll get a pop-up dialog asking you to enter your Battlefront II directory. If this popup should rear it’s ugly head, simply browse to your \Star Wars Battlefront II\GameData directory, and click ok. It is very important that VisualMunge knows this path, as this is where your mod data will be copied to for being run in the game.
The first thing you’ll need to do to put you on the path of getting your very own Battlefront II map up and running, and choose a 3-letter name for your mod. I’ll use ABC as the example for this document. Note: the 3-letter name thing is unfortunately required by many systems in the game, so this was something we were unable to change.
Once you’ve entered a 3-letter world name, you’ll need to enter a Full World Name, and a World Description for your new map. The Full World Name and World Description are what will show up in the shell when you go to select your new map to play it.
Now that that’s all our of the way, all that’s left to do, is check the boxes for the game modes you want to include on your new map (the choices are Conquest, 2-flag CTF, 1-flag CTF, and Hero Assault) and click “Create World”. (There is also a "Space Map" check box that is covered below.)
What this has now done, is create a mod directory under your BF2_ModTools directory for your new mod. So if, for example, you were to create a world called ABC, you will now find a data_ABC directory in your BF2_ModTools folder. All the files from \data have been copied into your new folder, and the files in \TEMPLATE have been modified, and renamed automatically, and placed in your mod directory to create your new map according to the options you specified.
Once VisualMunge is done working it’s magic (copying and modifying files) you’ll get a pop-up message that means that all the copying, and modifying is done, and you’ll now need to:
1. Close VisualMunge,
2. Browse to \BF2ModTools\data_abc\_Build
3. Run ModTools VisualMunge.exe from inside this folder.
This is very important. The steps I just outlined are the only time that you’ll run VisualMunge from the main \data\_BUILD directory. Once you’ve created your new level, you’ll run VisualMunge from inside your \data_abc\_BUILD mod folder, which VisualMunge has created for you. Always be sure that you’re running VisualMunge from the correct folder, to avoid problems. To make things at least somewhat foolproof, you’ll notice that the Munge options have been grayed out when you run VisualMunge from the main data folder, and conversely, the Create New World options are grayed out when you run VisualMunge from inside your new mod folder.
ModTools VisualMunge.exe– Munging the World
The term “munge” is the term that we use for basically compiling your data for use in the game. We’ll get to actually modifying your new world in a bit, first I’m going to cover munging, and running your new level in the game.
So, by now you should have opened VisualMunge from inside your new mod folder, and you’ll notice that all the Munge options have been enabled, and the Create World options disabled. Your new level will automatically show up in the Worlds drop-down menu, and the only other option that should be selected by default is Common. You can leave everything as is when you run the program. Note: you MUST have your world selected in the worlds list in order for everything to munge and copy correctly.
Once VisualMunge finishes working it’s magic, you’re all done. You have a level that you can run, and play in the game. Visual Munge copies all the necessary files for running your level into your Battlefront II folder in the following location: \Star Wars Battlefront II\GameData\Addon\ABC (where ABC is the 3-letter name that you gave to your level). Run the game, and your new map should show up in the Instant Action, and Multiplayer playlists.
Template Game Modes
Here’s a brief rundown of what is included when you select each game mode to be included in your new Battlefront II map:
In Conquest, there are 4 CPs (each with spawn paths, and capture regions), 2 for each team. You can ,of course, add more CPs, and move any of the CPs and their spawn points and capture regions wherever you like.
2 Flag CTF
2 Flag CTF will have 2 CPs for each team to spawn at (these use non-capturable CPs used only as spawn points) with spawn paths included. Also included are the flags for each team, and the capture region (the cylindrical object that serves as the visual representation of the capture location) for each team.
1 Flag CTF
1 Flag CTF will have all the same things as 2 flag CTF, except there is only 1 flag placed in the middle.
Hero Assault will have 4 CPs, 2 for each team (again using non-capturable CPs) and that’s about it.
Game Mode Scripts
We’ve gone to the trouble of pre-arranging the scripts for each game mode, so when you select the game modes you want to include in your new map, you don’t have to worry about any manual setup for the scripts. Everything is arranged for you. You can, of course, change the scripts to suit your purposes (add vehicles, additional characters if you want, etc.) The scripts will be located in data_ABC\common\scripts\ABC (where ABC is the 3-letter name that you gave your map). The naming convention for the scripts is as follows:
ABCc_con.lua – Clone wars era, Conquest
ABCg_con.lua – Galactic Civil War era, Conquest
ABCc_ctf.lua – Clone Wars era, 2 flag CTF
ABCg_ctf.lua – Galactic Civil War era, 2 flag CTF
ABCc_1flag.lua – Clone Wars era, 1 flag CTF
ABCg_1flag.lua – Galactic Civil War era, 1 flag CTF
ABCg_eli.lua – Hero Assault
Detailed information about the scripts can be found in the documents folder in Battlefront II Mission LUA Guide.doc and on the lua scripts page. Also, for a more comprehensive technical overview of LUA and it’s workings in Battlefront II, check out Battlefront2_scripting_system.doc or the Lua page.
Modifying the World
You can modify the game scripts directly in any text editor (I suggest using a more advanced editor such as UltraEdit, EditPad, Notepad++, or SciTE). You should never use an text editor that formats the quotes into "curly" quotes instead of straight ones. See above for the location of the scripts.
To modify your new Battlefront II map, we’ve included our proprietary level editor, ZeroEditor. An important note, is that you need to run ZeroEditor from your new mod directory (data_ABC) in order for things to work properly (do we see a pattern emerging here?), so browse to data_ABC and run zeroeditor.exe. This will load up the editor. Load up your level, and you’re ready to go. For more detailed information on the workings of ZeroEditor, see ZeroEditor_guide.doc in the documentation folder or the Zeroeditor page. We’ve added tooltips to the editor for most every feature in the editor, so just hover your mouse over any of the buttons, or text in the interface, and it will pop up a tooltip explaining exactly what that feature does.
It is important to note, that when creating your new world through VisualMunge, we create, and set up all the files needed to run your level, and have the game mode functionality work. You will, however, have to go into your world and add Planning Paths, Barriers, Boundaries, any Lighting you want to add, along with any new Objects or terrain features you want to add. All of these things are covered in the ZeroEditor_guide.doc which is found in the documentation folder.
Opening the World in Zeroeditor
Continuing with the example of ABC, go to \BF2_ModTools\data_abc\ and run zeroeditor.exe from here. Once the editor is loaded, click the LOAD button, and browse to your map (\BF2_MofTools\data_abc\worlds\ABC\world1\ABC.wld)
The first thing you’ll see when you go to load up your map is the Load Layers dialog. For the sake of keeping things clean, and simple, always click Select All and make sure all the layers are loaded. You can hide layers later if you want to, but it’s best if they are all always loaded.
As an aside, there is a checkbox at the bottom called Build accurate object collision. What this does, is builds auto-generated collision for all the objects, based on the actual mesh. I would recommend using this, as it makes placing, selecting, and manipulating objects MUCH easier. Otherwise, the editor will use a bounding box for collision which makes selecting objects a pain, and it makes placing objects on top of other objects much more difficult. Click OK once all options are selected.
Now, at the top-middle of the screen, you’ll see a section called Active Layer with the current being [BASE] and a button underneath it that says CHANGE. The default build contains nothing on this layer (which is used by all modes), so click that button, and it will take you into the layers dialog. Click on the mode you wish to edit and then close that window.
Adding assets from shipped worlds
We’ve packaged up the shipped worlds from Battlefront II, to allow you to use assets from the shipped game to make your new levels with. In order to use these assets you’ll have to copy some files around. Below, I’ll describe how to get new objects, textures, or sky files into your new map.
Adding New Objects
In order to use objects from the shipped worlds (I’ll use Kashyyyk as our example here), you’ll need to copy those assets from the \BF2_ModTools\assets\worlds\KAS\msh and \BF2_ModTools\assets\worlds\KAS\odf folders. You can copy one object at a time, or you can just copy these entire folders into your new world folder (though we discourage this practice). Just keep in mind that the more files are in there, the bigger your level download will be, and the more memory will be required to run your level, so it’s best not to have too many files in these folders that aren’t being used. These files need to go in a corresponding folder inside your new mod folder. For example, if you want to copy some objects from the Kashyyyk world into your new world, you could either just copy the entire msh and odf folders (which, again, we discourage) into \data_ABC\worlds\ABC\, or you can create the odf and msh folders manually, and just copy single assets over. It’s important to note, that when you copy over a mesh, you need to copy over all the textures, option files (.option) and the odfs, otherwise the objects that you copy over won’t work properly. The odf's file name is generally the same as the msh's, the option files are the same name as the corresponding tga (targa, the texture format) or msh file with a .option added to the end, and the necessary tga files are found by using a hex editor (we recommend XVI32 or PSPad) to open the msh files and searching for any instances of tga.
Adding New Terrain Textures
To add new textures to the terrain, just find the terrain texture you want to use in one of the shipped world assets folders, and copy it into your \data_abc\worlds\abc\world1\ folder. Once you’ve done this, load up your map in ZeroEditor, and open your map. Click on the Texture edit mode button, and you’ll see your list of textures on the right hand side. Select a box that you want to add a new texture to (you can replace existing textures, or you can start by adding a new texture to a blank box). You’ll see the texture name appear on the left side where it says Texture. The box will be blank if you choose a blank texture slot. Click the Browse button below the Texture box, browse to the texture you just copied into your world folder, and voila…your new texture is ready to be used.
Changing the Default Sky
By default, the template map uses the sky file from Yavin. Changing this is a fairly simple thing to do. Browse to the world that you want to use the sky file from (again, I’ll use Kashyyyk as our example) in \assets\worlds\KAS\world2 and copy the sky file (kas2.sky) into your mod worlds folder (\data_abc\worlds\abc\world1) and rename it to abc.sky (where abc is the 3-letter name that you gave your world when you first created it). Open up that sky file, and search for which assets are used by the sky file, and you’ll need to copy those assets into your mod level’s world folder (\data_abc\worlds\abc\world1). They will be a/some sky .msh files, and some textures. Only worry about files that are actually located in the assets\worlds\KAS\world2 folder. If there are files that the sky file is looking for that aren’t located there, then don’t worry about those.
These notes go over what is different in Visual Munge for Star Wars Battlefront II when creating a Space level.
You’ll see a different List of Game Modes when you check the Space Map box.
-CW Assault will create a Clone Wars Space Assault map template
-CW CTF will create a Clone Wars Space CTF map template
-GCW Assault will create a Galactic Civil War Space Assault map template
-GCW CTF will create a Galactic Civil War Space CTF map template
Each template contains:
-2 Capital ships (one on either side)
-2 Frigates (one on either side)
-8 vehicle spawn points (4 on either side, one of each class)
-2 Command Posts (one on either side)
-12 Auto turrets (6 on either side)
-12 Remote turrets (6 on either side)
-4 Heavy turrets (2 on either side, GCW modes only)
Well, after you’ve followed the instructions in the normal Getting Started guide, you’ll still need to do the following.
No matter what era or gametype you’ve made, you’ll probably want to move the ships about the world. You’ll need to move whole groups of objects to keep things in line. You’ll also need to move spawn paths, regions, objects and all that good stuff. That’s why this is the first thing you need to do. If you make changes to the world and lay out barriers and paths, you’ll kick yourself if you want a different layout after the fact.
AI need barriers to move smoothly through the level. Use Zeroeditor to set these up.
Just like in ground maps, AI need planning graphs to figure out how to move through the hanger and back areas a little more intelligently. It’s not crucial, but it can help make the AI look more intelligent.
Read the FlyerSplineFollowing.txt file in the documentation or the Flyer Splines page for information of space pathing. Lay out spline paths that take your AI flyers out of the hangar and into space. Then layout paths that fly around your newly setup world.
Distributing your new level/mod
Once you have spent endless hours perfecting your new creation, to distribute your new level to other Battlefront II players, all you have to do is go to your mod folder in your \Star Wars Battlefront II\GameData\Addon\ABC folder, zip all the data in there up, and SHIP IT! Note: you want your zip file to contain ONLY the path info from Addon forward.