Thread Tools Display Modes
07-14-12, 12:31 PM   #1
Tituspullo_x
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 1
oUF Reference or Tuts

Hey,

Just trying out a couple things with oUF.

Is there a more complete reference or anything on how things work?

Just starting this out is pretty confusing, is the only way to figure out how this works either dig through all the core code and look at other peoples layouts and things?

The wiki linked is pretty incomplete, and haven't seen any good tutorials or anything.

How did you guys learn the ins and outs of oUF, was it just spending lots of time looking through the code and others code?
  Reply With Quote
07-14-12, 01:01 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
oUF is under construction when it comes to documentation, but the end result will be documentation in the files themselves, or some generated pages from that.

As for learning how it works is just looking at other people's layouts or just use Lua like normal.
  Reply With Quote
07-14-12, 04:54 PM   #3
Paopao001
A Fallenroot Satyr
 
Paopao001's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 20
Smile

If you are in live realms, oUF_Classic, oUF_Lily, oUF_Simple2 are some of the tutorial layouts for oUF.

You can find a list of HOW TOs with building the basic things of a layout in oUF_Simple2.

Besides, you can start with any layouts you like, too.
But it would be better for you to start with something easy and familiar to you.

If you are in beta realms, oUF_Simple(mop) is a reference layout for beginners.

After knowing the basic things,learning from every most downloaded layouts would surely help you to improve your own.
__________________

I hope you could understand my broken English.
If I offended you it was unwitting.
  Reply With Quote
07-14-12, 11:19 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you are new to Lua programming, new to WoW addon programming, or even just new to oUF layout programming, I would not recommend oUF_Simple as a good starting point. No offense to zork, but it's massively complicated. I've been writing addons for 6+ years, and maintain some very popular ones (including Grid), but it would take me hours of reading through oUF_Simple just to get to a point where I felt like I had an okay grasp on what was going on throughout the huge, convoluted, split-up codebase.

If you want to write your own layout from scratch, start with oUF_Classic or oUF_Lily. Both are very simple, have everything in one file, use only the core oUF elements, and do not use any third-party libraries, plugins, or modules. It's easy to see how each part works, and how all the parts work together. I'd recommend avoiding complex things like rune and totem displays until you have a solid grasp on the basic things like health bars and text.

If you're already using a layout and just want to change a few things, start there. Identify something you want to change -- preferrably something small -- and then try to change it. If you're having trouble finding which part of the code you need to change, or which functions to use, check out some of these resources, and then post your specific question here and ask for help.
__________________
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
07-15-12, 12:25 AM   #5
Paopao001
A Fallenroot Satyr
 
Paopao001's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 20
Well, people have different characteristics in the way of thinking and coding.
Hope you will find what fits you ~
__________________

I hope you could understand my broken English.
If I offended you it was unwitting.
  Reply With Quote
07-15-12, 09:55 AM   #6
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Sry Phanx but I think different on that point. Splitting up code into small pieces that are connected to each other makes it way easier to maintain the code compared to a big chunk of code where everyhting is in one file. Following function calls isn't hard at all.

Nevertheless...that is my opinion. Everyone can have their own.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-15-12 at 09:59 AM.
  Reply With Quote
07-15-12, 01:17 PM   #7
kaels
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 46
I actually found Simple far, far easier to follow than Classic when I was first poking around.

Looking at Classic and Lily again now that I can actually read the code properly, and...yes, I still find Simple easier.

I think splitting it up into separate files makes it easier to follow. One file provides configuration data. Another file creates functions to construct frames using that config data. A third file creates styles out of those functions and then works with oUF to construct frames using those styles. The function of each file is pretty clear; the function of various blocks of code in a single-file layout is much less clear to me.

But I'm sure it depends on personality. Some people have different mental organizational structures.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF Reference or Tuts


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