Thread Tools Display Modes
08-09-16, 12:17 AM   #1
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Question map/zone IDs

Hello,

Is there a way to identify map/zone IDs within the game?

For example, database sites list Ashran under zone/map ID: 6941, is this in the game too? If so, can I display/print it somehow in the game?
  Reply With Quote
08-09-16, 05:56 AM   #2
Mazzop
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 74
There is InstanceMapID and MapID (dont ask me for differences between them :P), but neither gives that number for Ashran
  Reply With Quote
08-09-16, 06:26 AM   #3
Benio
A Murloc Raider
Join Date: Jul 2016
Posts: 8
Using GetMapContinents function, you get a list of continents with their ids:

Code:
Dump: value=GetMapContinents()
[1]=13,
[2]="Kalimdor",
[3]=14,
[4]="Eastern Kingdoms",
[5]=466,
[6]="Outland",
[7]=485,
[8]="Northrend",
[9]=751,
[10]="The Maelstrom",
[11]=862,
[12]="Pandaria",
[13]=962,
[14]="Draenor",
[15]=1007,
[16]="Broken Isles"
For n ≥1; 2n −1th argument is the id of continent, 2nth argument is the name of continent.

Then, call GetMapZones(n) for each continent.
Note: Pass n, NOT id of continent.

When passing n =7, we get Draenor Zones with Zones id:

Code:
Dump: value=GetMapZones(7);
[1]=978,
[2]="Ashran",
[3]=941,
[4]="Frostfire Ridge",
[5]=949,
[6]="Gorgrond",
[7]=950,
[8]="Nagrand",
[9]=947,
[10]="Shadowmoon Valley",
[11]=948,
[12]="Spires of Arak",
Return format is same like for continents.
Finally, call GetMapSubzones(zoneID) where zoneID is id of zone returned by GetMapZones 2n −1th argument (as opposed to GetMapZones).

Example code, listing all subzones with their zones, with their continents (all with their corresponding ids):
Lua Code:
  1. local continents = {GetMapContinents()};
  2. for continentN =1, #continents /2 do
  3.     local continentID = continents[2* continentN -1];
  4.     local continentName = continents[2* continentN];
  5.     local zones = {GetMapZones(continentN)};
  6.     for zoneN =1, #zones /2 do
  7.         local zoneID = zones[2* zoneN -1];
  8.         local zoneName = zones[2* zoneN];
  9.         local subZones = {GetMapSubzones(zoneID)};
  10.         for subZoneN =1, #subZones /2 do
  11.             local subZoneID = zones[2* subZoneN -1];
  12.             local subZoneName = zones[2* subZoneN];
  13.            
  14.             print(continentName .."(" ..continentID .."): " ..zoneName .."(" ..zoneID .."): " ..subZoneName .."(" ..subZoneID ..")");
  15.         end;
  16.     end;
  17. end;

Legion output part:
Code:
Broken Isles(1007): Azsuna(1015): Azsuna(1015)
Broken Isles(1007): Highmountain(1024): Azsuna(1015)
Broken Isles(1007): Highmountain(1024): Broken Shore(1021)
Broken Isles(1007): Stormheim(1017): Azsuna(1015)
Broken Isles(1007): Stormheim(1017): Broken Shore(1021)
Broken Isles(1007): Stormheim(1017): Dalaran(1014)
Broken Isles(1007): Suramar(1033): Azsuna(1015)
Broken Isles(1007): Val'sharah(1018): Azsuna(1015)
Broken Isles(1007): Val'sharah(1018): Broken Shore(1021)
  • I can confirm that those IDs differs from ingame IDs using listed functions.
  • dev.battle.net API returns empty result for /wow/zone/6941. Master list also does not lists 6941:
    Code:
    {
        "status": "nok",
        "reason": "unable to get zone information."
    }
  • The whole ZONE API looks not returning those IDs (at least in EU if that have any meaning).
  Reply With Quote
08-11-16, 02:34 AM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
The "zone ID" that you're describing is the second return from GetAreaMapInfo(GetCurrentMapAreaID()).
  Reply With Quote
08-15-16, 07:53 AM   #5
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Thank you much for both!

With
Code:
/script print(GetAreaMapInfo(GetCurrentMapAreaID()))
I receive this:
1220 7637 -1 6658.330078125 1106.25 3445.830078125 -256.25 0 0 0
when I'm in Suramar which has the zone number 7637.

My problem is when I go into a sub-zone(?), eg. Falanaar Tunnels that has a different map I receive the same return so I can't list the current map with this method.


