KnossosNET / Knossos.NET

Repository for the Knossos.NET launcher, currently in development.
GNU General Public License v3.0
23 stars 10 forks source link

mod options can override user preferences #96

Closed notimaginative closed 8 months ago

notimaginative commented 8 months ago

Basically, options that affect performance or fundamental usability should not be allowed to be forced by a mod, if that setting is directly supported by kNet. Technically I think this is a mod issue and should be fixed there, but having kNet watch the users back would be really nice.

As one example, shadows cause rendering issues on mac and need to be disabled. However the mediavps have -enable_shadows in the cmdline arguments for the mod which forces them to be enabled even though shadows are set to disabled in kNet settings. Similarly -aa and -soft_particles are forcibly enabled even though they can negatively affect performance.

Essentially I think the cmdline should be sanitized based on the preferences the user has set. If a user has the desire or need to enable, disable, or alter a setting then that preference should be holy ground. I am aware that you can go into settings for the mod and tweak the cmdline, and those tweaks should be respected, but that shouldn't be a requirement simply to have general options the user has set take affect.

wookieejedi commented 8 months ago

Yeah agreed. Shadows can actually have the shadow_quality command set to 0, so this one would be an easier fix (since quality of 0 is the same as disabled). But for other things like it would be very useful, too. For example soft_particles flag is either present an on or absent and not on, so if I mod default has soft_particles in the default mod cmdline it will always be on even if the global setting is off.

Shivansps commented 8 months ago

This should not happen already. Mods should not be able to override general settings unless the option is enabled,

notimaginative commented 8 months ago

Mods can set whatever they want as far as cmdline arguments go, right? That's what it looks like anyway. And unless I'm missing it neither kNet nor old-knossos do any checking to see if any of those arguments specified by the mod conflict with user settings.

JohnAFernandez commented 8 months ago

So I think Shivansps is talking about this checkbox here "Do not apply global settings or Command Line on this mod". If we can show that shadows or mod-specific options are still enabled with that checkbox turned off, then that would be a bug for sure.

Screen Shot 2023-12-09 at 1 45 23 PM

notimaginative commented 8 months ago

I've never used that option.

This issue is pretty easy to test with the current mediavps though. Just make sure that everything for the mod is the default, then in the video settings of kNet disable shadows, anti-aliasing, and soft particles. Then when you run the mod check the cmdline used in the kNet debug window and you'll see -enable_shadows, -aa, and -soft_particles, even though you disabled them.

wookieejedi commented 8 months ago

Yep, the Do not apply global is indeed different. The crux of this issue is that the absence of flags also means something. Alas, if all flags were like shadows (where disabled is also a flag, ie -shadow_quality 0) then this would not be as tough to fix.

JohnAFernandez commented 8 months ago

Well, I think the best option then is to ignore any flags that are in the settings screen if that ignore global options box is not checked.