WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   MoP archived threads (http://www.wowinterface.com/forums/forumdisplay.php?f=162)
-   -   Microdungeons and mapping problems (http://www.wowinterface.com/forums/showthread.php?t=43643)

SinusPi 07-05-12 05:54 AM

Microdungeons and mapping problems
 
So, we got shiny new cave maps, dubbed "micro dungeons". (For the unaware: all larger caves now have maps of their own, some are even multi-floor to make navigation easier.)
And we have a ton of new problems now.

Before, we could just
Code:

local map_id,floor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel()
local x,y = GetPlayerMapPosition(unit)

... and hopefully (if the player's not browsing their maps) we would get a perfectly universal quad of world coordinates.

Now, in caves, map_id won't change (!), but floor, x and y will. The only way to check this seems to be
Code:

local texture,w,h,isCave,caveName = GetMapInfo()
- but, of course, this doesn't help much to alleviate the havoc in Astrolabe and similar coordinate-calculating addons.

So, question: are there any functions now that return the shift-and-size values allowing one to translate in-cave coords to zone coords, or are we doomed to scouting them out manually?

Kagaro 07-05-12 06:34 AM

thos emini dungeons are called senarios correct?

You maybe to use my beta libmapdata to convert and translate as the senario 'cavename' could be used to lookup the info and translate it.

Voyager 07-05-12 07:14 AM

Quote:

Originally Posted by Kagaro (Post 257677)
thos emini dungeons are called senarios correct?

You maybe to use my beta libmapdata to convert and translate as the senario 'cavename' could be used to lookup the info and translate it.

Scenarios have their own mapID. The only maps I found that are classified as microDungeon are the 2 faction shrines.

I just rewrote the GetMapInfo function to get around it.

Code:

local function GetMapInfo(...)
    local mapName, textureWidth, textureHeight, isMicroDungeon, microDungeonName = GetMapInfo(...)
    if isMicroDungeon and microDungeonName then
        return microDungeonName, textureWidth, textureHeight, isMicroDungeon, microDungeonName
    end
    return mapName, textureWidth, textureHeight, isMicroDungeon
end


SinusPi 07-05-12 09:23 AM

Here you can see a whole slew of formerly confusing caves, now nicely mapped mini-zones. With no MapID of their own.

However, I see that GetCurrentMapDungeonLevel() returns (hopefully) properly translated coordinates, even though the main map has no GetNumDungeonMapLevels() to speak of. So maybe there's salvation...

Voyager 07-05-12 10:30 AM

Quote:

Originally Posted by SinusPi (Post 257696)
Here you can see a whole slew of formerly confusing caves, now nicely mapped mini-zones. With no MapID of their own.

However, I see that GetCurrentMapDungeonLevel() returns (hopefully) properly translated coordinates, even though the main map has no GetNumDungeonMapLevels() to speak of. So maybe there's salvation...

That's quite alot of them! O_O
I did a quick check on the Venture Co Mine in Mulgore and found some odd results.
GetNumDungeonMapLevels() returns 1, 7
GetCurrentMapDungeonLevel() returns 7, -1559, -1930, -818, -1436
I'm confused why it's considered level 7 when there's only 1 floor in it.

Anyway, your position is still visible on the Mulgore map even while inside the dungeon, so it should be possible to just ignore the microdungeon coordinates and zoom out to the parent zone with SetMapByID(GetCurrentMapAreaID()) and get the coordinates from there, no translation needed that way.

SinusPi 07-05-12 03:41 PM

Quote:

Originally Posted by Voyager (Post 257700)
zoom out to the parent zone with SetMapByID(GetCurrentMapAreaID()) and get the coordinates from there, no translation needed that way.

That only solves the "how to get player coordinates" problem. Namely,
Code:

local mapName, textureWidth, textureHeight, isMicroDungeon, microDungeonName = GetMapInfo()
if isMicroDungeon then
  SetMapByID(GetCurrentMapAreaID())
end
local x,y = GetPlayerMapPosition("player")

But, if I try to put a map marker, using any addon designed for that, on the micro map... BOOM. :P

Map-revealing addons break like hell, too ;P Oh joy :>

SinusPi 07-13-12 08:31 AM

Quote:

Originally Posted by Voyager (Post 257700)
I did a quick check on the Venture Co Mine in Mulgore and found some odd results.
GetNumDungeonMapLevels() returns 1, 7
GetCurrentMapDungeonLevel() returns 7, -1559, -1930, -818, -1436
I'm confused why it's considered level 7 when there's only 1 floor in it.

That's the new way of saying, "the current cave is ONE level deep, but starts at level SEVEN in the list of floor numbers". If you enter another cave in the same zone, it might return like 2,9 - thus occupying numbers 9 and 10 in the list.

Esamynn 08-10-12 01:25 PM

Astrolabe has been updated to support micro-dungeons. Please try the latest revision from the WoW_5.0 branch: http://svn.esamynn.org/astrolabe/branches/WoW_5.0/

mbanks850 08-13-12 10:22 AM

Anyone know how to actually set the map to a microdungeon. If you call GetCurrentMapAreaID() on the map for Caverns of Time. It returns 161 which is Tanaris. If you SetMapByID to 161 , you can't SetDungeonMapLevel(17) to get to the Caverns of Time map.


All times are GMT -6. The time now is 05:31 AM.

vBulletin © 2014, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC