Jump to content

[1.12.2] Fix Stock Docking Nodes (7th August 2021)


JPLRepo

Recommended Posts

Fix Stock Docking Nodes
is a mod that fixes the drift that occurs in stock docking nodes with KSP 1.12.2.
It should work with ONLY version of KSP 1.12.2.

NOTE: This fix ONLY works for docking ports that are LOCKED or Undocked!

It will not fix docking ports that are unlocked and docked!!! So the bottom line is leave your docking ports LOCKED unless you are actively rotating them.

This mod replaces the stock Docking Node module with a fixed version of the Module.
This mod requires Module Manager.

License:
All Software and code
: MIT

(Won't be making that mistake ever again!)

Install Instructions:

  • Dependency: You must have installed (included in this package). Module Manager
  • Un-zip the download into your GameData folder.

Download from SpaceDock, or GitHub
SpaceDock runs and makes mods available to you based purely on donation. If you don't want to pledge to me at least
Consider pledging to keep SpaceDock going if you use it.
  8VWCQzN.png
- Please NOTE the License requirements listed above.

Support:
Known Issues:

  • Will probably not be compatible or break other mods that use the stock ModuleDockingNode part module.

I am more than willing to help anyone who asks for support, But Please in order for me to help you, you need to help me too. So Please make sure that if you are coming to this thread for support that:

A) you have logs as per below.

B) You are using this mod and not another mod that copied the code from this mod.

 

Be a :cool:COOL :cool:PERSON and help me by raising bugs and feature requests on GitHub here.

For support please ensure you are following these instructions.
From now on I will NOT respond to requests for support if you have not at least attempted to follow these simple steps.
NO LOGs = NO SUPPORT.

When I ask for a LOG I mean this LOG:

  1. The Logs
    These are text files that the game spits out for debugging purposes as it runs; if something broke horribly in-game, there will be something in here about it. You should upload the entire log as a file (i.e. not to pastebin); you can use dropbox or an equivalent host to upload the file. Make sure the entire file gets uploaded; you may have to zip it first, as logs can be very long. Here is where you can find the log:
    1. KSP versions 1.4.0 and above:
      • Windows: C:\Users\<username>\AppData\LocalLow\Squad\Kerbal Space Program\output_log.txt
        - This folder is usually hidden so you should enable the view hidden folders option (more information).
      • Mac OSX: Open Console, on the left side of the window there is a menu that says 'files'. Scroll down the list and find the Unity drop down, under Unity there will be Player.log Aka Files>~/Library/Logs/Unity/Player.log
      • Linux: The log is written to ~/.config/unity3d/Squad/Kerbal Space Program/Player.log

Whilst I agree CKAN is a great mod for those that can't use Zip tools. I take no part, nor am I interested in maintaining the CKAN mod metadata for my mods.
Please don't ask me about it but refer to the CKAN mod thread if you are having issues with CKAN or the metadata it maintains.

Change Log:

Spoiler

V1.1.0
- Make MM patch run in final to avoid other mod conflicts.
V1.0.0
- Fix Stock docking port drift. Stock docking ports will no longer drift when undocked or locked.
   

Source code is here
 

Author:
@JPLRepo - All codes changes, packaging, support, English Translation.

Big thanks to @Anth12for testing this mod for me.

Link to comment
Share on other sites

Hey @JPLRepo, we've got a request to index your mod in CKAN. Would you be okay with this? We only do it if that's the case.

I've seen the note about CKAN above. Of course, metadata would be purely maintained by us (except if you want to propose changes, you are always welcome to). I can't promise that we won't have to ask you a question every once in a while if we need clarification on something, though.
Similarly, we also encourage users to report CKAN problems to the CKAN thread, if you pointed them to us we'd be very grateful.

Link to comment
Share on other sites

This will break at least 40+ mods that have a ModuleManager patch targeting the stock ModuleDockingNode : https://github.com/search?q=HAS[%40MODULE[ModuleDockingNode]]&type=code (and likely a bunch of plugins that are acquiring ModuleDockingNode references without checking for derivatives).

I ported the fix in the KSPCommunityFixes plugin, as a fix for the original ModuleDockingNode module, avoiding that issue.

