IllusionMods/HSPlugins

[VideoExport] Unable to change Output and Frames folder paths

kkykkykky opened this issue · 3 comments

User on Illusion Soft Discord server reported changing folder paths in Plugin Settings is not working properly. VideoExport use the default paths regardless when generating video. Changes also reset back to default when Studio is closed.

I looked at the code and noticed it does the configs differently. Would it be safe to change newOutputFolder and newGlobalFramesFolder to ConfigEntry<String> and just do Config.Bind() without going through _configFile.AddString()?
Also not sure why it's necessary to check for existence of new folders before setting them since they get created if they don't exist.

I only looked at this in more detail in HS2, but all games seem use the same code for this. so I'm guessing this is a problem for all games.

This part of the code hasn't changed since a long time ago. I'm a bit surprised I wasn't able to find previous reports of this.

It checks for existing folders inside bepinex to keep backwards compatibility for people that used old versions and have clips saved there already. _configFile can be ripped out entirely to simplify things but I didn't do it just in case this was going to ever be merged back into Joan's repo in which case it would need to support HS1.

If I'm understanding the code correctly, this check would prevent the paths from changing unless the new folder paths exist.

The check for backwards compatibility is already done here.

It does look a bit messy, a PR would be great since I'm busy working on something else.