CoD 2 Mapping Issues
General
For the tool executables to work correctly on Windows 10 and 11, they should be run in administrator mode. This ensures proper access to system resources and prevents permission-related errors during mapping and compilation.
Note: Do not run CoD2Radiant in Windows XP Service Pack 3 compatibility mode, as this can break the user interface and prevent right-clicking from functioning properly.
Compiling
To successfully compile a map for Call of Duty 2 multiplayer, it must meet the following requirements:
- Named with the prefix
mp_(e.g.,mp_my_map). - A sealed skybox to prevent light leaks and rendering issues.
- An
info_player_startentity (right-click in 2D view > info > player_start). - An
mp_global_intermissionentity (right-click in 2D view > mp > global_intermission). - At least one DM spawn point (right-click in 2D view > mp > dm_spawn).
- At least one regular light entity (right-click in 2D view > light).
- Exactly one worldspawn entity (see below for setup).
Note: Failing to include any of these elements can result in compilation errors, crashes, or improper gameplay behavior.
Worldspawn
The worldspawn entity defines global map properties such as lighting and atmosphere. For advanced descriptions of light settings, see World Lighting. There are two primary methods to configure it: directly in Radiant or via a text editor.
Method 1: In Radiant
- With nothing selected, press N on your keyboard (or go to View > Toggle > Entity Info) to open the entity window.
- In the entity window, ensure
classnameis set toworldspawn. - In the Key and Value input boxes, add each required worldspawn key-value pair. Descriptions and examples are available in the entity window tooltip.
Example key-value pairs:
"sundiffusecolor" ".85 .9 1"– Diffuse color for sunlight."diffusefraction" ".3"– Fraction of diffuse light."ambient" ".02"– Ambient light level."sundirection" "-45 210 0"– Direction of the sun (yaw pitch roll)."suncolor" "1 .95 .85"– Color of the sun."sunlight" "1.5"– Intensity of sunlight."classname" "worldspawn"– Required entity class."_color" "0.000000 0.501961 1.000000"– Fog or overall color tint.
Method 2: Using a Text Editor
- Open your
.mapfile in a text editor (e.g., Notepad++). - Locate the
// entity 0section, which should already contain"classname" "worldspawn". - Copy and paste the desired key-value pairs into this section.
- Save the file and reload it in Radiant if needed.
Example worldspawn section in a .map file:
// entity 0
{
"diffusefraction" ".4"
"_color" "0.890196 0.733333 0.407843"
"ambient" "0"
"sundiffusecolor" ".58 .59 .71"
"sundirection" "-19 -70 0"
"suncolor" ".94 .62 .5"
"sunlight" ".5"
"classname" "worldspawn"
}
Grid File
The standard batch file for creating a grid file (cod2compiletools_grid.bat) is designed for single-player maps only and may lack commands for compatibility with newer operating systems. To support both multiplayer (MP) and single-player (SP) maps, edit the file as follows.
- Navigate to your Call of Duty 2 installation directory and open the
binfolder. - Locate
cod2compiletools_grid.batand open it in a text editor. - Delete all existing content and replace it with the updated script below.
- Save the file.
- Use
cod2compiletools.exeto generate the grid file for your map.
Note: This updated batch file automatically detects MP maps (prefixed with mp_) and uses the appropriate compiler executable, while ensuring compatibility with modern Windows versions.
@ECHO OFF
set treepath=%~1
set makelog=%2
set cullxmodel=%3
set mapname=%4
IF "%mapname:~0,3%" == "mp_" (
set exe=CoD2MP_s.exe
set mapdir=main\maps\mp
) ELSE (
set exe=CoD2SP_s.exe
set mapdir=main\maps
)
mkdir "%treepath%%mapdir%"
IF EXIST "%treepath%\map_source\%mapname%.grid" copy "%treepath%\map_source\%mapname%.grid" "%treepath%%mapdir%\%mapname%.grid"
cd %treepath%
%exe% +set developer 1 +set logfile 2 +set r_smc_enable 0 +set r_smp_backend 0 +set sv_pure 0 +set scr_dm_timelimit 0 +set r_vc_makelog %makelog% +set r_vc_showlog 16 +set r_cullxmodel %cullxmodel% +set com_introplayed 1 +devmap %mapname%
IF EXIST "%treepath%\map_source\%mapname%.grid" attrib -r "%treepath%\map_source\%mapname%.grid"
IF EXIST "%treepath%%mapdir%\%mapname%.grid" move /y "%treepath%%mapdir%\%mapname%.grid" "%treepath%\map_source\%mapname%.grid"
cls