7637-Suramar's map does not seem to have levels so Falanaar Tunnels may have an individual map, but the script can't identify it.

Last edited by Voxxel : 08-15-16 at 08:27 AM.
  Reply With Quote
08-15-16, 03:20 PM   #6
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by Voxxel View Post
My problem is when I go into a sub-zone(?), eg. Falanaar Tunnels that has a different map I receive the same return so I can't list the current map with this method.


7637-Suramar's map does not seem to have levels so Falanaar Tunnels may have an individual map, but the script can't identify it.
That is why, unfortunately, this library exists: https://www.wowace.com/addons/libbabble-subzone-3-0/
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
08-16-16, 08:29 PM   #7
elcius
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Sep 2011
Posts: 75
falanaar is classified as a 'micro-dungeon', they are very hard to get info about ingame, because they have no map ids and are identified purely by name (eg "FalanaarTunnels"), as such they can't be loaded using SetMapById.
pretty much the only way to know of a micro dungeons existence is for the player to be inside it (there are few that can be accessed using ProcessMapClick, but not many).
so your options are limited to having a pre-made database of micro-dungeon data, or having that data only available if the player is inside it.

you can identify a map as a micro dungeon by checking the 5th return of GetMapInfo().
  Reply With Quote
08-17-16, 01:39 PM   #8
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
The micro-dungeon version of this area is named "Collapse Scenario" (withered army training) and it takes place in Falanaar Tunnels in an instanced version of Suramar. The other, uninstanced version can be accessed in the open world without entering any instances. It's like a sub-level of Suramar zone. They use slightly different maps, while the scenario map has an graphical art title, the open world map has not:

http://imgur.com/a/z7MaX

In the open world Falanaar Tunnels, the 5th return of /dump (GetMapInfo()
is
Code:
FalanaarTunnels
and for the screnario it is
Code:
FalanaarTunnelsScenario
If scenarios like this (micro-dungeons) have no map IDs at all, how will the database sites be able to list them in the future? I mean if you check a boss in the Falanaar scenario, lets say Psillych, the link shows the mob's proper location on a blank map (pretends as a level 2 of Suramar's zone map) which doesn't exists. So you say it's impossible to display those maps on the db sites by IDs in the future?

Originally Posted by Torhal View Post
That is why, unfortunately, this library exists: https://www.wowace.com/addons/libbabble-subzone-3-0/
can I use this somehow to print out the map ID of at least the open world (uninstanced) version of FalanaarTunnels?
  Reply With Quote
08-17-16, 05:32 PM   #9
elcius
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Sep 2011
Posts: 75
both the instanced version and the world version are micro-dungeons, don't read into the name too much, it's used for any area that is large enough that blizzard decided they should have maps (but not important enough to name those maps or give them ids).
most large caves and buildings are micro-dungeons, even though they are not dungeons, or micro.

if you want to include them on a website, you'll have to use the only piece of identifying information that exists about them - their texture name (the 5th return of GetMapInfo).

Code:
local fileName, _, _, isMicro, microFileName = GetMapInfo();
map.TileTexture = 'Interface/WorldMap/'..(isMicro and ('MicroDungeon/'..fileName..'/'..microFileName..'/'..microFileName) or (fileName..'/'..fileName));
to rebuild the maps manually ingame this is what i'm using ..
Code:
local t = {};
local tilePrefix = map.TileTexture..(floor>0 and (floor..'_') or '');
for i = 1,GetNumberOfDetailTiles() do
	t[i] = {tilePrefix..i,0,((i-1)%4)*256,math.floor((i-1)/4)*256,256,256};
end
if map.Overlays then -- you can delete this if you're just doing micro dungeons, pretty sure none have overlays
	local ceil,log,log2 = math.ceil,math.log,math.log(2);
	for i, overlay in pairs(map.Overlays) do
		local file, fw,fh, xo,yo = unpack(overlay);
		local cols,rows = ceil(fw/256),ceil(fh/256);
		local index = 1;
		for y = 1, rows do
			local ch = (y == rows) and (2^ceil(log(1+((fh-1)%256))/log2)) or 256;
			for x = 1,cols do
				local cw = (x == cols) and (2^ceil(log(1+((fw-1)%256))/log2)) or 256;
				t[#t+1] = {file..index,1,xo+(x-1)*256,yo+(y-1)*256,cw,ch};
				index = index + 1;
			end
			
		end
	end
end
return t;
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » map/zone IDs


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