environment.GetArmorPenetration = _G.GetArmorPenetration -- GetArmorPenetration() - Returns percent of armor ignored by your physical attacks.
environment.GetAttackPowerForStat = _G.GetAttackPowerForStat --GetAttackPowerForStat(stat, value) - Returns the amount of attack power contributed by a specified amount of a particular stat.
environment.GetBlockChance = _G.GetBlockChange -- GetBlockChance() - Returns the player's percentage block chance.
environment.GetCombatRating = _G.GetCombatRating -- GetCombatRating(ratingID) - Returns the player's combat rating for a particular combat rating. (2.0)
environment.GetCombatRatingBonus = _G.GetCombatRatingBonus -- GetCombatRatingBonus(ratingID) - Returns the player's combat rating bonus for a particular combat rating. (2.0)
environment.GetCritChance = _G.GetCritChance -- GetCritChance() - Returns the player's melee critical hit chance
environment.GetCritChanceFromAgility = _G.GetCritChanceFromAgility -- GetCritChanceFromAgility("unit") - Returns the amount of your critical hit chance contributed by Agility.
environment.GetDodgeChance = _G.GetDodgeChance -- GetDodgeChance() - Returns the player's percentage dodge chance.
environment.GetExpertise = _G.GetExpertise -- GetExpertise() - Returns main hand and offhand expertise value.
environment.GetExpertisePercent = _G.GetExpertisePercent -- GetExpertisePercent() - Returns reduction in dodge and parry chances for main hand and offhand attacks, in percent.
environment.GetManaRegen = _G.GetManaRegen -- GetManaRegen() - Returns the player's mana regeneration rates.
environment.GetMaxCombatRatingBonus = _G.GetMaxCombatRatingBonus -- GetMaxCombatRatingBonus(lowestRating)
environment.GetParryChance = _G.GetParryChance -- GetParryChance() - Returns the player's percentage parry chance.
environment.GetPetSpellBonusDamage = _G.GetPetSpellBonusDamage -- GetPetSpellBonusDamage
environment.GetSpellBonusDamage = _G.GetSpellBonusDamage -- GetSpellBonusDamage(spellTreeID) - Returns the raw spell damage of the player for a given spell tree.
environment.GetRangedCritChance = _G.GetRangedCritChance -- GetRangedCritChance()
environment.GetSpellBonusHealing = _G.GetSpellBonusHealing -- GetSpellBonusHealing() - Returns the raw bonus healing of the player.
environment.GetSpellCritChance = _G.GetSpellCritChance -- GetSpellCritChance(school) - returns the players critical hit chance with a particular spell school.
environment.GetShieldBlock = _G.GetShieldBlock -- GetShieldBlock()
environment.GetSpellCritChanceFromIntellect = _G.GetSpellCritChanceFromIntellect -- GetSpellCritChanceFromIntellect("unit")
environment.GetSpellPenetration = _G.GetSpellPenetration -- GetSpellPenetration()
PluginDBM:
A work in progress
PluginLinq:
environment.Linq = LibLinq -- ckknight's LibLinq-1.0. This library is powerful. All scriptable. :)
PluginLocation:
environment.GetMinimapZoneText = _G.GetMinimapZoneText -- GetMinimapZoneText() - Returns the zone text, that is displayed over the minimap.
environment.GetRealZoneText = _G.GetRealZoneText -- GetRealZoneText() - Returns either instance name or zone name
environment.GetSubZoneText = _G.GetSubZoneTExt -- GetSubZoneText() - Returns the subzone text (e.g. "The Canals").
environment.GetZonePVPInfo = _G.GetZonePVPInfo -- GetZonePVPInfo() - Returns PVP info for the current zone.
environment.GetZoneText = _G.GetZoneText -- GetZoneText() - Returns the zone text (e.g. "Stormwind City").
environment.GetUnitStats = self.GetUnitStats -- Return name, guild, and location. These values are scanned off the unit tooltip. Thanks to ckknight for the code.
You think Blizz would get mad if someone reported getting some "malware" in a display? Not Windows malware, but just local to WoW. Because you'll be sharing displays, each element in a layout has some script, plus you have timer and key widgets, for executing some script at an interval and executing a script based on some key press.
You of course have to accept a display before loading it. And all this sandboxing does wonders. I'll be getting rid of _G before long. If you have to use _G please report why so I can provide some plugin or add to an existing one.
The only other thing that's available is sometimes there's a self, such as in a Timer widget, so you have access to its internal timer so you can stop the timer from within a script. self points to the actual widget. So you can script a widget at runtime, changing output on the fly. From the widget you have full access to everything concerning the display. I'm still at odds about providing self like this. I don't want to let something get out of hand before people get accustomed to liking this access. And I definitely don't want this whole project to get the nerf bat from Blizzard because gold sellers figured out how to advertise their low prices, or someone thought they'd be a smart ass and do something malicious.
You could just auto-refuse displays from people not on your friends list, in your guild, or in your current party/raid group. If some random person I didn't know wanted to send me code to execute, I certainly wouldn't accept it, and I can't really think of a good reason for anyone to accept it. If you know someone but for some reason don't want them on your friends list, you could still group with them to get their display.
You could just auto-refuse displays from people not on your friends list, in your guild, or in your current party/raid group. If some random person I didn't know wanted to send me code to execute, I certainly wouldn't accept it, and I can't really think of a good reason for anyone to accept it. If you know someone but for some reason don't want them on your friends list, you could still group with them to get their display.
Well, I want it to be more social than that. I want people to share displays, even strangers. I want people to be able to share personal signatures. I think I'd rather deal with security issues than cripple the entire idea. I of course want people to be able to custom tune LCD4WoW in whatever way possible, so your suggestions definitely deserve thoughts. I just want to give people what they want, and I think they would really get a kick out of this entire social hacking thing. Or not. The point is you have to make a choice, and the default is more in tune with how you describe.
all scripts from white-listed characters will be accepted automatically (have an option to automatically add guild mates, friends, party members (these should also be removed from the white-list when they leave that group))
all scripts from black-listed characters will be rejected automatically.
everyone else you should display a popup when they try to send you a script here you can accept, reject, add to white-list, and add to blacklist. (popup should never display during combat but wait till after combat is over)
also if you have the same person in both white and blacklist (say person is in your guild and also on the black-list) black-list should always trump the white-list
you could maybe have an event log that has a history of who and when you accepted scripts and maybe even the code of the script
Not many, but some plugins, such as PluginUnitStats, need to hook into WoW somehow, and a Del method will remove those hooks. Not all plugins create an object either. Most don't in fact. Usually :New() just populates the environment with said functions. I'll leave some document trails.
I think one thing that will help is disallow any database changes from inside scripts.
Edit:
One cool thing about this is you can create a dialog on the fly. Just feed it with the table description and environment, show it, and you have a fully interactive dialogue. :) No need for users to write Lua to make use of these.
By the way, DriverCharacter is sort of on the heavy end of things. I added onload profiling to the drivers to give an idea of what it looks like. For some reason I can't get the actual time it takes to load, just the memory and cpu information.
Let's say two raiders haven't always gotten along. One raider decides to play a little game during an A-game critical moment in an encounter. He shares with the other raider a display that somehow modifies one of his qtip displays. It has all the information about the fight, except it also comes with a trojan that the other raider can actually control with whatever means. How freaky is that? I'm making communication scriptable. Like I said, it's social hacking. We know in the real world that people are suckered all the time. Phishing is big business. I imagine most display exchanges start with whispers. So someone could do a little social engineering and gain the access to display something. You of course have full control and can end and erase everything if you wish. It's just I know how gullible people can be. It's a little frightening. Coding things like hard limits on display sizes will help I imagine.
Speaking of display sizes, I think I'm going to go through with a 32x32 graphic display, so we can show music/combat /data visualizations -- minus the music since WoW can't do that. You can use chat messages however. :) The visualizations could be scriptable themselves, like Winamp's AVS. This is way in the back of the back burner, but thought I'd mention I actually want to do this. That in mind, is there a better method of showing pixels than making every pixel an actual frame created with CreateFrame("Frame")?
32x32 sized pcm visualization, 8x8 cell character display
Peak
Spectrum
Edit: They might be a bit heavy for raid encounters. We'll see. A 20x4 display takes about 50ms to load when it has to create all new frames, and it sort of drops frame rate to nothing for those 50ms. But as long as we've already created the frames, we can create a display rather quickly. Drawing on them takes a bit, however, and that is why I'm saying it's likely not for raiding. The QTip driver could probably be used, however. You can do similar visualizations. You could definitely do 32x32, but what's random eye-candy's use in a raid? Peak and Spectrum would be easy, but they wouldn't have the decayed look. But they can be scriptable. :)
Edit2: What's cool about the peak visualization is you're looking at two channels. You can watch one variable with another, such as incoming damage and outgoing damage.
Another point is that at the LibCore level nothing outside has to be referenced. There's a parent reference, but you don't have to provide it. There's nothing being done with it as of yet. There may be in the future depending on the application, but it's entirely optional and controlled by the programmer. The only plan is to allow you to interact with other displays, so you can tap into another display's layouts and widgets, or stop and start a display,
Edit: Oh I just tagged version 1.1.2b of LCD4WoW . The profiling is working now. Use ResourceServer if you want to see it without the taint caused by calling PluginResourceTools.Update. There seems to be a memory leak somewhere.
Edit: Oh the memory leak seems to be in StarTip when you mouse over someone. I thought I fixed that one.
Actually I'm not sure about displaying memory and cpu profile information. Isn't that sort of thing touchy? Some addons say one thing, others say an entirely different thing. It seems simple enough. You just update the data every so often and display the changes however. But without looking at this resource addon's code (which I might be doing) I can't match it.
Edit: By the way, I may be doing things in dumb ways. Let me know if I am so I can fix them.
He shares with the other raider a display that somehow modifies one of his qtip displays. It has all the information about the fight, except it also comes with a trojan that the other raider can actually control with whatever means.
Control what, exactly? I don't see anything in the lists of available functions you posted earlier in the thread that would let anyone "control" anything. I didn't even see anything that would enable sending any information back to the person who sent you the display.
Control what, exactly? I don't see anything in the lists of available functions you posted earlier in the thread that would let anyone "control" anything. I didn't even see anything that would enable sending any information back to the person who sent you the display.
But having special reign over all displays when you're sharing others that people wrote is going too far. I'm not sure how far I want to go.
Added two new transitions and fixed up/down. The new transitions are checkerboard and tentacle. Checkerboard draws a checkerboard pattern, alternating between layout and transition buffers at each cell. Tentacle draws a moving tentacle across the display, gradually revealing the new layout.
I hope to add more transitions. I'm looking for ideas, particularly if you know how to pull them off. Look at the bottom of StarLibLCDText-1.0.lua for examples. The basic idea is you have three frame buffers: LayoutFB, TransitionFB, and DisplayFB. LayoutFB is the old layout, TransitionFB is the new layout, and DisplayFB is where you draw the combined result.
They look better live, since they're animated, and you're only looking at one frame here. Here's a demo.
DriverCharacter is pretty cpu intensive -- about 5%-10% for this demo with 3 displays (1 DriverCharacter and 2 DriverQTip) going. The QTip driver is a LOT easier on the frame rates. The DriverCharacter display is 2*20*8*6=1920 textures large and draws its own fonts (each icon is an actual font as well). The QTip display is 8x24 cells large -- 3 icons. DriverCharacter is more less for socializing, while DriverQTip could be used in more scenarios.
Now for the question that's eating at you: what use are these? I have absolutely no idea. You could draw a picture with them I guess, but no need. I plan to write an image widget full with draw functions that you can use from within a script. Or you can just define a static image. Whatever you can make with a scriptable 2 bit surface.
This thing's looking more and more like a character LCD every day. :) Special characters (custom font faces, icons, 32x32+ images, etc..) are just plain fun to play with and are one of the main things that make character displays character displays.
PluginBit:
PluginCharacterStats:
PluginDBM:
A work in progress
PluginLinq:
PluginLocation:
PluginLua:
PluginMath:
PluginRangeCheck:
PluginResourceTools:
PluginString:
PluginTable:
PluginUnit: (Note that this is incomplete at the moment. I'll update this with additions.)
PluginUnitStats:
You of course have to accept a display before loading it. And all this sandboxing does wonders. I'll be getting rid of _G before long. If you have to use _G please report why so I can provide some plugin or add to an existing one.
The only other thing that's available is sometimes there's a self, such as in a Timer widget, so you have access to its internal timer so you can stop the timer from within a script. self points to the actual widget. So you can script a widget at runtime, changing output on the fly. From the widget you have full access to everything concerning the display. I'm still at odds about providing self like this. I don't want to let something get out of hand before people get accustomed to liking this access. And I definitely don't want this whole project to get the nerf bat from Blizzard because gold sellers figured out how to advertise their low prices, or someone thought they'd be a smart ass and do something malicious.
Well, I want it to be more social than that. I want people to share displays, even strangers. I want people to be able to share personal signatures. I think I'd rather deal with security issues than cripple the entire idea. I of course want people to be able to custom tune LCD4WoW in whatever way possible, so your suggestions definitely deserve thoughts. I just want to give people what they want, and I think they would really get a kick out of this entire social hacking thing. Or not. The point is you have to make a choice, and the default is more in tune with how you describe.
all scripts from white-listed characters will be accepted automatically (have an option to automatically add guild mates, friends, party members (these should also be removed from the white-list when they leave that group))
all scripts from black-listed characters will be rejected automatically.
everyone else you should display a popup when they try to send you a script here you can accept, reject, add to white-list, and add to blacklist. (popup should never display during combat but wait till after combat is over)
you could maybe have an event log that has a history of who and when you accepted scripts and maybe even the code of the script
Edit:
One cool thing about this is you can create a dialog on the fly. Just feed it with the table description and environment, show it, and you have a fully interactive dialogue. :) No need for users to write Lua to make use of these.
By the way, DriverCharacter is sort of on the heavy end of things. I added onload profiling to the drivers to give an idea of what it looks like. For some reason I can't get the actual time it takes to load, just the memory and cpu information.
Speaking of display sizes, I think I'm going to go through with a 32x32 graphic display, so we can show music/combat /data visualizations -- minus the music since WoW can't do that. You can use chat messages however. :) The visualizations could be scriptable themselves, like Winamp's AVS. This is way in the back of the back burner, but thought I'd mention I actually want to do this. That in mind, is there a better method of showing pixels than making every pixel an actual frame created with CreateFrame("Frame")?
32x32 sized pcm visualization, 8x8 cell character display
Peak
Spectrum
Edit: They might be a bit heavy for raid encounters. We'll see. A 20x4 display takes about 50ms to load when it has to create all new frames, and it sort of drops frame rate to nothing for those 50ms. But as long as we've already created the frames, we can create a display rather quickly. Drawing on them takes a bit, however, and that is why I'm saying it's likely not for raiding. The QTip driver could probably be used, however. You can do similar visualizations. You could definitely do 32x32, but what's random eye-candy's use in a raid? Peak and Spectrum would be easy, but they wouldn't have the decayed look. But they can be scriptable. :)
Edit2: What's cool about the peak visualization is you're looking at two channels. You can watch one variable with another, such as incoming damage and outgoing damage.
Edit: Oh I just tagged version 1.1.2b of LCD4WoW . The profiling is working now. Use ResourceServer if you want to see it without the taint caused by calling PluginResourceTools.Update. There seems to be a memory leak somewhere.
Edit: Oh the memory leak seems to be in StarTip when you mouse over someone. I thought I fixed that one.
Edit: By the way, I may be doing things in dumb ways. Let me know if I am so I can fix them.
Control what, exactly? I don't see anything in the lists of available functions you posted earlier in the thread that would let anyone "control" anything. I didn't even see anything that would enable sending any information back to the person who sent you the display.
Why not just use textures and attach them to a single frame?
But having special reign over all displays when you're sharing others that people wrote is going too far. I'm not sure how far I want to go.
Yeah, I can custom tailor a table reference depending on a trust factor. Good idea.
I hope to add more transitions. I'm looking for ideas, particularly if you know how to pull them off. Look at the bottom of StarLibLCDText-1.0.lua for examples. The basic idea is you have three frame buffers: LayoutFB, TransitionFB, and DisplayFB. LayoutFB is the old layout, TransitionFB is the new layout, and DisplayFB is where you draw the combined result.
They look better live, since they're animated, and you're only looking at one frame here. Here's a demo.
DriverCharacter is pretty cpu intensive -- about 5%-10% for this demo with 3 displays (1 DriverCharacter and 2 DriverQTip) going. The QTip driver is a LOT easier on the frame rates. The DriverCharacter display is 2*20*8*6=1920 textures large and draws its own fonts (each icon is an actual font as well). The QTip display is 8x24 cells large -- 3 icons. DriverCharacter is more less for socializing, while DriverQTip could be used in more scenarios.
Now for the question that's eating at you: what use are these? I have absolutely no idea. You could draw a picture with them I guess, but no need. I plan to write an image widget full with draw functions that you can use from within a script. Or you can just define a static image. Whatever you can make with a scriptable 2 bit surface.
This thing's looking more and more like a character LCD every day. :) Special characters (custom font faces, icons, 32x32+ images, etc..) are just plain fun to play with and are one of the main things that make character displays character displays.