Thread Tools Display Modes
04-12-10, 04:07 PM   #1
Mutilatory
A Murloc Raider
 
Mutilatory's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 7
Learning lua

Right, so i'm wanting to start creating addons starting with probably one of the biggest - a unit frame addon.

I was wondering where I could learn all the WoW related things and get cracking?
  Reply With Quote
04-12-10, 04:31 PM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Looking at already existing addons is what helps me a lot
After I know what commands are used I look them up at
http://www.wowwiki.com/World_of_Warcraft_API

Very well documented Frameworks are a good help, too.
The wowace-community is probably the best source for documented
wisdom and experience in addon writing.
In the beginning the ACE3-Framework http://www.wowace.com/addons/ace3/pa...tting-started/ shows what is possible and what is needed
in an addon.

Last but not least WoWInterface-Forum is full of helpful and
friendly programmers who tried everything you dream of already
and share their gathered knowledge happily

Edit: A good start to see what problems and solutions are found with unit frames search this
forum for posts of Grimsin ... his threads have really useful and interesting info in regard of unit frames.
__________________
The cataclysm broke the world ... and the pandas could not fix it!

Last edited by Rilgamon : 04-12-10 at 04:36 PM.
  Reply With Quote
04-12-10, 04:34 PM   #3
Mutilatory
A Murloc Raider
 
Mutilatory's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 7
Thanks

When I download Ace3, Is the file an addon in itself or just librarys?
  Reply With Quote
04-12-10, 04:35 PM   #4
roeddog
Premium Member
Join Date: Sep 2008
Posts: 14
try these from Amazon.com

Hacking World of Warcraft (ExtremeTech) by Daniel Gilbert and James Whitehead II (Paperback - June 5, 2007)

World of Warcraft Programming: A Guide and Reference for Creating WoW Addons by James Whitehead II and Rick Roe (Paperback - Feb. 8, 2010)

Beginning Lua with World of Warcraft Add-ons by Paul Emmerich (Paperback - July 29, 2009)

or these free references
http://www.wowwiki.com/Lua
http://www.lua.org/
http://lua-users.org/wiki/SampleCode

hope this helps to get you started
  Reply With Quote
04-12-10, 04:42 PM   #5
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
One tip: Don't start with unitframes.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
04-12-10, 04:47 PM   #6
Mutilatory
A Murloc Raider
 
Mutilatory's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 7
Originally Posted by nightcracker View Post
One tip: Don't start with unitframes.
Okay, off the menu. How about something which displays a texture at different sizes? Sounds easy enough.
  Reply With Quote
04-12-10, 04:51 PM   #7
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Originally Posted by Mutilatory View Post
Thanks

When I download Ace3, Is the file an addon in itself or just librarys?
Both. A library is just a special version of an addon. Some libraries are
"standalone" libraries and some need to be called from an addon.

Ace3 can be used in both ways. When you install it standalone you will
find it in your addon-list. But its not doing much. IMO addons should come
with all libraries they need and standalone libs is not really a good idea.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
04-12-10, 05:31 PM   #8
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
http://www.wowinterface.com/forums/s...ad.php?t=24776

Good Guides
http://lua-users.org/wiki/TutorialDirectory
http://www.lua.org/pil
http://wowprogramming.com/

API References
http://wowprogramming.com/docs
http://www.wowwiki.com/Api

Weird stuff but sometimes useful (although most guides in there are out of date)
http://www.wowwiki.com/HOWTOs

If all else fails and your really stuck
Make a thread here or go to the WoWUIDev IRC Channel.
  Reply With Quote
04-12-10, 05:39 PM   #9
Mutilatory
A Murloc Raider
 
Mutilatory's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 7
Thing is, from the looks of it most of that just teaches me syntax. I can get my head around syntax without a guide. I want a guide in particular to show me how to do things like:

How to show a texture onscreen with a variable size.
  Reply With Quote
04-12-10, 05:44 PM   #10
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
I learnt via example and used a combination of the wowwiki site and other addons that did some of what I wanted.
__________________
  Reply With Quote
04-12-10, 05:56 PM   #11
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Originally Posted by Mutilatory View Post
Thing is, from the looks of it most of that just teaches me syntax. I can get my head around syntax without a guide. I want a guide in particular to show me how to do things like:

