{"id":1501,"date":"2025-09-21T10:37:25","date_gmt":"2025-09-21T09:37:25","guid":{"rendered":"https:\/\/grimms3dworlds.ddns.net\/?page_id=1501"},"modified":"2025-10-03T17:13:06","modified_gmt":"2025-10-03T16:13:06","slug":"cod-2-mapping-issues","status":"publish","type":"page","link":"https:\/\/grimms3dworlds.ddns.net\/index.php\/cod-2-mapping-issues\/","title":{"rendered":"CoD 2 Mapping issues."},"content":{"rendered":"\n<div style=\"font-family: 'Segoe UI', Arial, sans-serif; max-width: 900px; margin: 0 auto; padding: 20px; background: #ffffff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);\">\n\n    <script>\n    function copyCode(button) {\n        const pre = button.previousElementSibling;\n        const code = pre.querySelector('code');\n        const text = code.innerText;\n        navigator.clipboard.writeText(text).then(() => {\n            button.textContent = 'Copied!';\n            button.style.background = '#28a745';\n            setTimeout(() => {\n                button.textContent = 'Copy';\n                button.style.background = '#007bff';\n            }, 2000);\n        }).catch(err => {\n            console.error('Failed to copy: ', err);\n        });\n    }\n    <\/script>\n\n    <h1 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">CoD 2 Mapping Issues<\/h1>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">General<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">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.<\/p>\n    <p style=\"background: #e7f3fe; border: 1px solid #b6d4fe; padding: 15px; color: #0c5460; border-radius: 5px; margin-bottom: 20px;\">\n        <strong>Note:<\/strong> 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.\n    <\/p>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Compiling<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">To successfully compile a map for Call of Duty 2 multiplayer, it must meet the following requirements:<\/p>\n    <ul style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\">Named with the prefix <code>mp_<\/code> (e.g., <code>mp_my_map<\/code>).<\/li>\n        <li style=\"margin-bottom: 8px;\">A sealed skybox to prevent light leaks and rendering issues.<\/li>\n        <li style=\"margin-bottom: 8px;\">An <code>info_player_start<\/code> entity (right-click in 2D view > info > player_start).<\/li>\n        <li style=\"margin-bottom: 8px;\">An <code>mp_global_intermission<\/code> entity (right-click in 2D view > mp > global_intermission).<\/li>\n        <li style=\"margin-bottom: 8px;\">At least one DM spawn point (right-click in 2D view > mp > dm_spawn).<\/li>\n        <li style=\"margin-bottom: 8px;\">At least one regular light entity (right-click in 2D view > light).<\/li>\n        <li style=\"margin-bottom: 8px;\">Exactly one worldspawn entity (see below for setup).<\/li>\n    <\/ul>\n    <p style=\"background: #e7f3fe; border: 1px solid #b6d4fe; padding: 15px; color: #0c5460; border-radius: 5px; margin-bottom: 20px;\">\n        <strong>Note:<\/strong> Failing to include any of these elements can result in compilation errors, crashes, or improper gameplay behavior.\n    <\/p>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Worldspawn<\/h2>\n<p style=\"color: #4a4a4a; line-height: 1.6;\">The worldspawn entity defines global map properties such as lighting and atmosphere. For advanced descriptions of light settings, see <a href=\"https:\/\/grimms3dworlds.ddns.net\/index.php\/world-lighting\/\" style=\"color: #1a3c5e; text-decoration: none; border-bottom: 1px solid #1a3c5e;\" onmouseover=\"this.style.textDecoration='underline';\" onmouseout=\"this.style.textDecoration='none';\">World Lighting<\/a>. There are two primary methods to configure it: directly in Radiant or via a text editor.<\/p>\n\n    <h3 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 1px solid #e0e6ed; padding-bottom: 8px;\">Method 1: In Radiant<\/h3>\n    <ol style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\">With nothing selected, press <kbd>N<\/kbd> on your keyboard (or go to View > Toggle > Entity Info) to open the entity window.<\/li>\n        <li style=\"margin-bottom: 8px;\">In the entity window, ensure <code>classname<\/code> is set to <code>worldspawn<\/code>.<\/li>\n        <li style=\"margin-bottom: 8px;\">In the Key and Value input boxes, add each required worldspawn key-value pair. Descriptions and examples are available in the entity window tooltip.<\/li>\n    <\/ol>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Example key-value pairs:<\/p>\n    <ul style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\"><code>\"sundiffusecolor\" \".85 .9 1\"<\/code> \u2013 Diffuse color for sunlight.<\/li>\n        <li style=\"margin-bottom: 8px;\"><code>\"diffusefraction\" \".3\"<\/code> \u2013 Fraction of diffuse light.<\/li>\n        <li style=\"margin-bottom: 8px;\"><code>\"ambient\" \".02\"<\/code> \u2013 Ambient light level.<\/li>\n        <li style=\"margin-bottom: 8px;\"><code>\"sundirection\" \"-45 210 0\"<\/code> \u2013 Direction of the sun (yaw pitch roll).<\/li>\n        <li style=\"margin-bottom: 8px;\"><code>\"suncolor\" \"1 .95 .85\"<\/code> \u2013 Color of the sun.<\/li>\n        <li style=\"margin-bottom: 8px;\"><code>\"sunlight\" \"1.5\"<\/code> \u2013 Intensity of sunlight.<\/li>\n        <li style=\"margin-bottom: 8px;\"><code>\"classname\" \"worldspawn\"<\/code> \u2013 Required entity class.<\/li>\n        <li style=\"margin-bottom: 8px;\"><code>\"_color\" \"0.000000 0.501961 1.000000\"<\/code> \u2013 Fog or overall color tint.<\/li>\n    <\/ul>\n\n    <h3 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 1px solid #e0e6ed; padding-bottom: 8px;\">Method 2: Using a Text Editor<\/h3>\n    <ol style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\">Open your <code>.map<\/code> file in a text editor (e.g., Notepad++).<\/li>\n        <li style=\"margin-bottom: 8px;\">Locate the <code>\/\/ entity 0<\/code> section, which should already contain <code>\"classname\" \"worldspawn\"<\/code>.<\/li>\n        <li style=\"margin-bottom: 8px;\">Copy and paste the desired key-value pairs into this section.<\/li>\n        <li style=\"margin-bottom: 8px;\">Save the file and reload it in Radiant if needed.<\/li>\n    <\/ol>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Example worldspawn section in a <code>.map<\/code> file:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; max-height: 400px; overflow-y: auto; overflow-x: auto; white-space: pre;\"><code>\n\/\/ entity 0\n{\n    \"diffusefraction\" \".4\"\n    \"_color\" \"0.890196 0.733333 0.407843\"\n    \"ambient\" \"0\"\n    \"sundiffusecolor\" \".58 .59 .71\"\n    \"sundirection\" \"-19 -70 0\"\n    \"suncolor\" \".94 .62 .5\"\n    \"sunlight\" \".5\"\n    \"classname\" \"worldspawn\"\n}\n        <\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Grid File<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">The standard batch file for creating a grid file (<code>cod2compiletools_grid.bat<\/code>) 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.<\/p>\n    <ol style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\">Navigate to your Call of Duty 2 installation directory and open the <code>bin<\/code> folder.<\/li>\n        <li style=\"margin-bottom: 8px;\">Locate <code>cod2compiletools_grid.bat<\/code> and open it in a text editor.<\/li>\n        <li style=\"margin-bottom: 8px;\">Delete all existing content and replace it with the updated script below.<\/li>\n        <li style=\"margin-bottom: 8px;\">Save the file.<\/li>\n        <li style=\"margin-bottom: 8px;\">Use <code>cod2compiletools.exe<\/code> to generate the grid file for your map.<\/li>\n    <\/ol>\n    <p style=\"background: #e7f3fe; border: 1px solid #b6d4fe; padding: 15px; color: #0c5460; border-radius: 5px; margin-bottom: 20px;\">\n        <strong>Note:<\/strong> This updated batch file automatically detects MP maps (prefixed with <code>mp_<\/code>) and uses the appropriate compiler executable, while ensuring compatibility with modern Windows versions.\n    <\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; max-height: 400px; overflow-y: auto; overflow-x: auto; white-space: pre;\"><code>@ECHO OFF\n\nset treepath=%~1\nset makelog=%2\nset cullxmodel=%3\nset mapname=%4\n\nIF \"%mapname:~0,3%\" == \"mp_\" (\n    set exe=CoD2MP_s.exe\n    set mapdir=main\\maps\\mp\n) ELSE (\n    set exe=CoD2SP_s.exe\n    set mapdir=main\\maps\n)\n\nmkdir \"%treepath%%mapdir%\"\nIF EXIST \"%treepath%\\map_source\\%mapname%.grid\" copy \"%treepath%\\map_source\\%mapname%.grid\" \"%treepath%%mapdir%\\%mapname%.grid\"\n\ncd %treepath%\n\n%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%\n\nIF EXIST \"%treepath%\\map_source\\%mapname%.grid\" attrib -r \"%treepath%\\map_source\\%mapname%.grid\"\nIF EXIST \"%treepath%%mapdir%\\%mapname%.grid\" move \/y \"%treepath%%mapdir%\\%mapname%.grid\" \"%treepath%\\map_source\\%mapname%.grid\"\n\ncls\n<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>function copyCode(button) { const pre = button.previousElementSibling; const code = pre.querySelector(&#8216;code&#8217;); const text = code.innerText; navigator.clipboard.writeText(text).then(() => { button.textContent = &#8216;Copied!&#8217;; button.style.background = &#8216;#28a745&#8217;; setTimeout(() => { button.textContent = &#8216;Copy&#8217;; button.style.background = &#8216;#007bff&#8217;; }, 2000); }).catch(err => { console.error(&#8216;Failed to copy: &#8216;, err); }); } CoD 2 Mapping Issues General For the tool executables to [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1501","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages\/1501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=1501"}],"version-history":[{"count":7,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages\/1501\/revisions"}],"predecessor-version":[{"id":1547,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages\/1501\/revisions\/1547"}],"wp:attachment":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=1501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}