Jump to content

[1.8 - 1.12] KSPCommunityFixes - Bugfixes and QoL tweaks


Gotmachine
 Share

Recommended Posts

12 hours ago, NathanKell said:

V1.20.3

  • New performance patch : FewerSaves (contributed by @siimav). This defaults to off.
  • StrategyDuration had an incorrect transpiler linkage.

Ok, so I see this adds the following to the Settings.cfg:

  // This tweak eliminates KSP's stock behavior of saving every time
  // you exit a UI-only space center building (AC, MC, etc)
  // and every time you delete a vessel in the Tracking Station
  FewerSaves = false

I assume this needs to be changed to "true" to enable it?  Asking because most of the other performance tweaks are defaulted to "true"

Link to comment
Share on other sites

36 minutes ago, linuxgurugamer said:

I assume this needs to be changed to "true" to enable it?  Asking because most of the other performance tweaks are defaulted to "true"

Yes, that is correct. Probably can be defaulted to true later on once we validate that there isn't some piece of code out there that does something weird and relies on saving getting triggered at these places.

Link to comment
Share on other sites

1 hour ago, siimav said:

Yes, that is correct. Probably can be defaulted to true later on once we validate that there isn't some piece of code out there that does something weird and relies on saving getting triggered at these places.

Thanks

It may be worthwhile to create small window to allow the options to be configured without having to edit a file.  In fact, I'd be willing to write one, if you like.

Looking at the Settings.cfg file,  looks like it would be moderately difficult.  I'd want to read the file to get and keep the comments, and use them as a prompt on the window, so I wouldn't be able to use the normal way to load a config file

Looks like every parameter has one or more comments just before it, or a comment following the value 

Let me know

Edit:  I guess you recommend a MM patch to make the changes since the file gets updated every release, so I'd make the mod to write a MM patch file to make the local changes

Edited by linuxgurugamer
Link to comment
Share on other sites

24 minutes ago, linuxgurugamer said:

Thanks

It may be worthwhile to create small window to allow the options to be configured without having to edit a file.  In fact, I'd be willing to write one, if you like.

Looking at the Settings.cfg file,  looks like it would be moderately difficult.  I'd want to read the file to get and keep the comments, and use them as a prompt on the window, so I wouldn't be able to use the normal way to load a config file

Looks like every parameter has one or more comments just before it, or a comment following the value 

Let me know

Edit:  I guess you recommend a MM patch to make the changes since the file gets updated every release, so I'd make the mod to write a MM patch file to make the local changes

Community fixes already has a section in the settings window (the one from the pause menu - not the one from the main menu). That would seem like the obvious place, I'd think.

Link to comment
Share on other sites

27 minutes ago, rmaine said:

Community fixes already has a section in the settings window (the one from the pause menu - not the one from the main menu). That would seem like the obvious place, I'd think.

I would normally agree, except that there are now a LOT of options which don't really belong in that menu.  Maybe adding a stock settings page would be better, but then every time a new option is added the settings page(s) will need to be updated.

What I would write would be dynamic by reading the file and presenting it on screen in a usable format.  Since the top of the Settings.cfg contains the following:

// You can set specific patches to false to disable them.
// It is recommended to do so using a ModuleManager patch.
// See the KSPCF_UserSettings.cfg.extra file in the "Extras" folder for an example.

I was proposing something which would work along this way.   If, on the other hand, they are moving all settings into a settings window, then maybe it's not needed.

One thing to keep in mind, is that having a MM file to change the settings.cfg can be useful to be able to copy the settings between different installs

 

Link to comment
Share on other sites

3 minutes ago, Brigadier said:

Am I misinterpreting?  Do any changes to the .cfg file revert each KSP session and require an MM patch to be persistent, i.e. the FewerSaves option?

Using a MM patch for saving your customised settings is to keep your settings across updating KSPCF (since updating it will reset the settings config file), not just relaunching the game. 

Link to comment
Share on other sites

It's not necessarily the best idea to have a UI that writes MM patches (or otherwise sets these patches), because certain mods can literally depend on certain patches being active, and a UI that allows user selection can break these fundamental assumptions (i.e. that a @ patch in MM will apply).

But that's a call I'm happy to leave to got, I'm just here adding little bits and bobs. :)

 

As to FewerSaves, it is a performance optimization but not necessarily one that people want on -- some users may well prefer the stock behavior of saving on UI exist and on vessel remove. That, along with its somewhat experimental nature, is why we defaulted it to false.

Link to comment
Share on other sites

1 hour ago, dok_377 said:

Would be good to know what versions of the game your patches apply to. All Gotmachine's patches are marked. 

Ah, apologies. I have left unmarked those that apply to all versions which this mod works on.

Link to comment
Share on other sites

20 hours ago, NathanKell said:

It's not necessarily the best idea to have a UI that writes MM patches (or otherwise sets these patches), because certain mods can literally depend on certain patches being active, and a UI that allows user selection can break these fundamental assumptions (i.e. that a @ patch in MM will apply).

But that's a call I'm happy to leave to got, I'm just here adding little bits and bobs. :)

It would be the same thing as if the user wrote his own MM patches to make the change.  All I'm suggesting is a user-friendly UI to help those who don't want to or don't know how to make a MM patch.

Link to comment
Share on other sites

6 hours ago, linuxgurugamer said:

It would be the same thing as if the user wrote his own MM patches to make the change.  All I'm suggesting is a user-friendly UI to help those who don't want to or don't know how to make a MM patch.

That...is exactly my point, though.

Link to comment
Share on other sites

2 hours ago, NathanKell said:

That...is exactly my point, though.

It still might be a good idea.  Any mod that depends on one of the settings should have it’s patch marked as final.  The cfg emitted by the UI should not.  When displaying the UI it could detect that the saved setting is not what actually what was loaded and infer that there was some overriding patch and notify the user in some way.

Link to comment
Share on other sites

8 hours ago, linuxgurugamer said:

All I'm suggesting is a user-friendly UI to help those who don't want to or don't know how to make a MM patch.

The premise of KSPCF is to be "drop-and-forget" mod, the ability to enable or disable patches through MM is mainly here for mod compatibility purposes, not for the end users to tinker with.
There are currently more than 50 individual patches in KSPCF (and this is growing quickly), most of them are just obscure techno-babble to anyone that isn't familiar with technical aspects of the KSP internals.
Said otherwise, the only users that should be enabling or disabling patches are the users that know how to write a MM patch.

This being said, I agree some patches (mainly the QoL ones) could use some additional in-game configuration options, including the option to disable them.
I also agree that the current solution of adding such options as entries in the KSP main settings isn't very scalable.
Creating a separate settings interface available both from the main menu and the pause menu would be nice.
At some point I wanted to implement a standard "settings API" that could also be reused by other mods (I hate that mods have to resort to cluttering the mod toolbar for this), but I have no such project currently.

Link to comment
Share on other sites

4 hours ago, Gotmachine said:

This being said, I agree some patches (mainly the QoL ones) could use some additional in-game configuration options, including the option to disable them.
I also agree that the current solution of adding such options as entries in the KSP main settings isn't very scalable.
Creating a separate settings interface available both from the main menu and the pause menu would be nice.
At some point I wanted to implement a standard "settings API" that could also be reused by other mods (I hate that mods have to resort to cluttering the mod toolbar for this), but I have no such project currently.

Ok, I can look into this.  How about having a special comment which would indicate that an option should be displayed in the options window? maybe something like:

KSP_COMMUNITY_FIXES
{
.
.


  // Prevent kraken events on flight scene load
  // Disabled by default, the PartStartStability patch implement a better fix for that issue.
  FlightSceneLoadKraken = false

  // ##########################
  // Quality of life fixes
  // ##########################

  // Altimeter widget horizontal position tweakable in the pause menu settings
  // Displayable
  AltimeterHorizontalPosition = true

  // Part Action Window inventory UI widgets in a collapsed group by default
  // Displayable
  PAWCollapsedInventories = true

.
.
}

 

I could also just use the comment as a flag:


  // ##########################
  // Quality of life fixes
  // ##########################

and then go to the next set of hashes:

  // ##########################

 

Which would you prefer?  The first way would allow any option to be displayable, the second would limit it to the one section

5 hours ago, JonnyOThan said:

It still might be a good idea.  Any mod that depends on one of the settings should have it’s patch marked as final.  The cfg emitted by the UI should not.  When displaying the UI it could detect that the saved setting is not what actually what was loaded and infer that there was some overriding patch and notify the user in some way.

I would think that the UI should  write out a patch marked as "LAST", not FINAL

Link to comment
Share on other sites

31 minutes ago, linuxgurugamer said:

I would think that the UI should  write out a patch marked as "LAST", not FINAL

I don't want a wacky system parsing the settings file comments and writing an external MM patch, this is a terrible way to handle this.
I will eventually look into making a better in-game UI and to extend the patch system to generalize user-facing settings.
Meanwhile I think that for the few people that need to customize things, copypasting the patch example available in the extras folder is more than enough.

Link to comment
Share on other sites

53 minutes ago, Gotmachine said:

I don't want a wacky system parsing the settings file comments and writing an external MM patch, this is a terrible way to handle this.
I will eventually look into making a better in-game UI and to extend the patch system to generalize user-facing settings.
Meanwhile I think that for the few people that need to customize things, copypasting the patch example available in the extras folder is more than enough.

ok

Link to comment
Share on other sites

@Gotmachine @NathanKell

Something isn't working right in KSP 1.10.1, it started with KSPCF 1.20.0. When I'm trying to pick a part from the part list in the editor, it just throws TypeLoadException in the console and nothing happens. Reverting to KSPCF 1.19.1 resolves the problem. 

KSP.log: https://drive.google.com/file/d/1VDr-B_hbQbb9xxAUQ44ArAyZqeryBSDs
Player.log: https://drive.google.com/file/d/1sUc-dPxVwFupnNRlprMEm0ODBAvP1Ph9

Link to comment
Share on other sites

Update: apparently it's this patch. When I disable it, the problem also seems to go away.

On 7/25/2021 at 8:30 PM, Gotmachine said:

UpgradeBugs [KSP 1.8.0 - 1.12.3]
Fix various bugs with upgrades, like the part stats upgrade module breaking, upgrades not properly applying in the editor, upgrade cost not being applied to part cost, and various issues int the public API.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...