Diablo2RLoader icon indicating copy to clipboard operation
Diablo2RLoader copied to clipboard

Tune up ingame settings.json a little bit.

Open subaridji opened this issue 2 years ago • 10 comments

Line 2614 doesn't work properly while using mods in cfg file: $SettingsProfilePath = ("C:\Users\" + $Env:UserName + "\Saved Games\Diablo II Resurrected\") This leads to default game path, while given mod directory is stored in accounts.csv So default settings.json file will always be used and other accounts settings files will always be owerwritten.

Tried to fix it myself but no idea how to parse CustomLaunchArguments from accounts.csv.

subaridji avatar Dec 20 '23 21:12 subaridji

Hi there, with the auto setting switcher, it's currently designed to copy settings1.json (where the 1 represents your first account) and overwrite settings.json. The game saves these .json files in the above noted folder.

Does the mod you are using make the game launch from a different .json file?

shupershuff avatar Dec 21 '23 02:12 shupershuff

Which exact mod are you using? Maybe I can test to see for myself.

shupershuff avatar Dec 21 '23 03:12 shupershuff

Hi there, with the auto setting switcher, it's currently designed to copy settings1.json (where the 1 represents your first account) and overwrite settings.json. The game saves these .json files in the above noted folder.

Does the mod you are using make the game launch from a different .json file?

tha't exactly what's happening, but in game main directory. you can try on any basic mod, which requires -txt mod <mod_directory> parameters. in this case game uses mod's folder to read and store save files and settings.json. currently solved for myself with adding mod directtory directly in the script, like $SettingsProfilePath = ("C:\Users\" + $Env:UserName + "\Saved Games\Diablo II Resurrected\**mods\LLF\**"

subaridji avatar Dec 22 '23 17:12 subaridji

Just trying to think about ways I can do this. I would prefer not to add another column to accounts.csv or a config line in config.xml for custom settings path if I don't have to. Is <mod_directory> ALWAYS the same as the directory name?

If so, I could adjust the script to check if the command line parameter contains "mod" and if so, use a custom directory settings directory ("..\Saved Games\Diablo II Resurrected\mods<mod_directory>").

shupershuff avatar Jan 16 '24 21:01 shupershuff

I've drafted this. Can you please test to see if it works? Just extract and copy the .ps1 file over your existing file.

D2Loader.zip

shupershuff avatar Jan 18 '24 05:01 shupershuff

works like a charm image

subaridji avatar Jan 20 '24 19:01 subaridji

Awesome, I will include in the next minor release (whenever I get around to it hehe).

shupershuff avatar Jan 21 '24 22:01 shupershuff

Can you provide me the link to the exact mod you're using? I've since had a thought that it's incorrect to assume that all mods will have adjusted save file paths, so perhaps it's better to inspect the modinfo.json file for the save path instead.

shupershuff avatar Feb 20 '24 22:02 shupershuff

@subaridji I've since learnt that the solution I've provided you will not work for other mod users. Let me know what mods you're using so I can test. Cheers.

shupershuff avatar Mar 11 '24 21:03 shupershuff

LLF 1.2.zip @shupershuff, sorry skipped mail notification. I've attached original file, it's not published.

subaridji avatar Mar 18 '24 17:03 subaridji

LLF 1.2.zip @shupershuff, sorry skipped mail notification. I've attached original file, it's not published.

Hey mate, I've done a few more changes over the last few weeks including some that may impact you. I think it's ready but if you would like to test you can try out this version here

https://github.com/shupershuff/Diablo2RLoader/blob/LangholzTestingEmporium/D2Loader.ps1

shupershuff avatar Jun 11 '24 13:06 shupershuff

Is addressed in the next version which I'll release soon.

shupershuff avatar Jun 16 '24 04:06 shupershuff