Map release: The final pk3 file
Content:
Introduction:
This tutorial describes the last steps before releasing your map and the result should be a structured and as-small-as-possible filesized pk3. People might have pk3 files in their directory that include files with the same name+directory but with modified content. We'll try to avoid this possibility by setting up our own paths and shadernames.
Note: At this point you should be already done with your brushwork. All texture names and paths in this tutorial are written between quotation marks and are not part of the name itself!
For most of you it is clear but for those who don't know: Textures are stored in "baseq3/textures" but not "baseq3/texture". Shaders are stored in "baseq3/scripts" but not "baseq3/shaders" or "baseq3/script". Sound files are stored under "baseq3/sound". And finally, put the mapmodels into "baseq3/models". If you are not sure where to put your files, have a look at the paths used in pak0.pk3!
Preparation:
-
Use map specific paths: Set up directories for textures, sounds, models if you need to. Especially if you use materials from different texture packages. Texturepacks (e.g. dsitextures.zip by EvilLair) inclusive shaders should stay untouched in their folders. If you want to change them (and the author allows it), then put them into your map specific folder, so the originals don't get corrupted and still work in other maps. Format your texture directory like this, "mapname_base", to get a dropdown menu in the texture browser. [your mapname + underline + your description]
Dropdown menus keep your texture browser window structured and help to categorise your textures as needed (have a glance at the base categories (base_button, base_ceiling, base_door, base_floor...).
-
As the textures are now stored in our paths, we also have to tweak our shaders so they work properly. Probably some textures belonging to the original paths have shaders and we need to create new shaderfiles for our map for 2 reasons:
-
Adding shaders to our new materials: Changing the texture paths according to textures
-
Maximize compatibility of our pk3 file: Avoids possible interactions with modified shader files from other pk3 files that use the same shader. You might also add comments by using
//
forward slashes.
// base_textures - cretebase slick shader textures/amt-fs4_base/cretebase_s { qer_editorimage textures/amt-fs4_base/cretebase_slick.jpg surfaceparm slick surfaceparm metalsteps { map $lightmap rgbGen identity } { map textures/amt-fs4_base/cretebase_slick.jpg blendFunc GL_DST_COLOR GL_ZERO rgbGen identity } }
-
Working on the map file:
-
After you put all relevant textures into your own texture folder(s) (don't forget additional images in shader stages (e.g. effect images from the sfx folder for the tin texture in base_trim)) and created the necessary shaderfiles, you have to replace the old texture paths in your .mapfile with the new ones. GTK Radiant 1.5 has a nice little plugin that does this work for you. It is called "Find / Replace ..." and you find it within the texture browser window under "tools" (the plugin is also available in version 1.4, but it's a bit more complicated; you can find a description at the bottom of this tutorial).
-
Clicking into the "Find" textfield will activate it. Now, select the texture, that you want to replace, from the texture window. Same procedure for the new texture: Activate "Replace" textfield > choose new texture.
Press "Apply" to perform texture replacement.Note: You can also type in your paths manually, or paste and copy, if desired. By activating the checkbox "within selected brushes only" you have the possibility to find/replace textures in a defined area of the map, or rather on preselected brushes, instead of replacing all textures in the whole map.
-
Do this for all of your textures. Save your new, clean mapfile under a new mapname! Exit Radiant and open qqit again + load your clean mapfile (you can also press u to show used textures only). Do a quick check if all textures have been replaced. If there are still one or several old textures, it might be the case that you are using mapmodels with old texturepaths, or, if you have used the "within selected brushes only" function, that some brushes still have the texture on unseen faces. By selecting the texture in the texture window and pressing Shift+A you can see on which brushes it is (can be that you need to activate the 3d view, or keep your mouse onto the texture, before it is working).
If the mapmodels are indicating the textures, open all your mapmodels with notepad and search for the old texture path. Replace it with your new path > save the model > redo step 1c). You could also try it with the "flush and reload" function under "textures" (1.4) or in the texture editor (1.5) and pressing "u" afterwards again.*MATERIAL 1 { *MATERIAL_NAME "textures/trib2/cretebase" *MATERIAL_CLASS "Standard" *MATERIAL_DIFFUSE 0.961254 0.953505 1.000000 *MATERIAL_SHADING Phong *MATERIAL_DIFFUSE { *MAP_NAME "textures/trib2/cretebase" *MAP_CLASS "Bitmap" *MAP_SUBNO 1 *MAP_AMOUNT 1.0 *MAP_TYPE Screen *BITMAP "..\textures\trib2\cretebase.jpg" *BITMAP FILTER Pyramidal
*MATERIAL 1 { *MATERIAL_NAME "textures/amt-fs4_base/cretebase" *MATERIAL_CLASS "Standard" *MATERIAL_DIFFUSE 0.961254 0.953505 1.000000 *MATERIAL_SHADING Phong *MATERIAL_DIFFUSE { *MAP_NAME "textures/amt-fs4_base/cretebase" *MAP_CLASS "Bitmap" *MAP_SUBNO 1 *MAP_AMOUNT 1.0 *MAP_TYPE Screen *BITMAP "..\textures\amt-fs4_base\cretebase.jpg"
-
Now, as we have our structured and clean mapfile, we are ready to compile our map.
Creating the pk3 file:
-
Create your own default pk3 file using 7-zip or Winrar (*.zip not *.rar) and create your directories (or download this pk3 template [template_download.pk3]). Rename the pk3file to its proper mapname (like the*.bsp file) and add/delete (unnecessary) folders within the pk3 if needed. Nothing is more annoying than quitting Q3A, then going into the pk3 and look in the maps folder, just because the author uses different names in pk3 and bsp file. If both have the same name, it's easy to remember the filename and type it into the console. Sometimes it's even happening that the name in the *.arena or the *.defi file is mistyped and therefore it's not possible to enter the map via the menu. So, keep attention!
Note: Q3Map2Toolz provides a mappacker which is quite useless since it didn't work properly for me. It skips textures and will produce a pk3 file with a lot of missing textures or shaders! Create your pk3 on your own. It's a bit more work but you probably won't forget textures.
-
Put your textures, scripts, bsp file, aas file, levelshot and model textures into the according paths in the pk3. You do not have to pack modelfiles (such as *.md3 or *.ase), because the information about their geometry is already stored in the bspfile. But you have to add model shaders and model textures (latter are mostly in the model's directory)!
-
Create a significant screenshot of your map and store it under levelshots.
-
Write a textfile for your map. It should include the following informations:
Mapname, Q3Modification and Gametype, Author, Date of release.
How to "install" the pk3 file.
Possible bugs or incompatibilities.
-
Copyrights: You HAVE TO check the licences for your textures, shaders, models, sounds etc.! If you do not ask the authors for permission - you steal their work! 99.99% of the time you'll get the permission to use the material but you have to ask the author or follow the "conditions of use" (like naming the author in readme; put an additional txt file to pk3...) - its a matter of respect!
Write own legal notes for your brushwork, textures, shaders...
Note: Write your text in english language and save your text file with the extension txt.
Map test with a clean Quake 3 installation:
-
Your map is almost ready for release - a last check in a clean q3 installation (meaning NO custom maps, only basic content (pak0-12)) should be accomplished. Place your pk3 file into the baseq3 (or your mod directory) and launch Quake3. Do not launch your map via
\devmap yourmapname
- select it via the quake3 menu to check if everything is being displayed. -
As you spawn in your map, hit ^ to open the console and look for missing textures, warnings and so on. There might be warnings that you can ignore and others that you have to fix. Use the "Q3A_Common_Error_Messages_v1_5.pdf" (by Bliccer) to search for the warnings and read how to fix them!
In my case, the error can be ignored since compiling with -skyfix produces it:
But you might also get such an output:
Important:: Also put material from the "mapmedia.pk3" into your's, since this pk3 ships with a Radiant installation and is not included in vanilla Q3. That's why some base textures don't work in some maps.
Note: "Clean Quake3 installation" means only install quake3 with pointrelease 1.32c and no additional pk3 files! That way you'll find out if textures or shaders are missing and the map appears as it should.
Note: You can find the replace/reset tool under plugins - bobtoolz - reset textures.
It's only possible to type in the names of the textures if you've checked the enable button. Moreover you should copy and paste them (old and new texture path) form the surface inspector into a new textfile, since you can't manoeuvre within Radiant if the texture reset field is opened. To shorten the procedure you can select the texture, you want to change, and the path fields take over its name automatically.
If you have filled in the paths you can either use all brushes in your map, or only the ones selected before opening the plugin. A cool feature in this small tool is, that only the faces of the brushes, which are covered with the unwanted texture, get retextured. Furthermore the new texture will apply the scale and rotation edits. The rest of the faces stay like they are.