• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] About Cooldowns

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
How to do like in this game? How to make it like you can see how many seconds left until cooldown is depleted?

Any tutorials? Any test maps?
 

Attachments

  • cooldown.jpg
    cooldown.jpg
    772 KB · Views: 324
Level 20
Joined
Jul 14, 2011
Messages
3,213
Well... There's an icon/ability for each second, with the number. When the unit is bought, every second the Seg60 unit is removed from shop, and Seg59 is added. They're probably in the same group and share cooldown.

There's no other way to do this, since Icons are fixed, and triggers doesn't have access to cooldowns.
 
Level 8
Joined
Dec 9, 2005
Messages
523
Well... There's an icon/ability for each second, with the number. When the unit is bought, every second the Seg60 unit is removed from shop, and Seg59 is added. They're probably in the same group and share cooldown.

There's no other way to do this, since Icons are fixed, and triggers doesn't have access to cooldowns.

Seriously? I mean, import 50+ damned icons for just this effect? That's a bit over the top, isn't it? Not saying that's not how they did it but if it was, then wow that's a lot of wasted kilobyte space just to get a small effect like this.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
There's no other way to manipulate Icons other than creating/importing one for each item second.... Hard to believe, but true :p I never tough someone would xD
 
Level 1
Joined
Feb 1, 2012
Messages
5
Actually there is a way... It's a cooldown system written in JASS but I can't remember how's it's called. Back in 2006 I saw it on some site, but I couldn't remember anything now :( But I can give you 100% - it's not the icons import xD
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
But... wait... There's no way to mess with Cooldown nor Icons automatically with triggers/JASS no matter how complex or deep the system/code is. WC3 just doesn't allows it. SC2 does (with cooldowns).

There may be a simple system to replace Seg60 item with Seg59, and that with Seg58, etc... But each one of the ability/item icons has to be done manually and probably set manually in a variable array.
 
Ok, I am a JASS expert and I can tell you that it is 100% impossible to manipulate the icons from code. The user serious did import an icon for every single second and 1 unit for every icon ^)^.


To do this, first create all of your units (perhaps 61 (including 0) for each unit in a shop) and all of your icons (61 again). Import the icons into the map and set the unit icons. Next, go into the code and create a stack. Continue pushing units on to that stack (all 61). From here, register the sell or train or w/e event. If the stock == 0, then begin a repeating 1 second timer and attach the stack to it. Replace the sold unit with 60 second unit (or w/e). Every time the timer expires, go to the next on the stack and replace the unit in shop with the unit in stack (60, 59, etc). When the stack is at 0, destroy the timer ; ). Done.



Do I recommend doing this in a map? No. It simply isn't worth it.
 
I think there is also a cooldown model that masks regular icons when they are on cooldown. (that is how that black fadey thing appears)

I am assuming he probably added text to it and changes the color all based on how much cooldown is left. Try searching the forum, I think I responded to a thread where someone was editing the cooldown model or something similar.

Check the game interface files/war mpq's if you are interested in getting this to work. You can also try ripping the model from whatever map that is. (I do not condone it, but it is an option lol) Overall, I am pretty sure he did this method rather than the other. It would have been to complex to get the cooldown to show properly and the file size would be noticeably large.
 
Well let's open map and check what author/s did there :)

EDIT:

lolz now that's protected map for sure, I never find something so protected ^_^

Anyway I found something, this: UI-Cooldown-Indicator.mdx
But it was damaged and it's size is 0 KB so it can't be opened in any model making tool.

So I guess it's something just like Purge said, model that replaced default cooldown.
This thing was put within next folders: UI/Feedback/Cooldown/

I checked Blizzard MPQ there really is that model with 2 textures as well.

I know that this didn't solved anything but at least we are sure that making 1000 icons isn't case.
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
Even though Kobas failed, I'ma still try to look at this..

e/ same results as Kobas.. this thing is spazzled like theres no tomorrow, but there is a UI-cooldown-indicator, thats obviously it.

btw that cooldown isnt self created, ive seen it in a ton of other maps
 
Someone made a custom cooldown border which acts the same as the one in DotA here, uhm a year ago or 2 years ago... but basically just the same method as those found above...

anyway, subbing in this thread... I hope we find the answer to this... it seems this is something to be done just via editing that model and its textures just like how the one in DotA was made... coz I haven't stumbled in any function that could alter the icons...

we need someone who's good at editing models and using animated textures...
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I'll definitly take a look at this when I get home.
It might be an animated texture inside the model?
If it is, then changing it would make a lot of things possible for icon cooldowns...
 
well yeah... already been on a cooldown edit topic years ago (which is where I got a custom cooldown UI which acts like the one on dota), but this is the first time I saw someone thinking about adding those numbers...

and I haven't seen that map yet until now... I only got the idea of this by playing DotA 2...

and it would really be great if hash can do it... XD...
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
UI\Feedback\Cooldown\cooldown.blp is the texture that is being used to show the actual cooldown. It has the following animations:

Code:
4000: { 0.210316, 0, 0 }
  InTan: { 0.210316, 0, 0 }
  OutTan: { 0, 0, 0 }
4460: { 0.210316, 0, 0 }
  InTan: { 0, 0, 0 }
  OutTan: { -0.210316, -0.420632, 0 }
4560: { 0, -0.420632, 0 }
  InTan: { -0.210316, -0.420632, 0 }
  OutTan: { 0, -0.630948, 0 }
4773: { 0, -1.05158, 0 }
  InTan: { 0, -0.630948, 0 }
  OutTan: { 0, 0, 0 }
5000: { 0, -1.05158, 0 }
  InTan: { 0, 0, 0 }
  OutTan: { 0, 0, 0 }

4000: { 0.236605, 0, 0 }
  InTan: { 0.236605, 0, 0 }
  OutTan: { -0.236605, -0.420632, 0 }
4100: { 0, -0.420632, 0 }
  InTan: { -0.236605, -0.420632, 0 }
  OutTan: { 0, -0.630948, 0 }
4313: { 0, -1.05158, 0 }
  InTan: { 0, -0.630948, 0 }
  OutTan: { 0, 0, 0 }
5000: { 0, -1.05158, 0 }
  InTan: { 0, 0, 0 }
  OutTan: { 0, 0, 0 }

4000: { 0.198724, 0, 0 }
  InTan: { 0.199037, 0, 0 }
  OutTan: { 0.0112788, 0, 0 }
4227: { 0.210316, 0, 0 }
  InTan: { 0.0115922, 0, 0 }
  OutTan: { -0.210316, -0.420632, 0 }
4327: { 0, -0.420632, 0 }
  InTan: { -0.210316, -0.420632, 0 }
  OutTan: { 0, -0.630948, 0 }
4540: { 0, -1.05158, 0 }
  InTan: { 0, -0.630948, 0 }
  OutTan: { 0, 0, 0 }
5000: { 0, -1.05158, 0 }
  InTan: { 0, 0, 0 }
  OutTan: { 0, 0, 0 }

4000: { 0.210316, 0, 0 }
  InTan: { 0.210316, 0, 0 }
  OutTan: { 0, 0, 0 }
4687: { 0.210316, 0, 0 }
  InTan: { 0, 0, 0 }
  OutTan: { -0.210316, -0.420632, 0 }
4787: { 0, -0.420632, 0 }
  InTan: { -0.210316, -0.420632, 0 }
  OutTan: { 0, -0.630948, 0 }
5000: { 0, -1.05158, 0 }
  InTan: { 0, -0.630948, 0 }
  OutTan: { 0, 0, 0 }

Code:
4000: { 0, 0, 0, 1 }
  InTan: { 0, 0, 0, 1 }
  OutTan: { 0, 0, 0, 1 }
4460: { 0, 0, 0, 1 }
  InTan: { -0.668605, 0, 0, 0.743618 }
  OutTan: { -0.668605, 0, 0, 0.743618 }
4493: { 1, 0, 0, 0 }
  InTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
  OutTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
4627: { 0.707107, 0.357071, -0.357071, 0.494975 }
  InTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
  OutTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
4773: { -0, -0.504975, 0.504975, -0.7 }
  InTan: { -0, -0.504975, 0.504975, -0.7 }
  OutTan: { -0, -0.504975, 0.504975, -0.7 }
5000: { -0, -0.504975, 0.504975, -0.7 }
  InTan: { -0, -0.504975, 0.504975, -0.7 }
  OutTan: { -0, -0.504975, 0.504975, -0.7 }

4000: { 0, 0, 0, 1 }
  InTan: { 0, 0, 0, 1 }
  OutTan: { 0, 0, 0, 1 }
4033: { 1, 0, 0, 0 }
  InTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
  OutTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
4167: { 0.707107, 0.357071, -0.357071, 0.494975 }
  InTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
  OutTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
4313: { -0, -0.504975, 0.504975, -0.7 }
  InTan: { -0, -0.504975, 0.504975, -0.7 }
  OutTan: { -0, -0.504975, 0.504975, -0.7 }
5000: { -0, -0.504975, 0.504975, -0.7 }
  InTan: { -0, -0.504975, 0.504975, -0.7 }
  OutTan: { -0, -0.504975, 0.504975, -0.7 }

4000: { 0, 0, 0, 1 }
  InTan: { 0, 0, 0, 1 }
  OutTan: { 0, 0, 0, 1 }
4227: { 0, 0, 0, 1 }
  InTan: { -0.632445, 0, 0, 0.774605 }
  OutTan: { -0.632445, 0, 0, 0.774605 }
4260: { 1, 0, 0, 0 }
  InTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
  OutTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
4393: { 0.707107, 0.357071, -0.357071, 0.494975 }
  InTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
  OutTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
