Difference between revisions of "Target location"

From WolfWiki
Jump to: navigation, search
m
 
(14 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
== For Maps In Production ==
 
== For Maps In Production ==
  
A ''target_location'' is a non-brush entity that allows a mapper to specify the name of a certain area to be displayed instead of map coordinates in both the fireteam box and the location displayed when you chat, unless it is set to use coordinates on the client side.
+
A ''target_location'' is a non-brush entity that allows a mapper to specify a name for a certain area of the map.  Unless a player has configured their client to do otherwise, these names will be used instead of map coordinates in both the fireteam box and teammate chat messages.
  
Note that using these will throw an error into the console for every one you have if use in etmain, or as of now, shrub and etpub. The map will still run, though. To use them, first make a file called ''et_entities_location.def'' in the scripts directory of your mapping install. Then, open the file in notepad and paste the following in the file, and then save.
+
Using these entities will cause a warning to be displayed on the server console for every entity in the map during map load on etmain, shrub, and etpub (although etpub is actively developed, and this may change in the future.The map will still run, unaffected, though. To use them with GtkRadiant, first make a file called ''et_entities_location.def'' in the scripts directory of your mapping install. Then, open the file in notepad and paste the following in the file, and then save.
  
 
===Target_location entity===
 
===Target_location entity===
Line 9: Line 9:
 
/*QUAKED target_location (0 0.5 0) (-8 -8 -8) (8 8 8)
 
/*QUAKED target_location (0 0.5 0) (-8 -8 -8) (8 8 8)
 
Set "message" to the name of this location.
 
Set "message" to the name of this location.
 
The message can contain colorcodes, default color is ^3(yellow)
 
  
 
Closest target_location in sight used for the location, if none
 
Closest target_location in sight used for the location, if none
Line 17: Line 15:
 
</pre>
 
</pre>
  
This will allow you to place a target_location into your map inside of GTK Radiant. It will appear as a small green box. When selected, give it a key called ''message'' with a value that is the name you want at that location. You only need to place target_locations so you can always see one, any more are a waste of resources.
+
This will allow you to place a ''target_location'' into your map within GtkRadiant, which will appear as a small green box. When selected, give it a key called ''message'' with a value that is the name you want at that location. You only need to place ''target_location''s so that you can always see one; placing too many may be a waste of resources.
 
+
  
 
== For Completed Maps ==
 
== For Completed Maps ==
  
Note: This method is less efficient engine-wise than using actual target_locations.
+
Note: This method is slightly less efficient than using actual target_locations.
  
target_location on exisitng maps are saved into a file (maps/$MAPNAME_loc_override.dat). this way they are seperated from the map and its .pk3
+
''target_location''s on exisitng maps are saved into an external file named ''maps/'''(mapname)'''_loc.dat''.  They are generally located outside of a .pk3, but this is not a requirement.  If a file named ''maps/'''(mapname)'''_loc_override.dat'' exists, it will be read instead — this allows individual players or clans to override or add locations, even if the map or a .pk3 contains a location file.
  
When adding target_locations to a map you will have acces to the following commands:
+
etpro has the following commands to aid the addition of ''target_location''s to a map:
  
===Loc_commands===
+
===loc_commands===
====loc_add <message>====
+
:Add a new target_location at your current position whit name <message>
+
  
====Loc_del====
+
'''loc_add <name>'''
:Deletes the target_location that you are currently "in"
+
:Adds a new target_location at your current position named <name>.
  
====Loc_move====
+
'''loc_del'''
:Moves the target_location that you are currently "in" to your current position
+
:Deletes the nearest target_location (the one that you are currently "in".)
  
====Loc_rename <message>====
+
'''loc_move'''
:Renames the target_location that you are currently "in" to <message>
+
:Moves the nearest target_location to your current position.
  
====Loc_show====
+
'''loc_rename <name>'''
:Shows the target_location that you are currently "in" as text in console
+
:Renames the nearest target_location to <name>.
  
====Loc_save====
+
'''loc_show'''
:Saves all target_locations to a file (maps/$MAPNAME_loc_override.dat)
+
:Shows the name and origin of the nearest target_location in the console.
  
====Loc_load====
+
'''loc_save'''
:Reloads all target_locations from a file (maps/$MAPNAME_loc_override.dat)
+
:Saves all target_locations to a file named ''maps/'''(mapname)'''_loc_override.dat''
 +
 
 +
'''loc_load'''
 +
:Reloads all target_locations from a file named ''maps/'''(mapname)'''_loc_override.dat''
 +
 
 +
===_loc.dat format===
 +
The _loc.dat file is made up of lines using the format
 +
:''x y z "location name"''
 +
*The character @ may be used instead of "location name" to specify that the location uses the same text as the previous location
 +
*// may be used for comments
 +
Examples can be found in the etpro-*.pk3 files
  
 
==Viewing locations==
 
==Viewing locations==
  
While adding locations to your map you are willing to see your progress. This can be done using a cvar.
+
While adding locations to your map you are able to monitor your changes. This can be enabled using a cvar.
 
+
<pre>
+
b_debuglocations - Bitmask to enable debugging/design aids for location names.  Works with external .dats as well as target_location ents.
+
add the following together:
+
1  - Draw a bubble sprite at each location marker. The nearest location is drawn in green, with all the others being drawn in red.
+
2  - Add a dynamic light at each location marker. The nearest location is lit in red, with all the others being lit in green.
+
4  - Draw floating text at each location marker containing the location's name.  The nearest location is colored green instead of white.
+
8  - Send updates to other players when a location is added, deleted, or renamed.  This function is designed to allow several people to work on adding locations to a level simultaneously.
+
16 - Accept updates to locations from other players who are using b_debuglocations 8.
+
default: 0 valid values: 0-31
+
</pre>
+
  
NOTE: while using b_debuglocations make sure you use loc_save a lot, this is becase of engine limits the client can crash while drawing to many sprites
+
'''b_debuglocations''' (default: 0) - Bitmask to enable debugging/design aids for location names.  Works with external .dats as well as target_location ents. The following values can be added together:
 +
* 1 - Draw a bubble sprite at each location marker.<br>The nearest location is drawn in green, with all the others being drawn in red.
 +
*2 - Add a dynamic light at each location marker.<br>The nearest location is lit in red, with all the others being lit in green.
 +
*4 - Draw floating text at each location marker containing the location's name.<br>The nearest location is colored green instead of white.
 +
*8 - Send updates to other players when a location is added, deleted, or renamed.<br>This function allows multiple people to cooperatively edit locations in a level.
 +
*16 - Accept updates to locations from other players who are using b_debuglocations 8.
 +
<br>
 +
[[Category:ETPro]][[Category:ETPro:Mapping]]

Latest revision as of 04:52, 25 November 2005

For Maps In Production

A target_location is a non-brush entity that allows a mapper to specify a name for a certain area of the map. Unless a player has configured their client to do otherwise, these names will be used instead of map coordinates in both the fireteam box and teammate chat messages.

Using these entities will cause a warning to be displayed on the server console for every entity in the map during map load on etmain, shrub, and etpub (although etpub is actively developed, and this may change in the future.) The map will still run, unaffected, though. To use them with GtkRadiant, first make a file called et_entities_location.def in the scripts directory of your mapping install. Then, open the file in notepad and paste the following in the file, and then save.

Target_location entity

/*QUAKED target_location (0 0.5 0) (-8 -8 -8) (8 8 8)
Set "message" to the name of this location.

Closest target_location in sight used for the location, if none
in site, closest in distance, within PVS
*/

This will allow you to place a target_location into your map within GtkRadiant, which will appear as a small green box. When selected, give it a key called message with a value that is the name you want at that location. You only need to place target_locations so that you can always see one; placing too many may be a waste of resources.

For Completed Maps

Note: This method is slightly less efficient than using actual target_locations.

target_locations on exisitng maps are saved into an external file named maps/(mapname)_loc.dat. They are generally located outside of a .pk3, but this is not a requirement. If a file named maps/(mapname)_loc_override.dat exists, it will be read instead — this allows individual players or clans to override or add locations, even if the map or a .pk3 contains a location file.

etpro has the following commands to aid the addition of target_locations to a map:

loc_commands

loc_add <name>

Adds a new target_location at your current position named <name>.

loc_del

Deletes the nearest target_location (the one that you are currently "in".)

loc_move

Moves the nearest target_location to your current position.

loc_rename <name>

Renames the nearest target_location to <name>.

loc_show

Shows the name and origin of the nearest target_location in the console.

loc_save

Saves all target_locations to a file named maps/(mapname)_loc_override.dat

loc_load

Reloads all target_locations from a file named maps/(mapname)_loc_override.dat

_loc.dat format

The _loc.dat file is made up of lines using the format

x y z "location name"
  • The character @ may be used instead of "location name" to specify that the location uses the same text as the previous location
  • // may be used for comments

Examples can be found in the etpro-*.pk3 files

Viewing locations

While adding locations to your map you are able to monitor your changes. This can be enabled using a cvar.

b_debuglocations (default: 0) - Bitmask to enable debugging/design aids for location names. Works with external .dats as well as target_location ents. The following values can be added together:

  • 1 - Draw a bubble sprite at each location marker.
    The nearest location is drawn in green, with all the others being drawn in red.
  • 2 - Add a dynamic light at each location marker.
    The nearest location is lit in red, with all the others being lit in green.
  • 4 - Draw floating text at each location marker containing the location's name.
    The nearest location is colored green instead of white.
  • 8 - Send updates to other players when a location is added, deleted, or renamed.
    This function allows multiple people to cooperatively edit locations in a level.
  • 16 - Accept updates to locations from other players who are using b_debuglocations 8.