Thread Tools Display Modes
07-16-13, 08:35 AM   #1
shyrotam
A Cliff Giant
Join Date: Jan 2010
Posts: 77
alter lua file?

I dont know any of this coding stuff. I tried making a simple change to the .lua file of an addon in the saved variables folder but it didn't appear to have the effect i wanted. Am I missing a step? thanks.
  Reply With Quote
07-16-13, 08:48 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
All savedvariable files save on reload/exit, are you trying to change them while ingame?
  Reply With Quote
07-16-13, 09:03 AM   #3
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Originally Posted by shyrotam View Post
I tried making a simple change to the .lua file of an addon in the saved variables folder but it didn't appear to have the effect i wanted.
SavedVariables are read when a character logs on and written when a character logs off. Any changes made while WoW is running with a character logged on will be lost.

The Interface\AddOns\<...> .toc files are read when WoW starts and the .lua and .xml files are read when a character logs on or /reload is issued while a character is logged on. This means that adding a new addon needs to be done while WoW is not running but changes to the code of an existing addon can be recognized when a /reload is issued or logging a character off and on again.

If this confuses you, then use this rule: Only make changes when WoW is not running!

The rules are complicated because Blizzard wants to prevent external programs from making real-time changes.
  Reply With Quote
07-16-13, 11:18 AM   #4
shyrotam
A Cliff Giant
Join Date: Jan 2010
Posts: 77
that was it. it totally works. thanks.
  Reply With Quote
07-28-13, 02:48 PM   #5
shyrotam
A Cliff Giant
Join Date: Jan 2010
Posts: 77
I exited the game, altered the lua file, logged in and everything worked fine.

Until I exited the game again and the lua file has reverted back to its original form.

Is there something i can do to "maintain" my lua file changes? Thx
  Reply With Quote
07-28-13, 03:22 PM   #6
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by shyrotam View Post
I exited the game, altered the lua file, logged in and everything worked fine.

Until I exited the game again and the lua file has reverted back to its original form.

Is there something i can do to "maintain" my lua file changes? Thx
Making the file read-only may work (right click > Properties). Change to read-only after you've made your change Note, however, the addon this Lua file belongs to will no longer be able to make changes to it. Only other way to prevent your changes from being altered by the addon is to alter the addon itself.
  Reply With Quote
07-28-13, 04:46 PM   #7
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
In other words. make your changes to the \wow\Interface\AddOns\YourAddOnHere\yourAddOnHere.lua, rather than the SavedVariables.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!

Last edited by jeffy162 : 07-28-13 at 04:53 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » alter lua file?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off