MP Mapping

From Infinity Ward Community Wiki

Jump to: navigation, search

Contents

MP Map Checklist

Visit the link below to see a checklist for everything required to get a multiplayer map up and running.

MP Map Checklist

Setting up gameplay modes

This section covers how to set up a multiplayer map for the various gameplay modes in CoD4.

To place an MP entity, right-click in the 2D view of Radiant and go down to the “mp” section in the bottom division. Here you will see a list of gametypes. Below this section I describe how to use each of them properly.

Image:Sm_mp_01.jpg

You can also place an MP entity by creating a brush, going to the Entities menu (“n” key), selecting the name (mp_tdm_spawn for instance), and pressing the “enter” key.

MP prefabs are located in the map_source/prefabs/MP directory, and are used for several of the gameplay modes.

Global

To start out, place the mp/global_intermission entity and rotate it to face a cool-looking angle. This is the scene that will be displayed behind the scoreboard at the end of a match and is required to run the map.

Free-For-All

For FFA, place mp/dm_spawn entities around the entire map where you want players to spawn.

Team Deathmatch

For TDM, place mp/tdm/spawn entities around the entire map, generally overlapping FFA spawn locations. In the friendly base, place 8-12 mp/tdm/spawn/allies_start entities. In the enemy base, place 8-12 mp/tdm/spawn/axis_start entities.

Image:Sm_mp_02.jpg

The start spawn entities determine where players on each team spawn at the beginning of a match. They should generally be placed in rows and spaced out evenly.

Domination

For DOM, place mp/dom/spawn entities around the entire map. These sometimes overlap FFA spawns, but keep in mind that proximity to a DOM flag determines which spawns are linked to which flags. The command “set scr_domdebug 1” shows these flag to spawn connections in-game.

In the friendly base, place 9-16 mp/dom/spawn/allies_start entities. In the enemy base, place 9-16 mp/dom/spawn/axis_start entities. These normally overlap the TDM start spawns.

Next, 3 DOM flags must be placed throughout the map. Generally these are either placed in a “line” from the friendly to enemy base, or are evenly placed around asymmetrical maps.

To place a prefab, right-click in the 2D view of Radiant and choose the misc/prefab option. Browse to the map_source/prefabs/MP directory and place dom_flag_primary_a.map, dom_flag_primary_b.map and dom_flag_primary_c.map in the appropriate locations.

Next to each flag, place a script/origin entity. The settings of this entity determine friendly and enemy spawning when that flag is captured. (For instance, if linkto has two values, enemies might spawn at either one of those locations when friendlies have that flag captured.)

Image:Sm_mp_03.jpg

The middle B flag in a linear map would have the following settings:

script_linkname: flag2 script_linkto: flag1 flag3 targetname: flag_descriptor

Image:Sm_mp_04.jpg

Flag A and Flag C would have a linkname value of flag1 and flag3, respectively. In a linear map, Flag A would have a linkto value of flag2. However, with an asymmetrical layout it might have a script_linkto value of flag2 flag3.

Sabotage

For SAB, the spawn layout will be slightly different from other gameplay modes. Determine where the invisible line in the map would be. One half of the map is the friendly base, and the other half of the map is the enemy base.

Place mp/sab/spawn/allies entities around the friendly base, and mp/sab/spawn/axis entities around the enemy base. These could overlap FFA spawns on each respective side of the map, but keep in mind that you generally want a good distance between where the two sides are going to spawn from each other.

In the friendly base, place 9-16 mp/sab/spawn/allies_start entities. In the enemy base, place 9-16 mp/sab/spawn/axis_start entities. These are normally placed in a location with the same distance from the middle bomb as the other side.

Now, the middle bomb needs to be placed, generally somewhere along the invisible dividing line in the middle of the map. Browse to the map_source/prefabs/MP directory and place sab_bomb.map in that location.

