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.
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.
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() ) );
--- @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
[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;
--- @return Tile offsets corresponding to map-relative position (X, Y).
local function GetTileOffsets ( X, Y )
return YardsToTile( X ), YardsToTile( -Y ); -- Y-axis increases downwards
[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.