Battlefield 2 Modding Tutorial 2 -
Creating a Basic Level
The Level Editor is where you place control points, objects, vehicles, and so on, set level options like teams and tickets, and also where you will render out lightmaps.
Set-up[edit | edit source]
In order to follow along with this tutorial, you will need some sort of basic terrain. You may either create your own following the steps in
or using “My_Level” included with this document.
If you want to use the level “My_Level”, place it in Battlefield 2\mods\bf2\levels. (TBP)
Once you have installed the file or created your own terrain, we are ready to begin working on the level.
== The Level Editor ==
- Launch the editor.
- A window will pop up labeled “Select Startup Mod”. Choose bf2 and click “Okay” to continue. It may take a while to load, and there will be a lot of text flowing through the output
window. You can ignore all this.
- In the drop-down editor at the top left, select LevelEditor.
- Locate the load icon to the right of the drop-down menu and click on it:
- In the window that pops up, load “My_Level”.
Note: If you have completed “Battlefield 2 Modding Tutorial 1 – Creating a Basic Terrain”, you may continue where you left off. If you have not, then you will have to download “My_Level” and place the folder in “mods\bf2\Levels”.
== Mod Content ==
Before we go any further we have to check one thing.
- Select “Mod>Mod Manager…” from the main menu.
- A window labeled “Mod Manager – Active Mod : bf2” will pop up with two tabs. Click on the tab labeled
- Notice the list of folders in the left window. Make sure that all the boxes next to them are checked. This determines what you will have access to in your map:
- Once you have checked all the boxes, click “okay” to close the window. It may take a few moments for the editor to load all the content.
Placing Control Points[edit | edit source]
- Move the camera around in the map and locate where you want to put your first control point.
- Right-Click on the spot where you want to place the control point and choose “Create ControlPoint” from the menu that pops up:
- A window will pop up prompting you for a name. The default text that’s in the box shows a suggested naming convention, but you can name it anything you like.
- Since this is a simple map, name the control point “Base_A” and click “OK”.
You should now see this:
- Move the camera to where you want to place the control point for the opposite team and do the same thing, this time naming the control point “Base_B”:
- If you’ve somehow deselected Base_B, drag a bounding box around it with the left mouse button to reselect it.
- Locate the window labeled “TweakerBar” and make sure the “Tweak” tab is active. If you have Base_selected, you should see several variables in the tweak list.
Note: you may have to expand the window to the right to see all the text. Do so by holding the cursor over the right vertical edge of the window until a pair of horizontal arrows appear and then drag to the right. Doing so may cause the editor to deselect the control point. If so, you’ll have to select it again.
- Now find the parameter labeled “Team” and change it to “2”.
Use the following screenshot for a guide:
Any time you create a new control point, it defaults to Team 1. Since we changed this one, we now have a team 1 and a team 2. Take a look at the different parameters you can change here. Don’t change any of the values, just note the options you have for later use. Those of you that modded Battlefield:1942 should see a lot of familiar terms.
Placing Soldier Spawn Points[edit | edit source]
The next thing we need to do is place a soldier spawn for each side.
- Right-Click near Base_B and choose “Create SpawnPoint [Base_B]”:
- In the window that pops up, you may use the default name or change it to something that makes more sense if you like.
- To get a sense of how big your map really is, move the camera in until your control point and spawn point fill the screen.
Note the size of the flag pole. The flag may be at the bottom of the pole instead of the top. The editor sometimes does this, but it will still work correctly.
You should now have something similar to this. Note that I still have the spawn point selected:
- Do the same for Base_A. When you get done, each control point should have a spawn point connected to it.
Note: You can place as many spawn points as you want around a control point. When playing the game, players will randomly spawn between all the spawn points of a particular control point. You can see which control point each spawn point is connected to by the yellow line that runs between them. This is visible in the previous screenshot.
Also note that when placing a spawn point, the editor will try to connect it to the nearest control point. When you right-click to place a spawn point, make sure that the name that shows up in the menu is the name of the control point you want it to connect to. If you are having trouble placing a spawn, you may have to place it closer to a control point, then manually move it to the position you want.
In the previous screenshot you can also see a small green line projecting from one side of the spawn point box. This is the direction the player will be facing when they spawn at that point. Use the rotate tool to change this. By default, all spawn points are placed with the player facing the flag.
Placing Vehicle Spawns[edit | edit source]
The next thing to do is place an object spawn point. Normally this is used for vehicles.
- Right-Click close to one of your control points and choose “Create ObjectSpawner …” from the menu that pops up. The “…” will be the name of the control point you are close to as always:
- An additional screen will come up allowing you to choose which vehicle you want to spawn. Choose the first one, CH_US_LightJeep – [JEP_PARATROOPER/JEEP_FAAV]
- Another window will pop up allowing you to name your spawn, accept the default name and click “OK”.
Note: Notice that the names are generally listing of a pair of vehicles, one for each side. This tells you which vehicle will spawn depending on who controls the control point. In this case “CH_US” stands for and ,“LightJeep” is the class of vehicle and is the same for both sides, and “[JEP_PARATROOPER/JEEP_FAAV]” is the name of the particular vehicle of each side.
These are just default settings. You can change them later if you want different vehicles to spawn for each side or if you have one vehicle that’s common to both.
You should now see something like this:
- Do the same thing for the other control point, choosing the same vehicle.
You have now created the basics of a Base for both teams.
Placing Static Objects: The map would be pretty boring without some buildings to run around. Let’s place them now. This operation is handled a bit differently than placing spawns.
- On the left in the Resources bar, expand the following folder path:
Note: I’ve expanded the length of my Resources bar by dragging the divider bar underneath it down so you can see the whole path. You can resize all the windows this way.
- Scroll the Resource window down a bit if you need to and expand the “basebarracks” folder. You should now see the same name with a file icon next
- Drag this into your scene where you want to place the building:
Note: Notice that there is a folder named “basebarracks” and inside it is a file named the same thing. This is the same for all assets. You must drag the file to the scene in order to place it. If you try to drag the folder or anything other than the file to the scene, you will get a “NO” icon to let you know you can’t place what you have selected.
Continue placing objects wherever you would like them. Feel free to try different buildings to see what they are. Note that there are some unused objects in some of the folders. If you bring something into the scene that has problems with textures and so on, just selected it and delete it.
This would also be a good time to try out the move and rotate tools. You can see the icons for these tools near the center of the top edge of the main window. Hold your cursor over the various icons to bring up a tooltip telling what each one is. Don’t try to use anything other than the Select, Move, and Rotate buttons for now. These require more explanation and will be covered in a future tutorial.
Another good tool to know about is the “Snap object(s)” tool located about half-way down the “General” bar on the right side of the screen. When you click on this button, any objects you have selected will be snapped to the ground
== Level Settings ==
Ater you’ve played around with placing a few objects, we need to set one more thing in order to make the level work.
- In the bar labeled “General”, locate the button labeled “Level Settings” a little over half-way down andclick it.
A window will pop up with two columns, one labeled “Team 1” and one labeled “Team 2”. This is where you define which army is which team. There may be a few entries when you first open the window. Ignore these.
- In the very first drop-down box under “Team 1” click on it and select “MEC”.
- In the first drop-down box under “Team 2”, select “US”.
- Click “OK” to close the window.
When you do this, you should see all the slots automatically fill up. Later you can customize your teams, but for now leave everything at their defaults.
Your window should now look like this:
- Choose “File>Save All” from the menu bar to save your level.
For more details on the windows that pop up, see the section titled “Saving Your Work” in “Tutorial 1 – Creating a Basic Terrain”.
Congratulations, You have now created your first playable map. Here’s how to play it:
- Quit the editor.
- Launch BF2.
- In the main menu, click on “Multiplayer”, then “Create Local”.
- Find “My_Level – 16” in the map list. (it will have listings for 16, 32, and 64 players. Just choose 16)
- Add it to the “Chosen Maps” list.
- Click “Start Server”.
You are now ready to continue with the next tutorial, “Battlefield 2 Modding Tutorial 3 - Custom Mod Set-Up”.