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,867
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 11-23-10, 06:56 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Correct. Make sure you check http://www.wowinterface.com/download...rRingMod3.html aswell.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Report comment to moderator  
Reply With Quote
Unread 11-23-10, 06:47 AM  
Lyelu
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 44
File comments: 28
Uploads: 9
Hi, Seems like you give the "nod" here to go ahead and use your code in other Addons. I'd like to give it a try, but wanted to doublecheck first. I'm rather bored of squares for everything.
Last edited by Lyelu : 11-23-10 at 06:48 AM.
Report comment to moderator  
Reply With Quote
Unread 06-19-10, 07:41 AM  
naryn
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Is there anyway to move the frame in game? I can't find an interface nor am I experienced in LUA code
Report comment to moderator  
Reply With Quote
Unread 12-16-09, 04:57 PM  
MaltheMM
A Kobold Labourer

Forum posts: 1
File comments: 1
Uploads: 0
Originally Posted by Arixxis
Been playing around with this for a little while, but I started to wonder one thing- instead of starting at the 90 degree marks (0, 90, 180) is it possible to have a ring start at a different degree (such as at 45)?

If so, where would this be found in the .lua?
I was wondering the same thing ... it would make a very nice hud
Report comment to moderator  
Reply With Quote
Unread 09-07-09, 04:54 AM  
Arixxis
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Been playing around with this for a little while, but I started to wonder one thing- instead of starting at the 90 degree marks (0, 90, 180) is it possible to have a ring start at a different degree (such as at 45)?

If so, where would this be found in the .lua?
Report comment to moderator  
Reply With Quote
Unread 09-02-09, 08:24 PM  
vikkyne
A Murloc Raider

Forum posts: 4
File comments: 114
Uploads: 0
Re: Love it but....

Originally posted by Annyonne
Love the looks and customizations

But I don't know lua

I'll be watching for another config option...

Agreed. It is an intriguing piece of work, but w/o a GUI it is for a select minority of players. If only there were someone who had the capacity and desire to make this available to the non-scripters amongst us.

I'll have to do without for now.
Report comment to moderator  
Reply With Quote
Unread 08-18-09, 04:41 PM  
Annyonne
An Aku'mai Servant

Forum posts: 30
File comments: 63
Uploads: 0
Love it but....

Love the looks and customizations

But I don't know lua

I'll be watching for another config option...
Report comment to moderator  
Reply With Quote
Unread 08-12-09, 03:08 AM  
vidatu
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
First off, I love this mod. I'll be making my interface just a little bit closer to perfect thanks to it.

So, for example I have this as my UI-in-progress. How would I make the two rings on the right belong to my target? When I looked through the config file, I found the Unit parameter, but when I changed it from player to target, the rings just blanked out. What am I doing wrong?
Report comment to moderator  
Reply With Quote
Unread 08-11-09, 02:14 PM  
kaelwryn
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Ring inside another ring

Do you have example code to put a smaller ring inside of a larger one like you've done with http://s.wowinterface.com/preview/pvw29492.jpg?
Report comment to moderator  
Reply With Quote
Unread 08-05-09, 12:41 AM  
sneakyone
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
I hope that someone will make a gui for this mod, I love the thought of it and really want to use it but I know nothing about .lua coding.
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
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 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 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, 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
Post A Reply



Category Jump: