Dump all changed CVars
yaerox opened this issue · 10 comments
This is rather a question then an issue, but is there any chance to dump all changed values comapred to Blizzard Stock Settings?
@Ketho would you tell me where do I have to put the function to call it and do this on my client? Thanks in advance
Looks like a lot of graphics cvars are always different from the default
function DumpNondefaultCvars()
local t = {}
local cvars = C_Console.GetAllCommands()
for _, info in pairs(cvars) do
local default = GetCVarDefault(info.command)
local cur = GetCVar(info.command)
if default ~= cur then
tinsert(t, {info.command, default, cur})
end
end
sort(t, function(a, b)
return a[1]:lower() < b[1]:lower()
end)
for _, cvar in pairs(t) do
print(unpack(cvar))
end
end
Oh, just throw it into https://addon.bool.no/ and call it with /run DumpNondefaultCvars()
in the chat window
Or use addons like https://www.curseforge.com/wow/addons/wowlua
Sorry for answering late. But maybe someone here can clear some things up for me. I
- deleted my WTF, Cache and Interface Folder
- restarted WoW
- started the Game > Menü > System > Default > Reset all Settings
- started the Game > Menü > Interface > Reset all Settings
- restarted WoW
- added the above AddOn
- reload WoW
Now I expect the AddOn to basically show nothing because I have 100% fully stock UI and settings, right?
At least for me, even then the list is damn long:
I modified the AddOn so I can dump and set all cvars. So I Dumped > Set all default > Dumped again and I had to do this a couple times then the dumped list got smaller. Like really small (5-7 lines). As soon as I restarted the game the dump was again huge like on the screenshots above.
There is a "Reset Settings" button in the bottom right of the window that opens when you type /aio into the chat; this will attempt to reset every CVar to its default value.
Most of the CVars in your list are graphics settings; if you clicked the "Recommended" button under the System Graphics menu then it sounds like it set them to recommended values based on your computer specs rather than their default settings.
Some of the remaining CVars are tracking UI settings like whether you have the Quest log expanded or collapsed next to the world map so it can remember your preferences between sessions.
Now I expect the AddOn to basically show nothing because I have 100% fully stock UI and settings, right? At least for me, even then the list is damn long:
I assumed you would try to filter that list (since we're on github), something like
local hidden = {
activeCUFProfile = true,
audioLocale = true,
cameraSavedDistance = true,
}
function DumpNondefaultCvars()
local t = {}
local cvars = C_Console.GetAllCommands()
for _, info in pairs(cvars) do
local default = GetCVarDefault(info.command)
local cur = GetCVar(info.command)
if default ~= cur and not hidden[info.command] then
tinsert(t, {info.command, default, cur})
end
end
sort(t, function(a, b)
return a[1]:lower() < b[1]:lower()
end)
for _, cvar in pairs(t) do
print(unpack(cvar))
end
end
But yeah those graphics cvars are probably set to the recommended instead of the actual defaults...
Most of the CVars in your list are graphics settings; if you clicked the "Recommended" button under the System Graphics menu then it sounds like it set them to recommended values based on your computer specs rather than their default settings.
Yeah that's right. Didn't notiuced that on the first look. On the other hand, that's as well what I'm looking for. I have some performance issues which I'm trying to recreating using a stock UI to have valid arguments that the issue is not on my side. Anyway, thank you both.
What I did with your code was just replacing tinsert(t, {info.command, default, cur})
with SetCVar(info.command, default)
. Not clean but seemed like it worked.