Jump to content

[1.8 - 1.12] KSPCommunityFixes - Bugfixes and QoL tweaks


Gotmachine

Recommended Posts

V1.1 pre-release is out.

A lot of new stuff in there, so I will wait a bit before pushing the update to CKAN and updating the OP.

Meanwhile, you can get it from GitHub

Please report any issue, and please use KSPBugReport to do so.

Required and must be downloaded separately :

Installation

  • Download the file named KSPCommunityFixes_x.x.x.zip
  • Open the downloaded *.zip archive
  • Open the GameData folder of your KSP installation
  • Delete any existing KSPCommunityFixes folder in your GameData folder
  • Copy the KSPCommunityFixes folder found in the archive into your GameData folder

Changes in 1.1.0

KSP Bugfixes

  • ModuleIndexingMismatch [KSP 1.8.0 - 1.12.2] : Prevent modules persisted state from being lost in existing saves/ships following a mod installation/uninstallation/update. Note that this won't handle all cases, but it massively reduce occurrences of that issue.
  • StockAlarmCustomFormatterDate [KSP 1.12.0 - 1.12.2] : Make the stock alarm respect the day/year length defined by mods like Kronometer. Fix the underlying AppUIMemberDateTime UI widget API to use the mod-provided IDateTimeFormatter if present.
  • PAWGroupMemory [KSP 1.8.0 - 1.12.2] : Fix the expanded/retracted state of Part Action Window groups being reset when the PAW is closed or internally rebuilt (especially frequent in the editor).
  • KerbalInventoryPersistence [KSP 1.12.2] : Fix the whole kerbal inventory persistence system being inactive in KSP 1.12.2. This cause multiple issues, like being able to bypass kerbal inventories mass/volume limits, and various cargo part duplication / disappearance issues when EVAing / boarding.
  • FlightSceneLoadKraken [KSP 1.8.0 - 1.12.2] : Prevent kraken events on flight scene load in laggy situations

Quality of Life tweaks

  • PAWStockGroups [KSP 1.11.1 - 1.12.2] : Part Action Window groups for a selection of stock modules

Mod API

  • MultipleModuleInPartAPI : This API allow other plugins to implement PartModules that can exist in multiple occurrence in a single part and won't suffer "module indexing mismatch" persistent data losses following part configuration changes. See documentation on the wiki.
Link to comment
Share on other sites

52 minutes ago, OrbitalManeuvers said:

Would it be possible to prevent KSP from ever assigning crew members to seats?

Likely not so easy to do. The crew assignment stuff is quite messy, and messing with it might have unintended side issues with other mods...
I will try to look into it.

Link to comment
Share on other sites

There is a mod that messes with crew assignments, actually. It's configurable, though not sure if 'no crew' is one of the possible outcomes. I tend not to use it because, as Gotmachine said, the crew assignment stuff seems quite messy. That mod would tend to throw NREs  and exhibit other weird behavior when I used it before. But YMMV.

Link to comment
Share on other sites

39 minutes ago, Grimmas said:

There is a mod that messes with crew assignments, actually. It's configurable, though not sure if 'no crew' is one of the possible outcomes. I tend not to use it because, as Gotmachine said, the crew assignment stuff seems quite messy. That mod would tend to throw NREs  and exhibit other weird behavior when I used it before. But YMMV.

Right, I had looked at that one, it's just way more involved than I wanted.

 

54 minutes ago, Gotmachine said:

I will try to look into it.

meh, don't worry about it - just knowing that it's a messy module is enough to dissuade me :P   Thanks for the reply!

Link to comment
Share on other sites

7 hours ago, OrbitalManeuvers said:

Would it be possible to prevent KSP from ever assigning crew members to seats?

Clear the config file of better crew assignment and leave only this. It's clean and it does the job without problems.

@PART[*]:HAS[#CrewCapacity[*]] {
	MODULE {
		name = ModuleCrewAssignment
		defaultAssignment = Empty
	}
}

 

Link to comment
Share on other sites

  • Could you specify groups in the PAWStockGroups in the settings file or in the forum ?
  • In the editor, if you use Inventory mode, and put some parts in the inventory there, PAW inventory group title is not updated
Edited by flart
Link to comment
Share on other sites

28 minutes ago, flart said:

Could you specify groups in the PAWStockGroups in the settings file or in the forum ?

"Part" group : sameVesselCollision, AimCamera, ResetCamera, ToggleAutoStrut, ToggleRigidAttachment, ShowUpgradeStats, SetVesselNaming

"Comms" group : ModuleDataTransmitter PAW items

"Command" group : ModuleCommand PAW items