Edited by Gotmachine
Link to comment
Share on other sites

29 minutes ago, Gotmachine said:

This will break at least 40+ mods that have a ModuleManager patch targeting the stock ModuleDockingNode : https://github.com/search?q=HAS[%40MODULE[ModuleDockingNode]]&type=code

I ported the fix in the KSPCommunityFixes plugin, as a fix for the original ModuleDockingNode module, avoiding that issue.

Wait so you took my code which is MIT I admit and put it into your own distribution?

Link to comment
Share on other sites

7 minutes ago, JPLRepo said:

Wait so you took my code which is MIT I admit and put it into your own distribution?

I did, hopefully that's alright ?
The goal of that repository is to centralize bug fixes, instead of having a myriad of uncoordinated mods.
The organization/repository is community owned/maintained, you are very welcome to contribute.

Link to comment
Share on other sites

26 minutes ago, Gotmachine said:

I did, hopefully that's alright ?
The goal of that repository is to centralize bug fixes, instead of having a myriad of uncoordinated mods.
The organization/repository is community owned/maintained, you are very welcome to contribute.

While the license allows, it is courteous to ask first.  Especially in this case, since it's so new , you don't even know if any bugs may appear.  If so, there would be two different versions.

And, by including it in your DLL rather than keeping it as a separate DLL inside your zip file, you have made it impossible for anyone to use both your mod and @JPLRepo's mod.  At least if you had individual DLLs, people would be able to delete what they didn't want.

 

Link to comment
Share on other sites

2 minutes ago, linuxgurugamer said:

you have made it impossible for anyone to use both your mod and @JPLRepo's mod

No, this is handled. There is a patch to un-do JPLRepo's own patch, the KSPCommunityFixes one (which doesn't replace ModuleDockingNode with a derivative, thus avoiding tons of mod compatibility issues, that's the point) will take over.
And in case someone still want the original, features in KSPCommunityFixes can be individually disabled with a MM patch : https://github.com/KSPModdingLibs/KSPCommunityFixes/blob/master/GameData/KSPCommunityFixes/Settings.cfg

Link to comment
Share on other sites

8 minutes ago, Gotmachine said:

No, this is handled. There is a patch to un-do JPLRepo's own patch,

Even if you had the best intentions it is poor form to just rework someones new patch without discussing it with them first. If you work with them then you could come up with 1 unified patch that addresses any concerns. Your one should not be in the wild until you have a good discussion about what why and how with the author of the original.

Link to comment
Share on other sites

@GotmachineI reviewed that Github search you posted.  It's not as bad as you implied.

First, there were only two or three mods which have code which needs to be modified, and some of those may not even be supported anymore.  One is mine (DockingCameraKURS), and for me, it would be a 3 line change.  Another is DockingPortAlignmentIndicator, and it looks like a fairly simple fix for that as well.  In fact, DPAI was a majority of the results of the search.

Second, regarding all the patches which reference ModuleDockingNode, that's easily fixed by adding :FINAL to the patch which is supplied with this mod.

If this mod is continued, I'll be happy to make the changes in KURS, and to assist anyone else who needs help making changes to support this mod

Link to comment
Share on other sites

38 minutes ago, linuxgurugamer said:

@GotmachineI reviewed that Github search you posted.  It's not as bad as you implied.

First, there were only two or three mods which have code which needs to be modified, and some of those may not even be supported anymore.  One is mine (DockingCameraKURS), and for me, it would be a 3 line change.  Another is DockingPortAlignmentIndicator, and it looks like a fairly simple fix for that as well.  In fact, DPAI was a majority of the results of the search.

Second, regarding all the patches which reference ModuleDockingNode, that's easily fixed by adding :FINAL to the patch which is supplied with this mod.

If this mod is continued, I'll be happy to make the changes in KURS, and to assist anyone else who needs help making changes to support this mod

I'm not going to go into the debate.
But licenses aside, there's a thing called common courtesy and another thing called modder collaboration.
But silly me for assuming people would have these.. so any future mods I do will be All Rights Reserved to avoid any confusion.
I created this to help the community because I saw this as a big problem for a lot of players and didn't want them to have to wait until the next KSP patch.
At the first sign of a problem with support where someone has come to me because of this other mod I will immediately drop all support for this mod.
This mod will only live until the next official KSP patch anyway.

