All maps in City of Heroes and City of Villains use a coordinate system to track where people and objects are. These coordinates are all in the form of an (x, y, z) triplet. The coordinates are in units of in-game feet. For example, the point at coordinates (1, 0, 0) is one in-game foot away from coordinates (0, 0, 0).
The X-, Y-, and Z-Axes
The coordinates are slightly odd in that they do not follow a traditional mapping system. The x-axis is the east-west axis on game maps. However, as one travels east (right), the x-coordinate decreases. The y-axis is the vertical location of a person or object and increases as one increases one's altitude. The z-axis is the north-south axis on game maps, and increases as one travels south (down). Notice that coordinates can be positive or negative.
The axes are summarized in the diagram below, a modified map of The Hollows:
The origin of the maps (coordinates (0, 0, 0)) vary from map to map, and in some cases, is off the primary map area entirely.
Internally, the game tracks coordinates to six decimal places, or +/- 0.000001 feet (0.000012 inches). This is a high degree of accuracy, usually a degree that is not needed for practical purposes.
Using the /loc command
The simplest way to obtain one's coordinate is to type /loc on the chat command line. This will show one's coordinates on a map accurate to within 0.1 feet (1.2 inches).
Binding the /loc command
If the /loc command will be used often, it might be useful to bind the command to a key. For example, if the L key is not being used in some other capacity, typing the following on the chat command line will allow a player to simply press the L key to gather his or her location:
/bind L "loc"
Using demorecord files
If a higher degree of accuracy is desired, the full six decimal places of coordinates are recorded in demorecord files. To create a demorecord file, type /demorecord filename on the chat command line. The file will be saved in a subdirectory of the City of Heroes application directory (C:\Program Files\City of Heroes by default) named client_demos. To stop the demorecord file, type /demostop on the chat command line. For simple coordinate-gathering, the demostop command can usually be issued immediately after the demorecord command.
Once the demorecord file is created, open it using a text editor and search for the character's or object's name you wish to get the coordinates of. The name should be contained on a line such as the following:
0 32 NEW "DJ Zero"
The second number in this line (32 in the example) is the identification number of the character or object. All coordinates related to this character or object will be contained on similar lines with this identification number, but with the POS command instead of NEW. For example, the following line may appear in a demorecord file with the previous example line in it:
0 32 POS -80.09375 23.0625 -1057.03125
The numbers following the POS command are the x-, y-, and z-coordinates of the character or object. In this example, DJ Zero is located at coordinates (-80.093750, 23.062500, -1,057.031250). The /loc command rounds these coordinates to the nearest tenth, so in the game, this would appear as (-80.1, 23.1, -1057.0).