Affliction Tracker

A category for whatever! Can be Mudlet-related or offtopic.
User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Affliction Tracker

Post by Akaya »

So I'm about to dive into the world of creating an affliction tracker for my UI. I have 3 rough ideas already but I was hoping to get a few more before I set anything in stone on my screen.

My first idea was a mini console that displayed the afflictions you currently have. It works pretty well but looks boooring. Here's a screenshot of it while sparring a Blademaster in Achaea:
Image

Another idea was to have each affliction represented as an icon and place them all on a giant grid. As afflictions were received, the corresponding icons on the grid would appear. Neat idea. But it seemed a bit complicated. The user would have to memorize which icon went with each affliction for it to be effective. Here's a simple screenshot of it:
Image
Only one icon is displayed above, but you get the idea.

The final affliction tracker is the one I'm currently working on. It's not complete. There is a static display of each affliction. As afflictions are received, the corresponding affliction is highlighted. Additionally, I've been tinkering with a new function in Vadi's svo that displays how long you've had a said affliction. I'll be adding a little box next to each affliction name that reflects this nifty timing. The following screenshot displays what I've done so far but again, not finished:
Image

If anyone has some helpful advice as to how an affliction tracker can function, please do tell!

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Affliction Tracker

Post by Vadi »

Another way could be to have pop-up boxes that stack on each other. This way you'll visually know how poorly you're doing if you have a big pile of them - and they could be colour coded as well in importance.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Affliction Tracker

Post by Akaya »

Vadi wrote:Another way could be to have pop-up boxes that stack on each other. This way you'll visually know how poorly you're doing if you have a big pile of them - and they could be colour coded as well in importance.
I started putting this idea to the test. Here's a pic of what I have so far
Image

Next to each green dot would be an affliction (PRONE in this case). As I recieve afflictions, the list builds/falls like a tower beside the green dots.

I'm having trouble grasping how the script behind the idea would work. More specifically, the concept of how afflictions would move up and down the tower as they are recieved.

Right now, I'm only able to display one affliction at a time for I don't know how I'd "shift everything up/down" when an affliction is given/cured.

Here's a small excerpt of what I'm speaking of:
Code: [show] | [select all] lua
function eventaffhandler(event, affliction)
	if event == "svo got aff" then
		if affliction == "prone" then
			prone:Show()
                end
         end
I'm using the Vyzor framework btw.

That makes the PRONE label appear when I become prone. But not only do I want it to appear, I want it to move to its proper position (perhaps with the frame:Move() function within Vyzor?) based on how many afflictions I have or priority to be cured. So if I have 3 afflictions, I want those 3 afflictions to all move up one and the new affliction at the bottom. Or if its listed by priority, insert the new label in the position of its curing priority.

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: Affliction Tracker

Post by Oneymus »

I've been brainstorming this exact thing as of late, tower and all. My idea would be to have a number of "blank" Frames into which you would plug the images/text as appropriate. So, instead of moving Frames, you simply change their contents.

This would be managed via a simple table, and as afflictions are added/removed, you "recolor" the blank Frames.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Affliction Tracker

Post by Akaya »

ah... hmm. Let me play with that idea and see what I can come up with

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Affliction Tracker

Post by Akaya »

Well... I've been tinkering with it for a few days and made a little progress but not much.

I went ahead and created a few "blank boxes" or frames with clear backgrounds next to each green dot. When the svo lost/got aff events are raised, afflictions are added to/taken from a table. Each position in the table reflects a position of a blank box. For example t[1] would represent the bottom of the tower. t[2] would be right above it. So when the lost/got event is raised, the blank frames are updated to reflect the table filled with afflictions.

Now this doesn't really give the "tower" effect mentioned earlier, but rather function exactly as a table does when inserting or removing items. So when an affliction is removed, everything that was above the removed affliction will still drop down one position, it just can't figure out how to push it up from the bottom.

Here's a screenshot of it in action while bashing a few denizens in Achaea:
Image

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Affliction Tracker

Post by Vadi »

table.insert? It inserts at the end position by default.

(you can use vaff for testing, by the by)

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Affliction Tracker

Post by Akaya »

is there another function like table.insert that will insert in the first position? I think that could actually solve my problem if there is.

And thanks! vaff works wonders. I was obviously having to log in and test it out. :P

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Affliction Tracker

Post by kevutian »

You can specify where the new index will be inserted with the table.insert() function itself.

Code: Select all

table.insert(table, pos, args)

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Affliction Tracker

Post by Akaya »

Ok. So with that last little piece of the puzzle, it works great. The afflictions now appear on the UI in a tower-like manner as they're given/lost. Sweeeeeet :D

When the svo got/lost aff event is raised, the affliction is sent to a table via table.insert(testTable, 1, affliction) or listRemove(testTable, affliction)
All the afflictions in the table are pushed up or down and then the UI is updated to reflect the table's contents.

If anyone's interested in using this, let it be known. It requires that you play Achaea, use the svo curing system, and have the Vyzor framework installed on your Mudlet profile. It's a bit of work to package it all together and I don't want to put in the effort if it's not worth it to anyone.

Post Reply