WoW:Saving variables between game sessions (source)
Revision as of 21:27, 14 November 2006
, 14 November 2006→SavedVariables.lua
| Line 7: | Line 7: | ||
* <tt>WTF\Account\ACCOUNTNAME\ACCOUNTNAME\RealmName\CharacterName\AddOnName.lua</tt> - Per-character settings for each individual AddOn (NOTE: The realm part will be added in the 1.9 patch) | * <tt>WTF\Account\ACCOUNTNAME\ACCOUNTNAME\RealmName\CharacterName\AddOnName.lua</tt> - Per-character settings for each individual AddOn (NOTE: The realm part will be added in the 1.9 patch) | ||
These files are written | These files are written whenever the UI engine shuts down (either at game quit, or at the start of a forced UI reload), and then executed when the UI is started and addons are loaded (after logging in or at the end of a forced UI reload). | ||
The <tt>SavedVariables.lua</tt> files are executed as code (just like your addon code). The time at which they're executed varies slightly by file type -- The AddOn specific SavedVariables files are executed right after the addon they belong to has been loaded, and before the ADDON_LOADED event is fired for the addon. The global SavedVariables.lua file is loaded after all of the initial addons are loaded, before the player is given control, and before the VARIABLES_LOADED event is fired. | The <tt>SavedVariables.lua</tt> files are executed as code (just like your addon code). The time at which they're executed varies slightly by file type -- The AddOn specific SavedVariables files are executed right after the addon they belong to has been loaded, and before the ADDON_LOADED event is fired for the addon. The global SavedVariables.lua file is loaded after all of the initial addons are loaded, before the player is given control, and before the VARIABLES_LOADED event is fired. | ||