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

Custom Gold Mine type

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

I'm trying some advanced stuff in Wc3 resource gathering:

If some of you know Starcraft II - there is a 2nd type of minerals that can be mined much faster than the regular blue minerals.

I want to do something similar in wc3 aswell.

Stuff that I did:

- create a custom new goldmine type building
- added a custom mining ability that allows miners to gather 30% faster (mining time 0.7 from 1.0)

works well enough, but I have 2 questions:

1) how do I make Haunted/entangled gold mines to work with the faster gathering rate? My solution would be to add a 2nd level of Acolyte/Wisp Mining ability that has a lower duration via trigger. Someone got a better idea/solution?

2) Is there a way to use a custom minimap icon for the Gold mines? I've seen an "entangled gold mine" and "haunted gold mine" icon in the game interface constants, but I can't seem to use them as minimap icons for the mine. Are there unused interface constants that I can use with the custom gold mine? And how can I utilize them in the Editor?

Thanks in advance!
 
Level 5
Joined
Mar 30, 2006
Messages
60
Edit: what I'm doing is to create a 2nd resource type to W3.
Those mines are much rarer than regular Gold mines but can be mined faster.


mine2.png


I managed to get the haunted mine to work via triggers. But I only found a solution that requires the map to be prepared with regions around the mines. But it works well enough for now I think.

Code:
Mine
    Events
        Unit - A unit Finishes construction
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Mine1 <gen> contains (Constructed structure)) Equal to True
                (mine2 <gen> contains (Constructed structure)) Equal to True
        (Unit-type of (Constructed structure)) Equal to Haunted Gold Mine
    Actions
        Set HauntMineGold[(Player number of (Triggering player))] = (Resource quantity contained in (Triggering unit))
        Player - Make Haunted Mine2 Available for training/construction by (Triggering player)
        Unit - Order (Constructed structure) to train/upgrade to a Haunted Mine2

Code:
Mithril Mine 2
    Events
        Unit - A unit Finishes an upgrade
    Conditions
        (Unit-type of (Triggering unit)) Equal to Haunted Mine2
    Actions
        Player - Make Haunted Mine2 Unavailable for training/construction by (Triggering player)
        Neutral Building - Add HauntMineGold[(Player number of (Triggering player))] gold to (Triggering unit)
        Set HauntMineGold[(Player number of (Triggering player))] = 0

Icon map doesn't work at all at the moment. I tried to use the "Circle of Power" with my modified icon but I can't use the Circle of Power icon on any unit/building. Afaik it used to be a yellow dot on the map, but this doesn't seem to be the case anymore.

Which sucks...
 
Last edited:
Level 5
Joined
Mar 30, 2006
Messages
60
Okay, quick picture:

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 :/
 
Last edited:
Status
Not open for further replies.
Top