Show/hide mount appearance upgrades - simple keybind toggle addon?

MoonPile
MoonPile
✭✭✭✭✭
Ideally it'd be cool if there were a default feature to set mount appearance upgrades per mount: https://forums.elderscrollsonline.com/en/discussion/680430/hide-appearance-upgrades-per-mount-favorite-mounts-per-character/

But an OK solution in the meantime, a keybind toggle to show/hide all three upgrades at once. Manual, but faster than menu-surfing. Disclaimer: I know absolutely nothing about making addons, just guessing based on basic code logic :#

I thought it could be something short like this: https://www.esoui.com/downloads/info455-AutolootToggle.html
But I don't know what the correct inputs are, or if this is even possible...

I found these refs here: https://esoapi.uesp.net/100014/globals.txt

SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE
SI_INTERFACE_OPTIONS_HIDE_MOUNT_INVENTORY_UPGRADE
SI_INTERFACE_OPTIONS_HIDE_MOUNT_SPEED_UPGRADE

Thanks to Feroc's Autoloot Toggle I got as far as this below, but obviously "autolootSetting" and "SETTING_TYPE_LOOT, LOOT_SETTING_AUTO_LOOT" needs to be replaced – Idk with what?
function MountUpgradeToggle()
	local autolootSetting = GetSetting(SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE);
	if (autolootSetting == "1") then
		autolootSetting = "0";
		d("Autoloot is now off");
	else
		autolootSetting = "1";
		d("Autoloot is now on");
	end
	
	SetSetting(SETTING_TYPE_LOOT, LOOT_SETTING_AUTO_LOOT, autolootSetting, 1);
end

SLASH_COMMANDS["/MountUpgradeToggle"]= MountUpgradeToggle
SLASH_COMMANDS["/mut"]= MountUpgradeToggle

If it's even possible to do all three in one keystroke, can that just look like:
GetSetting(SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE, SI_INTERFACE_OPTIONS_HIDE_MOUNT_INVENTORY_UPGRADE, SI_INTERFACE_OPTIONS_HIDE_MOUNT_SPEED_UPGRADE);
?

Maybe this one's a totally different beast from autoloot and not that simple! Figured I'd ask anyway xD

