Jump to content

[1.12.2] KSPCommunityFixes - Bugfixes and QoL tweaks


Recommended Posts

KSP Community Fixes

This plugin is a collection of code patches aiming at fixing internal bugs in the KSP codebase, as well as QoL improvements. There is no defined scope for now, so feel free to propose additional patches ideas by opening an issue, or to contribute with a pull request.

Download and installation

Compatible only with KSP 1.12.2 - Available on CKAN

Required and must be downloaded separately :

Installation

  • Go to the GitHub release page and download the file named KSPCommunityFixes_x.x.x.zip
  • Open the downloaded *.zip archive
  • Copy the KSPCommunityFixes folder found in the archive into the GameData folder of your KSP installation.

Features

Individual patches can be enabled or disabled by editing the Settings.cfg file.

Bugfixes

  • RefundingOnRecovery : Vessel recovery funds properly account for modules implementing IPartCostModifier. This bug affect stock fairings, cargo parts and many modules from various mods (part switchers and procedural parts mods, USI, Kerbalism, Tweakscale, etc).
    This is the same issue that is also fixed by KSP-Recall, but by patching the actual stock bug instead of doing a huge hack with hidden resources. If KSP-Recall is installed, the fix from KSPCommunityFixes will by used instead of the KSP-Recall one.
  • DockingPortDrift : Prevent persistent position drift of docking port connections, as long as the "Rotation locked" advanced tweakables PAW option is enabled (it is by default). Credit to JPLRepo for the fix.

Quality of Life tweaks

  • PAWCollapsedInventories : Part Action Window inventory UI widgets in a collapsed group by default, group title show slots usage and cargo mass. Applied to part and kerbal inventories.
    PAWCollapsedInventories.gif
  • AltimeterHorizontalPosition : Altimeter widget horizontal position is now tweakable in the pause menu settings.
    AltimeterHorizontalPosition.gif

License

MIT

Edited by Gotmachine
Link to comment
Share on other sites

Hey I have one!

 

this patch is designed to fix the custom barn kit errors in science and sandbox mode that turn your building so the wrong level and you cant upgrade them, so it deletes levels all together.

heres the link: https://www.dropbox.com/sh/2amqicgx4knheqw/AABpYdKlNnm6sXHES6vjchHIa?dl=0

This Does Require Module Manager and Custom Barn Kit, but you should already have those since this is to fix them

:D

(Please note that the link sends you to the folder that contains all of my things, not just this one, and if you install any other things, they will merge into one "Triangular Technologies LLC" Folder) 

don’t use this it’s very broken

Edited by DaBakonAder
Link to comment
Share on other sites

1 minute ago, DaBakonAder said:

this patch is designed to fix the custom barn kit errors in science and sandbox mode that turn your building so the wrong level and you cant upgrade them, so it deletes levels all together.

Well, issues in other mods should be addressed directly by their authors. You should probably raise the issue in the CustomBarnKit forum thread or on its github repository.

Also, I should have mentioned that this is primarily aiming at fixing issues that require some code. Things that only require a MM patch are likely out of scope, although I might include some on a case by case basis.

Link to comment
Share on other sites

1 minute ago, Gotmachine said:

Well, issues in other mods should be addressed directly by their authors. You should probably raise the issue in the CustomBarnKit forum thread or on its github repository.

I Did do this

1 minute ago, Gotmachine said:

Also, I should have mentioned that this is primarily aiming at fixing issues that require some code. Things that only require a MM patch are likely out of scope, although I might include some on a case by case basis.

Okay then!

Link to comment
Share on other sites

 

10 hours ago, Gotmachine said:

AltimeterHorizontalPosition : Altimeter widget horizontal position is now tweakable in the pause menu settings.

I didn't realise i needed this.  Thanks!

 

10 hours ago, Gotmachine said:

PAWCollapsedInventories

Could this be applied to all the things like vessel naming too please?

Peace.

Link to comment
Share on other sites

8 hours ago, theJesuit said:

Could this be applied to all the things like vessel naming too please?

That's a good idea. Would require a bit of work, I will open an issue and see what I can do when I got some motivation.

Link to comment
Share on other sites

Posted (edited)
3 hours ago, KawaiiLucy said:

Does the Refund on Recovery fix the bug with negative funds, eg. when recovering high amounts of rare metals/refined exotics from USI?

I don't know, depends on what USI is doing. Is there a more detailed report for that bug on the Squad bugtracker or on the USI github repo or forum thread ?

Edit : If you are talking about this :

Anything that is fixed by KSP-Recall will be fixed by KSPCommunityFixes, so the answer is yes (I updated the OP to mention that).

Edited by Gotmachine
Link to comment
Share on other sites

I'm receiving this error messages all the time I perform some staging event. Other moments too, but staging where I was able to find a pattern...

[ERR 18:48:56.605] Coroutine couldn't be started because the the game object 'TrackingFilters' is inactive!
...
[ERR 18:48:56.848] Coroutine couldn't be started because the the game object 'IVACollapseGroup' is inactive!

In addition to the messages on the screen, the game has a small freeze (less than 1s). But I don't know if this is because of this mod!

Thanks.

Link to comment
Share on other sites

8 hours ago, Dominiquini said:

I'm receiving this error messages all the time I perform some staging event. Other moments too, but staging where I was able to find a pattern...

Sorry for that, and thanks for reporting. I should have done a bit more testing, that last altimeter tweaking feature had a few issues.

Released v1.0.3 hotfix : https://github.com/KSPModdingLibs/KSPCommunityFixes/releases/tag/1.0.3

  • Fix persisted altimeter position not being correctly reloaded
  • Fix map filters transition coroutine errors by disabling the nested gameobject instead of the top one
