WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Account information code question (https://www.wowinterface.com/forums/showthread.php?t=48899)

hotluck 02-03-14 08:00 AM

Account information code question
 
Hi :)

Hopefully someone can point me in the right direction on this.

I am trying to find the code WoW uses to work out the name of an account folder in WTF so it knows where to access/use the correct lua files from when the player is playing (for a person who has multiple accounts on a battle.net account). If I give an example (account names fictional for example) -

In config.wtf in the main WTF folder there is a line that reads -

SET accountList "ACCOUNT1|!ACCOUNT2|"

Now if you then look in the WTF/Account folder, you will see 2 folders -

ACCOUNT1
3468452#1

The second account folder is not the same name as the second account in the accountlist so how does WoW work it out?

Hope this makes sense to someone lol.

Amanda

Duugu 02-03-14 08:27 AM

Is this a trial account? I'm not 100% sure but I think numbers like 3468452 are used for trial accounts.

sezz 02-03-14 08:45 AM

@Duugu: Every account that has been created after the WoW/BNet merge only has numbers in it (for example: 3468452#1 = WOW1, 3468452#2 = WOW2), the numbers are AFAIK related to the BNet account. If you login with multiple BNet accounts you should have multiple folders like that with different numbers.

@hotluck: What are you trying to do? File operations aren't possible in addons.

Duugu 02-03-14 10:23 AM

Quote:

Originally Posted by sezz (Post 290401)
@Duugu: Every account that has been created after the WoW/BNet merge only has numbers in it

Ah. Oh. That explains much. ;) ty

10leej 02-03-14 10:28 AM

That's handles through the blizz launcher/battle.net desktop actually. It fetches the profile info and downloads it to the wtf.

Phanx 02-03-14 11:38 AM

Quote:

Originally Posted by 10leej (Post 290407)
That's handles through the blizz launcher/battle.net desktop actually. It fetches the profile info and downloads it to the wtf.

You can still log in directly from the game client; WoW itself (without any launchers) can distinguish between multiple WoW accounts on your Battle.net account.

Quote:

Originally Posted by hotluck (Post 290399)
I am trying to find the code WoW uses to work out the name of an account folder in WTF so it knows where to access/use the correct lua files from when the player is playing (for a person who has multiple accounts on a battle.net account).

1) Addons have no access to, or even awareness of, individual files, so you cannot "access" or "use" any Lua files. You can only access data (such as tables, functions, or strings) that have been loaded into the UI scripting environment by an addon, and you can only load an addon as a whole, not by its individual files.

2) Each WoW account gets its own set of saved variables; only the most basic game client settings (eg. resolution, sound settings, some Blizzard interface options) are shared with other WoW accounts, but those are shared with any account that logs in using that installed copy of the game, not just with other WoW accounts on the same Battle.net account.

Quote:

Originally Posted by hotluck (Post 290399)
The second account folder is not the same name as the second account in the accountlist so how does WoW work it out?

Information doesn't have to be available to addons to be available to WoW. Account names join a long list of other things -- like Real ID names, the exact coordinate locations of mobs, the exact position of tracking dots on the minimap, etc. -- that are not available to addons.

Even if you can make use of the WOW1 and WOW2 names somehow, looking at the accountList CVar would not help if you wanted to log into both accounts at the same time, since nothing (eg. which account was last logged in) is written out to the file on disk until you log out or exit the client, so unless you wanted to (and could consistently remember to) log in, then out, then back in on the first account before logging in on the second account, both clients would load with the same version of Config.wtf.

Rather than asking about the technical details of a particular implementation (which in this case doesn't sound like it's even possible) you'll get more useful replies if you actually describe what you want to do. Instead of asking how to calculate the value of Y at any value of X along a sine curve, just ask how to make an icon bounce up and down.

10leej 02-03-14 02:09 PM

Ah though it was handled through the launcher that process doesn't end when you launch the client.

Phanx 02-03-14 05:00 PM

If you do it from the launcher, it is. But, you can also open the game client (Wow.exe or Wow-64.exe) directly, without any launcher running at any point, and log in from there.

Though, likely nobody does this anymore... I used to do it beacause the WoW Launcher was horrible and messed with WoW folder and file attributes, and didn't actually offer any benefits. However, the new Battle.net launcher not only doesn't break things on my filesystem, but it also saves me from having to type in my password ever again! :P

sezz 02-04-14 12:45 PM

Quote:

Originally Posted by Phanx (Post 290418)
However, the new Battle.net launcher not only doesn't break things on my filesystem, but it also saves me from having to type in my password ever again! :P

You're lucky - every now and then I get a folder called "(null)" in WTF/Account or WTF/Account/AccountName/Server or an empty and useless SavedVariables folder in WTF/Account...

But that's propably a 64 bit WoW bug in Windows, not a launcher problem. I don't get the (null) folders in OSX and I didn't get them when using the 32 bit WoW client before the Battle.net launcher beta started (I also didn't use the "old" launcher).

Phanx 02-04-14 01:23 PM

Quote:

Originally Posted by sezz (Post 290427)
You're lucky - every now and then I get a folder called "(null)" in WTF/Account or WTF/Account/AccountName/Server or an empty and useless SavedVariables folder in WTF/Account...

Well, it does do that, but that isn't re-showing hidden files, removing read-only and system file attributes (which also removes the custom icons I've set on some folders, among other things), or doing anything else that actively interferes with the desired operation of my filesystem or other programs. Annoying, yes, but not actually breaking. :p

hotluck 02-05-14 10:15 AM

Thanks for the replies guys :)

I use the addon altoholic which I love, but the only way to have up-to-date info available for both my accounts is to log them both in and use the share option from both sides which takes time.

My idea was to create an addon that worked in conjunction with altoholic that would hold the info of all the user's multiple accounts and be able to merge the info from all the accounts automatically into the current account's wtf altoholic files when they logged in but from the answers you've given, I think that's not possible so I'll just have to grit my teeth and deal with alto as it is.

If anyone has any other ideas about being able to do this within the addon lua limitations I would appreciate it otherwise thanks for the help :)

Amanda

Lombra 02-05-14 10:26 AM

There is an out-of-game way to achieve this BUT it will only work as long as you do not login on both accounts at the same time. If you do, bad things will happen, and horrible things can happen. (as far as your saved variables go, at least) You can use symbolic links to have both accounts use the same account folder. It's not viable in most cases, but just throwing it out there in case you actually don't ever use both accounts at the same time.


All times are GMT -6. The time now is 07:48 PM.

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