SteveLeafo / Budford

Budford: Cemu configuration, settings and auto update tool. Per game settings and more...
Mozilla Public License 2.0
24 stars 2 forks source link

Per User Settings #14

Open crossoft opened 6 years ago

crossoft commented 6 years ago

Hello, I looked through the code but haven't figured out which data are separated into user profiles other than name and avatar. For me, I've got players who want to switch graphics packs, mods, etc. based upon who is using it. From what I can tell that level of setting is only at the game level currently; not at the user level. Am I correct? Cheers

SteveLeafo commented 6 years ago

Hi, as it stands Budford only manages Cemu save files on a per user basis. Everything else is common.

That said, it would be fairly easy to store any of the settings on a per user basis.

To achieve this, just can just modify the fields in the Model class to be a lookup table instead of a single instance and use the user name as the key.

So for example if you wanted the active filters to be different for each user, you would change:

public ViewFilters Filters = new ViewFilters();

to be


internal ViewFilters Filters { get { return UserFilters[CurrentUser]; } }

public Dictionary<string, ViewFilters> UserFilters = new Dictionary<string, ViewFilters>();

You can make this change to any of the settings.

Then it just becomes a question of how to handle pre-existing models. For example, do we import the current settings to all users or just the current user etc..

For mods, one feature that could be added is add an option to run plug-ins before a game is launched.

Then you can create different mod plug-ins for each user.

I hope this makes sense...

Best regards, SteveLeafo

crossoft commented 6 years ago

Then it just becomes a question of how to handle pre-existing models. For example, do we import the current settings to all users or just the current user etc..

Makes perfect sense. I like it. When I have time I may attempt the changes and submit a pull request.

Cheers!