From 62cf128ed4744655cbd33bb6890641bd1b20e90e Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 23 Aug 2008 12:10:55 +0000 Subject: [PATCH] fix docs for the new features git-svn-id: svn://svn.icculus.org/nexuiz/trunk@4155 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- Docs/mapping.txt | 151 +++++++++++++++++++++++++++++------------------ 1 file changed, 94 insertions(+), 57 deletions(-) diff --git a/Docs/mapping.txt b/Docs/mapping.txt index 7101958d9..0f65a079f 100644 --- a/Docs/mapping.txt +++ b/Docs/mapping.txt @@ -30,22 +30,20 @@ Appendix A - Advanced mapinfo Appendix B - Helpful extras i. Team Colors ii. Text Colors - + Appendix C - Advanced Darkplaces shaders ======================== =I. Map Lists & Scripts= ======================== -There are actually 2 script/cfg options available to you, each serving a -different purpose and being executed at a different time during the map's life -cycle: +There now is just a single script/cfg file available to you, containing all map +specific settings: -1. mapname.mapinfo -2. mapname.cfg +mapname.mapinfo -Of these, the mapinfo is the only one that's truely required - and the game is -even so nice that it automatically generates a draft of it for you. +The mapinfo is actually required - however, the game is so nice that it +automatically generates a draft of it for you. ------------------ -The mapinfo file- @@ -73,6 +71,7 @@ data/data/wazat1.mapinfo for me. The file may look like: _diameter 1966.839355 _spawnpoints 5 has weapons + cdtrack 5 type dm 30 20 type dom 200 20 type rune 200 20 @@ -113,24 +112,6 @@ the number of teams; the CTF type allows a third number to specify a capture limit (if g_ctf_win_mode is 0 or 1). -------------- --mapname.cfg- -------------- - -Unlike the mapinfo, which is processed by the server, the mapname.cfg file is -processed by the client, and therefore is used for client settings like fog or -the music to play. - -To make the mapname.cfg, make a file with the same name as your map's .bsp -file, except with a .cfg extension instead of .bsp. For example, my -"wazat1.bsp" map would use "wazat1.cfg". It uses the same name as your map, -thus the term mapname.cfg. It will typically only contain a single line: - - cd loop 6 - -where 6 is the number or name of a track in sound/cdtracks/ - - =============== =II. Map Image= =============== @@ -271,9 +252,9 @@ re-detected after you add such entities, delete the data/data/mapname.mapinfo file - or simply edit it to add the "type dom" line. -========== -=III. CTF= -========== +========= +=IV. CTF= +========= Capture the flag needs at least 1 CTF flag per team, and can also make use of team spawnpoints. @@ -301,9 +282,9 @@ detect it for supporting CTF. To force the map to get re-detected after you add such entities, delete the data/data/mapname.mapinfo file - or simply edit it to add the "type ctf" line. -================ -=III. Runematch= -================ +============== +=V. Runematch= +============== Runematch needs only one type of entity to work: rune spawn points. You will need at least one for each rune (5 minimum at the time of this writing), though @@ -319,6 +300,58 @@ detect it for supporting Runematch. To force the map to get re-detected after yo such entities, delete the data/data/mapname.mapinfo file - or simply edit it to add the "type rune" line. +========== +=VI. Race= +========== + +Making a race map is not hard: you need some special spawnpoints, and some checkpoints. + +Spawnpoints +----------- +classname info_player_race +target targetname of the controlpoint +race_place for finish line control points, the place of the point + +Checkpoints +----------- +classname trigger_race_checkpoint +targetname some name to target the checkpoint with +cnt number of the checkpoint (or 0 for finish line) + +Note that checkpoints are brush entities, and they should be somewhat thick and +cover the full volume the player could use to get past them. + +Example of entity placement: + + ### + ---------------------###--- + / >>>> 7 5 3 1 ### \ + / >>>> 8 6 4 2 ### \ + | ------------------### | +%%%%%%%% ###| | +%%%%%%%% $$$| | + | ^ ^ ------------------$$$ | + \ $$$ < / + \ $$$ < / + ----------------------$$$--- + $$$ + +###: classname = trigger_race_checkpoint, cnt = 0, targetname = finish +$$$: classname = trigger_race_checkpoint, cnt = 1, targetname = cp1 +%%%: classname = trigger_race_checkpoint, cnt = 2, targetname = cp2 +>: classname = info_player_race, target = finish, angle = 0 +1: classname = info_player_race, target = finish, angle = 0, race_place = 1 +2: classname = info_player_race, target = finish, angle = 0, race_place = 2 +.... +8: classname = info_player_race, target = finish, angle = 0, race_place = 8 +<: classname = info_player_race, target = cp1, angle = 180 +^: classname = info_player_race, target = cp2, angle = 90 + +If your map contains the required entities for Race, the menu will automatically +detect it for supporting Race. To force the map to get re-detected after you add +such entities, delete the data/data/mapname.mapinfo file - or simply edit it to +add the "type race" line. + =============================== =Appendix A - Advanced mapinfo= @@ -348,6 +381,10 @@ These "settemp" settings are automatically removed when the map is left and another is loaded. As you can see, it is possible to make per-mode temporary settings, and global ones. +Similar settings are also possible for the client: + + clientsettemp_for_type all r_shadow_glossexponent 96 + ============================= =Appendix B - Helpful Extras= @@ -394,30 +431,30 @@ Occasionally you may want to print text in color, such as team names. Here are y 8 Grey (transparent) 9 Grey (solid) 0 Black - + ========================================== =Appendix C - Advanced Darkplaces shaders= -========================================== - -Shader parameters for DP's own features: -- dp_reflect - Makes surfaces of this shader reflective with r_water. The reflection is - alpha blended on the texture with the given alpha, and modulated by the given - color. distort is used in conjunction with the normalmap to simulate a - nonplanar water surface. -- dp_refract - Makes surfaces of this shader refractive with r_water. The refraction - replaces the transparency of the texture. distort is used in conjunction with - the normalmap to simulate a nonplanar water surface. -- dp_water - This combines the effects of dp_reflect and dp_refract to simulate a water - surface. However, the refraction and the reflection are mixed using a Fresnel - equation that makes the amount of reflection slide from reflectmin when - looking parallel to the water to reflectmax when looking directly into the - water. The result of this reflection/refraction mix is then layered BELOW the - texture of the shader, so basically, it "fills up" the alpha values of the - water. The alpha value is a multiplicator for the alpha value on the texture - - set this to a small value like 0.1 to emphasize the reflection and make - the water transparent; but if r_water is 0, alpha isn't used, so the water can - be very visible then too. - +========================================== + +Shader parameters for DP's own features: +- dp_reflect + Makes surfaces of this shader reflective with r_water. The reflection is + alpha blended on the texture with the given alpha, and modulated by the given + color. distort is used in conjunction with the normalmap to simulate a + nonplanar water surface. +- dp_refract + Makes surfaces of this shader refractive with r_water. The refraction + replaces the transparency of the texture. distort is used in conjunction with + the normalmap to simulate a nonplanar water surface. +- dp_water + This combines the effects of dp_reflect and dp_refract to simulate a water + surface. However, the refraction and the reflection are mixed using a Fresnel + equation that makes the amount of reflection slide from reflectmin when + looking parallel to the water to reflectmax when looking directly into the + water. The result of this reflection/refraction mix is then layered BELOW the + texture of the shader, so basically, it "fills up" the alpha values of the + water. The alpha value is a multiplicator for the alpha value on the texture + - set this to a small value like 0.1 to emphasize the reflection and make + the water transparent; but if r_water is 0, alpha isn't used, so the water can + be very visible then too. + -- 2.39.2