WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   alter lua file? (https://www.wowinterface.com/forums/showthread.php?t=46820)

shyrotam 07-16-13 08:35 AM

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.

p3lim 07-16-13 08:48 AM

All savedvariable files save on reload/exit, are you trying to change them while ingame?

bsmorgan 07-16-13 09:03 AM

Quote:

Originally Posted by shyrotam (Post 281213)
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.

shyrotam 07-16-13 11:18 AM

that was it. it totally works. thanks.

shyrotam 07-28-13 02:48 PM

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

Nibelheim 07-28-13 03:22 PM

Quote:

Originally Posted by shyrotam (Post 281880)
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 :p 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.

jeffy162 07-28-13 04:46 PM

In other words. make your changes to the \wow\Interface\AddOns\YourAddOnHere\yourAddOnHere.lua, rather than the SavedVariables.


All times are GMT -6. The time now is 03:12 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI