I am trying to create a "google earth" style map addon.
What I am looking for is an expanded view of the minimap tiles.
I used Yatlas years ago. I also used Cartographer (3 I think) which had this feature.
I had some code working some time ago, but that was some expansions ago and hence does not work anymore.
What I would need is some way to get a mapping of (tileX,tileY) -> texture name.
I think there was an automated way to do so in Cartographer3 then...
Thats what I have:
a "md5translate.trs" file, most likely outdated.
a "world.lua" file which translates this into the needed format
Im pretty sure I will need to adapt the "world.lua" script for the new continents.
But the real question is: How can I get an updated "md5translate.trs"?
Either you misunderstood me, or I misunderstood you know. What I am looking for is the actual "landscape" data displayed in the minimap, not the art used to make the minimap frames. I could not find this in the extracted files.
Thanks for the tip anyway, I learned something interesting.
MapsterEnhanced provides the style of map you are looking for. If the addon itself isn't exactly what you want, its code may provide some clues for you.
I'm not sure which part of my post you thought was related to the minimap. Mapster is an addon that modifies the world map, not the minimap. The addon I linked is a plugin for Mapster that further modifies the world map to use the minimap terrain textures instead of the map art textures, exactly like the screenshot you just posted. Maybe you should read the whole post and click on the link before complaining that it's not relevant. :rolleyes:
Thanks for the hint Phanx.
That was not exactly what I am looking for (though I am still waiting for a reply from the author). The problem is that MapsterEnhanced uses hardcoded reduced size textures. However I would like to have the high detail textures from the game.
They used to be somewhere like "textures\Minimap\" .. mapData .. ".blp" where mapData is an md5 hash. They seem gone (I get green rectangles now.)
They are probably somewhere different now, but I am pretty sure they are still there, after all that is the textures displayed by the minimap.
I found:
"world/Maps/Azeroth/" and similar folders containing .adt files.
I think these are the actual terrain files, and not the minimap tiles.
I also found in textures.mpq: World/Minimaps/Azeroth/mapXX_YY.blp.
and similar. This looks great. And it also turns out to be much simpler than the old format.
There is still a problem left:
I need a way to translate the player (or any other) position to the tile indices.
E.g. something like (485, 0.23, 0.71) -> (485, 22.4, 27.8)
(485 ist he MapId of Northrend, that point is in Borean Tundra, Valliance Landing)
I have not (yet) found anything in neither the api nor any library to do so. Maybe someone knows something I do not?
Here's what I've learned from a map project of my own. For clarity, I refer to the contents of the world map as "map areas", and the 3D world geometry datafiles as "maps".
You can get the player's map-relative (as opposed to map-area-relative) position with the following functions:
--- @return ID of the current map, even if it has no map areas.
local function GetCurrentMapID ()
return ( select( 8, GetInstanceInfo() ) );
end
--- @return Map (X, Y) coordinate of UnitID based on the current map area.
local function GetPlayerPoint ( UnitID )
local X, Y = GetPlayerMapPosition( UnitID );
if ( X ~= 0 and Y ~= 0 ) then -- Player appears on the current map area
local MapID, Y, X = GetWorldLocFromMapPos( X, Y );
if ( MapID == GetCurrentMapID() ) then -- Not a virtual map transformation
return -X, Y; -- X-axis is flipped in map coordinates
end
end
end
[FONT="Courier New"]GetPlayerPoint[/FONT] operates based on the selected map according to the API, i.e. [FONT="Courier New"]SetMapByID[/FONT]. Any map that shows the player's arrow on it should yield valid coordinates.
All game maps range from -17066.66656 yd to 17066.66656 yd on each side, divided into a 64x64 grid of minimap tiles. Therefore the following function should translate a player's point in yards to their position in minimap "tile coordinates":
local MAP_SIZE, MAP_CHUNKS = 34133.33312, 64;
--- @return Coord converted from map-relative yards to a minimap tile offset.
local function YardsToTile ( Coord )
return ( Coord / MAP_SIZE + 0.5 ) * MAP_CHUNKS;
end
--- @return Tile offsets corresponding to map-relative position (X, Y).
local function GetTileOffsets ( X, Y )
return YardsToTile( X ), YardsToTile( -Y ); -- Y-axis increases downwards
end
[FONT="Courier New"]GetTileOffsets( GetPlayerPoint( "player" ) )[/FONT] should return a floating point value between 0 and 64, mapping the player to the grid of minimap tiles. I may have misremembered the Y-axis direction for the image tiles, but that should be an easy fix if everything appears inverted.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
What I am looking for is an expanded view of the minimap tiles.
I used Yatlas years ago. I also used Cartographer (3 I think) which had this feature.
I had some code working some time ago, but that was some expansions ago and hence does not work anymore.
What I would need is some way to get a mapping of (tileX,tileY) -> texture name.
I think there was an automated way to do so in Cartographer3 then...
Thats what I have:
Im pretty sure I will need to adapt the "world.lua" script for the new continents.
But the real question is: How can I get an updated "md5translate.trs"?
Edit: here is the file I have http://www.wowace.com/paste/6363/
Thanks for the tip anyway, I learned something interesting.
I am looking for something like Yatlas:
What I am missing is some sane way to get these textures from the game.
Thank you very much, especially for pointing out my mistake.
That was not exactly what I am looking for (though I am still waiting for a reply from the author). The problem is that MapsterEnhanced uses hardcoded reduced size textures. However I would like to have the high detail textures from the game.
They used to be somewhere like "textures\Minimap\" .. mapData .. ".blp" where mapData is an md5 hash. They seem gone (I get green rectangles now.)
They are probably somewhere different now, but I am pretty sure they are still there, after all that is the textures displayed by the minimap.
"textures\\Minimap\\" .. mapData .. ".blp"
or
[["textures\Minimap\" .. mapData .. ".blp"]]
I found:
"world/Maps/Azeroth/" and similar folders containing .adt files.
I think these are the actual terrain files, and not the minimap tiles.
I also found in textures.mpq:
World/Minimaps/Azeroth/mapXX_YY.blp.
and similar. This looks great. And it also turns out to be much simpler than the old format.
http://www.wowace.com/addons/libmaptiledata-1-1/
There is still a problem left:
I need a way to translate the player (or any other) position to the tile indices.
E.g. something like (485, 0.23, 0.71) -> (485, 22.4, 27.8)
(485 ist he MapId of Northrend, that point is in Borean Tundra, Valliance Landing)
I have not (yet) found anything in neither the api nor any library to do so. Maybe someone knows something I do not?
You can get the player's map-relative (as opposed to map-area-relative) position with the following functions: [FONT="Courier New"]GetPlayerPoint[/FONT] operates based on the selected map according to the API, i.e. [FONT="Courier New"]SetMapByID[/FONT]. Any map that shows the player's arrow on it should yield valid coordinates.
All game maps range from -17066.66656 yd to 17066.66656 yd on each side, divided into a 64x64 grid of minimap tiles. Therefore the following function should translate a player's point in yards to their position in minimap "tile coordinates":
[FONT="Courier New"]GetTileOffsets( GetPlayerPoint( "player" ) )[/FONT] should return a floating point value between 0 and 64, mapping the player to the grid of minimap tiles. I may have misremembered the Y-axis direction for the image tiles, but that should be an easy fix if everything appears inverted.