Next, each base needs a bomb target prefab. The friendly bomb target prefab is sab_bomb_allies.map, while the enemy bomb target prefab is sab_bomb_axis.map.

Image:Sm_mp_05.jpg

We’ve found that the bomb doesn’t always work well if it’s too close to the start_spawn locations, because of how far back they are to the end of the map. If you find during playtesting that both teams are having a difficult time of planting the bomb, you should consider moving the bombs more towards the dividing line of the map. (Keeping in mind to keep the bomb locations of each side balanced.)

Search and Destroy

Because SD doesn’t have respawns, only two types of spawning entities needs to be placed. Place 9-16 mp/sd/spawn/attacker entities in the attackers start location, and 9-16 mp/sd/spawn/defender entities in the defenders start location. These aren’t necessarily in the same place as the other start spawns, because they need to be placed in relation to where the two bomb targets will be placed.

In front of the attacker spawns, the bomb needs to be placed. Place it far enough away from the attacker spawns so it won’t be automatically picked up at the beginning of a round. Also, put it in a highly visible location so it won’t be missed. Browse to the map_source/prefabs/MP directory and place sd_bomb.map in that location.

To supplement the bomb prefab, the bomb trigger prefab needs to be placed somewhere in the map. This prefab is sd_bombtrigger.map. It can be anywhere, but for consistency place this prefab in the top-left corner of the map.

Image:Sm_mp_06.jpg

Now, the two possible bomb targets need to be placed. It depends on the map, but these are generally placed closer to the defenders than the attackers, giving them time to get in location and prepare for the assault. They should also be spread far enough apart that defenders can’t cover both bomb sites from the same location. The prefab names of the bomb targets are sd_bombzone_nuke_a.map and sd_bombzone_nuke_b.map.

Headquarters

HQ uses TDM spawn entities, so there are no extra spawns to be placed for this game type. To set up a map for HQ, up to 7 locations need to be set up as HQ points. Interior locations tend to work the best for an HQ location.

To set up an HQ location, place a trigger/multiple brush entity covering the volume of a location. This is the space a player needs to touch in order to capture or destroy the HQ point. This trigger should have a targetname value of “radiotrigger”.

Inside of each of these triggers, place a war_hq_obj.map prefab. There must be one for each of the 7 triggers, and each one must be fully inside of a trigger volume. These crates will appear and disappear along with the currently activated HQ location.

Image:Sm_mp_09.jpg

Setting up UAV, Airstrike and Helicopter

This section covers how to set up a map to support the various awards given for kill streaks.

Creating a Minimap Image

A custom minimap image is required for the UAV and Airstrike bonuses to work properly. The following section describes the process of creating a new image for a user-made map.

Creating a custom minimap image

Setting up Helicopter Paths

To get helicopter strikes working, five different paths of linked script_origins need to be added.

General

Each script/origin entity that is placed has a few values that can be used for control.

script_accel: Acceleration of the heli from that point to the next point.
script_airspeed: Speed of the heli from that point to the next point.
script_delay: Causes the heli to pause at that point for # of seconds before proceeding.

Image:Sm_mp_08.jpg

The linked points determine where the helicopter rotor will travel. So, always put your path a bit higher than you might think, since the hole body of the helicopter will be traveling underneath the path.

To quickly link two script/origin entities, select the first point, then the target point, then press the “W” key.

Path 1 – Approach Path

The approach path is the method that the helicopter enters into the playable space. In CoD4 maps it’s generally split into 3 possible approach paths, all converging into a central point in the middle of a map.

To start one of the three paths, add a script/origin entity with a targetname value of “heli_start”. This point should usually be linked to the first point on the path with script_accel and script_airspeed values.

Once all three approach paths are completed, they should eventually all link to a central script/origin entity. This entity can be targeted by another script/origin entity with a targetname value of “heli_dest”.

Path 2 – Circle Path

The circle path should form a circle around the playable space of the map. It’s generally higher up than the approach paths. Use script_delay to make the heli stop in key points of the path.

Once a circle is created, a starting point on the circle needs to be designated (to determine the first point the heli will travel to after it finishes with the approach path.

Designate this starting point with a script/origin entity linked to one of the circle points, with a targetname value of “heli_loop_start”.

Path 3 – Crash Path

If a heli is shot down, it will travel from the point it’s currently at to the crash path. This path should usually be in a central location that can be reached from any part of the circle path.

Designate the first point of a crash path by another script/origin entity linked to the first point with a targetname of “heli_crash_start”. The end don't need to be specified… the heli will explode at the end of the path.

Exit Markes

If a heli doesn’t get shot down, it will eventually fly away to one of several placed points in a map. These are generally placed in each of the four corners of a map.

To make an exit point, place a script/origin entity with a targetname value of “heli_leave”.

Setting up Old School Mode

The only additional thing required for Old School mode is a series of placed weapons / pickups. Most CoD4 maps have one weapon in the Assault Rifle, SMG, Shotgun, Sniper, and Explosives class, in addition to two perks. However, there are no restrictions to what can be placed in this regard.

To place a weapon, select any of the weapons tagged with mp in the “weapon” section of the right-click menu in the 2D view. For instance, place the weapon/g3/acog_mp entity. Then, check the SUSPENDED and SPIN values in the entity window. Finally, give it a targetname value of “oldschool_pickup”.

Image:Sm_mp_11.jpg

To place perks, Browse to the map_source/prefabs/MP/pickups directory and select one of the six available perks. The available old-school perks are Double Tap, Juggernaut, Last Stand, Martyrdom, Sleight of Hand, and Stopping Power.

Image:Sm_mp_10.jpg

Setting up factions

Faction sets in a MP CoD4 game are either Marines vs. Opfor, or SAS vs. Spetsnaz.

Marines vs. Opfor

Add the following lines to your map’s GSC file:

game["allies"] = "marines";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "desert";
game["axis_soldiertype"] = "desert";

Add the following to your map's CSV file:

include,mptypes_desert

SAS vs. Spetsnaz

Add the following lines to your map’s GSC file:

game["allies"] = "sas";
game["axis"] = "russian";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";

Add the following to your map's CSV file:

include,mptypes_woodland

Creating a Load Screen

Making a custom MP load screen

Packaging files for server

Follow this tutorial : [1]

List of file extensions  :

ExtensionDetailsLocationCreationTutorial
.mapMap source, prefabs, edited by radiantmap_source/RadiantMany tutorials
.d3dbspCompiled map dataraw/maps/mpStep 1 compilationhttp://www.infinityward.com/wiki/index.php?title=Compile_Tools
.ffFast file - optimised packed map fileszone/English/Step 3 compilationhttp://www.infinityward.com/wiki/index.php?title=Compile_Tools
_load.ffFast file for loading ?zone/English/Step 3 compilationhttp://www.infinityward.com/wiki/index.php?title=Compile_Tools
.csvZone filezone_source/English/Step 4, compilationhttp://www.infinityward.com/wiki/index.php?title=Compile_Tools
.iwiInfinity Ward image ?raw/imagesAsset manager, converterhttp://www.infinityward.com/wiki/index.php?title=Making_a_custom_MP_load_screen
No ext.Material for .iwi fileraw/materials/Asset managerhttp://www.infinityward.com/wiki/index.php?title=Making_a_custom_MP_load_screen
.gdtAsset manager game dataraw/source_data/Asset managerhttp://www.infinityward.com/wiki/index.php?title=Making_a_custom_MP_load_screen
.arenaMakes map visible on map listusermaps/[mapname]/ [mapname].iwd/mpNotepadhttp://www.modsonline.com/Tutorials-read-446.html
.iwdRenamed .zip (NOT .RAR!)usermaps/[mapname]/Winzip, Winrar,...Tutorial on this page
.gscGame Script Fileusermaps/[mapname]/maps/mpNotepadhttp://www.infinityward.com/wiki/index.php?title=MP_Game_Script_Files



Add sounds to your custom maps

Some sound found in raw/soundaliases/multiplayer.csv or common.csv cannot be used directly in custom because they are set for specific stock SP and MP maps, example:

emt_whopper_comp,,amb_emitters/emt_whopper_computer1.wav,1,1,max,1,1,100,720,auto,streamed,,rlooping,,launchfacility_b,,,,,,,,0.2,,,75,200,0.65

Note on this example the soundalias is set to the SP map/level launchfacility_b

The solution (as long as the .wav is in the main/iw_xx.iwd) is to create your own soundaliases file. Example for added sound for uber computer sound)

