It is currently Sun Feb 18, 2018 9:09 pm

Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: Tutorial: Basic Quake 4 MP Map .def File
PostPosted: Mon Oct 31, 2005 5:47 pm 
Hero Member
Hero Member
User avatar

Joined: Mon Sep 05, 2005 7:23 pm
Posts: 521
I will write a few tutorials in the coming weeks about mapping for q4, and I thought I would start off with something easy :)

Folder Structure

I will start off with a brief explanation of directory structure in q4. Under q4base, you have a maps directory, and a subdirectory called 'mp', for multiplayer. Thats where your multiplayer maps should go. There is also a folder called 'def' which is where your def file should go. There are other directories, for custom models, sounds, textures, etc, which are useful, but they are not necesarry at this point. In order to release a custom map, the only 2 things you absolutely need are the maps/mp dir (with your maps in it of course) and your def directory, with your def file inside. Its good to have a folder for levelshots as well - the standard directory for this is gfx/guis/loadscreens.

.def File Explanation

The .def file for a map is the file that tells the game what type of level the map is, and how to read it, and makes the level show up in your multiplayer menu. It is similar to the .arena file for q3. Under your q4base directory, you will need a directory called 'def', in which you will put your def file. A def file is written in .txt format, and the extension is renamed to .def.

Sample .def File

mapDef mp/storm3dm1 {

"name" "storm3dm1"
"DM" "1"
"Team DM" "1"
"Tourney" "1"
"CTF" "0"
"Arena CTF" "0"
"Gametype_Deathmatch" "1"
"Gametype_TeamDeathmatch" "1"
"Gametype_Tournament" "1"
"Gametype_CaptureTheFlag" "0"
"Gametype_ArenaCaptureTheFlag" "0"
"loadimage" "gfx/guis/loadscreens/storm3dm1"
"mp_thumb" "gfx/guis/mainmenu/thumb_storm3dm1"


mapDef Field

The mapDef field should point to the directory location of the map under the q4base/maps directory, and the name at the end should be the FILE NAME of the map, without any extension. The standard is to put mp maps under mp directory, so its necesarry to specify that this is where your map file is. If you leave the map directly in the maps folder, you can go ahead and remove the mp/mapname.

name Field

The name field is the name of the map (not necesarilly the filename, but what you want the title to be). For instance, if I wanted to call my level "Cajun Hell II", I would put that in the name field.

gametypes Fields

Next to the gametypes (CTF, Team DM, etc) there is a number, either 0 or 1. Setting the number to 1 will allow q4 to recognize that your map is of a certain gametype in the browser. For instance, the sample map in the template is a dm/tourney/tdm map, therefor the numbers next to dm/tourney/tdm is set to "1", and the numbers next to both of the CTF modes is set to "0". This means that when browsing for the map in game, it will only show up under dm/tourney/tdm, and will be filtered out under the CTF menu. The same goes with the gametype_Tournament, gametype_whatever fields. Im not sure why this is required twice, but appearantly it is.

loadimage Field

The loadimage field refers to the image that will be seen when you load up your map. You can put this image anywhere in your q4base dir, but the standard is to put it under gfx/guis/loadscreens directory. The text after loadscreens should be the exact filename of your screenshot, without the extension.

mp_thumb Field

mp_thumb refers to a thumbnail of your levelshot, so ppl can see a smaller screenshot of your level when browsing in the menu. You dont need this, as q4 will automatically thumbnail your larger image for your levelshot. This is only useful if you want a different thumbnail from your levelshot.

Okay, thats it for now. This tutorial will be updated as I get more info, feedback etc.


 Post subject:
PostPosted: Mon Oct 31, 2005 6:15 pm 
Full Member
Full Member
User avatar

Joined: Thu Sep 08, 2005 4:32 am
Posts: 129
Thanks! I will definitely check these out. I was going to post/ask some questions about textures, but thought I would google more before asking. :)

Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
twilightBB Style by Daniel St. Jules of