Thread Tools Display Modes
06-22-10, 01:08 PM   #1
shkm
A Chromatic Dragonspawn
 
shkm's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 186
Question Addons.txt: Now how does that work?

Does anyone know how WoW decides which addons to load for all characters, provided those individual characters do not have an opposing state set in the Addons.txt file? I ran some tests but they left me perplexed.

What I noticed:
  • Logging in on a fresh realm will create a full list of addons and their states (disabled/enabled) and store it in Addons.txt on only one character. This character needs not be the one logged in on. I don't know how WoW picks the character.
  • Other characters' Addons.txt files consist only of the addons they explicitly enable/disable. This is logical.

The first character's Addons.txt could potentially be considered a master file, but there are at least two issues with this:
  • There seems to be no way to check which character's Addons.txt should be the master
  • Multiple characters can have the same addon listed as enabled or disabled

Which leads us to possible solutions:
  • The character with the most addons listed in Addons.txt gets global settings. This is plausible because all addons will be listed on the master, whether enabled or disabled. It's implausible, however, because multiple characters can have all addons listed
  • There's a file somewhere which defines which character's Addons.txt to use for global settings (this contradicts other things, though)
  • File creation date. The earliest would be the master file

I also noticed that the system is pretty easy to break. I can't remember exactly how, but I managed to get WoW thinking that toggling an addon on any character would toggle it globally. This is why my solutions aren't exactly bulletproof.

So does anyone know what's going on here? Anyone know how it actually works? It would save me quite some time trying to work this out if you could share. Thanks.
__________________
Quit WoW again on 17/04/2014.

Last edited by shkm : 06-22-10 at 01:08 PM. Reason: Confusing wording
  Reply With Quote
06-22-10, 01:43 PM   #2
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
Isn't an addon enabled by default? Unless you have "## DefaultState: disabled" in your .toc.

When you disable the addon for the first time, even if only on one character, it's disabled globally.
__________________
Oh, the simulated horror!
  Reply With Quote
06-22-10, 01:48 PM   #3
shkm
A Chromatic Dragonspawn
 
shkm's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 186
Yes, but my question is more in regards to how WoW deals with other situations. If one character has an addon set to disabled but another has it set to enabled, which one is globally default? It's possible to have something globally disabled, meaning that anyone who wants to enable it can do so on a per-character basis. How would it then maintain global disabled state?
__________________
Quit WoW again on 17/04/2014.
  Reply With Quote
06-22-10, 02:27 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Doesn't it just write to each character's file that it's disabled? An easy way to test would be to disable an addon (restart the game to make sure files are written to) and then check the files themselves. You can then create a new character on the server - you'll see that all of the addons are enabled by default for that character (but still disabled for the others). Once you disable an addon for that character, it will be written to that character's file.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-22-10, 02:28 PM   #5
markv
A Fallenroot Satyr
AddOn Compiler - Click to view compilations
Join Date: Dec 2006
Posts: 27
From my experience what happens is WoW will default it to whatever you change it to the first time, no matter what character you're on, or if you've selected all.

So if you download a new addon, and then turn it off for your Hunter before doing anything else with it, it will toggle it off for all of your characters. Only after that initial time will it then save it by a per character state.

I have no idea if the state changes reset when WoW gets an update or not though, because I haven't really paid much attention to it during that.

This is just what I have found from my own personal experience.
  Reply With Quote
07-17-10, 09:35 AM   #6
shkm
A Chromatic Dragonspawn
 
shkm's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 186
Thanks for the responses! Totally forget about this thread! I'll be using some of the information here, along with some extra research, once I get round to a certain project. Might be a long while.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Addons.txt: Now how does that work?

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