There are a few different ways to edit the data, but first you need to know what is going on. There is a strict 3 level hierarchy in PT:
'''Level 1:''' The miner. This scrapes wowhead.com for data and saves it to data.lua
'''Level 2:''' data.lua. Humans can edit sets in data.lua that are not mined in level 1. data.lua provides raw data for compressplit.lua to turn into the various output files at level 3.
'''Level 3:''' LibPeriodicTable-x.x-*. These are strictly result files. Editing these files except to add *new* sets to them is totally futile as they are generated from data.lua
- Edit data in data.lua ONLY, then run compresssplit.lua in the command line.
- Changes made to the output files WILL get overwritten the next time compressplit is run.
- Editing the output files is ONLY done to add new set names to them.
- All new data sets must be added to both data.lua and the corresponding mini-embed (use Misc if it's a smallish data group that doesn't make sense in any of the other files.
- dataminer.lua scrapes wowhead.com for easily mineable sets and adds them to data.lua
- You would edit dataminer.lua if you know what you are doing and need to add a new generated set.
- Be aware that if a set is automatically generated with the dataminer, your changes to that set in data.lua will be overwritten the next time the dataminer is run. Fix the dataminer instead.
- Changes to the file PeriodicTable-3.0.lua can be made as normal.
- You will need Version Control access in order to edit any of this.
'''If any of this is puzzling or in any other way beyond you then simply report missing stuff to the Author of the mod you want it in.'''
This does not need editing unless Nymbia sees fit to release a new revision, or if you are adding a new result file.
Most edits take place here or in dataminer. Make sure you add your set as a comma delimited string. Each entry can optionally have a sort value by postfixing ":x". Example:
["Consumable.Food.Buff.Agility"] = "13928:10,27664:20,30358:20,27659:20,42999:40"
Find another mined set similar to yours, clone it and then make it work. Remember to run compressplit.bat in order to actually generate the mined results for use.
- You can pass in set names or partial set names to only generate those:
C:\dev\LibPeriodicTable-3.1\lua5.1.exe C:\dev\LibPeriodicTable-3.1\dataminer.lua ClassSpell C:\dev\LibPeriodicTable-3.1\lua5.1.exe C:\dev\LibPeriodicTable-3.1\dataminer.lua Misc.Usable.Starts
- You need to Google for lua5.1 executables for your OS in order to run the miner and compresssplit.
- In addition the miner requires some sockets, html and database handling libs / dlls / executables. If you run it without those it will error out on the missing modules, at which point Google around to find them for your system.
- Yes this is cryptic, but also a good hurdle to pass for committers.
- LibPeriodicTable-3.1-Consumable.lua for example
- Simply copy the new set in from data.lua verbatim and run compresssplit. It will notice the new set and get its data from data.lua and format it correctly.
A set containing itemId or spellId. Optionally, it can have values for those which must be integers and are separated by a colon.
["Reagent.Ammo.Arrow"] = "31737:500,12654:200,30611:385", ["GearSet.Tier 2.Priest.Vestments of Transcendence"] = "16925,16926,16919,16921,16920,16922,16924,16923", ["ClassSpell.Druid.Restoration"] = "-48435:0,-48436:0,-48437:0,-5185:1,-1126:1,-774:4,..."
A set containing references to sets. These can be used to form links between different points in the data hierarchy.
["InstanceLoot.Blackrock Spire"] = "m,InstanceLoot.Lower Blackrock Spire,InstanceLoot.Upper Blackrock Spire", ["Tradeskill.Mat.BySource.Gather"] = "m,Tradeskill.Gather",
There's no need to define a set that's implied by the hierarchy, PT3 creates these on the fly.
A set containing multiple sets.
["Consumable.Bandage.Battleground"] = "c[Alterac Valley,19307:2000][Arathi Basin,20232:1104,20234:2000][Warsong Gulch,19067:1104,19066:2000]",
- If you request a child of one of these sets, such as (with the above example as the only set)
PT:ItemInSet(19066, "Consumable.Bandage.Battleground.Warsong Gulch")
PT3 will automatically discover this and return the correct data.
- Any type of set can be stored within these sets, they can also be nested within each other, such as:
In addition, the contained sets must follow all the rules of their set type (specifically, data compression)
A set with non-integer values. These values can contain any string data aside from commas.
["Manufac.Alchemy"] = "o,16797:Elixir,16787:Healing,1235:Some'thing With_Spaces!,12534:111:111:111-2",
The itemids must be compressed, the values must be uncompressed.
A set that does not get uncompressed. In addition, the values can contain any string data aside from commas.
["MyAddon.Custom"] = "u,7132:Value!!,23684,32116:11",
Nothing here gets uncompressed. Use this set type for custom sets that are created on the fly in-game.
Notes on Sets
- Be aware of what you're overwriting. For example, if you define a set:
["a.b.c"] = "32257:1000,14431:400",
then the sets "a" and "a.b" are assumed from the hierarchy context. If you overwrite one of them, for example:
["a.b"] = "1221:112",
then the flow of the hierarchy is disrupted, as "a.b" should naturally be a multiset that contains it's children. This will not break anything, but be aware of the effects.
- A more damaging scenario would be this:
["a.b.c"] = "c[d,1111:11]", ["a.b.c.d"] = "2222:22",
In this case, data will be destroyed - and the kicker is that which data gets destroyed depends on the order in which they're requested.