PDA

View Full Version : Uberspells default colors



Greminty
02-18-2011, 12:51 AM
Uberspells is really awesome as a quick reference, but it's got so much going on sometimes that it's hard to tell what's what from a quick look. Specifically, I find it a little hard to tell whether shadow mastery is running, in cooldown, or ready-to-be-cast-again. (I know I could write a script to keep track of that automatically, but that's a separate issue.)

So, I wanted to add multiple colors to that, rather than have them all be blue. That way I can tell in an instant if a particular spell is active. It'd also be nice for tracking different types of spells (core defense spells in blue, bad effects in red, etc., etc.).

So my question is if there's a way to set the default color for those bars. I took a quick look at this and uberbar and didn't see anything that seemed like it. I'll investigate more tomorrow, but thought I'd ask here to see if anyone knew offhand.

Greminty
02-19-2011, 10:12 AM
May have found a solution. Not sure if it's actually possible to set the default color of the bar in lich. However, by adjusting the script a bit, I got it to remember any custom colors I set in stormfront, which is actually preferable.

Basically, instead of setting each progressBar's id to be its barNm (order in the list), I set the id to be the spell number. This way SF can remember my colors in the SF settings. I also had to switch the print order of the label and the progressBar so that the bar is "on top" so that you can actually get the Color option when you right click (the display looks the same though).

Still working on a couple repercussions of this (such as how to anchor them, and how to separate the lich spells feed from the xml spells feed), but it's working pretty well for me so far. Don't know if the author of uberspells wants to put in some of these changes, or if I should upload an alternate version to repo, so for now I'll just attach it here.

http://i51.tinypic.com/2z6fqfm.jpg

Deathravin
02-19-2011, 11:53 AM
I haven't played in a while, you can do whatever you want. I PMed you the UberSpells.key code. You can re-upload it if you like.

Very cool update btw. You could have it do different colors based on Spell[##].type (defense, utility, offense, timer) or if Spell[##].command contains "cman", "symbol", "sigil", or "sign", etc.

I think i did want to do different colors, but gave up for some reason.

subzero
02-19-2011, 03:35 PM
I approve this sort of updating.

Jace Solo
02-19-2011, 04:40 PM
Agreed, please update OR just PM/Email it to me!

Let me know which is the easiest for ya!

Greminty
02-19-2011, 07:24 PM
Updated! Also put in a few other minor fixes:
- Cleaned up Cooldown/Recovery effects... since they're named "Cooldown" in the Lich spell list, but show up as "Recovery" in SF xml
- Spells ending in under 90s show seconds left instead of h:mm
- Shortened the bars slightly to fit in SF sidebar
- A couple other minor bugs

To be clear, I still don't know how to set the color in the script (so I can't set default colors by spell type). This just allows the user to specify their own colors (and have SF remember them).

Let me know if you find any bugs or other issues.

horibu
02-19-2011, 09:54 PM
Can up upload it to the repo, say as Uberspells2 ??

Greminty
02-19-2011, 10:00 PM
It's up on repo now, I updated/replaced UberSpells. So, just re-download that.

(Also, just now fixed a minor bug I had introduced.)

Deathravin
02-20-2011, 03:27 AM
Updated! Also put in a few other minor fixes:
- Cleaned up Cooldown/Recovery effects... since they're named "Cooldown" in the Lich spell list, but show up as "Recovery" in SF xml
- Spells ending in under 90s show seconds left instead of h:mm
- Shortened the bars slightly to fit in SF sidebar
- A couple other minor bugs

To be clear, I still don't know how to set the color in the script (so I can't set default colors by spell type). This just allows the user to specify their own colors (and have SF remember them).

Let me know if you find any bugs or other issues.

Very cool find, man. I never knew you could change the color on an individual bar in stormfront.

I didn't know SF could remember colors of bars on its own. I bet there's a way to look at that. I don't have any access to any accounts at the moment, but what I'd do is...

;e toggle_upstream ; loop { echo upstream_get }
;e status_tags("on") ; loop { echo get }

Then change the color of one of the bars and see what's sent or received. Then see if you can emulate that sent or received data. I suppose it could all be done inside stormfront and kept there (which is most likely I suppose)... But it has to be somewhere if its retained.

I would always try to do it by using the health, mana, stamina and spirit bar colors, but I always had issues with having more than one of each in the bar. (Which is why uberbar only has 1 of each of those colors).

Greminty
02-20-2011, 08:18 PM
Thanks for the suggestions!

So I did find something sent when I changed a bar's color:

<stgupd><<r><display></display><display><dc id="uberspell_bar_9044" color="#FFFF00"/></display></<r>

When I put that to the game it complained about a missing closing tag. So I added the </stgupd> to it (though really the whole <<r> thing looks weird to me), and then it just seems to do nothing.

I did, however, find this in the SF local settings xml:
<display>
<dc id="uberspell_bar_9044" color="#FF0000" />
</display>

So, I looks like SF is updating its local settings, and that <stgupd> line it sends to the game is to update the server-side settings. I tried to test this by deleting my local settings after sending the <stgupd> line, and then restarting, but no dice. Looks like we would have to be able to update SF's in-memory settings... not sure if there's a good way to do that (maybe the game can push settings somehow?).

For now, I'm more-or-less satisfied to have them be user-settable, but I might look into this more later.

Sadumon
02-21-2011, 06:05 PM
Great update. I had also added the seconds countdown when the duration was low (I did < 60 seconds, but <90 seconds is just as good if not better). One thing I also did is have it update every 1 second if there are any spells whose duration is in the range where it displays seconds.

To do that, I added a new variable, wait_time, and set it to 10 outside of the main loop.

I then changed the wait_while loop to be less than the wait_time variable instead of the hardcoded 10, set the wait_time variable to 10 at the start of the loop, and then in the section where you choose whether to display h:mm or seconds, I set the wait_time to 1 if it goes down the seconds branch.

Deathravin
02-22-2011, 12:05 AM
I think the only reason I never did the seconds was I was trying to limit the SF bar updates. One xml update per second really starts to add up and slow SF down after a while.

GTK can handle it fine as uberbarwiz never seems to have an issue. But the SF xml gets excessive.

Greminty
02-22-2011, 01:08 PM
Yeah, I'm a little wary of putting a 1s timer into the official version (though I might stick it in my own). It's nice aesthetically, but doesn't really give you all that much more information.