Thread Tools Display Modes
09-18-14, 10:25 PM   #1
Lightbound
An Aku'mai Servant
 
Lightbound's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 35
Learning how to Learn? Lua inc.

Hello there!

Since im currently working on a ui for myself that is mainly like dragging addons together, style them to match one look and set kg panels behind them i got realy interested in learning lua. I saw so many amazing stuff made with addons in wow so ye. Enough sayed.

In general i would say i did forgot how to learn. Im "just" 20 years old and of course i did a learn progress in using daylie stuff. For example after starting to use pc's. I went totaly frightened after a blue screen did appear. Like jumping miles away from my pc "please dont exmplode!". Now i can do basicly everything i want to do with pcs, building them modificate them, tweak em and so on. The point is that was a progress that is basicly default by remembering and googeling.

If it comes to lua and mainly the wow api it is something complete different. I just dont get how to learn it. For sure i can read addon codes of existing addons and if i google right i can find every information about lua and the wow api i want so if my mind wouldnt be unable to combine and learn stuff i could be a master in lua after 1 minute. But im a boring, normal human without special learning skills. Even after the inventing of google i properly lost my skill in trying stuff out.

For sure i can try things out and put words together that "sound" logical for me but my skill in sort omsething out by myself nearly died. That sayed i would like to hear something by the "i learned writing addons by myself!" people around here.

If i guess right i have to learn 3 things in general before even start to write my own addon that is just based on my ideas instead of googleing something and modificate a already existing code.

1. The lua syntax.

How would i do that? How did you do that? I mean ye, if i understand what every thing in lua is doing i can get a clue. By the time i spent in forums i learned that bb codes start with [] and end with [/]. I learned how the most bb codes look like and ye this is basicly the syntax. In terms of programming i just know that if i want to use a if statement there has to be at least a then / else statement (if i guess right).

2. The wow api. Even if i know how to write lua properly i wouldnt be able to do anything in wow if i dont know how wow does work with the lua code. I saw a lot of lists explaining the wow api and its functions. Do you guys just google what you want to do and build it in then?

Is it like "okay i know how to create a background in lua and how to border it. Now i want to add a button so lets google "WoW API creating buttons" ?

3. The librarys and other stuff like that.

If i for example want to safe profiles i have to use a library if i guess right. Or if i want to use a 3. party API for World of Warcraft i have to learn it as well.

So that said i would realy appreciate to get some advices in terms of learning a language myself and in which order.
  Reply With Quote
09-18-14, 10:51 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Have a start by looking at the first couple of stickies here: http://www.wowinterface.com/forums/f...splay.php?f=12

__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-18-14, 11:13 PM   #3
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
1. I found "Learn Lua in 15 Minutes" a while ago. It provides a very good overview of the syntax, as well as some additional links at the end.

2. Wowpedia is probably the best resource for WoW API docs. I use it extensively when I don't know how to do something with the API.

3. Libraries are by no means required or even needed, though they do make certain things easier. Wowpedia has a simple example of how to do Saved Vars without a library.

Edit: and Seerah's link too, good stuff.
__________________
Knowledge = Power; Be OP


Last edited by Gethe : 09-18-14 at 11:15 PM.
  Reply With Quote
09-18-14, 11:58 PM   #4
Lightbound
An Aku'mai Servant
 
Lightbound's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 35
Well didnt expect that fast and helpful answers. Ill take a nap and than read through every information i can get. I dont expect that much but since i got a bunch of free time i want to do something "usefull" with it.

Edit: just scrolled over the "Learn Lua in 15 Minutes" thing. Basicly looks more like a "if you know any programming language, ill show you how you do stuff you already know in Lua". Anyways, ill take a look later on it.

Edit2: Is the IRC stuff still working? Tryed to join irc.freenode.net/WoWUIDev via webchat.quakenet.org. Not sure if i did right. Long time ago i did use IRC

Last edited by Lightbound : 09-19-14 at 12:06 AM.
  Reply With Quote
09-19-14, 12:39 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
There are some additional links, mostly to useful forum posts explaining Lua concepts and such, at the "resources" link in my signature.

2. Rather than Googling for how to make a button, it's probably faster to look at the code of an addon you already have that makes a button, or even the default UI code.

Same for events and functions -- try searching for keywords on the "all events" and "all API functions" lists on Wowpwedia first, and look in the related default UI code if you can't find it there. I only use Google for answering more conceptual questions, or for looking for information about specific API bugs.

3. I would not recommend using any libraries until you have a good grasp on the basics, and can make an informed decision about whether using a library will actually make your work easier, and whether the overhead is worth the gain. For example, it would be insane to use AceGUI just to create one button.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-19-14, 12:48 AM   #6
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
Yeah the 15 min thing does make a few assumptions, but it's still a good overview. If you're just getting started, you really only need to go as far as the tables section (then skip to the bottom for more links).
__________________
Knowledge = Power; Be OP

  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Learning how to Learn? Lua inc.

Thread Tools
Display Modes

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