Quantcast
Download
(15 Kb)
Download
Updated: 04/03/21 05:34 AM
Pictures
File Info
Compatibility:
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Updated:04/03/21 05:34 AM
Created:11/17/20 07:13 AM
Monthly downloads:15,358
Total downloads:45,420
Favorites:34
MD5:
6.3.5
LibMultiAccountSets  Popular! (More than 5000 hits)
Version: 2.0.3
by: code65536 [More]
This is a library for tracking Item Set Collection progress across multiple accounts.


Dependencies

Required:
  • None

Recommended/Optional:

List of addons that can use this library

Advanced features for users

LibMultiAccountSets has a settings panel (requires LibAddonMenu), which can be accessed either by navigating your Addons settings, or by using the /lmas chat command.

Using this settings panel, users can share their data with friends by exporting and importing data sets. This feature is designed to facilitate trading gear between players.


For example, let's say that after exploring a zone, you acquired a number of set gear pieces. After binding the ones that you have not yet collected, you are left with some extras. Are any of your friends missing those pieces? If they had shared their LibMultiAccountSets set collection data with you, you can easily check, and using the Uncollected Set Items filter plugin for Advanced Filters (which makes use of this library), you can compose a mail and filter for those items that your friend doesn't have right there in the mail composition window!



For addon developers

Mirrored functions:

The following functions mirror their built-in counterparts, except with an account parameter. If account is nil, these functions will just pass the call to their built-in counterparts.
Code:
LibMultiAccountSets.GetNumItemSetCollectionSlotsUnlockedForAccount( account, itemSetId )
* Built-in counterpart: GetNumItemSetCollectionSlotsUnlocked

LibMultiAccountSets.IsItemSetCollectionSlotUnlockedForAccount( account, itemSetId, slot )
* Built-in counterpart: IsItemSetCollectionSlotUnlocked

LibMultiAccountSets.IsItemSetCollectionPieceUnlockedForAccount( account, pieceId )
* Built-in counterpart: IsItemSetCollectionPieceUnlocked

LibMultiAccountSets.GetItemReconstructionCurrencyOptionCostForAccount( account, itemSetId, currencyType )
* Built-in counterpart: GetItemReconstructionCurrencyOptionCost

Other functions:

Code:
LibMultiAccountSets.IsItemSetCollectionItemLinkUnlockedForAccount( account, itemLink )
* Return type: boolean

LibMultiAccountSets.GetAccountList( excludeCurrentAccount )
* Return type: table/array of strings

LibMultiAccountSets.GetItemCollectionAndTradabilityStatus( accounts, itemLink, itemSource )
* itemLink can be nil if itemSource is supplied
* itemSource is a table containing bagId, slotIndex, who, tradeIndex and/or lootId and can be omitted if itemLink is supplied
* If accounts is a single account string, the return will be one of the following values:
    LibMultiAccountSets.ITEM_UNCOLLECTIBLE        -- Not a collectible set item
    LibMultiAccountSets.ITEM_COLLECTED            -- Collected by the specified account
    LibMultiAccountSets.ITEM_UNCOLLECTED_TRADE    -- Not collected by and tradeable with the specified account
    LibMultiAccountSets.ITEM_UNCOLLECTED_NOTRADE  -- Not collected by and not tradeable with the specified account
    LibMultiAccountSets.ITEM_UNCOLLECTED_UNKTRADE -- Not collected by the specified account, with unknown trade eligibility
* If accounts is a list of multiple accounts or is omitted (all accounts), the return be either:
    LibMultiAccountSets.ITEM_UNCOLLECTIBLE, if the item is not a collectible set item
    A table of status codes for each account (see above)

LibMultiAccountSets.OpenSettingsPanel( )
* Return type: N/A

Callbacks:

Event codes:
Code:
LibMultiAccountSets.EVENT_INITIALIZED
* Fired when LibMultiAccountSets has completed the initial scan of the current account's item set collection.

LibMultiAccountSets.EVENT_COLLECTION_UPDATED
* Fired when the item set collection data for the current account has been updated or when data for another account has been imported.
The functions for registration and unregistration mirror the syntax for the in-game RegisterForEvent and UnregisterForEvent:
Code:
LibMultiAccountSets.RegisterForCallback( name, eventCode, callback )
* Return type: boolean