How to show a texture onscreen with a variable size.
The only thing thats gonna do that is the "World of Warcraft Programming" book, I would personally advise rooting around in other peoples code and see what makes it tick.
  Reply With Quote
04-12-10, 06:02 PM   #12
Mutilatory
A Murloc Raider
 
Mutilatory's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 7
Originally Posted by Slakah View Post
The only thing thats gonna do that is the "World of Warcraft Programming" book, I would personally advise rooting around in other peoples code and see what makes it tick.
Unfortunately, I see the code, then I think what is making that work and it's an endless cycle. Anyway, I think i'll invest in that book to add to my growing pile of programming books. Thanks a bunch for your time folks

One last thing though, would it be possible to emulate the object selection circle?

Basically, I want a texture to be displayed at the feet of the character, but to also scale with camera angle, similar to the object selection circle.

Last edited by Mutilatory : 04-12-10 at 06:19 PM.
  Reply With Quote
04-12-10, 06:34 PM   #13
lilsparky
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 117
Originally Posted by Slakah View Post
I would personally advise rooting around in other peoples code and see what makes it tick.
yeah, same here. the wowwiki api/widget pages are good reference, too.

find an addon that does something relatively simple, then monkey around with it to see if you can get it to do something else or look some other way.

be careful, too, when looking at addons that use libraries like ace. they can often confuse you by looking sort of like the normal api. best to learn the api directly, then learn the libraries that make it all easier, imo.
  Reply With Quote
04-12-10, 07:26 PM   #14
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by Mutilatory View Post
Unfortunately, I see the code, then I think what is making that work and it's an endless cycle. Anyway, I think i'll invest in that book to add to my growing pile of programming books. Thanks a bunch for your time folks

One last thing though, would it be possible to emulate the object selection circle?

Basically, I want a texture to be displayed at the feet of the character, but to also scale with camera angle, similar to the object selection circle.
I was like that once.

I would look at the code then compare the functions to what wowwiki says it does. It does make sense after a while but it took me some time to get to grips with it.

Even now I have wowwiki bookmarked to call on to grab those functions out. And the book mentioned has a companion website which I frequent alot too. Which looking at the links given already is one of the wow api links.

Start off with something simple and let it grow.

Once you have a basic addon project set up that runs with minimal structure you can reuse it for your next projects tweaking it to suit its needs.
__________________
  Reply With Quote
04-12-10, 07:44 PM   #15
Mutilatory
A Murloc Raider
 
Mutilatory's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 7
Right, if someone could answer my previous question it'd be much appreciated.

However, i'd like to know a few addons which are Ace etc free, so basically only blizzards API in use. Thanks for all the help by the way
  Reply With Quote
04-12-10, 07:53 PM   #16
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
As far as I understand your question it sounds like you are wanting to draw a circle in the 3D game environment ? If that is the case it isn't possible. At least as far as I am aware.

As to addons without ace being used, there are quite a few. All of my own in fact are ace free apart from the LDB one ( basically due to myself still learning how the menu creation system works ). If you wanted to take a look at them I would suggest the LootAlerter one as that one has grown up with me as I have learned new things. Download via the archive and play with 1.01.00 for my first stab at its functionality and then look at the changes I made as I progressed through. It may not be as great as a lot of the addons out there but if you need a somewhat simple example with some programming notes in it then that might be what you want to look at.
__________________
  Reply With Quote
04-12-10, 08:03 PM   #17
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
While it would be impossible to actually draw onto the 3D space, I think he's asking about drawing a texture to emulate the appearance based on camera angle. A good example of that in practice is:
http://www.wowinterface.com/download...16249-AVR.html
and looking at how that addon does it may be the best way to learn how it works.
  Reply With Quote
04-12-10, 08:06 PM   #18
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Tekkubs code is usually no bull**** http://www.wowinterface.com/downloads/author-20806.html .

Basically, I want a texture to be displayed at the feet of the character, but to also scale with camera angle, similar to the object selection circle.
Atm to my knowledge theres only one mod which does this and thats AVR http://www.wowinterface.com/download...-AVR.html#info and it's not a small task doing it.
  Reply With Quote
04-12-10, 08:08 PM   #19
Mutilatory
A Murloc Raider
 
Mutilatory's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 7
I now have a goal and a method.

Thanks a bunch
  Reply With Quote
04-12-10, 08:16 PM   #20
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Ah you learn something new every day ... *goes to download addon .. rofl *
__________________
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Learning lua

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