ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   Removing old Toons - Joviex's Addon Settings Transfer (https://www.esoui.com/forums/showthread.php?t=7840)

Dingodan 06/05/18 03:24 AM

Removing old Toons - Joviex's Addon Settings Transfer
 
Hello,

Is it possible to remove the old Toons from the Character list in Joviex's Addon Settings Transfer and other Addons which have an List of Character?

Marazota 06/05/18 04:06 AM

im curious about it also

Baertram 06/05/18 05:37 AM

Afaik you can only manually edit the SavedVariables\AddonName.lua file (where AddonName is the addon's name like e.g. JoviexAddonSettingsTransfer.lua) and search for the old toon names.

Then remove the complete table starting with ["character name here"] = {
...}
And the settings should be gone.

If the settings are not stored by the name but the unique ID, something like ["8012232132313"] = { ... } you might not be able to see which ID is the ID of an old char.

You can use this function ingame to check your current characters and their unique IDs (will be printed to the chat) to compare them with the ones in the savedvars and strip those not found:
Lua Code:
  1. --Get your characters/toons and their unique ID
  2. function getYourCharData()
  3.     --Check all the characters of the account
  4.     d("[getYourCharData] Your character name = uniqueIds are:")
  5.     for i = 1, GetNumCharacters() do
  6.         local name, _, _, _, _, _, characterId = GetCharacterInfo(i)
  7.         local charName = zo_strformat(SI_UNIT_NAME, name)
  8.         d(">" .. tostring(charName) .. " = " ..tostring(characterId))
  9.     end
  10. end

Put this function somewhere in any of your addon's EVENT_ADD_ON_LOADED function and do a /reloadui.
Afterwards you should be able to type in the chat:
Code:

/script getYourCharData()

hawkeye1889 06/05/18 07:19 PM

Quote:

Originally Posted by Baertram (Post 34966)
Afaik you can only manually edit the SavedVariables\AddonName.lua file (where AddonName is the addon's name like e.g. JoviexAddonSettingsTransfer.lua) and search for the old toon names.

Then remove the complete table starting with ["character name here"] = {
...}
And the settings should be gone.

If the settings are not stored by the name but the unique ID, something like ["8012232132313"] = { ... } you might not be able to see which ID is the ID of an old char.

You can use this function ingame to check your current characters and their unique IDs (will be printed to the chat) to compare them with the ones in the savedvars and strip those not found:
Lua Code:
  1. --Get your characters/toons and their unique ID
  2. function getYourCharData()
  3.     --Check all the characters of the account
  4.     d("[getYourCharData] Your character name = uniqueIds are:")
  5.     for i = 1, GetNumCharacters() do
  6.         local name, _, _, _, _, _, characterId = GetCharacterInfo(i)
  7.         local charName = zo_strformat(SI_UNIT_NAME, name)
  8.         d(">" .. tostring(charName) .. " = " ..tostring(characterId))
  9.     end
  10. end

Put this function somewhere in any of your addon's EVENT_ADD_ON_LOADED function and do a /reloadui.
Afterwards you should be able to type in the chat:
Code:

/script getYourCharData()

Great idea but jovast.lua doesn't contain the character list sadly :( and that is the name in the saved variables file oddly

Joviex's is a weird addon because it uses other addons saved variables to generate the character list the only way that I've found to remove old characters that works is to delete all saved variables that have old characters listed which is a pain but the good news is that if an addon uses account wide settings you don't have to do anything. If someone finds a better way please share it here


All times are GMT -6. The time now is 08:02 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI