1. #1

    Starting programming LUA.

    Hello all. i want to ask to pro lua editors and UI makers where do you guys start learning lua?

    was an hard language to learn? did you buy/read books? or just playing around editing addons? ^^

    i really want to start programming lua to create my own ui's and my own addons (i know this isnt a thing that cant be done from day to night) but can someone give me some path to follow? xD

    thanks for the reading.

  2. #2
    Field Marshal Ronburggundy's Avatar
    Join Date
    Oct 2013
    Location
    The nightly news
    Posts
    77
    Quote Originally Posted by easkyy View Post
    Hello all. i want to ask to pro lua editors and UI makers where do you guys start learning lua?

    was an hard language to learn? did you buy/read books? or just playing around editing addons? ^^

    i really want to start programming lua to create my own ui's and my own addons (i know this isnt a thing that cant be done from day to night) but can someone give me some path to follow? xD

    thanks for the reading.
    There is a book out there about programming WoW addons. Its several years out dated though.

    From what I understand the LUA that wow lets you use, and the LUA that you can use outside of wow has numerous differences in that there are heavy restrictions in the WoW environment and addon api.

    Certainly look for WoW based material rather than generic LUA material as all things may not line up exactly as you would expect them.

  3. #3
    Quote Originally Posted by easkyy View Post
    i know this isnt a thing that cant be done from day to night)
    I decided to publish things when one of the addon sites started giving out beta keys for tbc or wrath or something, took about 24 hours to write something other people would use? :P

    Lua is really straight forward to pick up, especially with a java/c/# background - although it will teach you some bad habits if you go from lua to those languages!
    As to learning, every addon you download is just lua files you can browse with an editor, pick a simple mod you like - open up the .lua files, and browse away

    I haven't ever used books or anything, mostly just wowwiki's api stuff and addon studio (visual studio express with a lua plugin, its free )- has intellisense support and a slightly outdated set of wow api functions.
    Last edited by rijn dael; 2013-10-24 at 02:25 AM.

  4. #4
    Here's a few suggestions:

    • Just pick a simple addon (LootAnnounce, Tooltip Management, GCG game, TriviaBot, etc) and just go dig through their LUA files. Study things and figure out how they work.
    • Find a project (addon) that you're really interested in and help the author fix some bugs.
    • Find something that you do constantly and would like to automate via code.

    There's lot of ways to get started, and all of them typically involve just studying other peoples code and figuring out how things tick. Reach out to the community as much as you can. There are a ton of helpful and informative people on the forums who are happy to help you along your path.

    Best of luck to you in your start.
    Virtualize <Solution> @ Greymane | virtual#1157 | Web | YouTube | Twitter | Facebook
    Hermes - Share cooldown status with raid/party.
    Skada: Survivability - Show when a character died during a specific attempt.
    AffDots - Track the potency of your DoTs on a target.

  5. #5

  6. #6
    My usual infodump:
    Quote Originally Posted by Treeston View Post
    1. Don't use WYSIWYG. Use Notepad++ or a comparable plain text editor.
    2. TOC format information
    3. Lua 5.1 manual
    4. API doc, event doc, widget doc. There's also the FrameXML, but you probably won't have to look into it until you get into hooking.
    5. Feel free to ask for any advice regarding issues you're having on this forum - we'll be more than happy to assist.
    6. You can also find me on IRC if you have questions. The channel is #mmo-champion @quakenet - if you're not familiar with it, there's a simple webchat you can use.
    PS: "Lua" is "moon" in Portuguese, not an acronym.

    PPS: Previous programming experience? I've done more in-depth infodumps for people coming from various languages in the past and could dig those up for you.
    UI & AddOns expert | Interface & Macros moderator - My work

  7. #7

  8. #8
    first of all thank you all for the answers ..

    just came from the work and nice to see ppl answering it and giving me some paths to start with it..

    my programming experience is not too good and dont touch anything about programming along time ago, but i have learned (in school) "touched" abit in Visual Basic, Pascal (unfortunately the course i was in the programming languages they teach were not the best ones, i wish they had teach me c or c++ or java) oh and more english lessons xD ehhe..

    so basicly i have zero or only 1 :P in a 1-10 scale background in programming is that a total block to learning lua? i dont think so but can be .. tell me if im wrong..

    nowadays i already edit some minor changes in some UI's i download but nothing i can say that make me understand enough to program addons for myself xD


    one more time thanks for the answers guys.

  9. #9
    It's not a complete block, but the first language is always the hardest. Personally, I did a lot of trial and error over various projects, essentially just playing with ideas I had and seeing how I could make them work. As always, I'll be happy to help with any specific issues you can't quite solve on your own.
    UI & AddOns expert | Interface & Macros moderator - My work

  10. #10
    Quote Originally Posted by Treeston View Post
    My usual infodump:
    Don't use WYSIWYG
    When you say that do you mean do not use an IDE to develop your code or do not use editors which automatically generate code?

    The reason why i am curious is because many companies, including blizzard, requires the use of IDEs for programming because it is almost central to agile development.
    Quote Originally Posted by Windfury View Post
    Hmm their writing style reads as male to me.

    Now you've got me wondering.

  11. #11
    Bloodsail Admiral Tsundere Pejo's Avatar
    Join Date
    Mar 2011
    Location
    C eh N eh D eh
    Posts
    1,236
    Quote Originally Posted by Ralgarog View Post
    do not use editors which automatically generate code?
    This is my guess. I use Visual Studio 2012 myself, but I'm using it as a glorified text editor. I'm just comfortable with it, so yes. I didn't know about there was a WoW API addon though...that may be interesting. I've only done a couple addons, and they are very simple as I was just trying to fill any holes I found, a holes a hole.

  12. #12
    The latter. IDEs work just fine as long as you still write your code - you can just run into issues if they provide "templates" or somesuch that provide you with a basic structure that you're not familiar with.
    UI & AddOns expert | Interface & Macros moderator - My work

  13. #13
    Quote Originally Posted by Treeston View Post
    The latter. IDEs work just fine as long as you still write your code - you can just run into issues if they provide "templates" or somesuch that provide you with a basic structure that you're not familiar with.
    Addon studio after 2008 removed the funny drag-drop gui thing they tried to do, its basically visual studio with nothing extra, barring ctrl-shift-b = deploy my stuff to wow folder
    About the only thing I miss from my work environment is resharper and nunit/ncrunch - I haven't seen anyone with a practical approach to unit testing a wow addon though
    Last edited by rijn dael; 2013-10-24 at 11:12 PM.

Posting Permissions

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