<li><aclass="backlink"title="Click to do a full-text search for this title"href="./LevelEditor_MPMapDefs?action=fullsearch&value=linkto%3A%22LevelEditor+MPMapDefs%22&context=180">LevelEditor MPMapDefs</a></li>
<spanclass="anchor"id="line-2"></span><spanclass="anchor"id="line-3"></span><pclass="line862">Multiplayer mapDefs require a bit more setup than <aclass="nonexistent"href="./LevelEditor_SPMapDefs.html">Single Player mapDefs</a> but are still pretty easy. The big consideration is making sure your level is compatible with autodownload support that has been added in Quake 4 1.1. <spanclass="anchor"id="line-4"></span><spanclass="anchor"id="line-5"></span><pclass="line862">The addonPak system is virtually identical to that implemented for <aclass="http"href="http://zerowing.idsoftware.com/linux/doom/AddonPaks">Doom III</a>, just with some different mapDef keys and slightly different loadscreen support. In a nutshell, making your pk4 an addonPak will allow servers to run your map but only require players to have it installed if it is currently running. <spanclass="anchor"id="line-6"></span><spanclass="anchor"id="line-7"></span><pclass="line867">
<spanclass="anchor"id="line-8"></span><spanclass="anchor"id="line-9"></span><pclass="line874">First, let's quickly cover the pk4 directory structure. (You can create an empty pk4 file simply by creating a new .zip file in the software of your choice and changing the file extension.) Files in your pk4 need to match the directory structure they would have freely within your q4base directory: <spanclass="anchor"id="line-10"></span><spanclass="anchor"id="line-11"></span><pclass="line867"><spanclass="anchor"id="line-12"></span><pre>-q4base/
<spanclass="anchor"id="line-34"></span><spanclass="anchor"id="line-35"></span><pclass="line874">addonPaks are defined by including a file named 'addon.conf' to the base of your pk4 file. If no maps are included in the pk4, this file may be left empty: <spanclass="anchor"id="line-36"></span><spanclass="anchor"id="line-37"></span><pclass="line867"><spanclass="anchor"id="line-38"></span><pre>
<spanclass="anchor"id="line-39"></span></pre><spanclass="anchor"id="line-40"></span><spanclass="anchor"id="line-41"></span><pclass="line874">If you do have a map or multiple maps in the pk4, this file includes an 'addonDef' entry and mapDef entries for all maps in the pk4. <spanclass="anchor"id="line-42"></span><spanclass="anchor"id="line-43"></span><pclass="line874">Here is an example addon.conf that you can use as a base for your own map releases: <spanclass="anchor"id="line-44"></span><spanclass="anchor"id="line-45"></span><pclass="line867"><spanclass="anchor"id="line-46"></span><pre>// Example Quake 4 addonDef
<spanclass="anchor"id="line-47"></span>// Feel free to use this as a base for your own releases.
<spanclass="anchor"id="line-48"></span>
<spanclass="anchor"id="line-49"></span>// Marks this pk4 as an addonPak for autodownload.
<spanclass="anchor"id="line-65"></span></pre><spanclass="anchor"id="line-66"></span><spanclass="anchor"id="line-67"></span><pclass="line874">[MAP PATH] should be your map's path and filename relative to q4base/maps/. All our official MP maps are in q4base/maps/mp/ (i.e. mapDef mp/q4dm3), but you're welcome to use whatever path structure you feel like (maps/nickname/, etc.) so long as it is contained within the maps/ folder. <spanclass="anchor"id="line-68"></span><spanclass="anchor"id="line-69"></span><pclass="line874">General file naming convention in custom levels for Quake games of the past has been to use an initial or initials plus the iteration of the franchise followed by the gametype and how many maps you've made for that gametype... So for example my third CTF level might be named kfs4ctf3. <spanclass="anchor"id="line-70"></span><spanclass="anchor"id="line-71"></span><pclass="line874">[MAP NAME] is whatever the map will be called. If you're on an uncreative streak you can always just use your map's filename or resort to references to obscure movies and/or TV shows. <spanclass="anchor"id="line-72"></span><spanclass="anchor"id="line-73"></span><pclass="line862">You'll notice we don't specify a loadscreen here; more on that in a moment. You'll also notice a few keys are missing when compared with our official multiplayer maps' mapDef entries (Gametype_*, mp_thumb). These keys were <strong>only</strong> used for the Xbox 360 version of Quake and are <strong>not</strong> required for your own levels for the PC version. (If you've release a map with these already, don't worry, it won't hurt anything) <spanclass="anchor"id="line-74"></span><spanclass="anchor"id="line-75"></span><pclass="line867">
<h2id="head-6ff8d7a91ee8b054616900e9b632e2abfe74aac1">The .def File and Load Screen</h2>
<spanclass="anchor"id="line-76"></span><spanclass="anchor"id="line-77"></span><pclass="line862">To get your load screen working, you will need to create a new <ahref="./DefinitionFile.html">DefinitionFile</a> with a 'duplicate' mapDef entry that points only to your loadscreen (but does not re-define any other element of the addon.conf mapDef): <spanclass="anchor"id="line-78"></span><spanclass="anchor"id="line-79"></span><pclass="line867"><spanclass="anchor"id="line-80"></span><pre>// Example Quake4 mapDef with addonPak support
<spanclass="anchor"id="line-90"></span></pre><spanclass="anchor"id="line-91"></span><spanclass="anchor"id="line-92"></span><pclass="line874">Your loadscreen image should be a 512x512 TGA (and/or DDS) file - just like level textures, power of 2 images play nice with the game's renderer. <spanclass="anchor"id="line-93"></span><spanclass="anchor"id="line-94"></span><pclass="line874">You'll also notice the map name is repeated here; this ensures that it displays correctly on the load screen instead of your map's path. <spanclass="anchor"id="line-95"></span><spanclass="anchor"id="line-96"></span><pclass="line867">
<spanclass="anchor"id="line-97"></span><spanclass="anchor"id="line-98"></span><pclass="line874">In the event that your pk4 is dependent on other addonPaks to function (in most cases it will not be), you can modify your addonDef to specify other pk4 files for dependency: <spanclass="anchor"id="line-99"></span><spanclass="anchor"id="line-100"></span><pclass="line867"><spanclass="anchor"id="line-101"></span><pre>addonDef {
<spanclass="anchor"id="line-102"></span> // Checksums for pk4 dependency.
<spanclass="anchor"id="line-105"></span></pre><spanclass="anchor"id="line-106"></span><spanclass="anchor"id="line-107"></span><pclass="line874">To find the checksum, set "developer 1" in the Quake 4 console and type "path" - this will give you a list of all pk4s and checksums (the crazy numbers/letters by the end) in the game directory, including all addonPaks: <spanclass="anchor"id="line-108"></span><spanclass="anchor"id="line-109"></span><pclass="line862">:<imgclass="attachment"src="./LevelEditor_MPMapDefs.jpg"title="attachment:path.jpg"/><spanclass="anchor"id="line-110"></span><spanclass="anchor"id="line-111"></span><pclass="line874">In my example case, I have addon_test.pk4, and addon_test_assets.pk4 on which it depends. My addonDef in addon_test.pk4 would then look like this: <spanclass="anchor"id="line-112"></span><spanclass="anchor"id="line-113"></span><pclass="line867"><spanclass="anchor"id="line-114"></span><pre>addonDef {
<spanclass="anchor"id="line-118"></span></pre><spanclass="anchor"id="line-119"></span><spanclass="anchor"id="line-120"></span><pclass="line874">and my addon_test_assets.pk4, containing no maps, would look like this: <spanclass="anchor"id="line-121"></span><spanclass="anchor"id="line-122"></span><pclass="line867"><spanclass="anchor"id="line-123"></span><pre>
<spanclass="anchor"id="line-124"></span></pre><spanclass="anchor"id="line-125"></span><spanclass="anchor"id="line-126"></span><pclass="line874">The comment naming the pk4 file(s) is optional, but may help keep track of filenames in the event you have multiple dependencies. <spanclass="anchor"id="line-127"></span><spanclass="anchor"id="line-128"></span><pclass="line867">
<spanclass="anchor"id="line-129"></span><spanclass="anchor"id="line-130"></span><pclass="line862">Keep in mind that pk4s with official naming conventions (i.e. pak003.pk4) will <strong>not</strong> work with autodownload and may create conflicts with official game content if you happened to pick a number being used in a future patch. For simplicity, we recommend using a naming convention of map_mapname.pk4 (Using the above example: map_kfs4ctf3.pk4) to prevent confusion and allow easy sorting of map pak files. <spanclass="anchor"id="line-131"></span><spanclass="anchor"id="line-132"></span><pclass="line867"><hr/><pclass="line874"><spanclass="anchor"id="line-133"></span>Back to <ahref="./LevelEditor.html">LevelEditor</a><spanclass="anchor"id="line-134"></span><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">LevelEditor MPMapDefs (last edited 2006-04-23 02:47:53 by <spantitle="AndrewWeldon @ 24-240-36-51.dhcp.mdsn.wi.charter.com[24.240.36.51]"><aclass="nonexistent"href="./AndrewWeldon.html"title="AndrewWeldon @ 24-240-36-51.dhcp.mdsn.wi.charter.com[24.240.36.51]">AndrewWeldon</a></span>)</p>
<li><ahref="http://moinmoin.wikiwikiweb.de/">MoinMoin Powered</a></li><li><ahref="http://www.python.org/">Python Powered</a></li><li><ahref="http://validator.w3.org/check?uri=referer">Valid HTML 4.01</a></li>