1. #1

    LUA editor with preview?

    I was looking at Tukui and it says that to edit it, you have to edit the LUA file. So what I am wondering, is there a program that will let you edit the LUA file and then preview the change without having to open the WoW client after each change? Or is this even possible?

  2. #2
    Deleted
    You mean see what your UI will look like without being in game? Generally no, but there's something like WoW Addon Studio which may do that. I think, at least. But I have no idea whether it will work for a fully fledged UI replacement and libraries and stuff. And, of course, there's no guarantee the outcome will be exactly the same. You're better off just checking in the game. Note that you don't have to exit the game for changes to take effect, unless you are adding files. Reload UI is fine.

  3. #3
    You don't have to restart the game to see changes made to .lua files, you can just /reload. You only need to restart the game if you're adding new files/addons.

  4. #4
    Quote Originally Posted by Anias View Post
    I was looking at Tukui and it says that to edit it, you have to edit the LUA file. So what I am wondering, is there a program that will let you edit the LUA file and then preview the change without having to open the WoW client after each change? Or is this even possible?
    LUA scripts are a type of scripted programming language, or a functional programming language, that requires an interpreter to run rather than being compiled into a stand-alone program (the interpreter is WoW here). As such you can always open the a .lua file with any plain text editor you like (Wordpad, Notepad++, ...) to see and edit the code to your liking. However if you have no understanding of programming languages in general or how a functional programming language works, seeing the code will be of little use to you.

    As long as a .lua file is loaded in WoW (they are loaded when WoW starts up) and contains no major errors you can always edit the file while the game runs, save, then /reload in WoW to have the updated file loaded and active. There is no such thing as a preview outside of the actual interpreter, and you won't find an interpreter other than WoW itself to show you want you want to see. With a little imagination and understanding in programming however you just might be able to know what your code does even without executing it, at least to a limited extend.
    Last edited by The Kao; 2014-07-26 at 12:11 PM.
    Your rights as a consumer begin and end at the point where you choose not to consume, and not where you yourself influence the consumed goods.

    Translation: if you don't like a game don't play it.

  5. #5
    ObPedant: lua is not a functional language.

  6. #6
    Thanks everyone. Never knew that you could edit the LUA then just reload. That makes a lot more sense to me now.

  7. #7
    Yeah I didnt know that either

  8. #8
    Deleted
    What Lombra said; just continuing the pedantry for people's edification:

    Quote Originally Posted by SlippyCheeze View Post
    ObPedant: lua is not a functional language.
    Well, you can do functional programming in Lua. But it is correct that "interpreted" and "functional" aren't synonyms, and in fact Lua being interpreted doesn't imply that one couldn't write a program that shows a preview of what an addon would look like in-game (and such programs do in fact exist, as mentioned earlier in the thread).

    Also /reload isn't technically enough for applying changes to all .lua files; if you make changes to your SavedVariables files while in-game, the changes will be reverted when you log out. (That still doesn't require a full restart of the client, though; it's enough to just be on the character select screen.)

    (Also it should be capitalized "Lua"; it's not an acronym.)

  9. #9
    Deleted
    You only have to restart the client if you added new files. (textures, lua files, etc.)

    Otherwise just keep a /reload macro that you can hit right after you saved your lua edit.

    Two really nice Lua editors are:
    Sublime Text 3 http://www.sublimetext.com/3
    Notepad++ http://notepad-plus-plus.org/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •