Multiple config files
Is it possible to use multiple config files in lua?
|
Yes.
10 char limit |
All a file dedicated to configuration does it separate configurable settings from non-configurable/relevant code. The fact that the file is named config.lua or configuration.lua makes it no different than core.lua or MyAddon.lua or modules.lua etc.
Config1.lua: Lua Code:
Config2.lua Lua Code:
Understand that you can place anything you can place into a table, into the addon table. As such, you could split your configuration into 1000 files if you wanted to. |
Now I'm confused.
Are we talking physical files on disk or multiple tables saved to a file? I thought it was 1 global savedvariable file, one per character savedvariable file and each file could hold multiple config tables defined in the .TOC by sepreating their names with a comma. If there is another option it would be interesting. |
Quote:
|
Quote:
|
You can create any Lua or XML file to use with an addon. Until 10Leej comes back and clarifies what he means, he's either talking about saved variable files (though he did say "config") or he's talking about a file in his addon with which to program his settings/options panel (usually what "config" means and what many people name as config.lua in their addon).
|
I want to actually use multiple config files on the same config table. So Clamsoda's response was what I was looking for pretty much.
And no I wasn't talking about saved variables. It's a realm I've never looked into. |
Quote:
Code:
local _, ns = ... Code:
local _, ns = ... |
All times are GMT -6. The time now is 02:17 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI