Skip to content

Account‐wide vs. Character Settings

Shadowfen edited this page Jul 29, 2026 · 3 revisions

One of the first decisions when creating saved variables is whether the data should be shared across every character on an account or stored separately for each character.

LibSavedVars supports both storage models and provides a nearly identical API for each.

Account-wide Settings

Account-wide settings are shared by every character on the player's account. A change made by one character is immediately available to all others.

This is the most common choice for settings such as:

  • User interface preferences
  • Window positions
  • Keybind options
  • Visual themes
  • Global addon configuration

Create account-wide saved variables with:

local settings = LibSavedVars:NewAccountWide(
    "MyAddonSavedVariables",
    1,
    nil,
    defaults
)

The saved data is stored once per account.

Account
└── Settings
    ├── enabled = true
    ├── scale = 1.0
    └── opacity = 0.8

If Character A changes settings.scale, Character B will see the new value the next time the addon loads.

Character Settings

Character settings are stored independently for each character.

Use character settings when values should differ from one character to another, such as:

  • Character-specific UI layouts
  • Per-character build information
  • Crafting preferences
  • Character notes
  • Individual addon configurations

Create character settings with:

local settings = LibSavedVars:NewCharacterSettings(
    "MyAddonSavedVariables",
    1,
    nil,
    defaults
)

Each character receives its own copy of the saved data.

Account
├── Character A
│   ├── enabled = true
│   └── scale = 1.0
│
├── Character B
│   ├── enabled = false
│   └── scale = 0.8
│
└── Character C
    ├── enabled = true
    └── scale = 1.2

Changes made by one character do not affect any other character.

Which Should You Choose?

Choose account-wide settings when every character should share the same configuration.

Choose character settings when each character should have independent preferences or data.

Many addons use one or the other exclusively, depending on their purpose.

Supporting Both

Some addons allow users to switch between account-wide and character-specific settings. For example, a player might prefer global UI settings but unique crafting preferences for each character.

LibSavedVars provides support for this through the LSV_Data class, which can manage both account-wide and character settings and switch between them at runtime.

For more information, see Supporting Both Character and Account-Wide Settings

Clone this wiki locally