Difference between revisions of "Target location"

From WolfWiki
Jump to: navigation, search
(For Maps In Production: Mostly wording updates)
(For Completed Maps: Fact updates.)
Line 21: Line 21:
 
== 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_locations 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>'''
+
'''loc_add <name>'''
:Add a new target_location at your current position whit name <message>
+
:Adds a new target_location at your current position named <name>.
  
'''Loc_del'''
+
'''loc_del'''
:Deletes the target_location that you are currently "in"
+
:Deletes the nearest target_location (the one that you are currently "in".)
  
'''Loc_move'''
+
'''loc_move'''
:Moves the target_location that you are currently "in" to your current position
+
:Moves the nearest target_location to your current position.
  
'''Loc_rename <message>'''
+
'''loc_rename <name>'''
:Renames the target_location that you are currently "in" to <message>
+
:Renames the nearest target_location to <name>.
  
'''Loc_show'''
+
'''loc_show'''
:Shows the target_location that you are currently "in" as text in console
+
:Shows the name and origin of the nearest target_location in the console.
  
'''Loc_save'''
+
'''loc_save'''
:Saves all target_locations to a file (maps/''mapname''_loc_override.dat)
+
:Saves all target_locations to a file named ''maps/'''(mapname)'''_loc_override.dat''
  
'''Loc_load'''
+
'''loc_load'''
:Reloads all target_locations from a file (maps/''mapname''_loc_override.dat)
+
:Reloads all target_locations from a file named ''maps/'''(mapname)'''_loc_override.dat''
  
 
==Viewing locations==
 
==Viewing locations==

Revision as of 15:48, 13 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.

The message can contain colorcodes, default color is ^3(yellow)

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

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.