Link to comment
Share on other sites

1 hour ago, Dominiquini said:

You thing this is a bug worth of fixing?

I would love to. However, this is far from an easy fix, as this is not really a bug, but more a missing feature.

The PAW items order is determined by the order of execution of every object that add items to it, change the items visibility or trigger PAW rebuilds, so it is completely uncontrollable.
The only real way to do it would be to re-order the items after the fact, which :
- Is quite complicated to implement : there are a lot of events that can trigger a PAW rebuild, and due to all the various caching/performance fixes Squad implemented, the PAW UI code is... lets say tortuous...
- Would require to manually define the desired order of all PAW items, which is quite a huge task when you factor in the gazillion of custom items from mods

Link to comment
Share on other sites

7 hours ago, Gotmachine said:

I would love to. However, this is far from an easy fix, as this is not really a bug, but more a missing feature.

The PAW items order is determined by the order of execution of every object that add items to it, change the items visibility or trigger PAW rebuilds, so it is completely uncontrollable.
The only real way to do it would be to re-order the items after the fact, which :
- Is quite complicated to implement : there are a lot of events that can trigger a PAW rebuild, and due to all the various caching/performance fixes Squad implemented, the PAW UI code is... lets say tortuous...
- Would require to manually define the desired order of all PAW items, which is quite a huge task when you factor in the gazillion of custom items from mods

Just to be clearer, what bothers is that the order keeps changing. Any order, as long as static, would be fine.
Anyway, thanks for considering this!

Link to comment
Share on other sites

Posted (edited)
25 minutes ago, Dominiquini said:

what bothers is that the order keeps changing. Any order, as long as static, would be fine.

That's the problem. There is nothing in the code that control the order, it is the result of the code execution path, which is very complex in that case, and consequently impossible to control or predict.
Even if I manage a way to detect PAW rebuild events, re-applying the initial order is quite hard, as some initially invisible PAW items will become visible after the first initialization and we won't be able to know where to put them.

I will see if I get the courage to work on this. Dwelling in the PAW code is a traumatic experience.

Edit : Just gave a quick look, there is actually some ordering code. So there is likely a bug in it.

Edited by Gotmachine
Link to comment
Share on other sites

4 minutes ago, Poodmund said:

This didn't use to happen before KSP 1.8.0, it was fine on 1.7.3. I raised an issue about it but it gained no traction: https://bugs.kerbalspaceprogram.com/issues/24943 

I upvoted it!

I opened a bug that I thing is serious, but doesn't have been picked is this: https://bugs.kerbalspaceprogram.com/issues/28185.  It's been confirmed, but it doesn't look like anyone is working on it... I didn't suggest it because I don't think it's part of the scope of this mod, but if you want to check it out!

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/25/2021 at 2:30 PM, Gotmachine said:

This is the same issue that is also fixed by KSP-Recall, but by patching the actual stock bug instead of doing a huge hack with hidden resources. If KSP-Recall is installed, the fix from KSPCommunityFixes will by used instead of the KSP-Recall one.

You should also force the Refunding to be disabled on KSP-Recall.cfg: 

@KSP-Recall:AFTER[999_KSP-Recall]
{
        @INSTALLED
        {
                @Resourceful = false
        }
}

This will prevent the FlightHelper and EditorHelper from running, saving some CPU cycles as their GameEvent handlers will not be hooked.

 

Link to comment
Share on other sites

Is making MH launchsites menu in the VAB/SPH larger in the scope of this mod?

For example, based on how many launchsites in the list, make the list expand, for example up until 10 lines.

Probably the same applied to the stock save folder list in the VAB/SPH

Link to comment
Share on other sites

Posted (edited)
On 7/29/2021 at 9:51 PM, Dominiquini said:

I opened a bug that I thing is serious, but doesn't have been picked is this: https://bugs.kerbalspaceprogram.com/issues/28185.

Just to be clear : does the contract work or not ?
Because the nullref itself is likely quite harmless, excepted that it prevent the orbit UI tooltip from showing.
Edit : And also, I can't replicate it in 1.12.2. No nullref when hovering on available contract orbits.

On 8/7/2021 at 10:17 PM, Lisias said:

ou should also force the Refunding to be disabled on KSP-Recall.cfg

Will add this to next update. Thanks for notifying.

1 hour ago, Dodge said:

Does this replace KSP-Recall? Seems like KSP-recall does have some other things fixed? 

This replace one of KSP-Recall fixes (recovery funds). Both mods can be installed together, and the recovery funds fix from KSPCommunityFixes will be used.
This being said, for KSP 1.12, I think the only other active fix in KSP-Recall is "Attached", and I have absolutely no idea what this is doing.

36 minutes ago, flart said:

Is making MH launchsites menu in the VAB/SPH larger in the scope of this mod?

That seems like a good UI QoL improvement. Feel free to open an issue for it, or even to submit a PR.

Edited by Gotmachine
Link to comment
Share on other sites

1 hour ago, Gotmachine said:

This being said, for KSP 1.12, I think the only other active fix in KSP-Recall is "Attached", and I have absolutely no idea what this is doing.

It does for AttachNodes what Resourceful does for Resources - prevent the current state from being squashed by the prefab data on some events on faulty KSP versions. A change on TweakScale ended up rendering it redundant when TweakScale is installed, but TweakScale-less installations that suffer the problem (attaching nodes being reset all the time) can force its activation the same way you could force the deactivation of Refunding to see if it fixes the problem.

It is not activated on KSP 1.12.

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