I have raised concerns about the patching DLL that is being used by @Gotmachine to patch the KSP dll. It may actually violate the KSP EULA, but that is one for the legal department to follow up.


I've updated the mod to run it's MM update in FINAL pass to avoid conflicts with other mods.

 

Link to comment
Share on other sites

2 hours ago, Poodmund said:

Regardless, Linux, by not changing out the stock ModuleDockingNode you make it a lot safer and more of a catch all scenario when considering interopability.

Not disagreeing with you.  But it was handled very poorly, and (rightly so) offended the author, not to even begin considering the legalities of using Harmony on KSP (thinking of the EULA).

To that end, I'm supporting @JPLRepo by updating DockingCameraKURS to support his mod directly

 

Link to comment
Share on other sites

7 minutes ago, linuxgurugamer said:

@JPLRepo

Seem to have a problem with this, using the latest release

In a test game with ONLY this mod installed and ModuleManager and the base game, I tried loading in a stock craft in the SPH (The Crater Crawler), and then launched it.

This is the result:

Logs: https://www.dropbox.com/s/6av1q289zvl6r3n/DockingNodeTest.zip?dl=0

SJ08Ckz.png

Don't seem to have any such issue here. Works fine.

I see the problem. Yeah this isn't going to work with 1.12.0 or 1.12.1 my bad.

 

Link to comment
Share on other sites

 

1 minute ago, linuxgurugamer said:

Sorry, I realized after I posted that my test install was the wrong version.  I updated to post to reflect that

Yeah my bad too. it needs the locking mechanism. Which was only implemented in 1.12.2. So this mod/fix will only work with KSP 1.12.2.

I've updated the opening post to reflect that. sorry for the confusion.

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Sadly, after searching my mods, I found that 27of them have references  to ModuleDockingNode, which is too many for me to get updated for now

I may slowly add support for this, the changes aren't that difficult, just too many to do right now

References in what way sorry?

As in you have mods that specifically look for that Module? in order to do what? Just curious because there are several Interfaces on that module that perhaps you can reference instead of the module by name.

 

 

Link to comment
Share on other sites

On 8/7/2021 at 11:51 PM, JPLRepo said:

I have raised concerns about the patching DLL that is being used by @Gotmachine to patch the KSP dll. It may actually violate the KSP EULA, but that is one for the legal department to follow up.

Making a point over a personal issue Vs killing the KSP modding scene, your choice here. I hope you appreciate the community wide effect.

If you get fouled during a game, you don't go and puncture the ball.

 

Unity games whose developers claim to support the modding of their game and the modding community utilising Harmony to create mods for the games:

  • 7 Days To Die
  • BattleTech
  • Besiege
  • Cities:Skylines
  • Oxygen Not Included
  • Raft
  • Ravenfield
  • Rimworld
  • Sheltered
  • Stardew Valley
  • Staxel
  • Subnautica
  • Unturned

Non-Unity games whose developers claim to support the modding of their game and the modding community utilising Harmony to create mods for the games:

  • Mount & Blade II: Bannerlord

You game either claims to support the modding scene or it doesn't. miyOVF0.png 

 

 

Edited by Poodmund
Adding games to the games list
Link to comment
Share on other sites

21 hours ago, Poodmund said:

Making a point over a personal issue Vs killing the KSP modding scene, your choice here. I hope you appreciate the community wide effect.

If you get fouled during a game, you don't go and puncture the ball.

 

 

Nothing personal, just doing my job. I’ve seen it, and passed on the info. Let’s just move on and keep it on topic.

<EDIT> I like that you keep updating your post after I've responded to it. So I'll do the same.

I have seen the use of this DLL modifier. I won't go into how it works, as I'm sure you know already. But we all know injecting or modifying IL code at runtime, is not perfect. So whilst it may appear wonderful. It's got it's pros and cons as well.

As part of my role, I have to notify where I see potential breach of EULA, and that is what I have done. That's it. End of the discussion.

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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