"Control" group : reaction wheels, RCS, gimbals, control surfaces PAW items

I guess I should make a screenshot and add it to the OP.

33 minutes ago, flart said:

In the editor, if you use Inventory mode, and put some parts in the inventory there, PAW inventory group title is not updated

Yeah, it also doesn't always properly update when you manipulate stuff in the PAW. I have a much more refined stock inventory overhaul in preparation, but at this point it probably belong to a separate mod, as it somewhat goes quite beyond the simple "Bugfix/QoL" category.

In a nutshell, what it does is :
- Automatically compute cargo parts volume instead of requiring config definitions
- Properly handle volume for part variants
- Remove the inventory slot count limit (only mass/volume limits matter)
- Always allow stacking up to 10 items, as long as cargo parts are technically identical, don't contain resources and aren't specifically excluded from being stackable in the configs.

- Overhaul the stock inventory UI with a "pages" system, and make the grid user-resizable so it doesn't take so many space in the PAW

While this is technically entirely compatible with the stock system, it is nevertheless a deep modification and can potentially cause compatibility issues with other mods relying on the stock behavior (especially the in-progress KIS 2 mod).
So I'm not sure what to do with it yet.

Link to comment
Share on other sites

8 hours ago, Gotmachine said:

I have a much more refined stock inventory overhaul in preparation:

In a nutshell, what it does is :
- Automatically compute cargo parts volume instead of requiring config definitions
- Properly handle volume for part variants
- Remove the inventory slot count limit (only mass/volume limits matter)
- Always allow stacking up to 10 items, as long as cargo parts are technically identical, don't contain resources and aren't specifically excluded from being stackable in the configs.

- Overhaul the stock inventory UI with a "pages" system, and make the grid user-resizable so it doesn't take so many space in the PAW

is it like 90% of what @IgorZ is planning for the KIS2 ?

====================

Also about the naming,
one of the "Configure Vessel Naming" and "Rename Vessel" was placed in the Vessel Naming group in the stock,
and how I understand it, one of them was "legacy", another one was added later, and supports several parts with the different priority.
So, maybe hide legacy one whatsoever, and put a new one in the Vessel Naming group?

 

4veSoqz.jpeg   iPmMBLW.jpeg

Link to comment
Share on other sites

21 minutes ago, flart said:

is it like 90% of what @IgorZ is planning for the KIS2 ?

More or less.
However, KIS 2 will override and be mostly incompatible with the stock system, which mean that other mods that want to expand on the stock system will likely be incompatible with KIS 2.
I had a lengthy discussion with @IgorZ on the topic, but we more or less agreed that we are disagreeing.
The stock system has many shortcomings, but IMO it still is a decent "common base" for mods to work on.
IMO, those shortcomings can be fixed without throwing compatibility away like KIS 2 intends to do.
I am massively relying on the stock inventory system for some features in another mod, so my intention is to "fix/expand" it from a user facing POV, but also to provide a better modding API for it in the process.
This stock inventory "extended modding API" is the reason I would prefer to release it as a part as KSPCommunityFixes, but the KIS 2 plans have made that a bit problematic.
In theory, what I'm doing shouldn't cause issues in KIS 2, but having to verify that is a lot of extra work, especially since KIS 2 is a in development moving target...

39 minutes ago, flart said:

So, maybe hide legacy one whatsoever, and put a new one in the Vessel Naming group?

This is a bit messy to implement while keeping compatibility with KSP versions prior to the introduction of the vessel naming feature. This is quite minor in any case...

Link to comment
Share on other sites

11 hours ago, Gotmachine said:

However, KIS 2 will override and be mostly incompatible with the stock system

To be more precise, KIS will be incompatible with the stock inventory GUI. The code that properly deals with the stock inventory API should not be affected. The only open question here is what is "properly"? FWIW, the stock inventory API is not existent. So, in the end, it will depend on the implementation of a specific mod.

Link to comment
Share on other sites

V1.3.0 is out.

Available from GitHub and CKAN.

New bugfix : PAWItemsOrder [KSP 1.8.0 - 1.12.2]
Fix PAW items position randomly changing and flickering

This should fix the issues @Poodmundand @Dominiquini were taking about in this thread a while ago, although I suspect that there are a few other item ordering related issues lying around in the PAW code.

Edited by Gotmachine
Link to comment
Share on other sites

V1.4.0 is out.

Available from GitHub and CKAN.

  • New QoL patch : UIFloatEditNumericInput [KSP 1.8.0 - 1.12.2]
    Allow numeric input ("#" button) in "float edit" PAW items
    UIFloatEditNumericInput.gif
  • Fixed some patches not being applied in KSP versions below 1.12 : PAWItemsOrder, TweakableWheelsAutostrut, ModuleIndexingMismatch, FlightSceneLoadKraken.
  • PAWStockGroups patch now applicable to KSP 1.10.1 (min version was 1.11.1 before)
