Plater Nameplates

Plater Nameplates

64M Downloads

CVar based settings reset when creating a new character

syndenbock opened this issue ยท 16 comments

commented

Game and Plater version
Game version: Retail (9.2)
Plater version: Plater-v350-Retail - DetailsFramework v313 - WoW 9.2.0

Describe the bug

  • I created a new character and started playing on it with Plater enabled
  • A lot of the CVar based settings were reset to the games default values instead of the values I configured in Plater
  • When going back to an older character, the CVar based settings were set to the defaults too. All of the characters are using the same profile (Default).
  • I have a small personal addon that sets these cvars to what I want them to be. Plater always resets these values on a reload though.

I expected the settings to stay the same when creating a new character and especially the settings of already existing characters to not be changed.
It would also be nice to have an option to disable setting the CVars Plater has stored so my personal addon can set those.

Lua Error
No lua errors occured

Screenshots
No image necessary imo

Other Information
No other info needed imo

commented

Can you please try this with the latest alpha version? There were changes to ensure restore and store of CVars is handled more consistently.

commented

Another round of changes will follow to ensure restore is not affected during first load on character, once I have internet access again on my PC.

commented

The issue when creating a new character seems to be fixed.
I would still like an option to disable cvar store and restore though so I can set the values in my personal addon.

commented

{ type = "toggle", get = function() return true end, set = function (self, fixedparam, value) if (not InCombatLockdown()) then SetCVar ("nameplateShowEnemyPets", 1) else Plater:Msg (L["OPTIONS_ERROR_CVARMODIFY"]) self:SetValue (GetCVar ("nameplateShowEnemyPets") == CVAR_ENABLED) end end, name = "Show Enemy Pets" .. CVarIcon, desc = "Show nameplates for enemy pets" .. CVarDesc, nocombat = true, },

This will just fool yourself, as it only changes the visual part in the options menu and not change any values.

When I do a /plater cvar, those 3 values are correct, however somehow they are not correctly restored/applied?

Try this with only plater and no other addons enabled.

commented

When I do a /plater cvar, those 3 values are correct, however somehow they are not correctly restored/applied?

And the full output for those 3cvars please.

commented

/plater cvar output:

'nameplateShowFriendlyPets' = 1
'nameplateShowEnemyTotems' = 1
'nameplateShowEnemyPets' = 1

So I deleted the entire WTF folder and relogged, now it seems to be working.

commented

This would have been useful:
/plater cvar nameplateShowFriendlyPets
/plater cvar nameplateShowEnemyTotems
/plater cvar nameplateShowEnemyPets

commented

So I deleted the entire WTF folder and relogged, now it seems to be working.

This rather sounds like some other addon interfering, this is why I asked to try this with just Plater enabled.

commented

I don't have any addons that modify those values, but I did run some scripts manually to change those cvars on some characters before, which might have messed up the value toggle.
So I think the way to avoid this going forward is to let Plater be the only controller of those nameplate values.

commented

I don't have any addons that modify those values, but I did run some scripts manually to change those cvars on some characters before, which might have messed up the value toggle. So I think the way to avoid this going forward is to let Plater be the only controller of those nameplate values.

If you're running other addons and not willing to cooperate and try it with just Plater enabled there is nothing more I can do for you.
But yes: let Plater control this.

commented

I did try it with just Plater and default profile with only those values modified, but the issue went away once I cleared WTF folder (most likely it was config-cache.wtf files which caused this) before I disabled other addons.
Anyways thanks for the help :)

commented

The cache files literally "cache" values. CVars are stored on server side.

commented

This is still buggy for me. Not only when creating new characters, but also when switching to another character using the same profile, or even doing a reload with the same character.

Here is my setting regarding nameplates:
image

After the first reload, it becomes:
image

Then reload again, it becomes:
image

Another reload makes it:
image

Then reload again, it becomes the correct settings I have..

I have tried creating a brand new profile that only modifies those settings, but this issue easily repros

commented

I basically had to modify the addon locally to always return true for it to work, which is really inconvenient:

{ type = "toggle", get = function() return true end, set = function (self, fixedparam, value) if (not InCombatLockdown()) then SetCVar ("nameplateShowEnemyPets", 1) else Plater:Msg (L["OPTIONS_ERROR_CVARMODIFY"]) self:SetValue (GetCVar ("nameplateShowEnemyPets") == CVAR_ENABLED) end end, name = "Show Enemy Pets" .. CVarIcon, desc = "Show nameplates for enemy pets" .. CVarDesc, nocombat = true, },

commented

When I do a /plater cvar, those 3 values are correct, however somehow they are not correctly restored/applied?

commented

Latest alpha versions iterates on the cache restore and fixes another issue there.