Closed Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 31

Thread: Howto: Modify OmniCC to show 1/10 seconds

  1. #1
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523

    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>
    Last edited by Satrina; 01-14-2009 at 02:29 PM.
    Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!

  2. #2
    Join Date
    Oct 2007
    Location
    PDX
    Posts
    1,366
    Thanks! I was hoping you would post this.

  3. #3
    Join Date
    Dec 2008
    Posts
    141

  4. #4
    Join Date
    Sep 2008
    Posts
    82
    Thank you SO much (sorry I missed this topic).

  5. #5
    Join Date
    Jul 2007
    Posts
    16,426
    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
    Quote Originally Posted by Turelliax View Post
    I will never be a kaz.. no one can reach the utter awesomeness of you.
    http://i.imgur.com/3vbQi.gif

  6. #6
    Join Date
    Sep 2008
    Posts
    82
    Quote Originally Posted by Kazeyonoma View Post
    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. #7
    Join Date
    Dec 2008
    Posts
    141

  8. #8
    Join Date
    Dec 2007
    Posts
    1,630
    Keylogger.

    (I hope I did this right)
    Xav
    Formerly Xavastrasz
    Quote Originally Posted by Rak View Post
    control+c control+v amirite?
    Quote Originally Posted by Magnuss View Post
    Hell no, its Xav, he is gonna type that bitch till his fingers fall off.

  9. #9
    Join Date
    Apr 2008
    Posts
    95
    Quote Originally Posted by Xav View Post
    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. #10
    Join Date
    Jun 2008
    Posts
    10
    Thank you Satrina! I hate guessing when my cooldown will hit the 1.5 seconds mark.

  11. #11
    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. #12
    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. #13
    Join Date
    Nov 2008
    Location
    Minnesota, US
    Posts
    68

  14. #14
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523
    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. #15
    Join Date
    Apr 2008
    Posts
    13
    Thanks Satrina very helpful.

  16. #16
    Join Date
    Jan 2008
    Location
    Yardley, PA
    Posts
    1,222
    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.

  17. #17
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523
    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. #18
    Join Date
    Feb 2007
    Location
    BROOKLYN, NYC
    Posts
    569
    Quote Originally Posted by Satrina View Post
    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. #19
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523
    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. #20
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523
    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
    Last edited by Satrina; 01-14-2009 at 02:45 PM.
    Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts