Thread Tools Display Modes
07-02-14, 07:12 AM   #1
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Getting started - Help appreciated :)

Greetings,

I'd like to start off by introducing myself.
My name is Simon, i'm 22 years old and i live in Denmark, therefore if my English seems out of sentence, please note that i do not have English as my native language. If you have questions to or is confused about anything i say/write, please just tell me and i will try to rephrase it.

From other languages like C# and Visual Basics i know how to work around a few things, like the different loops, such as a For loop. I also happen to know how to use Logical behaviors such as If, ElseIf, Else statements and how to invoke different operators to evaluate conditions.

But C# and Visual Basic was just a bit out of my league as i had no idea what to do with it and no projects came to mind. This has been quite a long time ago and my knowledge is rusty. I would like to start from scratch, and that is why i ask here for advice. Below is a list of questions/requests i'd like to get solved:
  • Guides to the .Lua language, including how to setup and "compile" the code. (Videos preferred)
  • Guides and Reference to development of World of Warcraft AddOns.
  • Guides to combine and learn .Lua and .XML. (If XML is necessary or recommended)
  • Idea's for a starter AddOn, not a "Hello World!" but something that is both simple and visual or 'useful'. (Could be anything from showing a ToolTip to Targeting a specific Mob by it's ID or something)
  • Text Editors/IDE's (NotePad++, Sublime Text 3, etc)
  • Other things you might find valuable for starters.

I wrote Compile in the first listed item, as i believe this is probably known to everyone what that means. But as far as i can tell, .Lua is using an interpreter?

Regards,
Codelogic
  Reply With Quote
07-02-14, 07:35 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
Hello and welcome.

The stickies in this section are a good place to start, most of your questions are answered there.
If you take a look there and you still haven't crossed off some of your bullet points, post back with what you're missing.
  Reply With Quote
07-02-14, 07:55 AM   #3
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Originally Posted by Dridzt View Post
Hello and welcome.

The stickies in this section are a good place to start, most of your questions are answered there.
If you take a look there and you still haven't crossed off some of your bullet points, post back with what you're missing.
Thank you - that forum totally slipped my eyes. However guides in there seems to be very outdated on varies things?

Can i ask You what Editor you use? Also there is this place called WoWWiki.com, which looks alot like wowpedia - are either of them outdated, and which is your preferred one?

Do you happen to know if UltraEdit has an IntelliSense-like CallTip function that pop's up when typing? Or if Auto-Complete and Snippets are possible to make?

Last edited by Codelogic : 07-02-14 at 08:10 AM.
  Reply With Quote
07-02-14, 10:36 AM   #4
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Also there is this place called WoWWiki.com, which looks alot like wowpedia - are either of them outdated, and which is your preferred one?
I know for a fact that quite a few users here update the API pages on wowpedia.com. My personal preference is wowpedia.
Do you happen to know if UltraEdit has an IntelliSense-like CallTip function that pop's up when typing? Or if Auto-Complete and Snippets are possible to make?
I personally use IntellyJ IDEA with the following plugins when developing personal addons:

http://www.jetbrains.com/idea/
http://plugins.jetbrains.com/plugin/5055
https://bitbucket.org/sylvanaar2/idl...raft/wiki/Home

I'm using PHPStorm for my work as well.
  Reply With Quote
07-02-14, 11:00 AM   #5
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
IntelliJ looks great But i guess the WoW API documentation changes alot, how is the plugin at updating that?
  Reply With Quote
07-02-14, 11:34 AM   #6
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by Codelogic View Post
IntelliJ looks great But i guess the WoW API documentation changes alot, how is the plugin at updating that?
Sylvanaar has updated the API for 5.2, but there's a scraper script in the repo available to update to the latest API version (using data provided by wowprogramming.com): https://bitbucket.org/sylvanaar2/idl...txt?at=default
  Reply With Quote
07-02-14, 11:36 AM   #7
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Originally Posted by ravagernl View Post
Sylvanaar has updated the API for 5.2, but there's a scraper script in the repo available to update to the latest API version (using data provided by wowprogramming.com): https://bitbucket.org/sylvanaar2/idl...txt?at=default
Thanks, could you guide me through the steps of setting it up?

EDIT: NVM - Fixed.

Last edited by Codelogic : 07-02-14 at 12:07 PM.
  Reply With Quote
07-02-14, 12:23 PM   #9
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Thank you all for your response, now it's time to start coding!

Is the book World of Warcraft Programming (2nd Edition) worth the read, even though it's outdated on many aspects? And can i jump straight into that, or should i go for .Lua in general first - like the Lua programming book 3rd edition?

Last edited by Codelogic : 07-02-14 at 12:27 PM.
  Reply With Quote
07-02-14, 02:15 PM   #10
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
It depends on what kind of idea you have. You can do really advanced stuff, from drawling lines on the worldmap to make a guide, or a simple gratz in the guild chat when someone levels up. Start with something simple and try to research how to do it. It's not going to be perfect at first, but you'll learn along the way.

Also there's plenty of people that like to take a look at your code and help you with any improvements.
  Reply With Quote
07-02-14, 02:31 PM   #11
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Originally Posted by ravagernl View Post
It depends on what kind of idea you have. You can do really advanced stuff, from drawling lines on the worldmap to make a guide, or a simple gratz in the guild chat when someone levels up. Start with something simple and try to research how to do it. It's not going to be perfect at first, but you'll learn along the way.

Also there's plenty of people that like to take a look at your code and help you with any improvements.
I have a final project in mind and i just want to get going with that, but before i can get my hands dirty i need to learn more about the language itself and i need to develop smaller, more simple AddOns. But i'm still not sure whether the books i mentioned before would be worth both the money and the time? If anyone could come up with personal opinions on those two books or even recommend other such things, i would appreciate it very much
  Reply With Quote
07-02-14, 03:34 PM   #12
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Codelogic View Post
I have a final project in mind and i just want to get going with that, but before i can get my hands dirty i need to learn more about the language itself and i need to develop smaller, more simple AddOns. But i'm still not sure whether the books i mentioned before would be worth both the money and the time? If anyone could come up with personal opinions on those two books or even recommend other such things, i would appreciate it very much
The lua language that is not that complex. At least not if you're doing basic stuff as developing wow addons. So, reading a full book about lua would be way too much. At least in my opinion.
In the end of the day any development activities are about knowing the framework/api/etc you're using - and not that much about knowing and totally mastering the programming language.

Even if World of Warcraft Programming is more than 4 years old it is not that outdated. A lot of stuff has been never changed since wow was released. Especially if it comes to the basics of addon development. It delivers an easy to use introduction to the 3 relevant topics: lua, the api, and the addon development process itself. I would say it should serve well to a total beginner who don't wants to dig out all the stuff individually from the web.

So, if you'are a person who loves to learn from a single and well-structured source then read the book. (The drawback is, that parts of it could be kind of outdated/incomplete, and you'll have to work through stuff you don't really care about or that you allready know.)
If you don't need detailed step for step guidance, and would like to decide what you'll learn first and what's important for you, then reading a basic introduction to lua and some "how to make an addon" guides, and then steping into the development of some small addons on your own could be a the better decision.

However ... the best way to learn something is to do it - not to read about it.

Last edited by Duugu : 07-02-14 at 03:41 PM.
  Reply With Quote
07-02-14, 03:53 PM   #13
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,857
Before writing anything, install BugSack.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-02-14, 05:37 PM   #14
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Thank you very much both of you. I purchased an online example of the wowprogramming book, so far i'm happy about it. It is straight forward and easy to understand, specially because i have a little bit of coding experience in advance, so i don't really need to struggle that much to understand the principle of a for loop.

That being said, i will read the book through - and if i stump upon outdated code i will either ask for guidance here or try to research for it.

However though, instead of starting yet another thread once the book is read (i believe over this weekend) i'd like to see someone post some AddOn ideas i can start making once the book is done. It could be anything, and i came across a few ideas myself:

With the use of slash commands, count the amount of items in my bags and post it to a seperate frame that will appear for e.g. 10 seconds. (Yes, it's completely useless - but i think that these useless things always are great places to start.)

Once the above is made, create a button inside my bag that can order the items alphabetically.

Add a search function to search for a specific item in bags.

i am though not yet sure if any of the above is impossible, but they seem as valid starting points.

Will take a look at bugsack aswell!
  Reply With Quote
07-02-14, 07:17 PM   #15
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
A basic configuration UI to be re-used for all of you upcoming addons could be good starting point too. And it's a good exercise to become familar with frame/textures/etc. handling

Last edited by Duugu : 07-02-14 at 07:21 PM.
  Reply With Quote
07-03-14, 03:11 AM   #16
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Originally Posted by Duugu View Post
A basic configuration UI to be re-used for all of you upcoming addons could be good starting point too. And it's a good exercise to become familar with frame/textures/etc. handling
Great idea with the configuration UI.

The other thing you say is exactly what i'm thinking about, A button, A frame, A search field and then i will use things such as DropDown menu's to select in which order the items should be sorted: Alphabetically, by Type, by Rarity, etc.

Let me understand this correctly:
Frames are where everything is positioned and inside these frames we can add textures.
Textures are everything that contains a texture of any sort - Buttons, Self-Made items to click, etc.
They can both be modified and both be user-interactive.
  Reply With Quote
07-03-14, 08:03 AM   #17
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Codelogic View Post
Great idea with the configuration UI.

The other thing you say is exactly what i'm thinking about, A button, A frame, A search field and then i will use things such as DropDown menu's to select in which order the items should be sorted: Alphabetically, by Type, by Rarity, etc.

Let me understand this correctly:
Frames are where everything is positioned and inside these frames we can add textures.
Textures are everything that contains a texture of any sort - Buttons, Self-Made items to click, etc.
They can both be modified and both be user-interactive.
A frame is generic UI element. It can act as a container (parent) for frames (childs) and other types UI elements or as a single UI element. The complete wow UI is build of (stacked) frames. All top level UI elements - provided by wow or by addons - are childrens of a single root frame: UIParent.
A classic configuration UI would be comprised of a "main" frame (a container) that is a child of UIParent and a lot of frames and other elementes (widgets) that are childs of the "main" frame.

A texture is a UI element that displays an image file (from disk or memory). It's always a child of a generic UI Elemente like a frame or a button.

All UI elements do provide attributes, methods, and handlers. Some of them are common for (almost) all element types - like the Show()/Hide() method or the anchor attribute. Some of the methods and attributes are specific. Like the OnClick handler. A frame provides an OnClick handler, a texture does not.

Last edited by Duugu : 07-03-14 at 08:09 AM.
  Reply With Quote
07-03-14, 08:24 AM   #18
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
You may be interested in the Widget Hierarchy and Widget API

  Reply With Quote
07-03-14, 11:42 AM   #19
Codelogic
A Deviate Faerie Dragon
Join Date: Jul 2014
Posts: 12
Thanks for the explanation Duugu and thanks for the Widget Hierarchy ketho!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Getting started - Help appreciated :)

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