Download
(2 Kb)
Download
Updated: 03/11/19 07:45 AM
Pictures
File Info
Compatibility:
Wrathstone (4.3)
Murkmire (4.2)
Wolfhunter (4.1)
Summerset (4.0)
Dragon Bones (3.3)
Clockwork City (3.2)
Horns of the Reach (3.1)
Morrowind (3.0)
Homestead (2.7)
One Tamriel (2.6)
Shadows of the Hist (2.5)
Dark Brotherhood (2.4)
Thieves Guild (2.3)
Orsinium (2.2.4)
Updated:03/11/19 07:45 AM
Created:03/10/19 09:22 AM
Monthly downloads:34
Total downloads:3,522
Favorites:5
MD5:
Categories:Character Advancement, Graphic UI Mods, Map, Coords, Compasses
Wayshrine Tab Selector
Version: 1.3
by: Kulturnilpferd [More]
Description:

Every time you go to a wayshrine it will open the location tab. That annoys me a lot when I am questing and change the map view via double click on quests. So I have developed this nice addon which you could define a default tab which is opened if you visit a wayshrine. Beside that you have an auto mode. With these you could set the default tab to the last you have visited.
Just open the Addon settings and choose your favourite tab in the dropdown list or enable or disable the automatic mode. Also works with FasterTravel

Dependencies:
Update 1.3:
  • Bug fixed: If Automode was disabled the tabs stuck at choosen default tab
  • Optimized loaded addon check (Thanks to Baertram)

Update 1.2:
  • Added FasterTravel addon support

Update 1.1:
  • Added "Auto Mode" which set the default tab to the last used one
  • Multilingual code improvements (Thanks to Baertram)
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Uploader
Date
1.2
2kB
Kulturnilpferd
03/11/19 07:13 AM
1.1
2kB
Kulturnilpferd
03/10/19 01:31 PM
1.0
2kB
Kulturnilpferd
03/10/19 09:28 AM


Post A Reply Comment Options
Unread 09/06/21, 10:27 AM  
liam97

Forum posts: 0
File comments: 1
Uploads: 0
Originally Posted by Murxx
With the Markarth update 6.2.5 this Addon isn't working anymore. The only visible option is automatic mode on/off and even this has no effect.
It would be nice if somebody could update this, but I'm not that knowledgeable.
Report comment to moderator  
Reply With Quote
Unread 01/24/21, 09:42 AM  
Murxx

Forum posts: 0
File comments: 4
Uploads: 0
With the Markarth update 6.2.5 this Addon isn't working anymore. The only visible option is automatic mode on/off and even this has no effect.
Report comment to moderator  
Reply With Quote
Unread 03/11/19, 07:34 AM  
Kulturnilpferd
 
Kulturnilpferd's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 1
Thanks, have found a bug so Version 1.3 is on the way, will add these, too
Report comment to moderator  
Reply With Quote
Unread 03/11/19, 07:19 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
If you add support to other addons be sure so put them in your txt manifest file via the OptionalDependsOn:

Code:
## OptionalDependsOn: <otherAddonsFolderName>
So if the foldername is e.g. FasterTravel it should be
Code:
## OptionalDependsOn: FasterTravel
This assures that your addon will be loaded AFTER the other addon and the other addons global variables etc. are known already as your addon loads.

You could easily check in your addon#s EVENT_ADD_ON_LOADED callback function if the addonName parameter == "FasterTravel" and you'll know that way that the other addon is loaded then properly.

Lua Code:
  1. local otherAddons = {}
  2.  
  3. local function init(func, ...)
  4.     local arg = { ... }
  5.     addEvent(EVENT_ADD_ON_LOADED, function(eventCode, addOnName)
  6.     if (addOnName ~= "WayshrineTabSelector") then
  7.             --Other addon checks
  8.             if addOnName == "FasterTravel" then
  9.                  otherAddons["FasterTravel"] = true
  10.             end
  11.         return
  12.     end
  13.     func(unpack(arg))
  14.     end)
  15. end

This can be handy if it does not provide any global variables like FASTER_TRAVEL you are able to check in your code like
if FASTER_TRAVEL then
-- Faster travel is loaded
end

Even if you are checking addons which use LibLoadedAddons (like Fastertravel might be doing) the OptionalDependsOn is neccessary! The addons will be loaded from Z to 0 initially. Depending addons and libraries will be checked and loaded first. OptionalDepending Addons and libraries after that (if they are given in the AddOns folder or subfolders of other addons in there and got their own manifest txt file).
If your addon is loaded before the other addon is loaded and you are doing checks BEFORE EVENT_PLAYER_ACTIVATED (at this point all addons should be loaded properly! At EVENT_ADD_ON_LOADED only your own addon might be loaded, but others are still to be loaded. This event is called for EACH addon at least once!) the other addon might not be loaded yet.

