How to change ingame settings

From ESOUI Wiki

Jump to: navigation, search

Last updated: 2022-02-18, API101032

A detailed information, based on the example "How to change the scrolling combat text" setting ingame via AddOns, can be read here:
https://www.esoui.com/forums/showthread.php?t=10075

Contents

API functions

Used API functions for settings read and write are:

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

* ApplySettings()

* RefreshSettings()

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

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

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

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

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

* RequestLoadDeferredSetting(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_)


SettingsSystemType: List of SettingsSystemType: Globals#SettingSystemType
e.g. SETTING_TYPE_CAMERA

settingId: e.g. CAMERA_SETTING_FIRST_PERSON_FIELD_OF_VIEW
settingId can be found in the vanilla code option panels files e.g.: https://github.com/esoui/esoui/tree/master/esoui/ingame/optionspanels
Here is a list of the extracted constants containing _SETTINGS_ in their name. Attention: Not all of them must be dedicated to the settigs menus, you need to try!:

ACCOUNT_SETTING_ACCOUNT_EMAIL 
ACCOUNT_SETTING_GET_UPDATES 
ACT_SETTING_ALWAYS 
ACT_SETTING_AUTO 
ACT_SETTING_OFF 
ACTION_BAR_SETTING_CHOICE_AUTOMATIC 
ACTION_BAR_SETTING_CHOICE_OFF 
ACTION_BAR_SETTING_CHOICE_ON 
ACTION_BAR_SETTING_LOCK_ACTION_BARS 
AUDIO_SETTING_AMBIENT_ENABLED 
AUDIO_SETTING_AMBIENT_VOLUME 
AUDIO_SETTING_AUDIO_ENABLED 
AUDIO_SETTING_AUDIO_VOLUME 
AUDIO_SETTING_BACKGROUND_AUDIO 
AUDIO_SETTING_COMBAT_MUSIC_MODE 
AUDIO_SETTING_FOOTSTEPS_ENABLED 
AUDIO_SETTING_FOOTSTEPS_VOLUME 
AUDIO_SETTING_MUSIC_ENABLED 
AUDIO_SETTING_MUSIC_VOLUME 
AUDIO_SETTING_SFX_ENABLED 
AUDIO_SETTING_SFX_VOLUME 
AUDIO_SETTING_SOUND_ENABLED 
AUDIO_SETTING_SPEAKER_SETUP 
AUDIO_SETTING_UI_ENABLED 
AUDIO_SETTING_UI_VOLUME 
AUDIO_SETTING_VIDEO_ENABLED 
AUDIO_SETTING_VIDEO_VOLUME 
AUDIO_SETTING_VO_ENABLED 
AUDIO_SETTING_VO_VOLUME 
AUDIO_SETTING_VOICE_CHAT_VOLUME 
AVA_NOTIFICATIONS_SETTING_CHOICE_ALWAYS_SHOW 
AVA_NOTIFICATIONS_SETTING_CHOICE_AUTOMATIC 
AVA_NOTIFICATIONS_SETTING_CHOICE_DONT_SHOW 
BUFFS_SETTING_ALL_ENABLED 
BUFFS_SETTING_BUFFS_ENABLED 
BUFFS_SETTING_BUFFS_ENABLED_FOR_SELF 
BUFFS_SETTING_BUFFS_ENABLED_FOR_TARGET 
BUFFS_SETTING_DEBUFFS_ENABLED 
BUFFS_SETTING_DEBUFFS_ENABLED_FOR_SELF 
BUFFS_SETTING_DEBUFFS_ENABLED_FOR_TARGET 
BUFFS_SETTING_DEBUFFS_ENABLED_FOR_TARGET_FROM_OTHERS 
BUFFS_SETTING_LONG_EFFECTS 
BUFFS_SETTING_PERMANENT_EFFECTS 
CAMERA_SETTING_ASSASSINATION_CAMERA 
CAMERA_SETTING_DISTANCE 
CAMERA_SETTING_DISTANCE_SYNCED 
CAMERA_SETTING_DISTANCE_UNSHEATHED 
CAMERA_SETTING_FIRST_PERSON_FIELD_OF_VIEW 
CAMERA_SETTING_FIRST_PERSON_HEAD_BOB 
CAMERA_SETTING_FOV_CHANGES_ALLOWED 
CAMERA_SETTING_INVERT_Y 
CAMERA_SETTING_SCREEN_SHAKE 
CAMERA_SETTING_SENSITIVITY_FIRST_PERSON 
CAMERA_SETTING_SENSITIVITY_THIRD_PERSON 
CAMERA_SETTING_SMOOTHING 
CAMERA_SETTING_THIRD_PERSON_FIELD_OF_VIEW 
CAMERA_SETTING_THIRD_PERSON_HORIZONTAL_OFFSET 
CAMERA_SETTING_THIRD_PERSON_HORIZONTAL_POSITION_MULTIPLIER 
CAMERA_SETTING_THIRD_PERSON_SIEGE_WEAPONRY 
CAMERA_SETTING_THIRD_PERSON_VERTICAL_OFFSET 
CHAT_BUBBLE_SETTING_ENABLED 
CHAT_BUBBLE_SETTING_ENABLED_FOR_LOCAL_PLAYER 
CHAT_BUBBLE_SETTING_ENABLED_ONLY_FROM_CONTACTS 
CHAT_BUBBLE_SETTING_SPEED_MODIFIER 
COMBAT_MUSIC_MODE_SETTING_ALL 
COMBAT_MUSIC_MODE_SETTING_BOSSES_ONLY 
COMBAT_MUSIC_MODE_SETTING_NONE 
COMBAT_SETTING_ALLOW_COMPANION_AUTO_ULTIMATE 
COMBAT_SETTING_CLAMP_GROUND_TARGET_ENABLED 
COMBAT_SETTING_ENCOUNTER_LOG_APPEAR_ANONYMOUS 
COMBAT_SETTING_MONSTER_TELLS_COLOR_SWAP_ENABLED 
COMBAT_SETTING_MONSTER_TELLS_ENABLED 
COMBAT_SETTING_MONSTER_TELLS_ENEMY_BRIGHTNESS 
COMBAT_SETTING_MONSTER_TELLS_ENEMY_COLOR 
COMBAT_SETTING_MONSTER_TELLS_FRIENDLY_BRIGHTNESS 
COMBAT_SETTING_MONSTER_TELLS_FRIENDLY_COLOR 
COMBAT_SETTING_PREVENT_ATTACKING_INNOCENTS 
COMBAT_SETTING_QUICK_CAST_GROUND_ABILITIES 
COMBAT_SETTING_ROLL_DODGE_DOUBLE_TAP 
COMBAT_SETTING_ROLL_DODGE_WINDOW 
COMBAT_SETTING_SCROLLING_COMBAT_TEXT_ENABLED 
COMBAT_SETTING_SCT_INCOMING_DAMAGE_ENABLED 
COMBAT_SETTING_SCT_INCOMING_DOT_ENABLED 
COMBAT_SETTING_SCT_INCOMING_ENABLED 
COMBAT_SETTING_SCT_INCOMING_HEALING_ENABLED 
COMBAT_SETTING_SCT_INCOMING_HOT_ENABLED 
COMBAT_SETTING_SCT_INCOMING_PET_DAMAGE_ENABLED 
COMBAT_SETTING_SCT_INCOMING_PET_DOT_ENABLED 
COMBAT_SETTING_SCT_INCOMING_POINT_GAINS_ENABLED 
COMBAT_SETTING_SCT_INCOMING_STATUS_EFFECTS_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_DAMAGE_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_DOT_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_HEALING_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_HOT_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_PET_DAMAGE_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_PET_DOT_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_PET_HEALING_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_PET_HOT_ENABLED 
COMBAT_SETTING_SCT_OUTGOING_STATUS_EFFECTS_ENABLED 
COMBAT_SETTING_SCT_SHOW_OVER_HEAL 
COMBAT_SETTING_USE_BATTLE_LEVEL 
GAMEPAD_CHAT_TEXT_SIZE_SETTING_LARGE 
GAMEPAD_CHAT_TEXT_SIZE_SETTING_MEDIUM 
GAMEPAD_CHAT_TEXT_SIZE_SETTING_SMALL 
GAMEPAD_SETTING_CAMERA_SENSITIVITY 
GAMEPAD_SETTING_GAMEPAD_TEMPLATE 
GAMEPAD_SETTING_INPUT_PREFERRED_MODE 
GAMEPAD_SETTING_INVERT_X 
GAMEPAD_SETTING_INVERT_Y 
GAMEPAD_SETTING_USE_KEYBOARD_CHAT 
GAMEPAD_SETTING_VIBRATION 
GAMEPAD_SETTING_WAS_LAST_INPUT_GAMEPAD 
IN_WORLD_UI_SETTING_COMPANION_PASSENGER_PREFERENCE 
IN_WORLD_UI_SETTING_COMPANION_REACTION_FREQUENCY 
IN_WORLD_UI_SETTING_DEFAULT_SOUL_GEM 
IN_WORLD_UI_SETTING_FOOT_INVERSE_KINEMATICS 
IN_WORLD_UI_SETTING_GLOW_THICKNESS 
IN_WORLD_UI_SETTING_HIDE_LOIN_CLOTH 
IN_WORLD_UI_SETTING_HIDE_MOUNT_INVENTORY_UPGRADE 
IN_WORLD_UI_SETTING_HIDE_MOUNT_SPEED_UPGRADE 
IN_WORLD_UI_SETTING_HIDE_MOUNT_STAMINA_UPGRADE 
IN_WORLD_UI_SETTING_HIDE_POLYMORPH_HELM 
IN_WORLD_UI_SETTING_HIDE_TASSETS 
IN_WORLD_UI_SETTING_INTERACTABLE_GLOW_ENABLED 
IN_WORLD_UI_SETTING_INTERACTABLE_GLOW_INTENSITY 
IN_WORLD_UI_SETTING_TARGET_GLOW_ENABLED 
IN_WORLD_UI_SETTING_TARGET_GLOW_INTENSITY 
LANGUAGE_SETTING_USE_PROFANITY_FILTER 
LOOT_SETTING_AOE_LOOT 
LOOT_SETTING_AUTO_ADD_TO_CRAFT_BAG 
LOOT_SETTING_AUTO_LOOT 
LOOT_SETTING_AUTO_LOOT_STOLEN 
LOOT_SETTING_LOOT_HISTORY 
LOOT_SETTING_PREVENT_STEALING_PLACED 
OPTIONS_CUSTOM_SETTING_CHAT_BUBBLE_EMOTE_ENABLED 
OPTIONS_CUSTOM_SETTING_CHAT_BUBBLE_GROUP_ENABLED 
OPTIONS_CUSTOM_SETTING_CHAT_BUBBLE_SAY_ENABLED 
OPTIONS_CUSTOM_SETTING_CHAT_BUBBLE_WHISPER_ENABLED 
OPTIONS_CUSTOM_SETTING_CHAT_BUBBLE_YELL_ENABLED 
OPTIONS_CUSTOM_SETTING_FRAMERATE_LATENCY_RESET_POSITION 
OPTIONS_CUSTOM_SETTING_GAMEPAD_PREGAME_PLAY_CINEMATIC 
OPTIONS_CUSTOM_SETTING_GAMEPAD_PREGAME_SERVER_SELECT 
OPTIONS_CUSTOM_SETTING_GAMEPAD_PREGAME_VIEW_CREDITS 
OPTIONS_CUSTOM_SETTING_GAMMA_ADJUST 
OPTIONS_CUSTOM_SETTING_MONSTER_TELLS_ENEMY_TEST 
OPTIONS_CUSTOM_SETTING_MONSTER_TELLS_FRIENDLY_TEST 
OPTIONS_CUSTOM_SETTING_RESEND_EMAIL_ACTIVATION 
OPTIONS_CUSTOM_SETTING_RESET_GAMEPAD_CONTROLS 
OPTIONS_CUSTOM_SETTING_RESET_TUTORIALS 
OPTIONS_CUSTOM_SETTING_SCREEN_ADJUST 
OPTIONS_CUSTOM_SETTING_SCREENSHOT_MODE 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_EMOTE 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_GROUP 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_GUILD1 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_GUILD2 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_GUILD3 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_GUILD4 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_GUILD5 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_NPC 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_OFFICER1 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_OFFICER2 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_OFFICER3 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_OFFICER4 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_OFFICER5 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_SAY 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_SYSTEM 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_WHISPER_INC 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_WHISPER_OUT 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_YELL 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_ZONE 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_ZONE_ENG 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_ZONE_FRA 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_ZONE_GER 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_ZONE_JPN 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_COLOR_ZONE_RUS 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_TITLE_GUILD1 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_TITLE_GUILD2 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_TITLE_GUILD3 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_TITLE_GUILD4 
OPTIONS_CUSTOM_SETTING_SOCIAL_CHAT_TITLE_GUILD5 
OPTIONS_CUSTOM_SETTING_SOCIAL_GAMEPAD_TEXT_SIZE 
OPTIONS_CUSTOM_SETTING_SOCIAL_MIN_ALPHA 
OPTIONS_CUSTOM_SETTING_SOCIAL_TEXT_SIZE 
PRIMARY_PLAYER_NAME_SETTING_PREFER_CHARACTER 
PRIMARY_PLAYER_NAME_SETTING_PREFER_USERID 
RESOURCE_BARS_SETTING_CHOICE_ALWAYS_SHOW 
RESOURCE_BARS_SETTING_CHOICE_AUTOMATIC 
RESOURCE_BARS_SETTING_CHOICE_DONT_SHOW 
RESOURCE_NUMBERS_SETTING_NUMBER_AND_PERCENT 
RESOURCE_NUMBERS_SETTING_NUMBER_ONLY 
RESOURCE_NUMBERS_SETTING_OFF 
RESOURCE_NUMBERS_SETTING_PERCENT_ONLY 
SUBTITLE_SETTING_ENABLED_FOR_NPCS 
SUBTITLE_SETTING_ENABLED_FOR_VIDEOS 
TUTORIAL_ENABLED_SETTING_ID 
UI_SETTING_ALWAYS_SHOW_STATUS_TEXT 
UI_SETTING_AUTO_DECLINE_DUEL_INVITES 
UI_SETTING_COMPASS_ACTIVE_QUESTS 
UI_SETTING_COMPASS_COMPANION 
UI_SETTING_COMPASS_GROUP_LEADER 
UI_SETTING_COMPASS_GROUP_MEMBER_AVA 
UI_SETTING_COMPASS_GROUP_MEMBER_BATTLEGROUND 
UI_SETTING_COMPASS_GROUP_MEMBER_DELVE 
UI_SETTING_COMPASS_GROUP_MEMBER_DUNGEON 
UI_SETTING_COMPASS_GROUP_MEMBER_GENERAL 
UI_SETTING_COMPASS_GROUP_MEMBER_RAID 
UI_SETTING_COMPASS_QUEST_GIVERS 
UI_SETTING_CUSTOM_SCALE 
UI_SETTING_DEPRECATED3 
UI_SETTING_FADE_PLAYER_BARS 
UI_SETTING_FRAMERATE_LATENCY_LOCK 
UI_SETTING_GAMEPAD_CHAT_HUD_ENABLED 
UI_SETTING_GAMEPAD_CUSTOM_SCALE 
UI_SETTING_PRIMARY_PLAYER_NAME_GAMEPAD 
UI_SETTING_PRIMARY_PLAYER_NAME_KEYBOARD 
UI_SETTING_RESOURCE_NUMBERS 
UI_SETTING_RETURN_CURSOR_ON_CHAT_FOCUS 
UI_SETTING_SHOW_ACTION_BAR 
UI_SETTING_SHOW_ACTION_BAR_BACK_ROW 
UI_SETTING_SHOW_ACTION_BAR_TIMERS 
UI_SETTING_SHOW_ARMOR_INDICATOR 
UI_SETTING_SHOW_AVA_NOTIFICATIONS 
UI_SETTING_SHOW_FRAMERATE 
UI_SETTING_SHOW_LATENCY 
UI_SETTING_SHOW_LEADERBOARD_NOTIFICATIONS 
UI_SETTING_SHOW_QUEST_BESTOWER_INDICATORS 
UI_SETTING_SHOW_QUEST_TRACKER 
UI_SETTING_SHOW_RAID_LIVES 
UI_SETTING_SHOW_RESOURCE_BARS 
UI_SETTING_SHOW_WEAPON_INDICATOR 
UI_SETTING_SOCIAL_LIST_HIDE_OFFLINE 
UI_SETTING_ULTIMATE_NUMBER 
UI_SETTING_USE_CUSTOM_SCALE 
UI_SETTING_USE_GAMEPAD_CUSTOM_SCALE 

Conclusion

Settings of most of the ingame settings menus (except AddOns!) and controls/keybindings are stored at the server (~200 max keybinds per character). A handful of settings (mainly graphics-related settings) are only stored locally, as CVars instead. However, all local CVars that have corresponding in-game settings GUI options, such as graphics settings, can (and should) be set via the SetSetting API instead of SetCVar to ensure completely correct syncing behavior.

All other settings like 3rd party AddOns or even ZOs own built-in AddOn's settings (like "Include banked items at crafting table") are stored in the local SavedVariables folder.
ZOs settings are stored there in ZO_*.lua files.

SetSetting

THIS seems like the best way to change the game's settings. It seems to be able to change any setting, it syncs the changes to their server, and it uses the correct settings storage API (local CVar and/or server) internally.
You only have to provide the first three parameters (category, setting and value). There's no reason to provide the final "setOptions" parameter, because the API figures that out itself.
You may have to manually trigger ApplySettings() if you change graphics or GUI scale settings (basically, anything that the game classifies as "disruptive changes" requires ApplySettings()).
You should never manually force the server sync (since that could lead to lost changes if you send too many at once -> server kicks your for message spam).

SetCVar

Probably not synced to the server, and most likely only safe/good to use for secret, completely local settings such as "SkipPregameVideos" or changing the client language via "language.2" to e.g. "fr".
If you use it to modify some CVar that is actually available as a SetSetting, then your changes MAY PERHAPS not sync to the server (I haven't tested that to be sure, but either way it's just silly to SetCVar
something that already exists as SetSetting so I won't research this deeper).

GetCVar

If you want to read a CVar, use GetCVar.

GetSetting and GetSetting_Bool

If you want to read a setting, use GetSetting, which always returns a string (no matter which data is stored in the setting).
If it's a simple on/off setting, then its string value is usually the string "1" (on) and "0" (off). You can then simplify your code by using GetSetting_Bool instead, which returns true/false instead so that you can do "if GetSetting_Bool() then" instead of "if GetSetting() == "1"".

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox