LibPeriodicTable-3.1
Forum Discussion Thread
- Editing - how to maintain PeriodicTable.
- Usage - how to include and use PT sets in your mod.
- API - how to use PeriodicTable in your mod.
- Forum - discussion thread.
- Brush up on your chemistry knowledge.
Periodic Table organizes many WoW items and spells into sets. Like most Ace addons it's focus is efficiency. PT is a LibStub library for managing these sets (ex: Misc.Spell.Mount, Consumable.Food.Edible.Cheese, Misc.Minipet, ClassSpell) for other addons.
If you are looking for a tooltip display addon check out Mendeleev, which you can find on Curse or WoWI.
Item sets are stored as a comma-delimited strings and parsed out into a table only if requested. This speeds up load time and ensures that memory is only used for sets that are actively used.
If you are interested in using PT with your mod feel free to read the source code (there's not a lot). The comments will tell you everything you need to know.
Modules
PeriodicTable's "modules" are simply sets of sets. Particular mods can link the exact sets they need.
- ClassSpell - Spells for all classes with subsets for each tree.
- Consumable - Foods, Potions, Elixirs, Buffing items including type (fruit, meat, etc), quality (inedible, buff) and HP-recovery info.
- CurrencyItems - Items purchasable with various currencies.
- Gear - Socketed gear, Trinkets, Vendor Badge gear
- GearSet - Set Gear. Tier, Reputation, PvP, etc.
- InstanceLoot - Loot tables for instances and the bosses in those instances (only higher-level instances currently)
- InstanceLootHeroic - Loot tables for heroic instances
- Misc - Random stuff like Currency, Containers, Mounts, etc.
- Reputation - Rewards and Turnins for factions
- Tradeskill : Profession recipes
- TradeskillLevels : Profession recipes with level requirements
- TradeskillResultMats : Some kinda mats required sets for the recipes it looks like
In case one of your addons is providing /dump, something like this should work as temporary solution:
/dump LibStub("LibPeriodicTable-3.1"):ItemSearch(<itemid>)
/dump LibStub("LibPeriodicTable-3.1"):ItemSearch("[item]">)
I wonder if there is a way to turn this into a mouseover macro?
Don't know if you can make it mouseover, but this one will identify the item you have on your cursor (picked up):
To answer my own query...
/dump LibStub("LibPeriodicTable-3.1"):ItemSearch(({GameTooltip:GetItem()})[2])
I put this into a macro and dragged it onto the buttonbar. When I mouseover an item, I press the buttonkeybinding and tada... dump info!
In reply to Elkano:
Any recommendations for an addon that supports /dump. Or, is there a better way to do this as of Legion?
I'm still around breathing :) sadly, comments here are easy to miss... LPT has been split into separate data libs for a long time; as a lib it's meant to be run embedded by default so you'd only add those parts you need. That said, in the five years LPT-3.1 has been around by now a lot has changed within WoW. Some of these changes didn't fit that well into the data structures in place. Also, the amount of data has grown... there are almost 90k different items in the client by now (well, some aren't used). So the history has resulted in some brownfields. Also, data mining them from WoWHead has always been a pain (parsing for JSON data, 200 items max, filters, wrong data, ...), WoWDB hasn't been any better (even though we were promised special API calls :/ )
The core library for LPT is still doing fine and I don't see any needed changes to it. Thus a new version with changed sets would imho still be a 3.x version. The data miner could use a some generic work, maybe splitting it into multiple files (core functionality, data set specific stuff) to make maintaining it a bit easier. For the data sets themselves, there are lots that need serious treatment, e.g. the instance data (currently there is a split into normal, heroic, lfr, though imho the only reasonable split, if any, would be group vs raid, using lfr/normal/hero and size [10/25] as sub-splits where applicable).
Regarding the "which addons use it", that info sure would be nice to have. There is this "reverse relationship" for projects but iirc it has been broken for ages.
Elkano is the Manager/Author, so I think he'd need to be on board for any major changes. I have no idea how active he is in WoW and/or addon development at this point.
@ckaotik
I'd suggest just advancing to LibPeriodicTable-4.0 rather than trying to tie it to a game version. LPT4 would be the core functionality and have no data libraries at all, though it might define a few suggested "official" high level namespaces and offer a template for a dataminer.
LPT3.1 data libraries could be upgraded, repackaged, or split as needed to create more specialized, more tightly controlled LPT4 versions. Authors that upgrade to LPT4 would embed the core and any necessary data libraries and possibly add specialized data within their own addons (AutoBar).
I'm sure I'm not the first to say so, but it would be nice if there were a way to officially know which addons use which data libraries and namespaces so that the impact of changes to them could be known ahead of time. Separating the data from the LPT core functionality would be a step in that direction too.
@MuffinManKen
And since many entries in LibPT are hand-maintained, it's necessary to have many people working on it since it's a pain to update.
However, quite a few hand-maintained sets can now be mined as WowHead added quite a few more filters and useful pages, such as Tier sets. Seemed easier at that time to just add them manually instead of extending the miner... More minable sets -> less manual update required -> more frequent and up to date data, me thinks.
I also agree with JCinDE that it's a shame LPT is so ... untidy (and in some cases outdated, incorrect, duplicate or existing in one forward but not a backward set etc). It's just such a valuable project and only having alpha releases every couple of days|weeks|months doesn't reach most of the people using it. (Also, adding Tier 12 content when Tier 15 becomes available is kind of uncool)
To keep compatibility to current addons, we'd need a new branch. I suppose the 3.1 came from back then when patch 3.1 was released? So how about a 5.x tag? :)
You raise valid points. Perhaps the obstacles could be overcome if proper advance notice were given for the addon authors to either make their LPT data part of their addon or maintain it separately as a shared dataset. Then what seems to have been the vision for LPT could become reality.
The LPT core functionality could be packaged without data and each data module could be packaged as its own addon, available for use as needed and loaded only when an addon tries to access one of its sets.
I dunno. It just prickles my OCD that the best and only item database library is sort of disorganized and cluttery.
The only Addon-specific data that I'm aware of is a few multisets that were added for AutoBar. I agree they shouldn't have been added here, but since they were it's hard to remove them because someone might be using them. At one point I removed the Warlock stones that don't exist anymore and it broke a bunch of addons.
Any clean up would need to be done as a separate named version (3.2?) to avoid breaking things. Even then it would be a lot of effort and it would be hard to get people to agree on what's needed. And since many entries in LibPT are hand-maintained, it's necessary to have many people working on it since it's a pain to update.
For example, my stance on the TradeskillLevels is that since they are horribly incorrect they should be removed if they can't be fixed. I know others feel it's better to have bad data than no data.
The built-in data in LPT really needs to be cleaned up and standardized. Addon-specific data should not be distributed with the core LPT. Too many cooks, methinks.
A lot of items don't seem to be making it into their natural set. Panderia keystones, for example, are still not getting added to keystones (see Tradeskill.Mat.ByType.Keystone).
Were many trade skills and levels removed?
Elixir of Minor Accuracy, Potion of Nightmares, Resurgent Healing Potion, Cataclysm Potions, Fur Lining, and more.
Is it correct The alterac vallley items are not in the lib anymore ? Like the armors/ wingman mats etc..
If I am wrong where can I find em ? am lost
The Hyjal Herb bag has been in LibPT since Jan 13, so the fix was already there. Mr Plow just needs to be updated with the latest version.
This is when it was added: r337 | elkano | 2011-01-13
Im really sorry about that and thanks for the fast reply
"I've tried reporting problems to them earlier but I gave up on the idea, nothing happened."
Really? Your soul shard issue was fixed 3 days after you posted about it. If you want us to go out of our way to fix things for you you might want to try not implying to the world at large that we're a bunch of slackers.
And if you want to report a bug and track it's status, perhaps you should use the Ticket system.
This is me being lazy again regarding the Hyjal herb bag, this is my post from curse.com
Yesterday I equipped my new 36 slot herb bag, Hyjal Expedition Bag http://www.wowhead.com/item=54446
and I got problems. I put it in the bank and then started right clicking my herbs in the inventory and they went to the new bank exactly as they should. Then I did a /mp bank theworks and MrPlow started to move things out of the bag and filled up my other bags with those herbs and when it didnt fit all herbs in the other bags it seemed like MrPlow started looping so I just /mp stop Apparently MrPlow doesn't recognize the Hyjal bag as a herb bag. I will go back in that little file I've tweaked in earlier (see below) and see to it that the bag is where it should be.
In the end this isn't a MrPlow error but the guys who develops the addon LibPeriodicTable-3.1 that MrPlow uses. I've tried reporting problems to them earlier but I gave up on the idea, nothing happened.
I think I will paste this to them too so they notice unless a bunch of other ppl already told them.
Thanks for this great addon, I use it a billion times a day :)
Interface: 30200
Title: Mr PlowAuthor: Wobin
Notes: Regain that wasted space!Version: 10.1
X-Category: InventoryLoadOnDemand: 0
SavedVariables: MrPlowDBSavedVariablesPerCharacter: MrPlowIgnoreDB
OptionalDeps: Ace3, LibPeriodicTable-3.1, LibDBIcon-1.0X-Curse-Packaged-Version: v10.2.6.5-Beta**
Cata flasks...please and thank you.