Edit:
faster Travel does not use LibLoadedAddons as it seems? I cannot find a DependsOn in it's manifest txt file nor is it loaded from subfolders of the addon in it's txt file?
LibLoadedAddons will only work for addons which use it, not he ones not using it.
So your checks should always be nil for this addon ?!
Last edited by Baertram : 03/11/19 at 07:28 AM.
Report comment to moderator  
Reply With Quote
Unread 03/10/19, 05:52 PM  
Kulturnilpferd
 
Kulturnilpferd's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 1
The addon does itself a call to open the tab from its own addon. I have no control over that but if you want to use this addon alogside with Faster Travel you could edit the following file in your addon settings: "FasterTravel\FasterTravel.lua"
Just remove line 425:
Code:
WORLD_MAP_INFO:SelectTab(SI_MAP_INFO_MODE_WAYSHRINES)
I will develop soon a better solution to add the addon specific button, this is just a quick workaround
Last edited by Kulturnilpferd : 03/10/19 at 06:00 PM.
Report comment to moderator  
Reply With Quote
Unread 03/10/19, 03:47 PM  
budist

Forum posts: 0
File comments: 13
Uploads: 0
I really hoped this addon would allow the tab from this other addon: https://www.esoui.com/downloads/info...eleporter.html

to work by default. Sadly it doesn't
Report comment to moderator  
Reply With Quote
Unread 03/10/19, 10:38 AM  
Kulturnilpferd
 
Kulturnilpferd's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 1
Nice, thanks a lot for your advice will update this immediatly
Report comment to moderator  
Reply With Quote
Unread 03/10/19, 10:16 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Thanks for the idea and the addon!

Just a hint:
YOu should NOT use the string values as indices saved in your savedvars. Use the constant values you are using for the selection of the tab instead, like SI_MAP_INFO_MODE_HOUSES. These are Integer values.
And they allow you to support different languages as well instead of only english.

And instead of using the hardcoded english names for the tab texts you could simply use the constant values like SI_MAP_INFO_MODE_HOUSES together with the function GetString().
This will translate the texts autoamtically to the client language.

This will allow to strip your function StartFastTravelInteract to fewer lines as well:
e.g.
Lua Code:
  1. local function StartFastTravelInteract()
  2.         if WayshrineTabSelector.savedVariables.DropdownMenuIndex then
  3.            WORLD_MAP_INFO:SelectTab(WayshrineTabSelector.savedVariables.DropdownMenuIndex)
  4.         end
  5. end

In your LAM settings dropdown just use the choices table containing the texts with GetString(SI_MAP_INFO_MODE_HOUSES) etc.
and another choicesValues table with the same index like choices and the value = the constant e.g. SI_MAP_INFO_MODE_HOUSES

Lua Code:
  1. local choicesTabs = {
  2.     GetString(SI_MAP_INFO_MODE_QUESTS), --Quests
  3.     GetString(SI_MAP_INFO_MODE_KEY), --"Key"
  4.     GetString(SI_MAP_INFO_MODE_FILTERS), --"Filters"
  5.     GetString(SI_MAP_INFO_MODE_LOCATIONS), --"Locations"
  6.     GetString(SI_MAP_INFO_MODE_HOUSES)  --"Houses"
  7. }
  8. local choicesTabsValues = {
  9.     SI_MAP_INFO_MODE_QUESTS,
  10.     SI_MAP_INFO_MODE_KEY,
  11.     SI_MAP_INFO_MODE_FILTERS,
  12.     SI_MAP_INFO_MODE_LOCATIONS,
  13.     SI_MAP_INFO_MODE_HOUSES,
  14. }
  15. local optionsTable = {
  16.     [1] = {
  17.         type = "header",
  18.         name = "",
  19.         width = "full",
  20.     },
  21.     [2] = {
  22.         type = "description",
  23.         title = nil,
  24.         text = "Choose a custom default tab on wayshrine menu",
  25.         width = "full",
  26.     },
  27.     [3] = {
  28.         type = "dropdown",
  29.         name = "Default Wayshrine Tab",
  30.         choices         = choicesTabs,
  31.         choicesValues   = choicesTabsValues,
  32.         getFunc = function()
  33.             return WayshrineTabSelector.savedVariables.DropdownMenuIndex end,
  34.         setFunc = function(var)
  35.             WayshrineTabSelector.savedVariables.DropdownMenuIndex = var
  36.         end,
  37.         width = "half",
  38.     },
  39. }

If you change this you should increase the savedvariables version so old values containing the String will be deleted
Last edited by Baertram : 03/10/19 at 10:21 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: