LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   General Authoring Discussion (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=22)
-   -   Saving options from multiple LOTRO instances (https://www.lotrointerface.com/forums/showthread.php?t=3785)

Hyoss 02-12-2020 07:26 PM

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?

Garan 02-14-2020 12:57 PM

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).

Thurallor 02-15-2020 05:29 PM

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/

Garan 02-15-2020 06:54 PM

Quote:

Originally Posted by Thurallor (Post 12407)
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).

Thurallor 02-16-2020 07:05 PM

Quote:

Originally Posted by Garan (Post 12408)
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.

Drono 02-17-2020 02:58 AM

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.

Hyoss 02-19-2020 04:19 AM

Thanks for the ideas will be giving this a try actually.


All times are GMT -5. The time now is 06:31 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI