WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Learning lua (https://www.wowinterface.com/forums/showthread.php?t=31841)

Mutilatory 04-12-10 04:07 PM

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?

Rilgamon 04-12-10 04:31 PM

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.

Mutilatory 04-12-10 04:34 PM

Thanks :)

When I download Ace3, Is the file an addon in itself or just librarys?

roeddog 04-12-10 04:35 PM

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

nightcracker 04-12-10 04:42 PM

One tip: Don't start with unitframes.

Mutilatory 04-12-10 04:47 PM

Quote:

Originally Posted by nightcracker (Post 184671)
One tip: Don't start with unitframes.

Okay, off the menu. How about something which displays a texture at different sizes? Sounds easy enough.

Rilgamon 04-12-10 04:51 PM

Quote:

Originally Posted by Mutilatory (Post 184667)
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.

Slakah 04-12-10 05:31 PM

http://www.wowinterface.com/forums/s...ad.php?t=24776

Quote:

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.

Mutilatory 04-12-10 05:39 PM

Quote:

Originally Posted by Slakah (Post 184677)

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.

Xrystal 04-12-10 05:44 PM

I learnt via example and used a combination of the wowwiki site and other addons that did some of what I wanted.

Slakah 04-12-10 05:56 PM

Quote:

Originally Posted by Mutilatory (Post 184679)
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.

Mutilatory 04-12-10 06:02 PM

Quote:

Originally Posted by Slakah (Post 184682)
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.

lilsparky 04-12-10 06:34 PM

Quote:

Originally Posted by Slakah (Post 184682)
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.

Xrystal 04-12-10 07:26 PM

Quote:

Originally Posted by Mutilatory (Post 184684)
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.

Mutilatory 04-12-10 07:44 PM

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 :)

Xrystal 04-12-10 07:53 PM

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.

Akryn 04-12-10 08:03 PM

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.

Slakah 04-12-10 08:06 PM

Tekkubs code is usually no bull**** http://www.wowinterface.com/downloads/author-20806.html .

Quote:

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.

Mutilatory 04-12-10 08:08 PM

I now have a goal and a method.

Thanks a bunch :)

Xrystal 04-12-10 08:16 PM

Ah you learn something new every day ... *goes to download addon .. rofl *


All times are GMT -6. The time now is 05:17 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI