Locations help indicate to players the location of their team-mates and objectives. By placing an info_location entity, an area of a map can be assigned a title which is then referred to by in-game text messages and prompts. Location names are localised for different language editions of the game.
An info_location entity should be created in or around the area to be named. It should then be assigned and values that match a location definition inside locations.locstr (generally, and should both be set to the same string)
Theand values should be set to encompass the named area.
Mappers are advised to use locations already defined in locations.locstr and locations.lang rather than creating their own.
Location names are identified in the same manner as all other localised strings.
- The info_location entity refers to a location name, e.g.
- Location names are defined in /base/localization/locstr/maps/locations.locstr, which refer to localised strings, e.g. '#str_00110103'
- Localised location strings are defined in /base/localization/english/strings/locations.lang, e.g. 'Explosives Testing'
So to add a new location name:
- Add it to locations.lang (for each language) with the same name in each
- Refer to the locations.lang entries from locations.locstr
- Refer to the entry in locations.locstr in the info_location entity.
Localised versions of location names are stored in different folders within the /base/localization directory. For example, all Polish translations lie in /base/localization/polish and Italian in /base/localization/italian. The file formats are identical for all languages.
The console command g_debugLocations can be used to debug issues with locations. When turned on (g_debugLocations 1) all location entities are drawn as red cubes. The game highlights in green the one it thinks is appropriate for where the player is standing. This can be used to ensure location radii have been set up correctly.