.
Edited by MoonPile on 13 July 2025 02:23
  • Baertram
    Baertram
    ✭✭✭✭✭
    SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE
    These are string constants used for translations!
    Behind SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE you will find, via GetString(SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE) the text of the translation.
    Something like "Hide mount stamina enhancement".
    -> Should help to find the relating settings, see below
    Thanks to Feroc's Autoloot Toggle I got as far as this below, but obviously "autolootSetting" and "SETTING_TYPE_LOOT, LOOT_SETTING_AUTO_LOOT" needs to be replaced – Idk with what?

    There is one settings category, or SettingSystemType in ZOs naming (SETTING_TYPE_LOOT) which holds these setting names/IDs (LOOT_SETTING_AUTO_LOOT) and you need to find that in the esoui source files at best:
    https://github.com/esoui/esoui

    If you do not now the setting name/ID you can e.g. search for the string constants like SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE which you found already.

    https://github.com/esoui/esoui/blob/593b7915d5c6b897a3077ee939b27d3e56b764cd/esoui/ingame/optionspanels/optionspanel_gameplay_shared.lua#L309

    Many ingame settings categories and IDs are defined in the tables in the files in this folder:
    /esoui/ingame/optionspanels/
    https://github.com/esoui/esoui/tree/live/esoui/ingame/optionspanels

    /optionspanel_gameplay_shared.lua
    --Options_Gameplay_HideMountStaminaUpgrade
            [IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE] =
            {
                controlType = OPTIONS_CHECKBOX,
                system = SETTING_TYPE_IN_WORLD,
                panel = SETTING_PANEL_GAMEPLAY,
                settingId = IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE,
                text = SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE,
                tooltipText = SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE_TOOLTIP,
            },
    
            --Options_Gameplay_HideMountSpeedUpgrade
            [IN_WORLD_UI_SETTING_HIDE_MOUNT_SPEED_UPGRADE] =
            {
                controlType = OPTIONS_CHECKBOX,
                system = SETTING_TYPE_IN_WORLD,
                panel = SETTING_PANEL_GAMEPLAY,
                settingId = IN_WORLD_UI_SETTING_HIDE_MOUNT_SPEED_UPGRADE,
                text = SI_INTERFACE_OPTIONS_HIDE_MOUNT_SPEED_UPGRADE,
                tooltipText = SI_INTERFACE_OPTIONS_HIDE_MOUNT_SPEED_UPGRADE_TOOLTIP,
            },
    
            --Options_Gameplay_HideMountInventoryUpgrade
            [IN_WORLD_UI_SETTING_HIDE_MOUNT_INVENTORY_UPGRADE] =
            {
                controlType = OPTIONS_CHECKBOX,
                system = SETTING_TYPE_IN_WORLD,
                panel = SETTING_PANEL_GAMEPLAY,
                settingId = IN_WORLD_UI_SETTING_HIDE_MOUNT_INVENTORY_UPGRADE,
                text = SI_INTERFACE_OPTIONS_HIDE_MOUNT_INVENTORY_UPGRADE,
                tooltipText = SI_INTERFACE_OPTIONS_HIDE_MOUNT_INVENTORY_UPGRADE_TOOLTIP,
            },		
    

    The settings name would be:
    IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE
    IN_WORLD_UI_SETTING_HIDE_MOUNT_SPEED_UPGRADE
    IN_WORLD_UI_SETTING_HIDE_MOUNT_INVENTORY_UPGRADE

    And now you still need the category for it.
    https://github.com/esoui/esoui/blob/593b7915d5c6b897a3077ee939b27d3e56b764cd/esoui/ingame/optionspanels/optionspanel_gameplay_shared.lua#L289

    Just scroll up a bit from the first found entries and you see the table's headline:
    SETTING_TYPE_IN_WORLD

    So category (SettingSystemType) is SETTING_TYPE_IN_WORLD
    settingsNames are IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE, IN_WORLD_UI_SETTING_HIDE_MOUNT_SPEED_UPGRADE, IN_WORLD_UI_SETTING_HIDE_MOUNT_INVENTORY_UPGRADE

    And these can be used with all the GetSetting, SetSetting, GetSettingBool, SetSettingBool etc. functions.
    If it's even possible to do all three in one keystroke, can that just look like:
    No, you need to use the setting functions always with params defined in the API description, which you can find here as txt file:
    https://wiki.esoui.com/APIVersion#Live_API_version
    -> "API TXT Documentation:"

    Download the txt file and search for the GetSetting or SetSetting functions and you see their parameters needed:
    * GetSetting(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_)
    ** _Returns:_ *string* _value_

    * GetSetting_Bool(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_)
    ** _Returns:_ *bool* _value_

    * SetSetting(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_, *string* _value_, *[SetOptions|#SetOptions]* _setOptions_)

    Means your call to change the setting via a function, called from a keybind, would be something like:

    "1" should be enabled, and "0" disabled
    local isEnabledString = GetSetting(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE) 
    --returns "1" if enabled and "0" if disabled
    
    local isEnabledBoolean = GetSettingBool(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE) 
    --returns true if enabled and false if disabled
    
    SetSetting(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE, "1")
    


    Hope that helps to help yourself, if not just reply if you got any questions.
    btw: here is how to setup keybindinds in an addon (if the AutoLoot addon is not describing it enough by it's code):
    https://wiki.esoui.com/Keybindings


    Edited by Baertram on 13 July 2025 12:47
  • MoonPile
    MoonPile
    ✭✭✭✭✭
    Baertram wrote: »
    SI_INTERFACE_OPTIONS_HIDE_MOUNT_STAMINA_UPGRADE
    These are string constants used for translations!
    ...

    Thank you so much! I will poke around from here.
    Think I need to just start these posts with "thanks in advance, Baertram" :D
Sign In or Register to comment.