Thread Tools Display Modes
Prev Previous Post   Next Post Next
07/18/23, 10:17 AM   #1
NeuroticPixels
Addon Addict
 
NeuroticPixels's Avatar
Premium Member
Join Date: May 2019
Posts: 211
Unhappy Change to account-wide settings? (ResourceRadar)

Hi.
I looked through https://www.esoui.com/forums/showthread.php?p=41611 to see if I could figure out how to edit a lua to make it use account-wide settings.

I couldn't figure it out. I tried and failed. Received an error upon logging in to ESO.

I have this saved as a reminder:



But..... I've never seen an addon use this before:

Code:
    ResourceRadar_SavedVars = ResourceRadar_SavedVars or {}
    local characterId = GetCurrentCharacterId()
    ResourceRadar_SavedVars.character = ResourceRadar_SavedVars.character or {}
    ResourceRadar_SavedVars.character[characterId] = ResourceRadar_SavedVars.character[characterId] or {}
    self.currentProfile = ResourceRadar_SavedVars.character[characterId]
    
    self:InitializeDefaults()
The addon (ResourceRadar) currently doesn't save any settings that I set from one character to the next. I'd like the settings to be account-wide.

I tried looking at the Saved Variables to see if I could edit those. But it seems to be missing the line for my character name, so I don't know how to add that. I don't know if everything has to be indented properly.... I don't know where exactly to put brackets... ugh.

This is what the saved variables currently say:

Code:
ResourceRadar_SavedVars =
{
    ["character"] = 
    {
        ["8796093035941557"] = 
        {
            ["worldPinPulse"] = false,
            ["displayNodesInWorld"] = true,
            ["compassPinSize"] = 20,
            ["displayNodesOnMap"] = false,
            ["worldPinSize"] = 66,
            ["displayNodesOnCompass"] = false,
            ["removeOnDetection"] = 
            {
                [1] = false,
                [2] = false,
                [3] = false,
                [4] = false,
                [5] = false,
                [6] = false,
                [7] = false,
                [8] = false,
                [9] = false,
                [100] = false,
            },
            ["mapPinSize"] = 16,
            ["worldPinTexture"] = "esoui/art/ava/ava_rankicon64_centurion.dds",
            ["pinTextures"] = 
            {
                [1] = "esoui/art/crafting/smithing_tabicon_refine_down.dds",
                [2] = "esoui/art/icons/servicemappins/servicepin_clothier.dds",
                [3] = "esoui/art/icons/mapkey/mapkey_lumbermill.dds",
                [4] = "esoui/art/crafting/enchantment_tabicon_essence_down.dds",
                [5] = "esoui/art/crafting/alchemy_tabicon_reagent_down.dds",
                [6] = "esoui/art/icons/servicemappins/servicepin_dyestation.dds",
                [7] = "ResourceRadar/Textures/waterplant.dds",
                [8] = "esoui/art/treeicons/store_indexicon_consumables_down.dds",
                [9] = "esoui/art/icons/servicemappins/servicepin_alchemy.dds",
                [100] = "esoui/art/icons/poi/poi_crafting_complete.dds",
            },
            ["pinColors"] = 
            {
                [1] = 
                {
                    [4] = 1,
                    [1] = 0.4470000000,
                    [2] = 0.4900000000,
                    [3] = 1,
                },
                [2] = 
                {
                    [4] = 1,
                    [1] = 0.5880000000,
                    [2] = 0.9880000000,
                    [3] = 1,
                },
                [3] = 
                {
                    [4] = 1,
                    [1] = 1,
                    [2] = 0.6940000000,
                    [3] = 0.4940000000,
                },
                [4] = 
                {
                    [4] = 1,
                    [1] = 1,
                    [2] = 0.4550000000,
                    [3] = 0.4780000000,
                },
                [5] = 
                {
                    [4] = 1,
                    [1] = 0.4510000000,
                    [2] = 0.5690000000,
                    [3] = 0.4240000000,
                },
                [6] = 
                {
                    [4] = 1,
                    [1] = 0.5570000000,
                    [2] = 1,
                    [3] = 0.5410000000,
                },
                [7] = 
                {
                    [4] = 1,
                    [1] = 0.4390000000,
                    [2] = 0.9370000000,
                    [3] = 0.8080000000,
                },
                [8] = 
                {
                    [4] = 1,
                    [1] = 0.5690000000,
                    [2] = 0.8270000000,
                    [3] = 1,
                },
                [9] = 
                {
                    [4] = 1,
                    [1] = 0.9340000000,
                    [2] = 0.3450000000,
                    [3] = 0.5370000000,
                },
                [100] = 
                {
                    [4] = 1,
                    [1] = 1,
                    [2] = 0.0117647061,
                    [3] = 0,
                },
            },
        },
    },
}
Would I just change ["character"] to ["default'] and ["8796093035941557"] to [$AccountWide]?
I figured I needed to put in the account name between those. (["@NeuroticPixels"]). But I don't know about all the indents for each line and how to connect the brackets.
I've only ever edited what's in a saved vars. I've never had to add any new lines.

I apologize for my ignorance. Please be gentle with me.

Last edited by NeuroticPixels : 07/18/23 at 10:21 AM.
  Reply With Quote
 

ESOUI » AddOns » AddOn Help/Support » Change to account-wide settings? (ResourceRadar)


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off