I wasn't aware of multiple glyphs modifying the same spell so that does change things a little. I'll probably end up just offering both features, since I rather like the idea of the icons anyway.
With using strings though it would probably have to be localized since I can't find a global constant for the "Glyph of" phrase - I might be able to assume that the first two words of a string can be clipped, but that won't be true in all languages. It might apply to all languages supported by wow though, I'm not sure.
- Registered User
Member for 12 years, 11 months, and 1 day
Last active Sun, Dec, 31 2017 02:45:05
- 0 Followers
- 43 Total Posts
- 0 Thanks
Jul 14, 2010Posted in: Lua Code DiscussionQuote from lilsparkyi'm not totally grasping your ultimate goal here, honestly. what is the value of adding that "Glyph of Death Coil" affects the spell "Death Coil"? why not just add the entire "Use:" tooltip line? that explains the entire effect and they're reasonably concise. it would also remove the need to pre-mine any data.
It's not about finding what the glyph does necessarily, that's just the information I need to accomplish my end goal. As of right now for somebody that changes glyphs frequently, you need to manually mouseover each rune in the glyph frame to find the one you want to replace if you don't memorize the location of each.
The ideal situation is to replace the generic glyph texture in the frame with the actual icon for the spell being modified. I'd see the Death Coil icon in its place, and know clearly that's the glyph right when opening the window.
Overall a pretty minor issue, but I've gone out of my way to fix even smaller things before so why not this. :p
I was also leaning towards just using a table, Phanx. It's likely the solution I'll go but I wanted to make sure I wasn't missing an entire additional route for this.
Jul 13, 2010What I'm trying to accomplish: Simplify the default glyph UI display by including an icon/name of the spell that is affected by a given glyph. This would remove the need to hover over the indescript glyph slot icon to find this out.Posted in: Lua Code Discussion
Given the information available to the UI about glyphs the player is currently using (GetGlyphLink and GetGlyphSocketInfo), what is the most elegant and maintainable way of getting the spell that the glyph modifies?
Currently I only see two potential methods:
Using tooltip scanning on the glyph spell description. The largest hurdle for me here is spells consisting of more than one word; I can't really think of a way to account for this with a parsing algorithm. Smaller issues include the potential for glyphs that don't have the affected spell's name in them (although this doesn't seem likely), the clunkiness of tooltip scanning, and the relatively slow execution time of parsing algorithms. Speed isn't a major concern (this code will only be run when the glyph frame is shown), but it would be nice to have instant updates.
The other method is just a manually maintained table that uses the glyph spell (3rd return of GetGlyphSocketInfo) as keys and the affected spell as values. The obvious downside is the time necessary to gather all of this data and the need for manual updates as glyphs are changed.
I see some documentation notes that glyph links are unique from other item links, but I don't see anything that explains the purpose of each of the values in the link string. I don't see anything that would point to the affected spell (other than the name, which doesn't always match the name of the affected spell) in the link.
Any input on which of these options would be the best or any options I missed?
Jul 9, 2010This information is already displayed in the frame at the top of your screen, in the same place as the one used for ICC heroic attempts and pvp objectives.Posted in: Addon Ideas
I'm not saying that an alternative display isn't worthwhile, but some people either have that frame hidden, have other elements on top of it, or just didn't notice.
Jun 27, 2010That should actually be pretty simple:Posted in: Addon Ideas
local f = CreateFrame'Frame' f:RegisterEvent'BN_FRIEND_TOON_ONLINE' f:RegisterEvent'BN_FRIEND_TOON_OFFLINE' f:SetScript('OnEvent', function(self, event, name) if event == 'BN_FRIEND_TOON_ONLINE' then AddFriend(name) else RemoveFriend(name) end end)
Not tested, I'm not actually sure if BN_FRIEND_TOON_X passes the name as an argument but I'd assume it does. If it passes a presenceID instead you can just use BNGetToonInfo. If it doesn't pass anything (which doesn't seem likely), you can use BN_FRIEND_ACCOUNT_X which I know passes a presenceID.
edit: In retrospect this doesn't adequately cover cross realm / faction, but that's quite easy to add with the previously mentioned function. This is just a proof of concept if anybody wants to use it since I'm not planning on doing too much work with bnet stuff right now.
Apr 29, 2010In a rare stroke of .. common sense, I believe I've solved my logging problem by just writing my table pre-concatenation to a savedvariable with the current HH:MM timestamp as the key.Posted in: Lua Code Discussion
Apr 29, 2010Posted in: Lua Code DiscussionQuote from pigmonkeyI actually wrote the same addon for my guild. Though I don't understand your first question completely (why not just print one person, one damage value per line?)
Some of my code comments are a bit inaccurate in the above - I'm now actually tracking effective damage rather than wasted damage. This data is more appropriate for our specific need but it also means that I need to print all of the users damage to get usable results.
I want to be able to log the chat data via /chatlog (meaning I need to print it to a chat channel) so doing each line individually would result in the user having their chat automatically throttled.
I'm already disposing of my data after each wave is complete (all players dropped) so that's not really a problem. This is an interesting alternative, thanks for the input.I do have something that worked for me for the second problem, so long as you are okay with destroying the data after it is printed (as I do at the end of each pull). This is built on my own framework, but should still be straightforward. Basically, keep finding the max, print it, and discard it. I do top 5 each pull.
Apr 29, 2010I'm writing an addon to help fill gaps in log parsing websites for the heroic lich king encounter. Right now it's aimed at tracking units grabbed by Val'kyr Shadowguards as well as effective damage done to them (damage above 50% health).Posted in: Lua Code Discussion
While I've got something that should be functional I have a few problems:The data it prints is a massive block of text, and more importantly since it's printed locally it can't be logged to chatlog.txt. This means there's no permanent record of it and it tends to be pushed off the chat log quite quickly during the encounter.Any suggestions for getting the string down to usable sizes and reporting it in individual chat lines without truncating it in the middle of a player's damage or name?
Due to the character limit on SendChatMessage, it's not something that will translate cleanly from a print(). My string manipulation abilities are a bit weak and I can't think of any way to cleanly break this down into a compatible size. I'm placing all of the data in a table and forming my large string with table.concat.
The string format looks like this: http://img98.imageshack.us/img98/879/wowscrnshot042910015827.jpg
The other problem is an issue of readability and elegance. I'm using a hash table to collect data about effective damage done. The key is the player's name and the value is the damage. I want returned value to be sorted from highest to lowest damage - due to the unpredictably ordered returns when iterating a hash table I had to pass my data to a temporary array to sort it.Code: http://www.pastey.net/135859
While I don't think I can avoid using an array in some form, is it possible to change my data structures to get rid of the temporary table without making the code worse? Or is it possible to do what I'm doing currently better? The relevant code for this particular issue is highlighted.
Apologies if this was a little too verbose but I wanted to be as clear as possible. Thanks for any advice.
Mar 8, 2010Posted in: Lua Code Discussion
local width, height = strsplit("x", GetCVar"gxResolution")
Your (decimal) aspect ratio is width divided by height. I dunno how to get fractional aspect ratio from the resolution, but you can adapt your numbers easily.
i.e. 1920x1080 = 16:9 = 1.7777~ (16 / 9)
You can round off the odd numbers using format.
format("%.2f",1920/1080) -- = 16:9 = 1.78
Feb 11, 2010_ForgeUser685884 posted a message on Earliest event GetChannelList() is valid after login?That works great, thank you.Posted in: Lua Code Discussion
Feb 11, 2010_ForgeUser685884 posted a message on Earliest event GetChannelList() is valid after login?I'm populating a list of custom user channels on login for display in a dropdown menu. GetChannelList() however doesn't return joined channels until some unknown (to me) point in the login process.Posted in: Lua Code Discussion
I tried PLAYER_ENTERING_WORLD, PLAYER_ALIVE, and all of the CHANNEL_X_UPDATE(D) events and it doesn't seem to be available in any of them. The code works as intended on ui reload, but not on initial login, so I'm looking for the event I could use to delay the call.
Oct 1, 2009http://img199.imageshack.us/img199/954/wowscrnshot092909225922.jpgPosted in: General Chat
There's a lot of blatantly incomplete stuff but I've been creatively drained for weeks now. Some things that come to mind:
* BigWigs bars are basically default, got annoyed when they changed the alpha config (for the better!) so I left it that way. :p
* I'm mixin' and matchin' fonts. Avante Garde and Straightline (the pixel font) in this case. I'm not sure which I like more, or if I even mind having them both, so I've been playing around with them.
* The buff bars are atrocious. I can't find a way to track important short term stuff that I'm happy with in my current UI, so those hideously colored out of place bars are from a previous attempt at a UI.
So C&C welcome if you'd like.
- To post a comment, please login or register a new account.