General Howto: Modify OmniCC to show 1/10 seconds - TankSpot
Remove Advertisements
Howto: Modify OmniCC to show 1/10 seconds
TankSpot // TankSpot News & Discussion // User Interface, Addons, and Macros
Closed Thread
 
Thread Tools
  #1  
Old 01-13-2009, 04:05 PM
Satrina's Avatar
village idiot
 
Join Date: Jul 2007
Location: Canadia
Posts: 3,208
Blog Entries: 9
Howto: Modify OmniCC to show 1/10 seconds

I had a few requests for this, so here we go. What this does is make it so when your OmniCC cooldowns are under 2 seconds, it will display the time remaining to 1/10 of a second:


1) Head on over to OmniCC in your addons directory (.../World of Warcraft/Interface/AddOns/OmniCC)

2) Edit the file full.lua in your favourite text editor (notepad is fine)

3) Search for GetFormattedTime. You want the second instance of it. You should see this:

Code:
function OmniCC:GetFormattedTime(s)
  if s >= DAY then
    return format('%dd', floor(s/DAY + 0.5)), s % DAY
  elseif s >= HOUR then
    return format('%dh', floor(s/HOUR + 0.5)), s % HOUR
  elseif s >= MINUTE then
    if s <= MINUTE*3 and self:UsingMMSS() then
      return format('%d:%02d', floor(s/60), s % MINUTE), s - floor(s)
    end
    return format('%dm', floor(s/MINUTE + 0.5)), s % MINUTE
  end
  return floor(s + 0.5), s - floor(s)
end
Change it to this (the parts you are interested in are bolded):

Code:
function OmniCC:GetFormattedTime(s)
  if s >= DAY then
    return format('%dd', floor(s/DAY + 0.5)), s % DAY
  elseif s >= HOUR then
    return format('%dh', floor(s/HOUR + 0.5)), s % HOUR
  elseif s >= MINUTE then
    if s <= MINUTE*3 and self:UsingMMSS() then
      return format('%d:%02d', floor(s/60), s % MINUTE), s - floor(s)
    end
    return format('%dm', floor(s/MINUTE + 0.5)), s % MINUTE
  elseif s > 2 then
    return floor(s + 0.5), s - floor(s)
  end
  return format("%0.1f", s), 0.1
end
4) If you want the countdown to continue past 0.5 seconds, search for UpdateTimer. You want the second instance of it. You should see this:

Code:
function OmniCC:UpdateTimer(timer)
  local rScale = timer:GetEffectiveScale() / UIParent:GetEffectiveScale()
  local iconScale = floor(timer:GetWidth() + 0.5) / ICON_SIZE --icon sizes seem to vary a little bit, so this takes care of making them round to whole numbers

  if iconScale*rScale < self:GetMinScale() or iconScale == 0 then
    timer.toNextUpdate = 1
    timer.text:Hide()
  else
    local remain = timer.duration - (GetTime() - timer.start)
    if floor(remain + 0.5) > 0 then
    <snip>
Change it to this (the parts you are interested in are bolded):

Code:
function OmniCC:UpdateTimer(timer)
  local rScale = timer:GetEffectiveScale() / UIParent:GetEffectiveScale()
  local iconScale = floor(timer:GetWidth() + 0.5) / ICON_SIZE --icon sizes seem to vary a little bit, so this takes care of making them round to whole numbers

  if iconScale*rScale < self:GetMinScale() or iconScale == 0 then
    timer.toNextUpdate = 1
    timer.text:Hide()
  else
    local remain = timer.duration - (GetTime() - timer.start)
    if remain >= 0 then
    <snip>
__________________
Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!

Last edited by Satrina; 01-14-2009 at 02:29 PM..
  #2  
Old 01-13-2009, 04:06 PM
Nez's Avatar
Nez
Is it Dead Yet?
WoW Characters
 
Join Date: Oct 2007
Location: PDX
Posts: 607
Blog Entries: 5
Send a message via MSN to Nez
Thanks! I was hoping you would post this.
  #3  
Old 01-13-2009, 04:07 PM
Tankadin for life!
WoW Characters
 
Join Date: Dec 2008
Posts: 129
What exactly does this do for us?
__________________

  #4  
Old 01-13-2009, 04:11 PM
Registrant
WoW Characters
 
Join Date: Sep 2008
Posts: 82
Thank you SO much (sorry I missed this topic).
  #5  
Old 01-13-2009, 04:29 PM
Kazeyonoma's Avatar
t3h Banhammer
WoW Characters
 
Join Date: Jul 2007
Posts: 9,553
Blog Entries: 2
it shows your OmniCC cd's down to the last one-tenth of a second, so you can better gauge when to hit a cd or when to stop an attack. I know sometimes I sit there when it says 1 second and think to myself. could I have hit another devastate before SS came back up? and end up waiting almost 2 seconds for it to come and think to myself damnit.
__________________

READ THIS: Posting & Chat Rules
Source: Turelliax
I will never be a kaz.. no one can reach the utter awesomeness of you.
  #6  
Old 01-13-2009, 04:32 PM
Registrant
WoW Characters
 
Join Date: Sep 2008
Posts: 82
Source: Kazeyonoma
I know sometimes I sit there when it says 1 second and think to myself. could I have hit another devastate before SS came back up? and end up waiting almost 2 seconds for it to come and think to myself damnit.
This is exactly the reason I did this. Often I am sitting there wondering if I can fit another devastate (or whatever) in before my Revenge or Shield Slam cooldowns are up. I'm positive I'm losing a fair bit of DPS this way. Very excited to put it to use tonight.
  #7  
Old 01-13-2009, 04:34 PM
Tankadin for life!
WoW Characters
 
Join Date: Dec 2008
Posts: 129
Ahh so it makes better use of GCD/CD right
__________________

  #8  