1. create a file called whatever.csv under raw/soundaliases

2. Add the following in the empty file:


#Emitters,,,,,,,,,,,,,,,,,,,,,,,,,
emt_whopper_comp,,amb_emitters/emt_whopper_computer1.wav,1,1,max,1,1,100,720,auto,streamed,,rlooping,,all_mp,,,,,,,,0.2,,,75,200,0.65

Note the change in the line from launchfacility_b to all_mp to allow for the sound in your custom map.

3. If you dont already have on, create a file in raw/maps/mp/ called mp_mapname_fx.gsc, put/add this to it:

main()
{
	level.scr_sound["emt_whopper_comp"] = "emt_whopper_comp";
/#
	if ( getdvar( "clientSideEffects" ) != "1" )
		maps\createfx\mp_mapname_fx::main();
#/		
}


mp_mapname is your map name

4. Again, if not already there create a file under raw/maps/createfx/ called mp_mapname_fx.gsc, put/add this to it:

//_createfx generated. Do not touch!!
main()
{
     	ent = maps\mp\_utility::createOneshotEffect( "light_shaft_dust_large" );
     	ent.v[ "origin" ] = (X, Y, Z);
     	ent.v[ "angles" ] = ( 270, 0, 0 );
     	ent.v[ "fxid" ] = "light_shaft_dust_large";
     	ent.v[ "delay" ] = -15;
     	ent.v[ "soundalias" ] = "emt_whopper_comp";
}

X, Y, Z are the coordinate of where you want the origin of the sound to come from.

5. Finally add this to your zone_source/mp_mapname.csv:

sound,whatever,,all_mp

6. Compile!


Add FXs to your custom maps

In this example a large fire FX with metal fire sound is used

1. Create a folder createfx under /raw/maps/

2. In that folder create a new file called mp_mapname_fx.gsc, in it put the following / mapname being your map name

//_createfx generated. Do not touch!!
main()
{
ent = maps\mp\_utility::createOneshotEffect( "firelp_vhc_lrg_pm_farview" );
ent.v[ "origin" ] = ( X, Y, Z );
ent.v[ "angles" ] = ( 270, 0, 0 );
ent.v[ "fxid" ] = "firelp_vhc_lrg_pm_farview";
ent.v[ "delay" ] = -15;
ent.v[ "soundalias" ] = "fire_metal_large";
}

X, Y, Z are the coordinate where you wish to place your FX.

3. under raw/maps/mp/ create another file called mp_mapname_fx.gsc / mapname being your map name

4. put the following in it:

main()
{
	level._effect[ "firelp_vhc_lrg_pm_farview" ]	= loadfx( "fire/firelp_vhc_lrg_pm_farview" );
	
/#
	if ( getdvar( "clientSideEffects" ) != "1" )
		maps\createfx\mp_mapname_fx::main();
#/		
}

5. In your raw/maps/mp/mp_mapname.gsc put the following after maps\mp\_load::main();

maps\mp\mp_mapname_fx::main();

6. Last step, in your zone_source/mp_mapname.csv add this line:

fx,fire/firelp_vhc_lrg_pm_farview

