Wowpedia
Advertisement
Game Flavors
Links
Info
Added in 8.1.5 / 2.5.1
Popularity #520 (67)

Sets a console variable.

success = C_CVar.SetCVar(name [, value, scriptCVar])
        = SetCVar

Arguments

name
string - name of the CVar.
value
string? - the new value of the CVar. If omitted, defaults to "0".
scriptCVar
string? - if passed, fires the CVAR_UPDATE event with this as the first parameter.

Returns

success
boolean - whether the CVar was successfully set.

Details

  • Settings that are changed using this will be applied to the game UI immediately, however settings are not saved to Config.wtf until properly logging out or reloading the game.
  • Some options require a reload/relog before they take effect.
  • Character and Account specific variables are stored server-side depending on synchronizeConfig
    Character - Character-specific variables can be found in \World of Warcraft\_retail_\WTF\Account\<AccountName>\<Server>\<Character>\config-cache.wtf
    Account - WoW account-wide variables can be found in \World of Warcraft\_retail_\WTF\Account\<AccountName>\config-cache.wtf
    Other variables are game-wide and can be found in \World of Warcraft\_retail_\WTF\Config.wtf
  • Some CVars can only be set through SetCVar() instead of /console, as returned by the 6th return value of GetCVarInfo()

Patch changes

Battle for Azeroth Patch 8.1.5 (2019-03-12): Moved to C_CVar.SetCVar(). The previous alias is still available as a slightly sanitized script wrapper.[1]
WoW Icon update.png Patch 1.0.0 (2004-10-08): Added as SetCVar()

Advertisement