Download
(155Kb)
Download
Updated: 07-24-09 03:29 AM
Pictures
File Info
Updated:07-24-09 03:29 AM
Created:07-23-09 11:49 AM
Downloads:2,869
Favorites:42
MD5:

TheRingThing

Version: 002a
by: zork [More]


Intro
This is my RingMod. It is capable of displaying rings on screen that fill radial. It does not use the massive texture spam approach, instead the ring gets divided into segments and is calculated. I used the approach Iriel posted some time ago when he wrote down his thoughts about the StatRings mod.

Derivated mods
- oUF_RingThing
- oUF_RingThing2

Documentation
https://github.com/zorker/rothui/blo...umentation.txt

How?
https://github.com/zorker/rothui/tre...chive/rRingMod

What is it for?
This is mainly a developers only addon. It includes two test functions for health/mana display for the player and all the other functions that are needed to calculate the values. This mod should show developers how they can do it and provides functions that can be used to achieve it.

Layers
The ring consists of 3 layers: background, ring-segments, foreground. Background and foreground can be hidden.

Dynamic
The background texture can be set to rotate. Thus it will constantly rotate. Update timer and speed can be set in the config.

Alpha blending
Currently the ring segments are set to SetAlphaBlending("ADD") thus the color gets multiplied with the background. Setting can be changed in the config.

Can we do half-rings?
Yes we can. You can define what segments should be used, where to start and in which direction it should be filled.
Half-ring config: http://zorktdmog.zo.funpic.de/ringmo...ringconfig.txt


Can we do orb-like stuff?
Yes we can. Just make yourself textures that can handle it and set the inner_radius to 1. Avoid the 0 it bugs out the SetTexCoord.


Unitframe ideas?
WingUnits anyone?

Or just think about two halrings for health and mana around the portrait in the middle with another ring outside for the castbar.
Or having a health orb in the middle while mana and castbar outside. I tried to do this some time ago with my oUF_Orbs layout but as you can see the bars did not fill radial, they just tried to fake it. This has an end now.

Stuff like that is possible. Is this awesome? Yes it is!

Config
The mod is LUA only for now, my hope is that maybe someone write a GUI for the config. Currently the mod is controlled by a config table in the LUA. Many settings are included and can be adjusted.

Code:
  
  --    ring layout
  --     ____ ____
  --    /    |    \
  --    |  4 | 1  |
  --     ----+---- 
  --    |  3 | 2  |
  --    \____|____/
  --

  -- direction 1 = right (clockwise), 0 = left (counter-clockwise)

  -----------------------
  -- CONFIG
  -----------------------

  local ring_table = {
    [1] = { 
      global = {
        unit = "player",
        active = 1,
        ringname = "rM_PlayerHealth",
        size = 256,
        anchorframe = UIParent,
        anchorpoint = "CENTER",
        anchorposx = 0,
        anchorposy = 0,
        scale = 0.82,
        alpha = 1,
        framelevel = 1,
        gfx_folder = "256_1",
        segments_used = 4,
        start_segment = 4,
        fill_direction = 0,
        ringtype = "health",
      },
      background = {
        color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
        alpha = 0.7,
        framelevel = 1,
        blendmode = "blend",
        use_texture = 1,
        do_rotation = 1,
        rotation = {
          update_timer = 1/30,
          step_size = 0.3,
          direction = 0,
        },
      },
      foreground = {
        color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
        alpha = 1,
        blendmode = "blend",
        framelevel = 3,
        use_texture = 1,
      },
      segment = {
        color = {r = 180/255, g = 10/255, b = 10/255, a = 1},
        alpha = 1,
        blendmode = "add",
        framelevel = 2,
        segmentsize = 128,
        outer_radius = 110,
        inner_radius = 90,
      },
    },

    [2] = { 
      global = {
        unit = "player",
        active = 1,
        ringname = "rM_PlayerMana",
        size = 256,
        anchorframe = UIParent,
        anchorpoint = "CENTER",
        anchorposx = 0,
        anchorposy = 0,
        scale = 0.65,
        alpha = 1,
        framelevel = 1,
        gfx_folder = "256_1",
        segments_used = 4,
        start_segment = 1,
        fill_direction = 1,
        ringtype = "mana",
      },
      background = {
        color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
        alpha = 0.7,
        framelevel = 1,
        blendmode = "blend",
        use_texture = 1,
        do_rotation = 1,
        rotation = {
          update_timer = 1/30,
          step_size = 0.2,
          direction = 1,
        },
      },
      foreground = {
        color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
        alpha = 1,
        blendmode = "blend",
        framelevel = 3,
        use_texture = 1,
      },
      segment = {
        color = {r = 10/255, g = 100/255, b = 150/255, a = 1},
        alpha = 1,
        blendmode = "add",
        framelevel = 2,
        segmentsize = 128,
        outer_radius = 110,
        inner_radius = 90,
      },
    },

  }
   
Links

Mod
http://www.wowinterface.com/download...o.php?id=14174

TDMOG blog
http://dm.next-gen.org/index.php?sei...rum&forumid=11

eJerks blog
http://elitistjerks.com/blogs/zork/

Dev Shots
http://zorktdmog.zo.funpic.de/ringmod/

Google Code
http://code.google.com/p/rothui/sour...trunk/rRingMod


If there are any questions, just ask me.
Feel free to use this mod for whatever you want.

002a
- added a documentation

002
- added a new texture folder for orblike textures
- added an "active" yes/no config option for each ring

001
- initial release
Optional Files (0)


Post A Reply Comment Options
Unread 07-23-09, 12:23 PM  
lodewijk
A Deviate Faerie Dragon

Forum posts: 13
File comments: 120
Uploads: 0
i have allways liked circular unitframes so it is good to see you have picked up the concept .

also based on iriel's statrings smurfy created smUnitFrames (http://wowvault.ign.com/View.php?vie....Detail&id=203).
maybe his work can give you some ideas.

personally i dont like ouf that much, but thats only because of the lack of an ingame config (in most cases) and my lack of .lua knowledge.
Report comment to moderator  
Reply With Quote
Unread 07-23-09, 12:34 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
This mod is basically for developers only. It shows the technique how to do it and provides the functions that calculate everything.
Its just not that polished yet.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 07-23-09 at 12:35 PM.
Report comment to moderator  
Reply With Quote
Unread 07-23-09, 03:00 PM  
lodewijk
A Deviate Faerie Dragon

Forum posts: 13
File comments: 120
Uploads: 0
Originally posted by zork
This mod is basically for developers only. It shows the technique how to do it and provides the functions that calculate everything.
Its just not that polished yet.
i see. i hope someone will make a stunning mod using your work, it is both very impressive and promising.
Report comment to moderator  
Reply With Quote
Unread 07-23-09, 06:57 PM  
Taroven
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 49
File comments: 837
Uploads: 11
Originally posted by lodewijk
i see. i hope someone will make a stunning mod using your work, it is both very impressive and promising.
I'm getting ideas for this already.
Report comment to moderator  
Reply With Quote
Unread 07-23-09, 07:33 PM  
ivantyr
A Kobold Labourer
 
ivantyr's Avatar

Forum posts: 1
File comments: 1
Uploads: 0
if it can be configured so it will show the global cooldown, then this is the mod for me
Report comment to moderator  
Reply With Quote
Unread 07-24-09, 07:45 AM  
xtoq
An Aku'mai Servant
 
xtoq's Avatar
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 642
Uploads: 4
This is great, it makes me want to kickstart my feeble knowledge of lua so that I can make something amazing out of it!
__________________
There is absolutely no evidence to support the theory that life is serious.
Report comment to moderator  
Reply With Quote
Unread 07-24-09, 08:33 AM  
pHishr
A Flamescale Wyrmkin
 
pHishr's Avatar
AddOn Author - Click to view AddOns

Forum posts: 105
File comments: 117
Uploads: 5
Man I really wanna try this, too bad my rogue isn't 60 yet!

This looks reeeally ace!
Report comment to moderator  
Reply With Quote
Unread 07-24-09, 09:43 AM  
Bhalial
A Murloc Raider
 
Bhalial's Avatar

Forum posts: 6
File comments: 47
Uploads: 0
Love..

Zork, I fucking love you !
Report comment to moderator  
Reply With Quote
Unread 07-27-09, 12:46 AM  
Selite
A Fallenroot Satyr
AddOn Author - Click to view AddOns

Forum posts: 20
File comments: 6
Uploads: 1
This has kicked me into gear to make some 'experimental' unit frames.
To borrow a term, you win so many internets.
Report comment to moderator  
Reply With Quote
Unread 07-27-09, 05:55 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Thanks for this great addon! Now I can make me a nice cursor castbar only for Fishing

I mashed your base code into some kind of library which makes it easier for external addons (such as oUF) to make use of it - it basically follows the API of a normal status bar:

Code:
local ring = LibStub("LibRingBars-1.0").new("Frame", nil, UIParent)
ring:SetSize(200)
ring:SetValue(0.87)
ring:SetPoint("CENTER", UIParent, "CENTER")
ring:SetStatusBarColor(0, 1, 1)
ring:SetBlendMode("ADD")
Most of zork's original config table options can be set through providing an optional config-table in #arg4 (so, half-rings are still possible) This lib doesn't make use of tthe background / foreground textures at the moment, but I plan on implementing them in the next days.

If someone wants me to release it, you could write to me - and zork can of course write to me if he doesn't want it to be released I'll later push it to my git repo.
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 07-27-09, 06:01 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Originally posted by Cargor
and zork can of course write to me if he doesn't want it to be released
No no, thats exactly what this mod is made for. I just wanted to show how it can be done and my hope was someone takes the technique and does something with it. Release your Lib, I am looking forward to it. Never used a lib though, could take myself a step further too.

I am currently working on my first ring-layout for oUF.
http://code.google.com/p/rothui/sour...oUF_RingThing/

Haven't tested it yet currently offline-coding .

Only had to adjust one thing. I needed to add the complete config_table to the object aswell since in oUF I have no reference to the config of the specific ring in the PostUpdateHealth/Mana functions (for example) later but I have access to self. Thus the ring_config variable basically becomes obsolete since it is saved in the object aswell.
Code:
  local function setup_ring(id)
 
    local ring_config = ring_table[id]
    local ring_object = cre_ring_holder(ring_config)
    ring_object.config = ring_config
    ring_object.background = cre_ring_background(ring_object.config, ring_object)
    ring_object.segments = cre_ring_segments(ring_object.config, ring_object)
    ring_object.foreground = cre_ring_foreground(ring_object.config, ring_object)
    return ring_object
  end
*edit* Just noticed, the mod is the in the "WeeklyPick":
http://www.wowinterface.com/forums/s...ad.php?t=25735
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 07-27-09 at 08:42 AM.
Report comment to moderator  
Reply With Quote
Unread 07-27-09, 11:46 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 07-27-09 at 02:15 PM.
Report comment to moderator  
Reply With Quote
Unread 07-27-09, 05:01 PM  
Folji
A Flamescale Wyrmkin
 
Folji's Avatar
AddOn Author - Click to view AddOns

Forum posts: 136
File comments: 96
Uploads: 1
So gonna be watching the development of this AddOn. I can think of a funky interface to make with it.
Report comment to moderator  
Reply With Quote
Unread 08-03-09, 06:17 PM  
Nuckin
is laughing at you
 
Nuckin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 210
Uploads: 4
the double slice image

Why have two separate slice images? wouldn't be better to use just the one and SetTexCoord() it around to the new position?

__________________
SELECT * FROM users WHERE clue > 0;
0 rows returned.
Report comment to moderator  
Reply With Quote
Unread 08-04-09, 12:24 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Re: the double slice image

Originally posted by Nuckin
Why have two separate slice images?
This would only be needed if the texture on the slice changes dynamically. If it just gets set on startup and stays from there it doesn't matter.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 08-04-09 at 12:24 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: