Quantcast Coordinates for BfA - WoWInterface
Thread Tools Display Modes
04-21-18, 04:58 AM   #1
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 153
Question Coordinates for BfA

Hey!

I know it's very early but do you guys know a coordinate addon for BfA-Alpha yet that actually works? I tried some like MapCoords, Coordinates, DCoords, but none of them works.
  Reply With Quote
04-21-18, 11:35 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,486
They changed how coordinates are gotten. We're still figuring this out.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-21-18, 01:26 PM   #3
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 331
The usual API functions (GetMapZones(), GetPlayerMapPosition(), GetCurrentMapAreaID(), etc) are missing and causing no end of headache.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
04-21-18, 01:56 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 874
In game type
Code:
/api mapui
click the pink MapUI text

or extract the code files and look in
\Addons\Blizzard_APIDocumentation\MapDocumentation.lua
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle and Move Pad Plus.
  Reply With Quote
04-21-18, 04:26 PM   #5
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 331
That helps with some things but functions like GetPlayerMapPosition() aren't defined there (doesn't exist in BfA and doesn't show in the extraction from live)
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
04-21-18, 05:36 PM   #6
Nimhfree
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 234
At the moment the key piece that is missing for me is the implementation of GetPlayerMapPosition. And using UnitPosition gives me values that are not percentage ranges within the map, but seem to be absolute points on the map. If only we could get the map dimensions we could probably simulate GetPlayerMapPosition well.

On a side note, it looks like C_Map.GetBestMapForUnit('player') is not ready early on in startup because nil is being returned.
  Reply With Quote
04-21-18, 06:08 PM   #7
Nevcairiel
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 56
The entire Map API in general is still in development. Its one area that has seen an entire redesign in BfA and its not quite done yet. Give any map-related questions a bit more time to be figured out!

Do however note that any addons that accessed map or location information will need changes, and sometimes maybe even re-think their design as things change drastically. So be prepared for that.

Information we currently do have:
- Continent/Zone index numbers are gone without replacement (ie. what GetCurrentMapContinent/GetCurrentMapZone used to return)
- The map filename is also gone (map files use the numeric texture IDs now, not useful as identification anylonger)
- MapAreaId/Floor are gone, replaced by UiMapId (every map you see has its own unique id, no longer dealing with floors etc)
- All maps are hierarchical, which means they have a parent and any number of children. A continent has zones, a zone has dungeons and microdungeons, a dungeon has floors, and so on, and you can query this hierarchy to find dungeon floors etc.
- No stateful API anymore (ie. the map currently being shown by the map is tracked in Lua only, not by any hidden magic in C code) (this is still a work in progress)
- A translation from MapAreaId/Floor => UiMapId is not available in-game, however we've been given this data to do the translation manually, or include them in an addon

Whats still missing so far:
- Player position in zone coordinates (ie. what GetPlayerMapPosition was)
- Zone size and position data (what GetAreaMapInfo used to return)

I've been talking to Dan (Blizzard UI developer who hangs around IRC), and he has assured me that he will look into exporting Zone size data again. If this does not happen for some reason, the alternative is to extract that data from the games database files and dump it into a library.

Whichever method is required, I'll definitely be updating my HereBeDragons map library to provide the same amount of information it offers now (I use the term "update" losely, due to the drastic changes it'll probably be a rewrite and calling it "2.0"). But, all in good time once I know which course to even take based on which API we're getting, and which we're not.

Last edited by Nevcairiel : 04-21-18 at 06:31 PM.
  Reply With Quote
04-21-18, 07:23 PM   #8
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 331
Originally Posted by Nevcairiel View Post
A translation from MapAreaId/Floor => UiMapId is not available in-game, however we've been given this data to do the translation manually, or include them in an addon.
UIMapIDToWorldAreaID.lua in the /addons/Blizzard_Depricated export directory contains a mapping of new to old.

Lua Code:
  1. -- This is for the 8.x map transition.
  2. -- Previously maps were represented by either by a pair of WorldMapAreaID and DungeonFloor, or a DungeonMapID.
  3. -- In the new system all maps are represented by a UiMapID.
  4. -- The CSV formatted comment below holds mapping between the two systems at the time of transition.
  5. -- This file will be removed in a future patch.
  6.  
  7.  
  8. --[[
  9. UiMapID,WorldMapAreaID,DungeonMapID,DungeonFloor
  10. 1,4,,0
  11. 2,4,598,8
  12. 3,4,602,10
  13. 4,4,603,11
  14. 5,4,604,12
  15. 6,4,657,19
  16. ....
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
04-22-18, 02:48 AM   #9
Nevcairiel
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 56
Indeed, thats the data I was referring to.
  Reply With Quote
05-12-18, 11:12 AM   #10
Bluspacecow
Giver of walls of text :)
 
Bluspacecow's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 769
Here's a Macro -

/script px, py = C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"), "player"):GetXY()
/script DEFAULT_CHAT_FRAME:AddMessage(format ("[ %s ] %.2f , %.2f",GetZoneText(),px*100,py*100));
__________________
tuba_man on Apple test labs : "I imagine a brushed-aluminum room with a floor made of keyboards, each one plugged into a different test box somewhere. Someone is tasked with tossing a box full of cats (all wearing turtlenecks) into this room. If none of the systems catch fire within 30 minutes, testing is complete. Someone else must remove the cats. All have iPods." (http://community.livejournal.com/tec...t/2018070.html)
  Reply With Quote
05-16-18, 04:08 AM   #11
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 153
Originally Posted by Bluspacecow View Post
Here's a Macro -

/script px, py = C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"), "player"):GetXY()
/script DEFAULT_CHAT_FRAME:AddMessage(format ("[ %s ] %.2f , %.2f",GetZoneText(),px*100,py*100));
Thanks!
Working fluently.
  Reply With Quote

WoWInterface » PTR » PTR General Discussion » Coordinates for BfA

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off