shupershuff / Diablo2RLoader

D2rLoader - Diablo 2: Resurrected launcher for multi-boxing
MIT License
61 stars 11 forks source link

Tune up ingame settings.json a little bit. #32

Closed subaridji closed 5 months ago

subaridji commented 11 months ago

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.

shupershuff commented 11 months ago

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 commented 11 months ago

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

subaridji commented 11 months ago

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 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\**"

shupershuff commented 10 months ago

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

shupershuff commented 10 months ago

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

subaridji commented 10 months ago

works like a charm image

shupershuff commented 10 months ago

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

shupershuff commented 9 months ago

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 commented 8 months ago

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

subaridji commented 8 months ago

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

shupershuff commented 5 months ago

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 commented 5 months ago

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