This will work for any FX you see under raw/fx folder. For soundaliases its a little bit different, I found creating your own soundaliases file is best. In this example thought the soundalias fire_metal_large is from stock and load automatically on any MP map.

Creating Custom Skybox

http://www.planetside.co.uk/terragen Terragen is a freeware scenery generator which can be used to create 2D skyboxes. The freeware version has a limitation that effectively limits the texture dimensions of the skybox to 960, so it can only really be used for skies at 512x512. If Terragen is registered for $99 (US), the size limitation is removed, so skies at 1024x1024 could potentially be rendered.

This tutorial will explain how to use a scene in Terragen to create a 2D skybox that can be used in Cod4 Radiant.

Here is an example of what you can achieve (no land on this one)

[2]

Creating the scene

Terragen can be downloaded HERE: http://www.planetside.co.uk/terragen/win/downloadwin.shtml

Terragen takes a little bit of practice to get the hang of. There are many websites that can teach you the basics. Here are some good ones:

Create your scene and save it. The camera position doesn't matter for now. Terragen can render realistic land if you're very skilled however making terrain is not recommended for a 2D skybox.

Set up the script

The skybox requires six images to be rendered. This script will automate the creation of all six so you do not have to repeatedly come back to your computer and readjust the camera after each render.

Use Notepad to save the following script as skyboxscript.tgs. It can be saved anywhere.

initanim "C:\skyrender", 1

;_ft
Zoom 1.0
CamH 0
CamP 0
CamB 0
frend

;_lf
Zoom 1.0
CamH 90
CamP 0
CamB 0
frend

;_up
Zoom 1.0
CamH 270
CamP 90
CamB 0
frend

;_bk
Zoom 1.0
CamH 180
CamP 0
CamB 0
frend

;_rt
Zoom 1.0
CamH 270
CamP 0
CamB 0
frend

;_dn
Zoom 1.0
CamH 270
CamP -90
CamB 0
frend


Render the skybox

A. Now, in Terragen, uncheck both of the Fixed Height Above Surface boxes in the Rendering Control window. Place your Terragen camera where you want the viewpoint of the skybox to be. What's important here is the Camera Position. The Camera Orientation doesn't matter. Note that changing the height can affect the appearance of the clouds even though the horizon is always in the same location.

[3]

B. Set the detail all the way up in the Rendering Control window. Set the width and height both to 512. This is the best you can do with the freeware version. If you have registered Terragen, set them both to 1024.

[4]

C. You should double check that you did the first two steps right so you don't waste a lot of time. Now, choose Execute Script... from the Terragen menu, and choose the file skyboxscript.tgs that you created earlier. Now the rendering will commence. It may take a couple of hours or more.

D. When the rendering is complete, a dialog will pop up saying the script is complete. Quit Terragen.

Get the textures ready

Now, if you open up the C: drive, you'll see six new BMP files. Rename them as follows, where xxxx is whatever you want to name your sky:

Original filename       Change to  
skyrender0001.bmp  xxxxft.bmp  
skyrender0002.bmp  xxxxlf.bmp  
skyrender0003.bmp  xxxxup.bmp  
skyrender0004.bmp  xxxxbk.bmp  
skyrender0005.bmp  xxxxrt.bmp  
skyrender0006.bmp  xxxxdn.bmp 

Use Photoshop or PaintShopPro to save them as TGA files (dont resize them!)into ...Call of Duty 4 - Modern Warfare\texture_assets\skybox. Create the folder if you have to.

Create the Material Skybox using Asset Manager

A. Open up the IW Asset Manager B. Select Material from the list, click New Entry and inout a name like sky_xxxxx C. Refer to the picture below for Asset Manager Settings

[5]

D. For the Color map note that the pic with _ft needs to be loaded E. Press F10 to convert the new Asset

Everything going well you will see your new Skybox in the texture list of Cod4 Radiant  ;D - Good Luck!

Personal tools