4540: { -0, -0.504975, 0.504975, -0.7 }
  InTan: { -0, -0.504975, 0.504975, -0.7 }
  OutTan: { -0, -0.504975, 0.504975, -0.7 }
5000: { -0, -0.504975, 0.504975, -0.7 }
  InTan: { -0, -0.504975, 0.504975, -0.7 }
  OutTan: { -0, -0.504975, 0.504975, -0.7 }

4000: { 0, 0, 0, 1 }
  InTan: { 0, 0, 0, 1 }
  OutTan: { 0, 0, 0, 1 }
4687: { 0, 0, 0, 1 }
  InTan: { -0.680934, 0, 0, 0.732345 }
  OutTan: { -0.680934, 0, 0, 0.732345 }
4720: { 1, 0, 0, 0 }
  InTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
  OutTan: { 0.774043, -0.0366259, 0.0366259, -0.631011 }
4853: { 0.707107, 0.357071, -0.357071, 0.494975 }
  InTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
  OutTan: { 0.707107, 0.357071, -0.357071, 0.494975 }
5000: { -0, -0.504975, 0.504975, -0.7 }
  InTan: { -0, -0.504975, 0.504975, -0.7 }
  OutTan: { -0, -0.504975, 0.504975, -0.7 }

So basically a black blend-in texture rotates on top of the icon.
Since the cooldown number has a fixed position,
I think an additional texture is added to Model-UI\Feedback\Cooldown\UI-Cooldown-Indicator.mdx in order to achieve this.

By using the same key frames it might be possible to synchronize a animated cooldown number texture with the UI\Feedback\Cooldown\cooldown.blp

I'll test some more when I get home, I don't have photoshop here to create any textures.
Nor do I have the editor to test it in.
 
probably, plus that color change of the cooldown UI too depending on the time remaining relative to the max cooldown time...

btw, it was Apheraz who made a custom cooldown UI years ago... http://www.hiveworkshop.com/forums/1799633-post23.html

though it only changes color like the ones already posted...
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
I can open it if i wanted to, but im not.

does anyone have a map besides lost temple that uses that ui cooldown?

e/ i have it, let me test it ill post a screenie

2e/ i give. heres the map i stole it from if anyone can figure it out

(can be opened with mpq editor, i broke its protection)
 

Attachments

  • twrpgv0.9z_deprotected.w3x
    7.4 MB · Views: 64
Last edited:
I can open it if i wanted to, but im not.

does anyone have a map besides lost temple that uses that ui cooldown?

e/ i have it, let me test it ill post a screenie

2e/ i give. heres the map i stole it from if anyone can figure it out

(can be opened with mpq editor, i broke its protection)
Map that can't be opened with WE isn't deprotected.

Don't ask how but here it is, check attached map, I made that cooldown of yours.
Please give credits to original authors not me.
If there are no known authors I will gladly make tutorial.

Images are 32x32 px and only present alpha layer, model combine few textures from wc3 together creating that nice effect.

All you need to do is to import files shown in map below and set resource paths.

I... Can't... Believe... Someone... Would... Do... This.
:razz:
Do I recommend doing this in a map? No. It simply isn't worth it.
:razz:
 

Attachments

  • Cloock Cooldown.w3x
    23.2 KB · Views: 119
Level 12
Joined
Mar 13, 2012
Messages
1,121
Can someone provide a version of that lost temple map which can be opened in MPQ editor or PM me how to do it?

Want to take a look at it : (
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Can someone provide a version of that lost temple map which can be opened in MPQ editor or PM me how to do it?

Want to take a look at it : (

I'm sorry, but asking for de-protection of a map is illegal here on hiveworkshop :(
I'm sure that if you google around for a while, you'll find out how to do it yourself though ;)

Remember: If you de-protect someone's map, you better not steal anything!
Give credits if you use their creations and show respect to the actual creator of the map that you've de-protected!

You wouldn't want people stealing your creations too now would you?
 
Yes I looked his wonderful job but I just don't like that clock.
There is way, but you must ask some model maker to do that. I don't have tool powerful enough to do that for you.
Even if I remove texture it will still use random one. I can create 1 additional transparent texture and use it instead but I suggest removing it completely.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
-Kobas- odd place to ask this but would it be okay to upload under "Unknown Author"?

e/ hahah thats why it didnt work, i capitalized the f on fonts lol
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Ah yes, he attached a map with the model, thx!

Remember: If you de-protect someone's map, you better not steal anything!

Hm you dont know me good enough, I would never hack maps and put them on the internet or such stuff. All I do is because of curiosity..
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Ah yes, he attached a map with the model, thx!



Hm you dont know me good enough, I would never hack maps and put them on the internet or such stuff. All I do is because of curiosity..

I'm not implying anything, I'm just trying to prevent ;)
I know it's probably for a good cause, but some people are never to be trusted.
And I'm not saying you are not, I'm just saying that if you where then imagine yourself standing in the shoes of the creator.
 
Status
Not open for further replies.
Top