These forums are in read-only mode. Please see this news post for more information.
New forums can be found here
|Addon Ideas Present your ideas for new addons.|
Join Date: Dec 2007
Objective Tracker Replacement [planning]
Right, so I'm in the process of rebooting an old project of mine, starting from scratch. Figured I'd share some of my plans regarding design philosophy, because doing so would present me with the opportunity of perspective. And such is always nice. Anyway, on to it, although if it ends up being somewhat incoherent, it could be due to sleep deprivation. I blame the weather.
Righto. So I'm planning on making it modular, and making it possible to plug in to the addon. Before I detail this more, I should probably discuss the core a bit more.
I'm planning on splitting the core addon three-ways. One part specializing in handling the widgets, one part specializing in config options, and one part for tying it all together.
The widget part will deal with linking frames together, sorting them, recycling. All that fun stuff. I have that one mostly figured out. It will have widgets grouped into custom objects in a hierarchy following something akin to: tracker frame > module frame > object > objective. Only this part of the code will directly modify the widgets. The 'core core', config manager or plugins will only be allowed to do so via internal addon functions.
As for the config part, there is not really much to say. AceConfig options table, where plugins will have some predefined config options, it will then be expanded to include a table of config options specific to that plugin. For the latter, plugins will be responsible for handling their own specific options table in terms of getter/setter functions, and as such also storing the actual config values.
So, like I mentioned, the core would then be responsible for tying these things together. Essentially, a plugin would register with the core, passing along a name and an optional partial options table. The core will then create a module frame object for it, keep a local reference to it, and spit back an object with a metatable set to it that contain an __index entry for the relevant functions. It will not be given a reference to its gui widget, because we can't go around breaking abstraction.
Some of the functions it would be given would deal with adding/removing objects/objectives, triggering resorting based on custom sort fields. I may also want to give plugins the ability to add stuff to the addon's LDB label.
And to briefly retouch the gui widget thingies, all but objectives are likely to be uniform, with objectives being able to have different styles. What currently comes to mind being description-only, statusbar, and counter (left-hand description, right-hand counter.)
Admittedly, there are a whole range of details omitted, but then again, this post is intended to deal with the more overarching stuff.
Before I attempt to pass out again, some of the indented plugins are, well, the obvious: quests, achievements, dungeons - the stuff currently covered by the objectives tracker. Only pwettier, hopefully. And will probably expand to make a daily/weekly tracker as well, which will have some predefined sets, that will account for quests that may vary on a daily basis, as well as the option to add more under the provision the quest id is known.
Right. Thoughts or requests for clarification are welcome.
Edit: Is this in the proper subforum, though? It seems it's more an addon idea than lua discussion, anyway. Aah! Halp!
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
All times are GMT. The time now is 11:58 PM.