Note: This plugin uses the Chat handler. It'll play well with any of my other scripts that use the chat handler, but not other authors' scripts that use the chat handler.
Okay, this is a bit of a weird plugin, in that it technically doesn't exactly do anything. But it might make an interesting code example.
What it does is track key presses and some mouse clicks that activate quickslots, integer power drops, and skill messages in the combat log. It'll use the key press/mouse clicks to identify potential skill usages, the integer power drops to identify potential skill activations, and the skill messages in the combat log to confirm skill activations. It will also attempt to learn the power costs of your skills.
/skillinfo toggle - This will bring up a set of 6x12 quickslots at the top of your screen. You'll need to mirror the shortcuts on your quickslot bars (quickslot 1 is on the bottom, quickslot 6 is on top - the arrangement should mirror the quickslot arrangement if you have all of the quickslots docked). SkillInfo will use this to identify which key corresponds to which skill. Typing this command again will hide the quickslots.
/skillinfo calibrate - Used to calibrate the delay between a key press and a skill activation. Choose a skill with no induction, make sure you have a valid target and are in range (if needed), and then type "/skillinfo calibrate start" and then use the skill. This will track the delay between the skill usage and the power drop. "/skillinfo calibrate status" will display the current average delay, "/skillinfo calibrate save" will save the current calibration information, "/skillinfo calibrate load" will reload the last saved calibration information, "/skillinfo calibrate reset" will clear all calibration information.
/skillinfo powerreset - Reset stored power costs. May be handy if you retrait or upgrade your equipment and have invalidated prior power costs. (This will happen automatically anyways, as the script fails to see the old power costs, but this will speed up the process.)
/skillinfo stopwarch - Tracks the interval between power costs - I was trying to use this to identify the total cycle time (induction + activation + cooldown) time of skills. Never really used it that much.
/skillinfo options - Open the plugin manager options panel.
There's three parts to this - Trait, Legacy, and Quickslot setup.
Trait setup will display your class's class and legendary traits. Greyed out means not active, colored in means active. Click to activate/deactivate.
LIs are now tracked by name, and it is expected that your LIs will have unique names. To add an LI, drag into the black box at the bottom. To add legacies to an LI, click the "Add Legacy" button, and choose from the drop down menu. Click on the text box to the right of the legacy name to set the value. These should be in the form of "-###s" (so far the only legacies I've seen are cooldown decreases in seconds. If there's ever a legacy that decreases a cooldown by a percentage, you could use "-###%")
Equipment sets are now tracked automatically, although I don't have the latest PvP sets coded in. I think.
Quickslot setup lets you override the existing quickslot bars with quickslots generated by SkillInfo. The advantage of this, is that SkillInfo can track mouse click made to the override quickslots, and therefore mouse click skill usages. Inactive/Active for the Quickslots turns the override bars on or off, Hide, Show on Key, Always Show changes the extended bars to either never be shown, only be shown if the quickslot visibility key is depressed, or always be shown. I've only tested the replacement bars on 1280x1024 and 1024x768. Theoretically it should work on any resolution greater than 1024x768.
_G.skillInfoWindow is the SkillInfo object - after loading the plugin, make the calls using that.
skillInfoWindow:findByShortcut(shortcut) - Given the data portion of a skill shortcut (a text string of the form "0x########"), returns the name of the skill. The name will be the "basic" form, and will not include "Improved", "Advanced", etc. Will only work for skills that are currently active (i.e., traited if necessary).
skillInfoWindow:getShortcut(skill) - Given the basic name of a skill, returns the data portion of a skill shortcut. Will only work for skills that are currently active.
skillInfoWindow:getSharedCooldown(skill) - Given the basic name of a skill, return a table consisting of the basic names of skills which share a cooldown with this skill. (For example, stance skills usually share a cooldown.)
skillInfoWindow:getCooldown(skill) - Given the basic name of a skill, return its current cooldown.
skillInfoWindow:getInduction(skill) - Given the basic name of a skill, return its current induction time.
skillInfoWindow:getTraitSet() - Return the number of traits in each trait set that are currently equipped (as indicated by the user). Trait sets are identified by the first letter of their color (R, G, Y).
skillInfoWindow:getEquipSet() - Return the current equipment sets that are active for the player. See itemSetTable for a list of IDs. IDs are typically based on where the set comes from. I.e., OrthancB is the more blue trait set oriented Orthanc set.
skillInfoWindow:QuickslotClicked(shortcut) - Informs SkillInfo of a quickslot being clicked. This should occur as part of a Quickslot's MouseClick event handler - shortcut should be the value returned by :GetShortcut() when run on the quickslot.
skillInfoWindow:BattleMemory(i) - Return the ith gambit builder that would be used to execute the current gambit stored in battle memory.
skillInfoWindow:ReportQuickslot(skill) - Takes a basic skill name and returns true if SkillInfo will detect the skill use via keypresses. (I.e., if the skill has been slotted into the Keymap configuration.)
skillInfoWindow:AddHandler(f) - Add a new SkillInfo event handler. Returns a handle that can be used with RemoveHandler.
skillInfoWindow:RemoveHandler(h) - Remove a SkillInfo event handler.
Event handlers should take three functions (event, time, args). Time is always the time when the event happened (note - some events may be delayed, because they are not recognized until later on - use time to know when the event occurred).
"!keymap" - Keymap configuration changed. Args are nil.
"!battlememory" - Battle memory changed. Args are nil.
"!update" - Skill information (cooldown, induction, etc.) may have changed due to trait changes or equipment changes. This will not catch skill changes that occur due to buffs - in general, it's advised that you query either the skill cooldown or induction each time you need it. Args are nil.
skill - Skill usage event occurred. args will either be "P" - power drop associated with the skill occurred, or a table. If it is a table, the entries in the table will be "B" (number of targets the skill applied a benefit to), "H" (number of targets the skill hit (normal, crit, dev crit)), "M" (number of targets missed by the skill), and "R" (number of targets that resisted the skill). This should only fire for the initial skill use, and not any subsequent effects (such as DoTs).
0.3.2 - Added U6 PvMP sets.
0.3.1 - Updated position of replacement quickslots for resolution widths under 1024. Still not quite right.
0.3 - Fixed March of the Ents capitalization.
Added support for replacing quickslots.
Battle Memory tracking. Kinda.
0.2.1 - Changed load/saved to work on serialized data. Hopefully should help out with international clients.