LibMultiAccountSets.UnregisterForCallback( name, eventCode )
* Return type: boolean
  • Version 2.0.3 (2021/03/28)
    • All excluded accounts will now be deleted from the addon's data, rather than being deleted only when the user logs in with that account; this brings the behavior of this feature to parity with LibCharacterKnowledge and allows a way for users to delete imported data for accounts that they do not control

  • Version 2.0.2 (2021/03/22)
    • For addon developers: Added GetRawData and SetRawData

  • Version 2.0.1 (2021/03/16)
    • Fixed a rare issue that could potentially cause data imports to fail

  • Version 2.0.0 (2021/03/04)
    • Internal code restructuring
    • Improved the handling of trade eligibility during the period of time after a BoP-tradeable item's eligibility has expired but before the game recognizes that the item has been bound
    • LibMultiAccountSets will now retain a record of when an account was last scanned, and this data is used by the export/import data sharing feature to protect imports from overwriting newer data with older data; unfortunately, this required a change in the format of the exported data, and the exported data generated by older versions of LibMultiAccountSets is not compatible with version 2.0 and vice-versa, so two users who wish to share data with each other should both update to the latest version
    • The export/import user interface for LibMultiAccountSets can now be used to import data for LibCharacterKnowledge and vice-versa
    • Improved the messaging that users see when importing new accounts
    • For addon developers: Added GetLastScanTime

  • Version 1.7.1 (2021/01/06)
    • Added French localization by @jakez31

  • Version 1.7.0 (2021/01/01)
    • For addon developers: Reworked GetItemCollectionAndTradabilityStatus
    • For addon developers: Added OpenSettingsPanel

  • Versions 1.6.0 to 1.6.1 (2020/12/29)
    • For addon developers: Added GetItemCollectionAndTradeStatus

  • Version 1.5.0 (2020/12/08)
    • The export/import data sharing feature will now use account names in an "undecorated" format to avoid the problem of Discord converting account names into Discord usernames; unfortunately, this required a change in the format of the exported data, and the exported data generated by older versions of LibMultiAccountSets is not compatible with version 1.5 and vice-versa, so two users who wish to share data with each other should both update to the latest version

  • Version 1.4.1 (2020/12/04)
    • The LibMultiAccountSets addon settings panel now includes a hint about the availability of an optional chat command to access the settings panel

  • Version 1.4.0 (2020/12/03)
    • Reorganized the LibMultiAccountSets addon settings panel
    • Added a third export option for the data sharing feature, to export the data for a persistent list of selected accounts; by using this new export option, users with multiple accounts can easily share their accounts' data without inadvertently re-exporting their friends' data

  • Version 1.3.3 (2020/11/30)
    • Increased the number of accounts that can be excluded from being saved

  • Version 1.3.2 (2020/11/28)
    • Outdated addons attempting to call a discontinued function will now fail gracefully instead of throwing a Lua error

  • Version 1.3.1 (2020/11/27)
    • The export function of the data sharing feature will now automatically select the export data text to facilitate copying to the clipboard

  • Version 1.3.0 (2020/11/25)
    • For addon developers: Added GetItemReconstructionCurrencyOptionCostForAccount
    • For addon developers: Removed AddAccountsCollectionStatusToTooltip

  • Version 1.2.0 (2020/11/21)
    • For addon developers: Addons using LibMultiAccountSets can now register for callbacks; see the LibMultiAccountSets web page for documentation

  • Version 1.1.0 (2020/11/18)
    • The export/import data sharing feature now includes a more robust check for data integrity; unfortunately, this required a change in the format of the exported data, and the exported data generated by LibMultiAccountSets version 1.0 is not compatible with version 1.1 and vice-versa, so two users who wish to share data with each other must both update to version 1.1
    • Added an option to change the colors of the account collection status text that can be added to item tooltips by addons using LibMultiAccountSets

  • Version 1.0.0 (2020/11/17)
    • Initial version
Optional Files (0)


Archived Files (16)
File Name
Version
Size
Uploader
Date
2.0.2
15kB
code65536
03/22/21 11:40 AM
2.0.1
15kB
code65536
03/16/21 06:11 PM
2.0.0
15kB
code65536
03/04/21 11:16 AM
1.7.1
11kB
code65536
01/06/21 07:13 AM
1.7.0
9kB
code65536
01/01/21 08:43 AM
1.6.1
9kB
code65536
12/29/20 08:19 AM
1.5.0
8kB
code65536
12/08/20 02:14 AM
1.4.1
8kB
code65536
12/04/20 01:31 PM
1.4.0
8kB
code65536
12/03/20 05:25 PM
1.3.3
7kB
code65536
11/29/20 11:49 PM
1.3.2
7kB
code65536
11/28/20 02:28 AM
1.3.1
7kB
code65536
11/27/20 07:22 AM
1.3.0
7kB
code65536
11/25/20 09:11 AM
1.2.0
7kB
code65536
11/21/20 04:06 AM
1.1.0
7kB
code65536
11/18/20 06:43 AM
1.0.0
6kB
code65536
11/17/20 07:20 AM


Post A Reply Comment Options
Unread 03/22/21, 04:50 PM  
mjbc

Forum posts: 0
File comments: 2
Uploads: 0
Originally Posted by code65536

Yea, a separate addon would be more resilient than modifying LMAS's directly. To that end, I added GetRawData and SetRawData to LMAS-2.0.2.

GetRawData takes account and a set ID as parameters and returns the raw data for that set (the full 36-bit bitfield, as a Lua number, not ZOS's id64). If it fails for any reason, it will return nil.

GetRawData takes account, a set ID, and a 36-bit bitfield (as a regular Lua number, not ZOS's id64) as parameters. It returns true if it succeeded and false if it failed. GetRawData can only be used to set data for an account that is not the currently-logged-in account.



Side note: The reason LMAS does data sharing with a full data set is that it's complicated to define what data is "new", since that requires knowing how old the other person's data is. Was that person's copy of your data last updated yesterday? Or a week ago? And if there are multiple people that you're trying to share with, then there needs to be a way to track that for each person. Sharing the full data set each time avoids all these thorny questions.
Thanks man, I'll check it out.

I understand the reasoning behind a full sync, I had to break it up into smaller pieces because of the length. A full set is too big to be sent by whispers, well, at least fast and without being kicked. I also tried with pings, but... that was even worse. Since I only share this data with my GF and she with me, it's easy to track what's new. The way I do it is, when someone syncs the data, it resets the "new" items, then as they bind them, the items get added to the collection of new items to be sync'ed.

Anyway, thanks for the functions, and thanks for the addons!
Last edited by mjbc : 03/22/21 at 04:54 PM.
Report comment to moderator  
Reply With Quote
Unread 03/22/21, 11:49 AM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 214
Uploads: 27
Originally Posted by mjbc
Hey there,

Are there any plans to create public methods for changing the saved data?

Back in 1.7.0 I made a fork of your code, for my personal use, so I can sync data with my girlfriend, I save the sets and items changed since last sync and send it through multiple whispers, usually 3 or 4, nothing that will kick me from the game.

I want to do a separate addon but there's no way (at least that I know of) to tell LibMultiAccountSets to save certain Data. I don't send the entire sync data like the import/export, but rather each changed set encoded info.

Let me know if there are any plans for that in the future.

Thank you for your work!
Yea, a separate addon would be more resilient than modifying LMAS's directly. To that end, I added GetRawData and SetRawData to LMAS-2.0.2.

GetRawData takes account and a set ID as parameters and returns the raw data for that set (the full 36-bit bitfield, as a Lua number, not ZOS's id64). If it fails for any reason, it will return nil.

SetRawData takes account, a set ID, and a 36-bit bitfield (as a regular Lua number, not ZOS's id64) as parameters. It returns true if it succeeded and false if it failed. SetRawData can only be used to set data for an account that is not the currently-logged-in account.



Side note: The reason LMAS does data sharing with a full data set is that it's complicated to define what data is "new", since that requires knowing how old the other person's data is. Was that person's copy of your data last updated yesterday? Or a week ago? And if there are multiple people that you're trying to share with, then there needs to be a way to track that for each person. Sharing the full data set each time avoids all these thorny questions.
Last edited by code65536 : 03/23/21 at 06:52 AM.
Report comment to moderator  
Reply With Quote
Unread 03/22/21, 05:19 AM  
mjbc

Forum posts: 0
File comments: 2
Uploads: 0
Hey there,

Are there any plans to create public methods for changing the saved data?

Back in 1.7.0 I made a fork of your code, for my personal use, so I can sync data with my girlfriend, I save the sets and items changed since last sync and send it through multiple whispers, usually 3 or 4, nothing that will kick me from the game.

I want to do a separate addon but there's no way (at least that I know of) to tell LibMultiAccountSets to save certain Data. I don't send the entire sync data like the import/export, but rather each changed set encoded info.

Let me know if there are any plans for that in the future.

Thank you for your work!
Report comment to moderator  
Reply With Quote
Unread 01/06/21, 05:00 PM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 214
Uploads: 27
Originally Posted by Baertram
Hey code, thanks for this library!
Just in case you want to update your description's list of adons using this library:
I'm working on an FCOItemSaver intgeration for automatic set item marking known/unknown.
FCO ItemSaver

Code:
[url ="https://www.esoui.com/downloads/info630-FCOItemSaver.html"]FCO ItemSaver[/url]
->Why is the code tag rendering urls... I've added a space after url
Okay, I've updated the addon page.
Report comment to moderator  
Reply With Quote
Unread 01/06/21, 04:32 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3440
File comments: 4160
Uploads: 66
Hey code, thanks for this library!
Just in case you want to update your description's list of adons using this library:
I'm working on an FCOItemSaver intgeration for automatic set item marking known/unknown.

Edit 20201-03-08:
FCOIS v2.0.1 added LibMultiAcountSets for the automatic set collectins marker icons now
Last edited by Baertram : 03/07/21 at 06:21 PM.
Report comment to moderator  
Reply With Quote
Unread 12/30/20, 01:49 PM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 214
Uploads: 27
Originally Posted by code65536
Originally Posted by frozenhamster
Hey, just to make sure:
The "sharing" shares a snapshot of the current locked/unlocked items. So I will have to reshare ever few days to have a somewhat updated list right?
That's correct.
Just to clarify: The data sharing feature is intended for sharing collection data with other ESO installations. If you play with multiple accounts on the same computer. Or two people take turns sharing the same computer to play their accounts, there's no need to use the data sharing feature. The collection data that's stored is available to every account on that computer and the data for a particular account on that computer is automatically refreshed and kept up to date when that account is logged in on that computer.

If you are sharing data with other people playing on their own PCs (for example, my group of friends share data with each other so we know who among us could use a duplicate piece of gear that we pick up) or if you play multiple accounts on multiple different computers, then that's where the data sharing feature comes in, to share data across different installations of ESO.
Last edited by code65536 : 12/30/20 at 01:50 PM.
Report comment to moderator  
Reply With Quote
Unread 12/30/20, 10:55 AM  
frozenhamster

Forum posts: 3
File comments: 17
Uploads: 0
Originally Posted by code65536
Originally Posted by frozenhamster
Hey, just to make sure:
The "sharing" shares a snapshot of the current locked/unlocked items. So I will have to reshare ever few days to have a somewhat updated list right?
That's correct.
Thanks. Thats what I thought. Your addon (so many of your addons actually) are absolute lifesavers. Thank you for your dedication!
Report comment to moderator  
Reply With Quote
Unread 12/29/20, 03:40 PM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 214
Uploads: 27
Originally Posted by frozenhamster
Hey, just to make sure:
The "sharing" shares a snapshot of the current locked/unlocked items. So I will have to reshare ever few days to have a somewhat updated list right?
That's correct.
Report comment to moderator  
Reply With Quote
Unread 12/29/20, 10:09 AM  
frozenhamster

Forum posts: 3
File comments: 17
Uploads: 0
Hey, just to make sure:
The "sharing" shares a snapshot of the current locked/unlocked items. So I will have to reshare ever few days to have a somewhat updated list right? Or does the link somewhat auto-update?
Report comment to moderator  
Reply With Quote
Unread 12/02/20, 06:07 PM  
jebbrown

Forum posts: 0
File comments: 13
Uploads: 0
Awesome

I sure they will all fit now! TYVM!


I can't tell you how many accounts I have or I would have to kill... your toons


Anyways, your lib is a huge help to me. Here... have a banana
Report comment to moderator  
Reply With Quote
Unread 11/30/20, 12:06 AM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 214
Uploads: 27
Originally Posted by jebbrown
This is a huge help for me as I have 3 accounts I play all the time.

But I also have a lot of storage accounts that I never actually play. I can't seem to fit them all in the 'Excluded Accounts' option box. Do I need to include the @ symbol? Without that I might be able to fit all the accounts I don't want tracked into the box.

Thanks so much for providing this
Uh... how many accounts do you have?!

Anyway, yes, the "@" is required and a name will not be recognized without it.

The text box limit had been set to 255 bytes, which would've allowed for 11 different account names, if every account name was as long as the game allowed. This limit was set arbitrarily, but it was a limit that I did not expect anyone to hit.

In any case, the limit has been increased to 4K bytes in version 1.3.3.
Report comment to moderator  
Reply With Quote
Unread 11/29/20, 03:09 PM  
jebbrown

Forum posts: 0
File comments: 13
Uploads: 0
This is a huge help for me as I have 3 accounts I play all the time.

But I also have a lot of storage accounts that I never actually play. I can't seem to fit them all in the 'Excluded Accounts' option box. Do I need to include the @ symbol? Without that I might be able to fit all the accounts I don't want tracked into the box.

Thanks so much for providing this
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.