Thread Tools Display Modes
09-09-10, 03:34 PM   #1
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
Load addon from 1 toc

I was wondering if it was poissiable to load addon's from 1 toc.
What I mean is, I have a hunter, druid, and shaman. I have addons that I use for each but not for all 3. So could I call all the addons for a specific toon from 1 toc.


Example

c:\WoW\Interface\Addons\Shaman\
Shaman.toc

## Interface: 40000
## Title: Shaman Addons
## Notes: blah blahI

addons\Skinner\Skinner.toc
addons\Skinner\skinner.lua
addons\DBM\core.lua
addons\DBM\frame.lua
addons\DBM\DBM.toc



If you see what I mean create 1 folder with all the addons contained in them and then call the addons from 1 toc file.

Then when i logged in if i hit the addons button i would see 3 options
Shaman
Hunter
Druid

And i could just enable the proper "set"
  Reply With Quote
09-09-10, 04:06 PM   #2
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Yes that would work. however with addons such as oUF that requires it's core to work you need to embed it properly.

And props on a good idea
__________________

  Reply With Quote
09-09-10, 04:29 PM   #3
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
Thanks. Gonna Work on it tonight. Im just thinking saved vars may be a issue.
  Reply With Quote
09-09-10, 04:38 PM   #4
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
As long as you include the savedvariables needed to be saved (copy from the original toc's) you should be fine.
__________________

  Reply With Quote
09-09-10, 05:00 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Why do you need this? If you want to load addons A and B on character X, but addons B and C on character Y, and addons A and C on character Z, just hit "Disable All" at the addons screen, then select each character from the dropdown at the top, and selectively enable the addons you want for that character. Using the default methods to enable different addons on different characters is (a) faster, (b) less work because it doesn't require copying and pasting, or deleting and creating files, and (c) easier to update in the future if you decide character X needs addon C after all, or if you install a new addon.

That aside, calling one addon's TOC from another addon's TOC does nothing. WoW just ignores it. You'd need to copy ALL of the file listings from the original TOC and paste them in yours, as well as merge in all of the saved variables lines.

Another issue you'd likely run into is that addons written (or updated) for WoW 3.3 often make use of the addon namespacing feature added in that patch, and are likely to use generic names in their namespace, expecting it to be private to their addon as they wrote it. For example, "db" or "L". Unless you modified the addons to rename these namespace values, you'd encounter errors as one addon's value overwrote another.

Finally, you'd only be able to use this setup for yourself, as copyright and license terms would prohibit you from distributing a "single addon" version of multiple addons, unless they were all licensed under identical terms which allowed such distribution (eg. the GPL).
  Reply With Quote
09-10-10, 05:44 AM   #6
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
Thank You for the info Phanx,

I figured it would be a bear of a task for me to do, I wasn't 100% sure if it was something i wanted to do anyway. If i do decide to take the time to do it I would never " Release it to the public" Although all the addons I do use I already have the original author's consent to redistribute.
  Reply With Quote
09-10-10, 06:08 AM   #7
break19
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 116
Originally Posted by nobgul View Post
Thank You for the info Phanx,

I figured it would be a bear of a task for me to do, I wasn't 100% sure if it was something i wanted to do anyway. If i do decide to take the time to do it I would never " Release it to the public" Although all the addons I do use I already have the original author's consent to redistribute.
Or, you could make em an all-in-one addon, with subroutines for each class, and use:
Code:
if (select(2, UnitClass("player"))) ~= "ROGUE" then
for a rogue, for example. Then you'd have one addon, and it would then just call the appropriate subroutine(s) for the class.
__________________
My daddy always told me, "Son, you can't fix stupid, and to try is stupid in itself"
  Reply With Quote
09-10-10, 03:32 PM   #8
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
Originally Posted by break19 View Post
Or, you could make em an all-in-one addon, with subroutines for each class, and use:
Code:
if (select(2, UnitClass("player"))) ~= "ROGUE" then
for a rogue, for example. Then you'd have one addon, and it would then just call the appropriate subroutine(s) for the class.
You Know thats how I setup my AbilitySayings addon. Didint even think of it 0_o.. Thanks
  Reply With Quote
09-11-10, 07:24 AM   #9
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
You can create 1 addon and include 3 addons in it, but you must consider the savedvariables used by the other addons (for saving their settings) and properly include all their libraries and such.
  Reply With Quote
09-11-10, 07:26 AM   #10
break19
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 116
Originally Posted by Vladinator View Post
You can create 1 addon and include 3 addons in it, but you must consider the savedvariables used by the other addons (for saving their settings) and properly include all their libraries and such.
IIRC, you can just include the proper files in the savedvariables token in the toc, and you're golden.

In theory anyway. lol
__________________
My daddy always told me, "Son, you can't fix stupid, and to try is stupid in itself"
  Reply With Quote
09-11-10, 08:28 AM   #11
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Why not make an addon that iterates over all the addons you have installed, and check if it should be loaded by having a table with the addons you want loaded for your class / playername?

EDIT: LOD addons would be a problem however :/
  Reply With Quote
09-11-10, 08:36 AM   #12
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
Like Addon Loader?

And then adding into each of the class-specific addons toc (Wiki Page):
## LoadManagers: AddonLoader
## X-LoadOn-Class: Rogue

I'm using this system in all of my addons for speeding up loading screen by loading on demand / delayed.

On topic: If you move addons into a single addon, you'd need to take care of the paths from the textures / fonts provided by the addon, if any.
__________________
« Website | GitHub »

Oh hai!
  Reply With Quote
09-15-10, 11:04 PM   #13
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
Cargor,

Thank you this is 100% what I was looking for. It should solve my needs.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Load addon from 1 toc

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