Category: Unit Mods
Addon Information
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)
zork's Portal Bug Reports Feature Requests
Author:
Version:
002a
Date:
07-24-2009 05:29 AM
Size:
154.63 Kb
Downloads:
471
Favorites:
50
MD5:
Pictures
Click to enlarge
Health and mana ring
Click to enlarge
Dead :(
Click to enlarge
Health ring small
Click to enlarge
Half-rings
Click to enlarge
Orblike
TheRingThing

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
http://rothui.googlecode.com/svn/tru...umentation.txt

How?
http://elitistjerks.com/blogs/zork/362-ring.html

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.

  Change Log - TheRingThing
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 - TheRingThing
Sorry, there are currently no optional files available.
  Archived Versions - TheRingThing
File Name
Version
Size
Author
Date
002
151kB
zork
07-23-2009 04:05 PM
001
66kB
zork
07-23-2009 01:49 PM
  Comments - TheRingThing
Post A Reply Comment Options
Old 12-16-2009, 05:57 PM  
MaltheMM
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Quote:
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
MaltheMM is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 09-07-2009, 06: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?
Arixxis is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 09-02-2009, 10:24 PM  
vikkyne
A Defias Bandit

Forum posts: 2
File comments: 24
Uploads: 0
Re: Love it but....

Quote:
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.
vikkyne is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 08-18-2009, 06:41 PM  
Annyonne
A Deviate Faerie Dragon

Forum posts: 10
File comments: 27
Uploads: 0
Love it but....

Love the looks and customizations

But I don't know lua

I'll be watching for another config option...
Annyonne is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 08-12-2009, 05: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?
vidatu is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 08-11-2009, 04: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?
kaelwryn is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 08-05-2009, 02:41 AM  
sneakyone
A Kobold Labourer

Forum posts: 0
File comments: 2
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.
sneakyone is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 08-04-2009, 02:24 AM  
zork
A Chromatic Dragonspawn
 
zork's Avatar
Interface Author - Click to view interfaces

Forum posts: 161
File comments: 1161
Uploads: 28
Re: the double slice image

Quote:
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.
| Blog | Roth UI | Roth UI mini | Roth UI FAQ | GoogleCode | DevShots | TheBigOne | Guild

Last edited by zork : 08-04-2009 at 02:24 AM.
zork is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 08-03-2009, 08:17 PM  
Nuckin
is laughing at you
 
Nuckin's Avatar
Premium Member
Interface Author - Click to view interfaces

Forum posts: 33
File comments: 198
Uploads: 3
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.
Nuckin is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 07-27-2009, 07:01 PM  
Folji
An Aku'mai Servant
 
Folji's Avatar

Forum posts: 38
File comments: 60
Uploads: 0
So gonna be watching the development of this AddOn. I can think of a funky interface to make with it.
Folji is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 07-27-2009, 01:46 PM  
zork
A Chromatic Dragonspawn
 
zork's Avatar
Interface Author - Click to view interfaces

Forum posts: 161
File comments: 1161
Uploads: 28
__________________
| Simple is beautiful.
| Blog | Roth UI | Roth UI mini | Roth UI FAQ | GoogleCode | DevShots | TheBigOne | Guild

Last edited by zork : 07-27-2009 at 04:15 PM.
zork is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 07-27-2009, 08:01 AM  
zork
A Chromatic Dragonspawn
 
zork's Avatar
Interface Author - Click to view interfaces

Forum posts: 161
File comments: 1161
Uploads: 28
Quote:
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.
| Blog | Roth UI | Roth UI mini | Roth UI FAQ | GoogleCode | DevShots | TheBigOne | Guild

Last edited by zork : 07-27-2009 at 10:42 AM.
zork is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 07-27-2009, 07:55 AM  
Cargor
A Flamescale Wyrmkin
 
Cargor's Avatar
Interface Author - Click to view interfaces

Forum posts: 142
File comments: 264
Uploads: 17
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.
__________________
« Homepage | Git »

Oh hai!
Cargor is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 07-27-2009, 02:46 AM  
Selite
A Deviate Faerie Dragon
Interface Author - Click to view interfaces

Forum posts: 19
File comments: 10
Uploads: 1
This has kicked me into gear to make some 'experimental' unit frames.
To borrow a term, you win so many internets.
Selite is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 07-24-2009, 11:43 AM  
Bhalial
A Kobold Labourer

Forum posts: 0
File comments: 31
Uploads: 0
Love..

Zork, I ****ing love you !
Bhalial is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Post A Reply



Category Jump:




The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOInterface | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


©2009 MMOUI / ZAM Network
vBulletin - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.