Target location

From WolfWiki
Jump to: navigation, search

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.