Link to comment
Share on other sites

When right-clicking one of the Kerbal Foundries wheels in the SPH, instead of a working PAW, I get the following exception (with preceding context between adding the part and right-clicking on it):

KF-WheelMedium added to ship - part count: 19 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

[11/19/2021 5:33:37 PM [x] Science!]: <Info> (StatusWindow) - StatusWindow.RefreshFilte
r 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

[11/19/2021 5:33:37 PM [x] Science!]: <Info> (ScienceWindow) - ScienceWindow.RefreshFil
ter 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

NullReferenceException: Object reference not set to an instance of an object
  at KSPCommunityFixes.UIPartActionNumericFloatEdit.Setup (UIPartActionWindow window, P
art part, PartModule partModule, UI_Scene scene, UI_Control control, BaseField field) [
0x0001c] in <8f81c7b736764f37a0edca532f4ee0dc>:0 
  at UIPartActionWindow.AddFieldControl (BaseField field, Part part, PartModule module) [0x00073] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at UIPartActionWindow.CreatePartList (System.Boolean clearFirst) [0x002bc] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at UIPartActionWindow.Setup (Part part, UIPartActionWindow+DisplayType type, UI_Scene scene) [0x0006a] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at UIPartActionController.CreatePartUI (Part part, UIPartActionWindow+DisplayType type, UI_Scene scene) [0x000f7] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at UIPartActionController.SelectPart (Part part, System.Boolean allowMultiple, System.Boolean overrideSymmetry) [0x001a7] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at UIPartActionController.HandleMouseClick (UnityEngine.Camera cam, System.Boolean allowMultiple) [0x0003f] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at UIPartActionController+<MouseClickCoroutine>d__39.MoveNext () [0x00082] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <2425394cf09642369e2109953e31f62b>:0

The exception itself then repeats hundreds of times.  After this exception gets thrown, all other parts stop responding to right-clicks (i.e. no PAW window appears, and no further exceptions thrown) until I exit and reenter the SPH.  Not sure if this is an issue with the newly-introduced UIFloatEditNumericInput patch specifically or if there's some issue with Kerbal Foundries that's triggering it.  Haven't encountered any other parts (vanilla or modded) that have this issue.

Unsurprisingly, after downgrading KSPCommunityFixes to 1.3.0 I can right-click on Kerbal Foundries wheels just fine, so whatever the issue is seems isolated to some interaction between UIFloatEditNumericInput and Kerbal Foundries.

Link to comment
Share on other sites

@Arrowmaster@YellowApple Which KSP version are you using ?
Can you upload a full KSP.log (or better, use https://github.com/KSPModdingLibs/KSPBugReport) ?
I can't reproduce it, neither in KSP  1.12.2 or 1.10.1

It seems strange that it happen with the Photon Corp SRBs, since they don't use a FloatEdit control. If they have one, it probably was added by another mod.
In your working game, do you see such a control (something looking like that : [<<][<][---slider---][>][>>]) on those ? If so, can you identify what it's for / from which mod it comes ?

Edited by Gotmachine
Link to comment
Share on other sites

3 hours ago, Gotmachine said:

@Arrowmaster@YellowApple Which KSP version are you using ?
Can you upload a full KSP.log (or better, use https://github.com/KSPModdingLibs/KSPBugReport) ?
I can't reproduce it, neither in KSP  1.12.2 or 1.10.1

It seems strange that it happen with the Photon Corp SRBs, since they don't use a FloatEdit control. If they have one, it probably was added by another mod.
In your working game, do you see such a control (something looking like that : [<<][<][---slider---][>][>>]) on those ? If so, can you identify what it's for / from which mod it comes ?

KSP 1.12..2, PAW for Photon Crop was fine in the VAB but breaks in flight. I also have Smart Parts with the auto staging SRB patch enabled, that could be it too.

https://oshi.at/pVkbNp

Link to comment
Share on other sites

And more issues... sorry again...

V1.4.2 is out.

Available from GitHub and CKAN.

Fixed ModuleIndexingMismatch patch causing issues with modules dynamically adding/removing resources. Specifically, the patch was causing part resources to be loaded before (instead of after in stock) the PartModule.OnLoad() call when loading a ShipConstruct. This notably fixes RealFuel resources being lost when reloading/launching a craft file, but that mistake likely had consequences for other fuel/resource switchers mods (B9PS, Firespitter...)

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.

×
×
  • Create New...