Template:Location/doc



The template location is intended to give the area code and the specific x/y-coordinates of an item, creature or something else in a specific location.

It can be used, for example, in loot lists of areas or in location lists of item articles. In a superscripted and italic format, it displays the submitted area code as a link to the areas list, and the submitted x/y-coordinates in the games' scripting format (separated by period), linking to the coordinates article.

This template uses named parameters. It is possible to omit either the area code or the coordinates, and only the respectively other will be displayed. It is, however, not possible to omit one of the two coordinates if the other is given – this will produce an error.

Usage
Type, following any item and a blank in a list which you want to add detailed location information to, where   should be replaced by the area code (usually "AR", followed by four digits; in enhanced editions sometimes "BD", "BP" or "OH" plus four digits) and   and   by the exact coordinates.
 * As this will often mark containers, the coordinates of the container have to be used. In Near Infinity a container has several of these:
 * Location: X/Y – the topmost and easy to find coordinates in the file, though often only somewhere around the container on the area map; if the container is a "pile", these must be used
 * Launch point: X/Y – further down the file data; represents the coordinates a character has to occupy on the area map to activate the container; only somewhere around as well
 * Bounding box – more complicated to acquire but perhaps the most intuitive coordinates for the player, as by using these it is possible to give the exact center coordinates of the container on the area map, the ones a player's mouse has to point to, to find it
 * To calculate these, divide the sum of "Bounding box: Left" and "Bounding box: Right" by 2 for "X", and the sum of "Bounding box: Top" and "Bounding box: Bottom" by 2 for "Y"
 * x=((Bounding box: Left)+(Bounding box: Right)/2)
 * y=((Bounding box: Top)+(Bounding box: Bottom)/2)

If only the area code is submitted, only this will be shown. Same applies to the coordinates if the area code is omitted; however, it is not possible to provide only either the x- or the y-coordinate.


 * Examples




 * results in


 * Found in Kagain's Shop in Beregost
 * in the barrel to the left of the counter
 * in the bag in the sideroom
 * Carried by the Slaver Guard at the entrance to the Slaver Stockade in the Athkatla Slums
 * Found in a drawer on the first floor of the northernmost house in Beregost