Old 01-13-2009, 04:42 PM
Xav's Avatar
Xav
Slayer of Tanks
WoW Characters
 
Join Date: Dec 2007
Posts: 1,803
Keylogger.

(I hope I did this right)
__________________
Xav
Formerly Xavastrasz
Source: Rak
control+c control+v amirite?
Source: Magnuss
Hell no, its Xav, he is gonna type that bitch till his fingers fall off.
  #9  
Old 01-13-2009, 05:06 PM
Sponsor
WoW Characters
 
Join Date: Apr 2008
Posts: 95
Source: Xav
Keylogger.

(I hope I did this right)

If you are meaning that you hope you got the code correct because you were going off memory then: Yes, you were right.

If you were meaning you hope you got your keylogger to infect us all then: No, you didn't do it properly because you weren't supposed to tell us.
  #10  
Old 01-13-2009, 05:38 PM
New Registrant
 
Join Date: Jun 2008
Posts: 10
Thank you Satrina! I hate guessing when my cooldown will hit the 1.5 seconds mark.
  #11  
Old 01-13-2009, 05:42 PM
Kedearian's Avatar
Sponsor
WoW Characters
 
Join Date: Nov 2008
Posts: 107
You got to be careful Xav.. anything that ends in .lua cant be trusted... blizzard GM's told me so. And blizz would never lie.

.. shamans finnally got that good totem manager built into the wow ui, just like they said, right?
  #12  
Old 01-13-2009, 07:26 PM
Gardek
WoW Characters
 
Join Date: Mar 2007
Posts: 87
Blog Entries: 4
Thanks so much for posting this, Satrina.

Question: I see the cooldown time disappear at 0.6 seconds - but the cooldown spiral continues. I can't hit the ability again until the spiral finishes as well. Is that the way its supposed to be? Is there a way to be able to hit the ability at the .6 sec mark?

Last edited by gardek; 01-13-2009 at 08:15 PM..
  #13  
Old 01-14-2009, 01:01 PM
Inactive
WoW Characters
 
Join Date: Nov 2008
Location: Minnesota, US
Posts: 63
Awesome
  #14  
Old 01-14-2009, 01:23 PM
Satrina's Avatar
village idiot
 
Join Date: Jul 2007
Location: Canadia
Posts: 3,208
Blog Entries: 9
0.6s is generally when I start hitting the next key in rotation anyway (3-4 taps to make sure you squeeze the GCD) but I will poke around, perhaps there is a little bug in OmniCC that isn't noticeable until you change this.
__________________
Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!
  #15  
Old 01-14-2009, 01:44 PM
New Registrant
 
Join Date: Apr 2008
Posts: 12
Thanks Satrina very helpful.
  #16  
Old 01-14-2009, 01:46 PM
Unpossible!
WoW Characters
 
Join Date: Jan 2008
Location: Yardley, PA
Posts: 905
Blog Entries: 2
I'm actually noticing a similar behavior, at around .5sec left on the CD. The "cooldown spiral" still shows, and I'm still "locked" out of the ability, but it disappears. I can provide a video of this behavior if need be.
__________________
Luck is what happens when preparation meets opportunity. -Seneca
Everyone marvels at a square egg, but only the chicken understands the PAIN.

Aftermath Guild
  #17  
Old 01-14-2009, 01:55 PM
Satrina's Avatar
village idiot
 
Join Date: Jul 2007
Location: Canadia
Posts: 3,208
Blog Entries: 9
I believe you! I just never considered it a problem since as I said, that's when I start tapping squeeze the GCD and never considered it to be anything of consequence.
__________________
Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!
  #18  
Old 01-14-2009, 01:56 PM
Fame's Avatar
there can only be one
WoW Characters
 
Join Date: Feb 2007
Location: BROOKLYN, NYC
Posts: 555
Blog Entries: 7
Send a message via AIM to Fame Send a message via MSN to Fame Send a message via Yahoo to Fame
Source: Satrina
0.6s is generally when I start hitting the next key in rotation anyway (3-4 taps to make sure you squeeze the GCD) but I will poke around, perhaps there is a little bug in OmniCC that isn't noticeable until you change this.
Speaking of which, any clue if the AutoHotKey code on-button-hit instead of on-button-release is against ToS? Since you can get a much quicker responce time.
  #19  
Old 01-14-2009, 01:59 PM
Satrina's Avatar
village idiot
 
Join Date: Jul 2007
Location: Canadia
Posts: 3,208
Blog Entries: 9
Wouldn't on hit make for some unintended fun when trying to type normal text? (I have zero experience with AutoHotKey)
__________________
Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!
  #20  
Old 01-14-2009, 02:29 PM
Satrina's Avatar
village idiot
 
Join Date: Jul 2007
Location: Canadia
Posts: 3,208
Blog Entries: 9
Added step 4 for people who want the countdown to continue past 0.5 seconds. The culprit is a rounding operation that OmniCC does, assuming that it will never display a cooldown count under 1 second.

Now you get to be like a caster and learn where your latency meets the GCD! For example, with this showing all the way down to 0.0, I can hit arcane explosion at 0.2 remaining and have it go off (my typical latency is 100-120ms). If I double tap at 0.3, I am hitting the GCD as it ends always. Similarly with shield slam and revenge, I can double tap at 0.3 (in reality, I tend to 3-tap at 0.4) and get it to go
__________________
Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!

Last edited by Satrina; 01-14-2009 at 02:45 PM..
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


World of Warcraft™ and Blizzard Entertainment® are all trademarks or registered trademarks of Blizzard Entertainment in the United States and/or other countries. These terms and all related materials, logos, and images are copyright © Blizzard Entertainment. This site is in no way associated with or endorsed by Blizzard Entertainment®.