Coordinate Translation menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    mcpickle's Avatar Private
    Reputation
    1
    Join Date
    Aug 2010
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Coordinate Translation

    Goal: Convert long numerical coordinate values (-4785, 29 received from memory into the coordinates used in-game by players (45.3, 76.7).

    I've heard that there is no one formula for this conversion due to the coordinates being zone specific and because of this I should map out the physical boundaries of a zone and use basic math to translate the coordinates.

    For all practical purposes my coordinate system is working just fine. This is purely a cosmetic thing. So before I waste any more time on this issue I figured I'd check to see if anyone has discovered a better solution.

    Appreciate any help!

    Coordinate Translation
  2. #2
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mcpickle View Post
    Goal: Convert long numerical coordinate values (-4785, 29 received from memory into the coordinates used in-game by players (45.3, 76.7).

    I've heard that there is no one formula for this conversion due to the coordinates being zone specific and because of this I should map out the physical boundaries of a zone and use basic math to translate the coordinates.

    For all practical purposes my coordinate system is working just fine. This is purely a cosmetic thing. So before I waste any more time on this issue I figured I'd check to see if anyone has discovered a better solution.

    Appreciate any help!
    Why not open up WoW and find out how it does it?

  3. #3
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    WowClientDbRow zone = WoWGame.UI.GetWorldMapAreaShown();
    var a = new Vector3(zone.GetField<float>(6), zone.GetField<float>(4), 0f);
    var b = new Vector3(zone.GetField<float>(7), zone.GetField<float>(5), 0f);
    var realPoint = new Vector3(a.X + y * (b.X - a.X), a.Y + x * (b.Y - a.Y), 0f);
    I'll let you figure out the math for the other way around; it's simple.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  4. #4
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    Code:
    WowClientDbRow zone = WoWGame.UI.GetWorldMapAreaShown();
    var a = new Vector3(zone.GetField<float>(6), zone.GetField<float>(4), 0f);
    var b = new Vector3(zone.GetField<float>(7), zone.GetField<float>(5), 0f);
    var realPoint = new Vector3(a.X + y * (b.X - a.X), a.Y + x * (b.Y - a.Y), 0f);
    I'll let you figure out the math for the other way around; it's simple.
    Not always correct. (As I showed you with the Barrens area)

  5. #5
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
                            Database.WorldMapAreaRecord CurrentArea = Database.WorldMapArea.Get((Int32) Core.ObjectManager.ZoneId);
                            if (CurrentArea != null)
                            {
                                Single tX = CurrentArea.A.X - (CurrentArea.A.X - CurrentArea.B.X) * args.Location.X;
                                Single tY = CurrentArea.A.Y - (CurrentArea.A.Y - CurrentArea.B.Y) * args.Location.Y;
                                Single tZ = Me.Location.Z; // the game
    
                                Teleport(new WoWPoint(tX, tY, tZ));
                            }

    In what situations would this fail? I've been using it extensivly for quite some time now and have yet to end up in limbo.

    Edit: few days soon, but 911 posts!
    Last edited by Robske; 09-07-2010 at 06:28 AM.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Code:
                            Database.WorldMapAreaRecord CurrentArea = Database.WorldMapArea.Get((Int32) Core.ObjectManager.ZoneId);
                            if (CurrentArea != null)
                            {
                                Single tX = CurrentArea.A.X - (CurrentArea.A.X - CurrentArea.B.X) * args.Location.X;
                                Single tY = CurrentArea.A.Y - (CurrentArea.A.Y - CurrentArea.B.Y) * args.Location.Y;
                                Single tZ = Me.Location.Z; // the game
    
                                Teleport(new WoWPoint(tX, tY, tZ));
                            }

    In what situations would this fail? I've been using it extensivly for quite some time now and have yet to end up in limbo.

    Edit: few days soon, but 911 posts!
    For whatever reason, in the Barrens, the bounds for the area are literally, 1/2 of Kalimdor. I'm not sure why, but that's just how it is. If you check in game; the coords properly go from 1-100 (roughly) within the zone. The WorldMapArea bounds for the Barrens, are definitely not within that area. Plus; WoW does a lot of transformations on the location according to what I've found. (Excluding the BElf/DR/etc starting area transforms, and dungeon map transforms)

Similar Threads

  1. How to translate coordinate into mapcoords?
    By demonguy in forum WoW Memory Editing
    Replies: 4
    Last Post: 12-06-2012, 04:46 AM
  2. +rep to who ever can fully translate this...
    By idusy-org in forum Community Chat
    Replies: 14
    Last Post: 09-25-2006, 04:05 PM
  3. BWH chinese translated. Now has an updated version for 1.11
    By ultimaonline100 in forum World of Warcraft Bots and Programs
    Replies: 40
    Last Post: 09-13-2006, 05:28 AM
  4. how do you find .go coordinates?
    By xjanal in forum World of Warcraft General
    Replies: 1
    Last Post: 09-11-2006, 07:12 PM
  5. Question about Coordinates
    By dela in forum WoW ME Questions and Requests
    Replies: 8
    Last Post: 08-26-2006, 04:52 AM
All times are GMT -5. The time now is 06:25 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search