• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Generate Minimap from a Map File

Status
Not open for further replies.
Level 4
Joined
Apr 11, 2021
Messages
31
Hi, I think the title is obvious, I want to write a PHP Script that takes a map file (patch 1.31 maps, before reforged) and Generate a Minimap from the given file and return it as an image

What steps should i follow ? Im a PHP Developer but I have no Idea about the Warcraft Maps Architectures and Encoding/Decoding, And I wanna know that do I have to generate a minimap by reading the map file ? or is there a bitmap representation of the minimap in the map file pregenerated by world editor ?
 
Level 17
Joined
Feb 25, 2013
Messages
303
Both the minimap itself and the minimap preview images are stored inside the map archive.
The minimap itself is war3mapMap and the preview is war3mapPreview. The minimap itself is most likely going to be a blp so you'll need to parse that, but the preview is most likely going to be tga.
Generating a new minimap image might be possible, but it's a much longer task and you'd only want to even attempt it if your stuff modifies some of the data that constitutes a minimap (e.g. you're building a World Editor). Just displaying the minimap preview will be good most of the time.
An extra layer to your question comes in the form of a counter-question: do you want the shown image to match how the minimap looks from inside the game lobby? If the answer is yes, you'll have to also parse the war3map.mmp on maps that don't have a war3mapPreview image.
 
Status
Not open for further replies.
Top