Originally Posted by votan
If I compare Garkin and sirinsidiator, the difference is, that Garkin uses only one ## SavedVariables.
If more than one saved variable can be specified, sharing data should be possible, by simply using a shared variable name.
tja.
|
This is how it does default UI. It has just one global name for saved variables defined in manifest:
from Ingame.txt:
Code:
; Ingame Script Files
## DependsOn: ZO_IngameLocalization ZO_Common
## SavedVariables: ZO_Ingame_SavedVariables
And then each part of the UI uses the same variable with different namespace:
Lua Code:
--Provisioner.lua:
self.savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 1, "Provisioner", defaults)
--SmithingCreation.lua:
self.savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 2, "SmithingCreation", defaults)
--WorldMap.lua:
g_savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 4, "WorldMap", defaults)
--etc.
All you need is some data sharing addon (because of manifest) where you define global variable name for saved variables. But as you said, it is possible to use "ZO_Ingame_SavedVariables" instead which will be always available as default UI is loaded first. You should just use unique namespace for the data.