Quantcast
Saving options from multiple LOTRO instances - LoTROInterface
lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > General Authoring Discussion (L)

Reply
Thread Tools Display Modes
  #1  
Unread 02-12-2020, 07:26 PM
Hyoss's Avatar
Hyoss Hyoss is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Jan 2011
Posts: 94
Saving plugin options from multiple LOTRO clients

So I found an interesting issue with storing plugin data - I run two copies of the game at once and have two LOTRO accounts set up on one SSG account (contrary to two SSG accounts). What happens now that plugins wil try to save data in

Code:
C:\Users\%USERNAME%\Documents\The Lord of the Rings Online\PluginData\%SSG_ACCOUNTNAME%\%SERVERNAME%\AllCharacters
This causes the options to be overriden rather then merged by whichever client is closed last. I noticed this happening with Thurallor's excellent Reminders plugin.

Does somebody have an idea how to address that? Some quick LUA edit maybe?

Last edited by Hyoss : 02-12-2020 at 08:00 PM.
Reply With Quote
  #2  
Unread 02-14-2020, 12:57 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 281
Short answer: No, this can not be reasonably handled due to limits of the Lua API in Lotro - the only practical way to handle it is to move one of the subscriptions to a different account (something that only SSG can do and they may not be willing to do so).

Long answer:
The Lua API for LotRO was never intended to work with multiple subscriptions on a single account (thus there being no way to specify a Subscription scope for plugin data files). There are only three possible scopes for plugindata files, Account, Server and Character. Account scope will not work in this situation due to race conditions (one client overwriting the other) nor would Server scope values work any better if you are running the characters on the same server - the same race conditions would occur. The only possible solutions would be to make every setting Character scoped which would be undesirable for most users or to implement dynamic loading/saving of all Account/Server scoped values to eliminate the race conditions. Such dynamic loading/saving is a fairly complicated process involving a child plugin for accessing settings and is extremely error prone for novice developers (the Anthology plugin uses such a system and was a royal pain in the @#$ to implement - the only reason I did was as a proof of concept and I would never wish that project on another developer).

So, since both approaches to handling this situation via Lua have significant drawbacks, it is far better to suggest that you ask SSG to separate your subscriptions by creating a second account and moving one of your subscriptions to that account - this of course has some implications for a VIP or Premium subscription and SSG may not be willing to do it but that is by far your most likely way of handling this. Otherwise, you will simply have to use one of your subscriptions to handle settings for account-wide plugins and any time you change those settings you will have to remember to reload the plugins on the other subscription (after reloading the plugin on the subscription that is making the changes so that they get written to disk and can be subsequently loaded by the other subscription). Unfortunately, due to the way that plugindata files are cached, this method is not guaranteed to prevent race conditions unless you actually log out of the controlling character rather than just reloading the plugin(s).
Reply With Quote
  #3  
Unread 02-15-2020, 05:29 PM
Thurallor's Avatar
Thurallor Thurallor is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 183
I would suggest running the two client instances as different Windows users. Presumably that should cause the data files to be saved in the Documents folder for each user, although I haven't tried it.

If you shift+right-click the shortcut, you can choose "Run as different user", then be prompted for the username and password. I think you can also modify the shortcut so it will run as a different user when you click it normally, and you don't have to enter the username/password. Once again, I haven't tried it.

http://woshub.com/run-program-as-dif...-user-windows/

Last edited by Thurallor : 02-15-2020 at 05:34 PM.
Reply With Quote
  #4  
Unread 02-15-2020, 06:54 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 281
Quote:
Originally Posted by Thurallor
I would suggest running the two client instances as different Windows users. Presumably that should cause the data files to be saved in the Documents folder for each user, although I haven't tried it.

If you shift+right-click the shortcut, you can choose "Run as different user", then be prompted for the username and password. I think you can also modify the shortcut so it will run as a different user when you click it normally, and you don't have to enter the username/password. Once again, I haven't tried it.

http://woshub.com/run-program-as-dif...-user-windows/
That's an interesting idea. Note, you would have to also install all of the plugins (and skins, etc) that you use under that other user's documents folder since if you are running the game as a different user, the Plugins folder will also be different. Requires a little bit of prep work, but it should work. However, any plugins that you DO want to share information will no longer share information (can't have it both ways).
Reply With Quote
  #5  
Unread 02-16-2020, 07:05 PM
Thurallor's Avatar
Thurallor Thurallor is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 183
Quote:
Originally Posted by Garan
However, any plugins that you DO want to share information will no longer share information (can't have it both ways).
If it's really important, it might be doable. You could probably share directories or individual settings files between the two using by symbolic links (using the mklink command). You'd have to be sure the file permissions are set so that both users can access the files, though.
Reply With Quote
  #6  
Unread 02-17-2020, 02:58 AM
Drono Drono is offline
The Unscathed
Interface Author - Click to view interfaces
 
Join Date: Apr 2017
Posts: 18
you dont have to install the plugins again, you can just make a link to the Plugin folder, since the PluginData folder is separate - i use this for my lotro clients (tho for the whole lotro directory) because i have live client and BR installed on different drives, and it works great.
Reply With Quote
  #7  
Unread 02-19-2020, 04:19 AM
Hyoss's Avatar
Hyoss Hyoss is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Jan 2011
Posts: 94
Thanks for the ideas will be giving this a try actually.
Reply With Quote
Reply


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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] DebuffVitals - new plugin for raiding and instances Grimmerthan Released Interfaces (L) 0 09-29-2018 12:19 PM
Help with SortPack Options... get an error?? Bzufa Interface Help (L) 14 06-08-2011 11:11 AM
Shell cmd w/ multiple args MuNkEy Lua Programming Help (L) 3 03-18-2011 11:00 AM
Multiple Skindefinition.XML per UI Deewe LotRO Wish List (L) 2 09-29-2007 03:25 PM
Help with loading multiple UIs Crumby Interface Help (L) 0 07-06-2007 06:45 PM


All times are GMT -5. The time now is 01:27 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui