5 While I can't help you make a map, I can help you get it listed in the menu and
\r
6 working in the maplist. :p The central object is the .mapinfo file, but
\r
7 there's much more available.
\r
11 I Map Lists & Scripts
\r
12 (get your map listed and working)
\r
28 Appendix A - Advanced mapinfo
\r
30 Appendix B - Helpful extras
\r
34 Appendix C - Advanced Darkplaces shaders
\r
36 ========================
\r
37 =I. Map Lists & Scripts=
\r
38 ========================
\r
40 There are actually 2 script/cfg options available to you, each serving a
\r
41 different purpose and being executed at a different time during the map's life
\r
47 Of these, the mapinfo is the only one that's truely required - and the game is
\r
48 even so nice that it automatically generates a draft of it for you.
\r
54 *cue even more scary music*
\r
56 The mapinfo file is basically what gets your map listed in the menu, and sets
\r
57 up the options needed to change to it. If no mapinfo file exists, the menu
\r
58 will automatically generate a rough draft for you on game startup. It will get
\r
59 stored into data/data/mapname.mapinfo.
\r
61 As an example, let's say I make a map called "wazat1.bsp". As long as I'm
\r
62 fantasizing, I might as well say this map is so well done I'm actually willing
\r
63 to release it for friends, neighbors, fellow forum visitors and other people
\r
64 who like me to judge me by. Let's also assume that I want domination,
\r
65 deathmatch/team deathmatch and runematch to all be playable on my map.
\r
67 This is very easy. First, I start the game and exit it again so the game writes
\r
68 data/data/wazat1.mapinfo for me. The file may look like:
\r
70 title Wazat's Great Map
\r
73 _diameter 1966.839355
\r
82 As I see, the menu autodetected that my map may be suitable for deathmatch,
\r
83 domination, runematch, last man standing and arena. But I want the map to be
\r
84 played in domination, deathmatch, team deathmatch, runematch only, and I also
\r
85 want different timelimits/fraglimits, so I will change the "type" lines to:
\r
92 Also, while I am at it, I should fix the placeholders in the map description lines:
\r
95 description A large multi level arena map
\r
98 Although not entirely necessary, I will now move the .mapinfo file from
\r
99 data/data/maps/wazat1.mapinfo to data/maps/wazat1.mapinfo, so it is at the same
\r
100 place as my map. Next time I start the game, my map will be shown supporting
\r
101 the right game modes and with the right description in the menu.
\r
103 Also, note the "has weapons" line. If this line is not there (which happens if
\r
104 the map contains no weapon entities other than the Nex), the map will run in
\r
105 MinstaGib only and not be shown in the menu normally. So if you look for your
\r
106 map and don't find it, add "has weapons" to the mapinfo file, and make sure you
\r
107 have weapon entities placed.
\r
109 There's much more power in a mapinfo file. See Appendix A for more details.
\r
116 Unlike the mapinfo, which is processed by the server, the mapname.cfg file is
\r
117 processed by the client, and therefore is used for client settings like fog or
\r
120 To make the mapname.cfg, make a file with the same name as your map's .bsp
\r
121 file, except with a .cfg extension instead of .bsp. For example, my
\r
122 "wazat1.bsp" map would use "wazat1.cfg". It uses the same name as your map,
\r
123 thus the term mapname.cfg. It will typically only contain a single line:
\r
127 where 6 is the number or name of a track in sound/cdtracks/
\r
134 So, you've got your map listed in the menu and it plays properly, but the menu
\r
135 isn't showing your picture! Or the picture is scaled badly! What manner of man
\r
136 would create such an accursed abomination?!
\r
138 Well... That sounds like something I'd do. :D
\r
140 And it is really easy: just make a screenshot of the map in action (preferably
\r
141 with crosshair and HUD switched off), and place it next to the map as
\r
142 mapname.jpg. For best rendering and file size, make the image in 4:3 aspect
\r
143 ratio, but scale it to the resolution 256x256 or possibly 512x512. It will look
\r
144 skewed in your image editing app, but the menu will show it right, and your
\r
145 graphics card LOVES images of such dimension.
\r
152 In order to get Domination working well in your map, you need to place dom_team
\r
153 and dom_controlpoint entites. You *must* have at least 3 dom_team entities - 2
\r
154 minimum teams and one blank one (empty netname and no team). You can have up
\r
155 to 4 teams (5 dom_team entities).
\r
160 netname name of team (Red Team). Set to "" or don't define for the required
\r
162 cnt color of the team. See the "Helpful Extras" section for info.
\r
163 model When this team captures control points, the points turn to this
\r
164 model. If this is the neutral team, points start out as this model.
\r
165 noise Sound to be played on the control point when it's captured. Only
\r
166 players nearby will hear it.
\r
167 noise1 Sound to be played to all players when the control point is
\r
168 captured. Also good for an annoncer voice ("Red Team has captured a
\r
173 classname dom_controlpoint
\r
174 message message to be displayed to all players when this point is captured,
\r
175 preceded by the team's name. This defaults to " has captured a control point".
\r
176 You can specify different names for each point, for example " has captured the
\r
178 origin where in the map this point is
\r
179 wait How often this point gives its controlling team frags.
\r
180 frags How many frags this point gives each wait cycle.
\r
182 Here is an example entry in a .ent file that includes colored text and 3 teams:
\r
185 "classname" "dom_team"
\r
187 "model" "models/domination/dom_unclaimed.md3"
\r
190 "classname" "dom_team"
\r
191 "netname" "^4Blue Team"
\r
194 "noise1" "domination/claim.wav"
\r
195 "model" "models/domination/dom_blue.md3"
\r
198 "classname" "dom_team"
\r
199 "netname" "^1Red Team"
\r
202 "noise1" "domination/claim.wav"
\r
203 "model" "models/domination/dom_red.md3"
\r
206 "classname" "dom_team"
\r
207 "netname" "^6Pink Team"
\r
210 "noise1" "domination/claim.wav"
\r
211 "model" "models/domination/dom_pink.md3"
\r
214 "classname" "dom_team"
\r
215 "netname" "^3Yellow Team"
\r
218 "noise1" "domination/claim.wav"
\r
219 "model" "models/domination/dom_yellow.md3"
\r
222 "classname" "dom_controlpoint"
\r
223 "message" " ^3has captured the ^1Hallways"
\r
224 "origin" "-206.0 -488.8 -150.0"
\r
230 "classname" "dom_controlpoint"
\r
231 "message" " ^3has captured the ^1Lavaroom"
\r
232 "origin" "1457.1 19.9 -110.0"
\r
237 "classname" "dom_controlpoint"
\r
238 "message" " ^3controls the ^1Nex & Strength"
\r
239 "origin" "-259.8 299.3 5"
\r
244 "classname" "dom_controlpoint"
\r
245 "message" " ^3has captured the ^1Upper Platform"
\r
246 "origin" "539.7 1206.0 182.0"
\r
251 "classname" "dom_controlpoint"
\r
252 "message" " ^3has captured the ^1Teleport Room"
\r
253 "origin" "-1000.0 636.2 -16.0"
\r
259 As you can see in the example, there are 5 dom_team ents: one blank, Red, Blue,
\r
260 Pink and Yellow. Each control point has a different message (giving it a
\r
261 special name), and the one in the hallways gives 3 frags every 5 seconds
\r
262 instead of just one, making it more valuable.
\r
264 If your map contains the required entities for Domination, the menu will
\r
265 automatically detect it for supporting Domination. To force the map to get
\r
266 re-detected after you add such entities, delete the data/data/mapname.mapinfo
\r
267 file - or simply edit it to add the "type dom" line.
\r
274 Capture the flag needs at least 1 CTF flag per team, and can also make use of
\r
279 classname item_flag_team1 or item_flag_team2
\r
280 angle direction the flag will point
\r
281 model model of the flag (default: models/ctf/flag_red.md3 or
\r
282 models/ctf/flag_blue.md3)
\r
283 noise sound played when flag is stolen (default: "ctf/take.wav")
\r
284 noise1 sound played when flag is returned by a teammate (default:
\r
286 noise2 sound played when flag is captured (default: "ctf/capture.wav")
\r
287 noise3 sound played when flag returns itself (default: "ctf/respawn.wav")
\r
291 classname info_player_team1 or info_player_team2
\r
292 *note: These function just like info_player_deathmatch, but for one team only.
\r
293 If you don't make team spawnpoints, info_player_deathmatch is used instead.
\r
295 If your map contains the required entities for CTF, the menu will automatically
\r
296 detect it for supporting CTF. To force the map to get re-detected after you add
\r
297 such entities, delete the data/data/mapname.mapinfo file - or simply edit it to
\r
298 add the "type ctf" line.
\r
304 Runematch needs only one type of entity to work: rune spawn points. You will
\r
305 need at least one for each rune (5 minimum at the time of this writing), though
\r
306 you should probably have more than that in the map. Just give the points a
\r
307 classname and origin.
\r
311 classname runematch_spawn_point
\r
313 If your map contains the required entities for Runematch, the menu will automatically
\r
314 detect it for supporting Runematch. To force the map to get re-detected after you add
\r
315 such entities, delete the data/data/mapname.mapinfo file - or simply edit it to
\r
316 add the "type rune" line.
\r
319 ===============================
\r
320 =Appendix A - Advanced mapinfo=
\r
321 ===============================
\r
323 You now know how to make a basic, bare-bones mapinfo to set up a couple options
\r
324 and load your map. However, there's much more you can do! Consider these
\r
327 1. The laser has too high of a force for laser jumps and ruins CTF
\r
328 2. I don't want players to start out with the shotgun, but with the machinegun
\r
330 3. The map takes so much server CPU performance that the anti-wallhack can't be
\r
333 Each of these situations can be resolved with ease with a little work in the
\r
336 To do this, I can add the following lines to my mapinfo file:
\r
338 settemp_for_type ctf g_balance_laser_primary_force 200
\r
339 settemp_for_type all g_start_weapon_shotgun 0
\r
340 settemp_for_type all g_start_weapon_uzi 1
\r
341 settemp_for_type all sv_cullentities_trace 0
\r
343 These "settemp" settings are automatically removed when the map is left and
\r
344 another is loaded. As you can see, it is possible to make per-mode temporary
\r
345 settings, and global ones.
\r
348 =============================
\r
349 =Appendix B - Helpful Extras=
\r
350 =============================
\r
355 When you need to set an entity's color or team, use these values:
\r
381 Occasionally you may want to print text in color, such as team names. Here are your options:
\r
390 8 Grey (transparent)
\r
394 ==========================================
\r
395 =Appendix C - Advanced Darkplaces shaders=
\r
396 ==========================================
398 Shader parameters for DP's own features:
399 - dp_reflect <distort> <r> <g> <b> <a>
400 Makes surfaces of this shader reflective with r_water. The reflection is
401 alpha blended on the texture with the given alpha, and modulated by the given
402 color. distort is used in conjunction with the normalmap to simulate a
403 nonplanar water surface.
404 - dp_refract <distort> <r> <g> <b>
405 Makes surfaces of this shader refractive with r_water. The refraction
406 replaces the transparency of the texture. distort is used in conjunction with
407 the normalmap to simulate a nonplanar water surface.
408 - dp_water <reflectmin> <reflectmax> <refractdistort> <reflectdistort> <refractr> <refractg> <refractb> <reflectr> <reflectg> <reflectb> <alpha>
409 This combines the effects of dp_reflect and dp_refract to simulate a water
410 surface. However, the refraction and the reflection are mixed using a Fresnel
411 equation that makes the amount of reflection slide from reflectmin when
412 looking parallel to the water to reflectmax when looking directly into the
413 water. The result of this reflection/refraction mix is then layered BELOW the
414 texture of the shader, so basically, it "fills up" the alpha values of the
415 water. The alpha value is a multiplicator for the alpha value on the texture
416 - set this to a small value like 0.1 to emphasize the reflection and make
417 the water transparent; but if r_water is 0, alpha isn't used, so the water can
418 be very visible then too.