• 🏆 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!

[General] Goldmine Minimap

Status
Not open for further replies.
Level 5
Joined
Mar 30, 2006
Messages
60
Hello


quick picture for explaination:

MINES.png


I have made another type of Goldmine for normal melee games. And I want the minimap to show it in a different color (so players can see if the map has only normal gold mines or enhanced mines aswell).

For this I tried to replace UI interface icons on the minimap - circle of power with the new "blue" gold mine icon. But it does not show up ingame. The Circle of Power used to make a small dot on the map, but it seems like it's not there anymore. Question is now how I can override the yellow gold mine icon with something else.

edit: creating the enhanced gold mine from another unit is out of the question though, as I'm pretty sure it will result in abilities like entangle gold mine or building haunted gold mines on it won't work anymore :/
 
Level 13
Joined
May 10, 2009
Messages
868
Have you considered using these?
  • Actions
    • Neutral Building - Change the special minimap icon to Your_Custom_Icon
    • Neutral Building - Turn special minimap icon On for Your_Specific_Enhanced_Gold_Mine
Edit:
You can add only one new custom icon for your minimap though. It has been used in the Founding of Durotar bonus campaign.

Untitled-1.png


Here's blizzard's code:
  • Init 04 Environment
    • Events
    • Conditions
    • Actions
      • -------- Special Minimap Icons --------
      • Neutral Building - Change the special minimap icon to UI\Minimap\Minimap-Entrance
      • Unit Group - Pick every unit in (Units of type Zone Indicator (Custom Campaign)) and do (Actions)
        • Loop - Actions
          • Neutral Building - Turn special minimap icon On for (Picked unit)
 
Last edited:
Level 13
Joined
May 10, 2009
Messages
868
Simple, hide the gold mine icon from the minimap:

Untitled-4.png


Then use the very same Zone Indicator unit created by blizzard, and place one on top of each custom gold mine using triggers. Something like this would solve your problem:

  • GoldMineUI
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Neutral Building - Change the special minimap icon to UI\Minimap\Minimap-Entrance
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Gold Mine
            • Then - Actions
              • Set point = (Position of (Picked unit))
              • Unit - Create 1 Zone Indicator (Custom Campaign) for Neutral Passive at point facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_point)
              • Neutral Building - Turn special minimap icon On for (Last created unit)
            • Else - Actions
WC3ScrnShot_010517_152237_01.png
 
Level 5
Joined
Mar 30, 2006
Messages
60
works.png

Okay was my fault, I accidentally deleted the path from the minimap special icon that's why it didn't show up correctly.
Now all I need is to remove the dummy unit from the game when the mines deplete (and make a custom minimap to show the different mine colors on the starting lobby) - and then it works almost entirely as I want it to be, thanks!
 
Level 13
Joined
May 10, 2009
Messages
868
You could take advantage of unit groups to detect the Zone Indicator when a gold mine dies, or use a hashtable in order to associate each other.

Regarding the map preview from lobby, you could use some image editor in order to add those icons to the minimap, then save the image as tga format, and rename it as war3mappreview.tga. Also, it is possible to obtain your minimap file from the editor: File -> Export Minimap... -> Mark: Preview Icons.

My example:

Then:
war3.png

Now:
war3.png


Untitled-4.png


WC3ScrnShot_120317_140306_01.png
 
Level 5
Joined
Mar 30, 2006
Messages
60
You could take advantage of unit groups to detect the Zone Indicator when a gold mine dies, or use a hashtable in order to associate each other.

Regarding the map preview from lobby, you could use some image editor in order to add those icons to the minimap, then save the image as tga format, and rename it as war3mappreview.tga. Also, it is possible to obtain your minimap file from the editor: File -> Export Minimap... -> Mark: Preview Icons.

My example:

Then:
View attachment 286192
Now:
View attachment 286187

View attachment 286188

View attachment 286189

Thanks again, works as intended.
Edit: does this import work with .blp files aswell? I'd like to keep the map sizes as small as possible. TGA is 250kb and the blp is only ~46kb.

preview.png

About removing the Zone Indicator - since I'm using regions around the new gold mines to detect/upgrade the haunted/entangled gold mines it's fine. I simply remove them if the the adjacent goldmine depletes:

  • Mine 1
    • Events
      • Unit - Mine 0059 <gen> Dies
    • Conditions
    • Actions
      • Unit - Remove Zone Indicator (Custom Campaign) 0164 <gen> from the game
Since I have to prepare the minimap files and the gold mines on the map anyways, I can just aswell use those triggers to remove them. Most basic solution I could think of.
 
Level 13
Joined
May 10, 2009
Messages
868
Save it as 24-bit tga file, and its size drops to 192kB. I don't think War3MapPreview supports .blp - I remember that I tried to do so a few times, but no success so far. Though I know that War3MapMap.blp is possible. However it also affects the in-game minimap.
 
Status
Not open for further replies.
Top