ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Libraries & Saved Variables (https://www.esoui.com/forums/showthread.php?t=4153)

votan 12/21/14 03:31 AM

Quote:

Originally Posted by circonian (Post 17961)
I don't think what I wanted is possible. I know some of you were already saying that. I'm mainly posting this for anyone else interested who reads this post.

I ran into another problem. Although I can get the library to work with multiple addons reading & writing the saved variables to each addons saved variable file doing the above. I realized that if a user installed a NEW addon that had the library included AND that addon got loaded first, it would have no saved variables yet for that saved variable table and thus wipe out all saved variables when it is loaded.

So I guess stand alone with its own saved variables would be the only way.

Thanks again everyone for all of your advice.

What about the approach to use "ZO_Ingame_SavedVariables"? Too dirty?

circonian 12/21/14 05:52 AM

Quote:

Originally Posted by votan (Post 17967)
What about the approach to use "ZO_Ingame_SavedVariables"? Too dirty?

I'm glad you mentioned that! Actually..I never used one of those namespaces before. I was going to come back and look at it later, to try and figure out how it worked, after reading the other posts. But I just forgot about it.

One of Garkins examples:
Lua Code:
  1. self.savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 1, "Provisioner", defaults)

So how would I use it? I'm guessing all I need to do is just use a unique namespace? So just something like:
Lua Code:
  1. self.savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 1, "LibNeed4ResearchVars", MyDefaultVarTable)
and...I'm guessing thats all there is to it?

What about the version number? If I changed the version number would it wipe out ALL of ZO_Ingame_SavedVariables? Or just MY namespace?

Garkin 12/21/14 06:22 AM

Quote:

Originally Posted by circonian (Post 17970)
I'm glad you mentioned that! Actually..I never used one of those namespaces before. I was going to come back and look at it later, to try and figure out how it worked, after reading the other posts. But I just forgot about it.

One of Garkins examples:
Lua Code:
  1. self.savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 1, "Provisioner", defaults)

So how would I use it? I'm guessing all I need to do is just use a unique namespace? So just something like:
Lua Code:
  1. self.savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 1, "LibNeed4ResearchVars", MyDefaultVarTable)
and...I'm guessing thats all there is to it?

What about the version number? If I changed the version number would it wipe out ALL of ZO_Ingame_SavedVariables? Or just MY namespace?

- Yes, you need just unique namespace.
- If you increase version number, it will reset to defaults just your namespace. Nothing else.

circonian 12/21/14 06:36 AM

Quote:

Originally Posted by Garkin (Post 17971)
- Yes, you need just unique namespace.
- If you increase version number, it will reset to defaults just your namespace. Nothing else.

Awesome, thanks Garkin.


All times are GMT -6. The time now is 12:10 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI