Problems Changing Lua Files Parameters

Eorzea Time
 
 
 
言語: JP EN FR DE
日本語版のFFXIVPRO利用したい場合は、上記の"JP"を設定して、又はjp.ffxivpro.comを直接に利用してもいいです
users online
フォーラム » Windower » Support » Problems changing lua files parameters
Problems changing lua files parameters
 Quetzalcoatl.Freddles
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Freddles
Posts: 11
By Quetzalcoatl.Freddles 2015-01-23 19:32:26  
Hello all,

I've tried modifying certain parameters in the lua files and it doesn't seem to change anything in game. I tried logging off and on, but it doesn't seem to take, yet the files are still modified. Am I doing something wrong?

I've tried modifying the y parameter for pointwatch, and also the macrochanger for the books... It still uses the first parameters that were there in the default files.

Also, does the update addon used to update from the server for new versions, or for changes we made in the files ourselves?

Thanks in advance,
 Leviathan.Arcon
VIP
Offline
サーバ: Leviathan
Game: FFXI
user: Zaphor
Posts: 660
By Leviathan.Arcon 2015-01-24 01:59:52  
The Lua addon files usually contain something along these lines:
Code
defaults = {}
defaults.Text = 'Something'
defaults.SomeMode = true
defaults.Position = {}
defaults.Position.X = 30
defaults.Position.Y = 620

settings = config.load(defaults)


Most addons give users the ability to adjust the settings. They do so by either generating an XML file in the Windower/addons/<addon>/data/ folder (called settings.xml) or by implementing a command handler so people can adjust settings in-game via the chat log.

To create that settings file it uses the default values. Once the settings.xml file is created it ignores the default values and only looks inside the file, that's why changing the defaults is useless at that point. The only use default values have after that is if you, for whatever reason, delete some settings, then they will be recreated the next time you load the addon.

Changing it in the Lua file is a bad idea for various reasons. Most importantly, it would reset every time the file is updated and you'd have to change your settings all over again.

Note that not all addons use this method, but most do. The MacroChanger addon apparently creates a settings.txt file in the data/ folder, which does essentially the same thing, only a bit worse.

Quetzalcoatl.Freddles said: »
Also, does the update addon used to update from the server for new versions, or for changes we made in the files ourselves?

The former.