It's an addon for The Elder Scroll Online which display all Blacksmith, Clothier and Woodworking master writ where the style is unknown, and for each of them, looking for the style price and display it.
Libraries :
And also another addon : CraftStore
I'm sorry, I not like the idea to depends from another addon, but because a lib about style is missing (and I don't have the time and energy to do it myself currently), I prefer depend from another addon instead of copy all datas already present in it.
Into the addon folder (Elder Scrolls Online\live\AddOns
in your document folder), you need to have a folder WritStylePrice
and copy all files into it.
So you can :
- Clone the repository in the AddOns folder and name it
WritStylePrice
. - Or download the zip file started by
esoui-
of the last release in github, and extract it in the AddOns folder.
You will have access to a new window which will display all master writ (which use a style) where the style is unknown, and for each, the price of the style.
To display it, you can configure a keybind, or use the command /writstyleprice
, also, if the command is not already used, you can use the command /wsp
Yes I have keep many masterWrits to do my tests
And I you have the cursor on the price, a tooltip will display you all known price for the style
When a character is loaded, the addon will scan the current character bag, your bank (not the guild bank) and you storage coffer if you are in your house. From the settings page, you can configure what will be scanned. If you disable the scan for a things already scanned, all data generated and saved by this addon will be removed.
Also from the settings page, you can configure a preferred source order to obtain and display the price.
There are loaded in order :
- Initialise.lua
- Collect.lua
- Events.lua
- GUI.lua
- Item.lua
- ItemType\MasterWrit.lua
- ItemType\Style.lua
- List.lua
- Price.lua
- Settings.lua
- Run.lua
Declare all variables and the initialise function.
Declared variables :
WritStylePrice
: The global table for all addon's properties and methods.WritStylePrice.name
: The addon nameWritStylePrice.dirName
: The addon name without space (which correspond to the directory addon name)WritStylePrice.savedVariables
: TheZO_SavedVars
table which contains saved variable for this addon.WritStylePrice.ready
: If the addon is ready to be usedWritStylePrice.async
: The library LibAsyncWritStylePrice.LAM
: The library LibAddonMenu2WritStylePrice.charactersMap
: The liste of all your character (not saved)
Methods :
WritStylePrice:Initialise
: Module initialiser
Intiialise savedVariables, settings panel, GUI, the collect and prices systemsWritStylePrice:initCharactersMap
: Populate thecharactersMap
property.
Table : WritStylePrice.Collect
Contain the bag, bank and storage coffers reader system
Constants :
TYPE_HOUSE_BANK
: A key used inlist
table to separate house storage coffers items from others.TYPE_BANK
: A key used inlist
table to separate bank items from others.TYPE_CHAR
: A key used inlist
table to separate characters bags items from others.
Properties :
list
: The table list of all items.
The structure is like that :table[TYPE_constant][bagIdOrCharacterId][bagId_slotIdx] = WritStylePrice.Item object
.
This list is saved in savedVariablescollect.list
.status
: The read/collected status for each part which can be read/collectedsavedVars
: All saved variables dedicated to the collect system.
Methods :
WritStylePrice.Collect:init
: Initialise the collect systemWritStylePrice.Collect:initSavedVarsValues
: Initialise with a default value all saved variables dedicated to the collect systemWritStylePrice.Collect:initSavedList
: Initialise the self.list table contentsWritStylePrice.Collect:obtainScanCharBag
: To know if the character bag should be scanned or notWritStylePrice.Collect:defineScanCharBag
: Define the value for the var used to know if the character bag should be scannedWritStylePrice.Collect:obtainScanBank
: To know if the bank should be scanned or notWritStylePrice.Collect:defineScanBank
: Define the value for the var used to know if the bank should be scannedWritStylePrice.Collect:obtainScanHouseBank
: To know if the house bank (storrage coffers) should be scanned or notWritStylePrice.Collect:defineScanHouseBank
: Define the value for the var used to know if the house bank should be scannedWritStylePrice.Collect:readAllList
: Read all list of items collected and call the callback for each itemWritStylePrice.Collect:removeAllInBagType
: Remove all items in a specific bagType (not bagId !)WritStylePrice.Collect:readSavedList
: Read all item saved in savedVar and instanciate a new Item object for each item.WritStylePrice.Collect:readCharBag
: Read all item in the character bagWritStylePrice.Collect:readBank
: Read all item in the bankWritStylePrice.Collect:readHouseBanks
: Read all item in the house bank (storrage coffers)WritStylePrice.Collect:generateSavedKey
: Generate the key used to save an item inself.list[][]
WritStylePrice.Collect:obtainBagItemList
: Obtain the table which contain the list item for a specific bagIdWritStylePrice.Collect:readItemSlot
: Read a slot index in a bag idWritStylePrice.Collect:newItem
: To add an unknown item (for the list) to the list if it's an item that interests usWritStylePrice.Collect:updateItem
: To update a known item inself.list[][]
WritStylePrice.Collect:removeItem
: To remove a known item fromself.list[][]
. Also check if it's a motif and if it has been learned.WritStylePrice.Collect:newStyleLearn
: Callback forself:readAllList
called when a new style has been learned. Used to check if the style is now known or not on each masterWrit in the list.
Table : WritStylePrice.Events
Contain all functions called when a listened event is triggered.
Methods :
WritStylePrice.Events.onLoaded
: Called when the addon is loadedWritStylePrice.Events.onLoadScreen
: Called after each load screen. Do the collect if necessary.WritStylePrice.Events.keybindingsToggle
: Called when the keybind is usedWritStylePrice.Events.toggleGUI
: Called when the slash command is usedWritStylePrice.Events.GuiClose
: Called when the GUI is closed by the top-right crossWritStylePrice.Events.onGuiMoveStop
: Called when the GUI o longer moved to save the current positionWritStylePrice.Events.onOpenBank
: Called when the bank is opened to collect it if necessaryWritStylePrice.Events.onMoveItem
: Called when a new item is looted, when an item move between bags, or is used.
Table : WritStylePrice.GUI
Contains all functions to define the GUI container and save GUIItems instances.
Properties :
ui
: The main UI controlisHidden
: If the UI is hidden or notlist
: The object which manage the ui table's content listsavedVars
: All saved variables dedicated to the gui.
Methods :
WritStylePrice.GUI:init
: Initialise the GUIWritStylePrice.GUI:getIsHidden
: Get the info if the UI is hidden or notWritStylePrice.GUI:refreshList
: Refresh the list of item in the ui tableWritStylePrice.GUI:initSavedVarsValues
: Initialise with a default value all saved variables dedicated to the guiWritStylePrice.GUI:toggle
: Show or hide the UIWritStylePrice.GUI:show
: Show the UI and refresh the content listWritStylePrice.GUI:hide
: Hide the UIWritStylePrice.GUI:savePosition
: Save the current position and size of the UIWritStylePrice.GUI:restorePosition
: Redefine position and size of the UI from saved dataWritStylePrice.GUI:headerInitCell
: Called on each ui table header cell
Table : WritStylePrice.Item
Contain all info about an item. It's a POO like with one instance of Item for each item.
Constants :
ITEM_TYPE_MW
: The itemType value for master writITEM_TYPE_SP
: The itemType value for style pageITEM_TYPE_MO
: The itemType value for style books and chapters
Properties :
bagId
: The bagId where is the itemslotIdx
: The slot index where is the itemcharId
: If the bagId is a character bag, the character id, else nilitemLink
: The itemLinkitemName
: The item name in the language used when the scan is doneitemType
: See constantsdata
: An instance ofWritStylePrice.ItemType.MasterWrit
orWritStylePrice.ItemType.Style
which contain specialised data about the item
Methods :
WritStylePrice.Item:New
: Instanciate a new Item "object"WritStylePrice.Item:initData
: Initialise the data property with a instance of the dedicated object for the item typeWritStylePrice.Item:createBaseObj
: Generate and return the base table used to create a new Item objectWritStylePrice.Item.checkType
: Check if an item is a type we follow and save (masterWrit or stylePage/motives)
Table : WritStylePrice.ItemType.MasterWrit
Contain all dedicated function to known data about a masterWrit. It's a POO like with one instance of MasterWrit for each masterWrit item followed.
Note : The object have access to the Item object properties which instanciate it.
Properties :
writItemType
: The itemType to craft (axe, stave, legs, etc)styleIdx
: The style id to use for the craftchapterIdx
: The style chapter index corresponding to the itemTypestyleIsKnown
: If the style is known on one of the charactersnbVouchers
: Number of the vouchers given by the masterWritstyleItem.motifLink
: The motif's itemLinkstyleItem.motifId
: The motif's item idstyleItem.motifName
: The motif's item name (in the language used when the scan is done)
Methods :
WritStylePrice.ItemType.MasterWrit:New
: Instanciate a new MasterWrit objectWritStylePrice.ItemType.MasterWrit:readItem
: Read the item and populate propertiesWritStylePrice.ItemType.MasterWrit.checkWritType
: Check the type writType to know if it's a masterWrit we need to follow or notWritStylePrice.ItemType.MasterWrit:convertWritItemTypeToCSChapterIdx
: Convert a writ itemType (from info in masterWrit) to CraftStore chapter indexWritStylePrice.ItemType.MasterWrit:checkStyleIsKnown
: Check if the style of the masterWrit is known or notWritStylePrice.ItemType.MasterWrit:updatePrices
: Update the motif's price
Table : WritStylePrice.ItemType.Style
Contain all dedicated function to known data about a style page. It's a POO like with one instance of Styles for each style item followed.
Note : The object have access to the Item object properties which instanciate it.
Properties :
itemId
: The item IDisKnown
: If the style is known on one of the charactersdone)
Methods :
WritStylePrice.ItemType.Style:New
: Instanciate a new Style objectWritStylePrice.ItemType.Style:readItem
: Read the item and populate propertiesWritStylePrice.ItemType.Style.checkStyleIsKnown
: Check if the style is known or not for the current character. Called only if not already known on another character.
Table : WritStylePrice.List
Contain all the system to generate the ui table list.
This object extends ZO_SortFilterList
object
Properties :
masterList
: A list of all item to display
Methods :
WritStylePrice.List:New
: Instanciate a new ZO_SortFilterList which use us and return itWritStylePrice.List:Initialize
: inheritdocWritStylePrice.List.BuildMasterList
: inheritdocWritStylePrice.List.readItemObj
: Callback forWritStylePrice.Collect:readAllList
, called for each item in the list. Add all masterWrit whose style is not known to the masterListWritStylePrice.List.convertItemDataToDisplay
: Convert data in Item object to a table used for generate the rowWritStylePrice.List.FilterScrollList
: inheritdocWritStylePrice.List.SortScrollList
: inheritdocWritStylePrice.List.SetupItemRow
: inheritdocWritStylePrice.List.createItemTooltip
: Create the item tooltip for the current item in the cellWritStylePrice.List.createPriceTooltip
: Create the tooltip to display all price found for an item
Table : WritStylePrice.ItemType.Style
Contain all dedicated function to obtain the price of an item.
Properties :
savedVars
: All saved variables dedicated to the price system.list
: The list of all items with a price.
Note : This list is not saved in savedVariables.
Methods :
WritStylePrice.Price:init
: Initialise data used by the price systemWritStylePrice.Price:initSavedVarsValues
: Initialise with a default value all saved variables dedicated to the sort systemWritStylePrice.Price.obtainOrder
: Obtain the current order to useWritStylePrice.Price.defineOrder
: Define a new order to use and refresh the UI listWritStylePrice.Price.generatePrices
: Generate the price's table for the itemLink and add it to self.listWritStylePrice.Price.addPrice
: Add a new price source to priceTable argWritStylePrice.Price.obtainPriceList
: Obtain the price list for a specific itemLinkWritStylePrice.Price.obtainPreferredPrice
: Obtain the preferred price for a specific itemLinkWritStylePrice.Price.convertSourceKeyToStr
: Convert a price source key to the translated human name
Table : WritStylePrice.Settings
Contain all function used to build the settings panel
Properties :
panelName
: The name of the settings panel
Methods :
WritStylePrice.Settings:init
: Initialise the settings panelWritStylePrice.Settings:build
: Build the settings panelWritStylePrice.Settings:buildScanCharBag
: Return info to build the setting panel for "scan character bag"WritStylePrice.Settings:buildScanBank
: Return info to build the setting panel for "scan bank"WritStylePrice.Settings:buildScanHouseBank
: Return info to build the setting panel for "scan house bank"WritStylePrice.Settings:buildPreferredPriceOrder
: Return info to build the setting panel for "preferred price" order
Define a listener to all used events.