Skip to content

An attempt to convert WoW world coordinates to zone coordinates

License

Notifications You must be signed in to change notification settings

TheGrayDot/wow-vanilla-world-coords

Repository files navigation

wow-vanilla-world-coords

An attempt to understand the WoW Vanilla coordinate system.

Problem

How does one determine the target zone from XYZ world coordinates? Or convert XYZ world coordinates to XY coordinates in a specific zone? For example, in CMaNGOS there are game objects with XYZ coordinates in the database. How can you figure out what zone those world XYZ coordinates are in? There are also teleport spells avilable GM commands with XYZ coordinates, such as .go -14406.6 419.353 22.3907 0 which teleports the player to Booty Bay. How do you know this is in Stanglethorn Vale?

Short answer... I do not think this is possible. But you can convert from XY zone coordinates to world coordinates. This repo documents some of my research, notes, links, and code to try share some of the information I learned along the way.

Quick Setup

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

If you get the following error message when using one of the generate_zone_map* files:

UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

Install a GUI such as QT5.

pip install PyQt5

File Summary

There are a bunch of files included in the repo. Here are a summary of the files:

  • coords_test.py: A Python test script with a bunch of known world coordinates to known zones and areas.
  • generate_zone_map_*: Two Python scripts to visually map the WorldMapArea.dbc file.
  • worldmaparea.py: A Python module with a couple classes to handle loading WorldMapArea DBC data.
  • worldmaparea.csv: Data extracted from 1.12.1.5875 WoW Vanilla client. The extracted WorldMapArea DBC data is easily downloaded from WoW.tools.

Definitions

  • XYZ coordinates: Also known as world coordinates, global coordinates, or .gps coordinates. These are the type of coordinates you will see in WoW private server databases, or when running the .gps command (if you have GM command capability of a private server)

  • XY coordinates: Also known as normal coordinates, map coordinates, or zone coordinates. These are the coordinates you will see on the zone map (area map) in-game. Basically, these are the coordinates you are used to seeing in-game.

Example Gameobject Coordinates

World coordinates from a CMaNGOS database

  1. Finding the game object ID of Sungrass
mysql> select entry,name from gameobject_template where name = "Sungrass";;
+--------+----------+
| entry  | name     |
+--------+----------+
| 142142 | Sungrass |
| 176636 | Sungrass |
| 180164 | Sungrass |
+--------+----------+
  1. Then get all sungrass on world map
select * from gameobject where id = "142142";

Resources

About

An attempt to convert WoW world coordinates to zone coordinates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages