It's an addon for The Elder Scroll Online which track all surveys you have in you bag and display all zone where you have a surve, the survey's unique number and the total number.
One library : LibAddonMenu-2.0
.
Into the addon folder (Elder Scrolls Online\live\AddOns
in your document folder), you need to have a folder SurveyZoneList
and copy all files into it.
So you can :
- Clone the repository in the AddOns folder and name it
SurveyZoneList
. - Or download the zip file started by
esoui-
of the last release in github, and extract it in the AddOns folder.
You will have a new "widget" which will be displayed in the screen. The system will search in you bag all surveys, parse it to know the zone name and will add the zone name in the widget.
For example, I have this :
I'm currently in Rimmen when the screen has been taken, so I have the Northern Elsweyr in top of the list (you can configure it)
You can configure how the sort is done and the text format :
Also you can configure a keybind to show/hide the GuI
There are loaded in order :
- Initialise.lua
- Collect.lua
- Events.lua
- GUI.lua
- GUIItem.lua
- ItemSort.lua
- Settings.lua
- Run.lua
Declare all variables and the initialise function.
Declared variables :
SurveyZoneList
: The global table for all addon's properties and methods.SurveyZoneList.name
: The addon nameSurveyZoneList.savedVariables
: TheZO_SavedVars
table which contains saved variable for this addon.SurveyZoneList.ready
: If the addon is ready to be usedSurveyZoneList.LAM
: The library LibAddonMenu2
Methods :
SurveyZoneList:Initialise
: Module initialiser
Intiialise savedVariables, settings panel, GUI and the sort system
Table : SurveyZoneList.Collect
Contain the bag reader system
Properties :
zoneList
: It's a table where keys are the zone name (from survey item name), and the value is a table which contain all info about the zone like number of survey, etcslotList
: It's a table where Keys are the slot index, and the value a table with info about the survey at the specific slot index; the table contain the zone name and the itemlinkorderedList
: Same as zoneList but with numerical keys (like an array), so we don't care about keys on this table. Values are reference to values in zoneList.
Methods :
SurveyZoneList.Collect:search
: Read all items in the character bag to find all surveysSurveyZoneList.Collect:readItem
: Read a specific item in the character bag to know if it's a survey, and parse the item name to know the zone name of the surveySurveyZoneList.Collect:obtainNewZoneInfo
: Obtain the table skeleton used to save data about a zoneSurveyZoneList.Collect:updateItemToList
: Update all lists for the item at slot slotIdx in the character bagSurveyZoneList.Collect:removeItemFromList
: Remove an item from all listSurveyZoneList.Collect:findForSlotIdx
: Return saved info about the item at a specific slot index in character bag
Table : SurveyZoneList.Events
Contain all functions called when a listened event is triggered.
Methods :
SurveyZoneList.Events.onLoaded
: Called when the addon is loadedSurveyZoneList.Events.onLoadScreen
: Called after each load screenSurveyZoneList.Events.onMoveItem
: Called when a item move in the character bag (filter on event)SurveyZoneList.Events.onGuiMoveStop
: Called when the user stop to move the GUISurveyZoneList.Events.keybindingsToggleGUI
: Called when the user trigger the keybinds for "toggle GUI"
Table : SurveyZoneList.GUI
Contains all functions to define the GUI container and save GUIItems instances.
Properties :
ui
: The ui TolLevelWindowbackUI
: The ui backdroptitle
: The first item of the list which display list titlefragment
: The fragment used to link the ui to a sceneitemList
: A list of all GUIItems created. We cannot remove an ui item from memory, so we keep it all created items here to reuse it when the list is refreshed.savedVars
: All saved variables dedicated to the gui.
Methods :
SurveyZoneList.GUI:init
: Initialise the GUISurveyZoneList.GUI:initSavedVarsValues
: Initialise with a default value all saved variables dedicated to the guiSurveyZoneList.GUI:build
: Build the GUISurveyZoneList.GUI:restorePosition
: Restore the GUI's position from saved variablesSurveyZoneList.GUI:isLocked
: Return info about if the GUI position is locked or notSurveyZoneList.GUI:defineLocked
: Define if the GUI is locked or not.SurveyZoneList.GUI:isDisplayWithWMap
: Return info about if the GUI should be displayed when the world map is open or notSurveyZoneList.GUI:defineDisplayWithWMap
: Define if the GUI should be displayed when the world map is open or notSurveyZoneList.GUI:obtainDisplayItemText
: Return the text format used for each itemSurveyZoneList.GUI:defineDisplayItemText
: Define a new text format for itemsSurveyZoneList.GUI:savePosition
: Save the GUI's position to savedVariablesSurveyZoneList.GUI:defineFragment
: Define GUI as a fragment linked to scenes. With that, the GUI is hidden when we open a menu (like inventory or map)SurveyZoneList.GUI:toggle
: Show or hide the GUI
If the GUI is currently hidden, it will be shown.
If the GUI is currently shown, it will be hidden.SurveyZoneList.GUI:refreshAll
: Refresh all items displayedSurveyZoneList.GUI:resetAllItems
: Reset each item values an hide itSurveyZoneList.GUI:hideAllItems
: Hide all itemsSurveyZoneList.GUI:showAllItems
: Show all used items
Table : SurveyZoneList.GUIItem
Contain all info about a row/zoneName in the gui. It's a POO like with one instance of GUIItem by row/zoneName (called item).
Properties :
uiIdx
: (static property) The current uiItem index which represents the number of item already createdui
: The item's ui BACKDROPuiLabel
: The item's ui labelparentUI
: The TopLevelWindow in GUI tableused
: If the current item is used or not (cannot be destroyed)zoneName
: The zone name to displayzoneInfo
: Info about the zone, value in SurveyZoneList.Collect.orderedList
Methods :
SurveyZoneList.GUIItem:new
: Instanciate a new GUIItem "object"SurveyZoneList.GUIItem:initUI
: Create ui elements used by the itemSurveyZoneList.GUIItem:display
: To display or not the guiSurveyZoneList.GUIItem:hide
: To hide the item's uiSurveyZoneList.GUIItem:show
: To show the item's uiSurveyZoneList.GUIItem:definePosition
: Define the item's ui position from the indexSurveyZoneList.GUIItem:updateText
: Update the text to display
Table : SurveyZoneList.ItemSort
Contain all function to manage the sort system
Constants :
ORDER_TYPE_NB_UNIQUE
: The value for an order by number of unique survey pointORDER_TYPE_NB_SURVEY
: The value for an order by the total number of survey in a zoneORDER_TYPE_ZONE_NAME
: The value for an order by zone name
Properties :
savedVars
: All saved variables dedicated to the sort system.currentZoneName
: The current zone name
Methods :
SurveyZoneList.ItemSort:init
: Initialise data used by the sort systemSurveyZoneList.ItemSort:initSavedVarsValues
: Initialise with a default value all saved variables dedicated to the sort systemSurveyZoneList.ItemSort:obtainOrder
: Obtain the current order to useSurveyZoneList.ItemSort:defineOrder
: Define a new order to useSurveyZoneList.ItemSort:isKeepCurrentZoneFirst
: Obtain info about if the current zone must always be the first item or notSurveyZoneList.ItemSort:defineKeepCurrentZoneFirst
: Define if the current zone must always be the first item or notSurveyZoneList.ItemSort:updateCurrentZone
: Update the current zone nameSurveyZoneList.ItemSort:espaceLuaStr
: Escape string to use it in patternSurveyZoneList.ItemSort:exec
: Execute the table's sort on SurveyZoneList.Collect.orderedListSurveyZoneList.ItemSort.sortZoneList
: Callback function used by table.sort.
It's called each time an item in the sorted table is compared to another.
Table : SurveyZoneList.Settings
Contain all function used to build the settings panel
Properties :
panelName
: The name of the settings panel
Methods :
SurveyZoneList.Settings:init
: Initialise the settings panelSurveyZoneList.Settings:build
: Build the settings panelSurveyZoneList.Settings:buildGUILocked
: Return info to build the setting panel for "lock ui"SurveyZoneList.Settings:buildDisplayedWithWorldMap
: Return info to build the setting panel for "display with world map"SurveyZoneList.Settings:buildCurrentZoneFirst
: Return info to build the setting panel for "keep the current zone first"SurveyZoneList.Settings:buildDisplayItemText
: Return info to build the setting panel for "item text format"SurveyZoneList.Settings:buildSort
: Return info to build the setting panel for a "sort" order
Define a listener to all used events.