Jump to content

[WIN] Fix My Docking [v 0.3]


Alo

Recommended Posts

Fix my docking is a tool to find and fix problems with docking ports in quicksave.

Now added automatic quicksave correction

Features

  • Show docking ports on vessel
  • Show docking ports relationships
  • Identify problematic docking ports
  • Support stock and mod docking ports
  • Support multidocking (correcting is not yet implemented)
  • Backup quicksave file

Planned Features

  • Full support of multidocking
  • Full support of docking ports with multiple docking modules (partially implemented)
  • Repair docking port problems in quicksave file

Changelog

Version 0.3

  • Automatic quicksave correction
  • Fix: ARM compatibility bug
  • Fix: Long strings bug (compatibility with mods which write long strings of data in savefile, like Kethane, SCANsat, ect)
  • More checks added to file analysis

Version 0.2

  • List of critical errors added (errors caused by KSP or mods which usually break docking ports)
  • Docking port UI analysis added
  • Fix: Status "Disabled" now known

Version 0.1

  • initial

How to use


  1. If you have a problem with docking port:
  2. Backup your save files!
  3. Make quicksave (F5)
  4. Put "Fix my docking.exe" in your save folder near quicksave.sfs. Quicksave shouldn't be open in word processor.
  5. Run "Fix my docking.exe"
  6. Load quicksave.sfs (F9)
  7. Look at "fmd log.txt" for more details

Log example


...
39 base comand 1 rootID: 4137735778
Found 6 docking ports
0 part: 15 dockingPort2 ID: 33069350 attached to asasmodule1-2
parent: 3 rootDP: 0 bottom: 3 top: -1 srf: -1 INT: TRUE
True > Ready < DockID: 1717145760
== 39 1 0 base comand 1 rootID: 4137735778
Docked (docker) part:27 ID: 1717145760 DockID: 33069350
!I 13 Connected port on same vessel
!E 24 Incorrect state of INTERNAL port
!I 35 Port has connection
!I 39 Port connects to Docked (docker)
1 part: 27 dockingPort2 ID: 1717145760 attached to trussPiece3x
parent: 15 rootDP: 15 bottom: 28 top: -1 srf: -1 INT: TRUE
True > Docked (docker) < DockID: 33069350 base ing 1 RootID: 3666921736
== 39 0 0 base comand 1 rootID: 4137735778
Ready part:15 ID: 33069350 DockID: 1717145760
!E 4 Docked part connected with non docked part
!E 8 Docked vessel name incorrect
!E 9 Docked vessel root id incorrect
!E 11 Docker not connected with dockee
!I 13 Connected port on same vessel
!I 35 Port has connection
!I 36 Port connects to Ready
2 part: 46 dockingPort2 ID: 603666381 attached to trussPiece3x
parent: 45 rootDP: 27 bottom: 45 top: -1 srf: -1 INT: TRUE
True > Ready < DockID: 1766022032
== 39 3 0 base comand 1 rootID: 4137735778
Docked (docker) part:67 ID: 1766022032 DockID: 603666381
!I 13 Connected port on same vessel
!E 24 Incorrect state of INTERNAL port
!I 35 Port has connection
!I 39 Port connects to Docked (docker)
...

Download links

Fix my docking v 0.3https://db.tt/KXAZBtre

Source https://db.tt/HfBW2PCd

License

Fix my docking is published under CC BY-NC-SA 4.0 license

Edited by Alo
Link to comment
Share on other sites

Most people (myself included) would be suspicious of a program that is a drop-in executable like this, when we think that the same thing could be accomplished with an add-on. That executable could do anything (and could be malicious!). And it probably doesn't work on Linux.

I'm guessing without looking that the .pas file you have listed as source is a Delphi program. But I would guess that virtually nobody here has a Delphi compiler handy to check that your code isn't malicious.

So I would suggest that you find some other way to do this, but other than that -- nice work!

Edited by technogeeky
Link to comment
Share on other sites

...

That said: Most people (myself included) would be suspicious of a program that is a drop-in executable like this, when we think that the same thing could be accomplished with an add-on. That executable could do anything (and could be malicious!). And it probably doesn't work on Linux.

I'm guessing without looking that the .pas file you have listed as source is a Delphi program. But I would guess that virtually nobody here has a Delphi compiler handy to check that your code isn't malicious.

So I would suggest that you find some other way to do this, but other than that -- nice work!

You are right about an exe file possibly being malicious, and certainly not working on other OS's. (though, good Pascal compilers exist for Linux too, so if anybody wants, he can make this work from the sourcefile).

And yes, .pas files are sourcecode in Pascal/Delphi. But at least for me, I do have that compiler handy (Pascal actually being my preferred language!). So, checked the code and can say there isn't any malicious part in it (very easy even if not commented - the beauty of Pascal being so easy to read). No bug checking, however.

C# has a clear advantage, due to Unity interface with plugins, but there's no rule against any other language.

Link to comment
Share on other sites

technogeeky, thanks for checking grammar.

You are right about an exe file possibly being malicious, and certainly not working on other OS's. (though, good Pascal compilers exist for Linux too, so if anybody wants, he can make this work from the sourcefile).

And yes, .pas files are sourcecode in Pascal/Delphi. But at least for me, I do have that compiler handy (Pascal actually being my preferred language!). So, checked the code and can say there isn't any malicious part in it (very easy even if not commented - the beauty of Pascal being so easy to read). No bug checking, however.

C# has a clear advantage, due to Unity interface with plugins, but there's no rule against any other language.

You can open .pas file with notepad.

I can try to compile it for Linux. It has no Windows specific functions, but i have no Linux installed to check that.

I have no idea how remake it into plugin. It should be bugfix to resolve this problem. Making plugin just to change save files without having some knowledge about docking port problem may cause more errors in saves. The way how next docking port was broken can be a surprise, so i don't want to make any changes in files right now.

Link to comment
Share on other sites

You can open .pas file with notepad.

I can try to compile it for Linux. It has no Windows specific functions, but i have no Linux installed to check that.

I have no idea how remake it into plugin. It should be bugfix to resolve this problem. Making plugin just to change save files without having some knowledge about docking port problem may cause more errors in saves. The way how next docking port was broken can be a surprise, so i don't want to make any changes in files right now.

Sure anybody can open *.pas with any text editor. But a proper Pascal/Delphi IDE makes code more readable, and beyond that it actually compiles the .exe (what I actually did, I am not happy when checking if my compiled code is significantly different from what is published).

To make a plugin, you will actually totally change how your application works. Please note I am not suggesting you should do that, your tool is conceived so to not require KSP to be runnning, and that leaves out most possible bugs.

Beyond that, all plugin functionalities are tied to Unity functions, written in C#. Unless you want to venture into transposing Unity functions in Pascal (possible, but a tedious task), that leaves only C# as an option to write your code.

Link to comment
Share on other sites

No matter, C # or Pascal, the plugin should act differently. While I try to find outcome of docking port bug in save file, plugin should resolve reason of bug. This challenge is much more difficult, i not sure if can i make this.

Then i faced docking port bug, i just wanted to have my station working again. Having big save file i tried to make program, that help me to find broken port. And then decided to share it.

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
  • 2 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...