Jump to content

[WIN] KML - Persistence file editor


Mythos

Recommended Posts

42 minutes ago, pseudamin said:

In any case, the problem is a bit moot as the edits I made turned the savefile incompatible with KSP, so I had to restart my career ambitions.

And this is why you should always edit a COPY of the savefile, and not the original.. or at least make a backup copy first.

It would probably help if the "Instructions, Hints, FAQ" section of the OP made this clear. (Not that anyone ever reads instructions!)

Edited by JAFO
Link to comment
Share on other sites

2 hours ago, JAFO said:

And this is why you should always edit a COPY of the savefile, and not the original.. or at least make a backup copy first.

It would probably help if the "Instructions, Hints, FAQ" section of the OP made this clear. (Not that anyone ever reads instructions!)

You're absolutely right. I did make a backup and edited a copy of it in KML - though I'm not sure how thoroughly I read the OP :confused:

I did so by changing the name of the savefile and adding a "BACKUP_" prefix to it. But when I changed it back again by removing the prefix, KSP did not recognise that file either.

Link to comment
Share on other sites

36 minutes ago, pseudamin said:

You're absolutely right. I did make a backup and edited a copy of it in KML - though I'm not sure how thoroughly I read the OP :confused:

I did so by changing the name of the savefile and adding a "BACKUP_" prefix to it. But when I changed it back again by removing the prefix, KSP did not recognise that file either.

 Windows probably changed the name of the file in a way you didn't expect. If you like send me the file and I'll see if I can fix it for you.

Link to comment
Share on other sites

If you edit with KML it

  • asks if you really want to overwrite an existing file
  • creates a backup file named zKMLBACKUP<timestamp>-<original filename>.sfs

But of course managing your copies by yourself and having names like "docking_broken", "partially_fixed" and whatnot is easier to handle and restore from :wink:

If you only fumbled around a single vessel you also could just delete tho whole vessel and the incompatibility should be gone, not necessary to start a new game.

Edited by Mythos
Link to comment
Share on other sites

4 hours ago, pseudamin said:

However, it might be nice to discuss the issue further in order to prevent these issues from arising in the future using better construction designs or construction hierarchies.

Having another look now I also wonder why you have [63] surface-attached to [9].

Did you build [7] first and then start your payload from there, so put [87] to [7], then [86] to [87] and so on? The numbering tells you didn't. But this would be the way that works.

It rather looks you have picked a tank [63] and just tried to place it somewhere in the cargo bay [9], finally having it surface-attached to it. And then build the payload from there on in two directions. Finally managing to have the front dock optically aligned with the bay-dock. But that is not how it works.

Dealing with payload you also like to have built it separately (to see only its stats) and then save it as subassembly. In such a case you have to make sure that so dock where you want it do dock with the bay must be the root part. When loading sub to your shuttle you will have the whole thing sticking to your mouse and should connect it to the dock, probably by forcing node-attachment with the alt-key. You can see what parts are connected by the parts that are highlighted during placement.

Those are some hints I have for building payload. I hope it helps.

Link to comment
Share on other sites

19 hours ago, Mythos said:

Having another look now I also wonder why you have [63] surface-attached to [9].

Did you build [7] first and then start your payload from there, so put [87] to [7], then [86] to [87] and so on? The numbering tells you didn't. But this would be the way that works.

It rather looks you have picked a tank [63] and just tried to place it somewhere in the cargo bay [9], finally having it surface-attached to it. And then build the payload from there on in two directions. Finally managing to have the front dock optically aligned with the bay-dock. But that is not how it works.

Dealing with payload you also like to have built it separately (to see only its stats) and then save it as subassembly. In such a case you have to make sure that so dock where you want it do dock with the bay must be the root part. When loading sub to your shuttle you will have the whole thing sticking to your mouse and should connect it to the dock, probably by forcing node-attachment with the alt-key. You can see what parts are connected by the parts that are highlighted during placement.

Those are some hints I have for building payload. I hope it helps.

Thanks for the tips, I really appreciate that.

It was definitely a very haphazard design process, where I built the shuttle first and then built the station component to fit into it afterwards, then altered the shuttle a bit to fit it in - all in the same session. So all in all, I did not have a clear plan from the beginning, which probably is a key component in the quagmire it turned in to.

 

EDIT: Also, thanks for the offer to attempt to recover the save file, @linuxgurugamer. But I actually don't mind starting over, as I had intended to make some considerable alterations to my network of communication satellites that probably is easier to redo from scratch.  

Edited by pseudamin
proper kudos
Link to comment
Share on other sites

4 hours ago, pseudamin said:

I did so by changing the name of the savefile and adding a "BACKUP_" prefix to it. But when I changed it back again by removing the prefix, KSP did not recognise that file either.

Hmm.. that is REALLY odd. I'm inclined to agree with @linuxgurugamer   Windoze somehow borked things.

If you still have the file, I'd take him up on his offer, if only to figure out what went wrong, so you can ensure it doesn't happen again.

Edited by JAFO
Link to comment
Share on other sites

16 hours ago, JAFO said:

Hmm.. that is REALLY odd. I'm inclined to agree with @linuxgurugamer   Windoze somehow borked things.

If you still have the file, I'd take him up on his offer, if only to figure out what went wrong, so you can ensure it doesn't happen again.

 

I would if I could but I deleted the file when I realised that KSP did not recognize it.

You both might well be right that it got borked/windozed but I'm thinking that keeping a separate backup folder for copies of whatever persistence files that I'd want to edit with KML might be a better (and less disorganised) solution in the future. 

Link to comment
Share on other sites

Hello Mythos or whomever is now developing KML!

Let me say, this is an awesome tool.  It has helped me several times to deal with things that KSP crapped itself on.  However there are a few things that could enhance the usability of the tool.  Namely inclusion of keyboard event handling for commonly used keys; for example, deleting a highlighted object(s) when the delete key is pressed.  That segues into my other suggestion.  Is it possible to allow us to multi-select objects for some tasks?  I routinely go through my save file and clear out debris as it builds up quickly and causes a mess of things both when navigating in game and performance-wise.  Being able to select multiple debris vessel objects to delete them all at once would make my life so much easier instead of having to delete 40+ debris objects one at a time.

 

Thanks!

 

Link to comment
Share on other sites

1 hour ago, Geowil said:

Is it possible to allow us to multi-select objects for some tasks?  I routinely go through my save file and clear out debris as it builds up quickly and causes a mess of things both when navigating in game and performance-wise.  Being able to select multiple debris vessel objects to delete them all at once would make my life so much easier instead of having to delete 40+ debris objects one at a time.

While I like and support the idea... you mean you don't just regularly delete debris in-game, from the tracking station interface, like the rest of us? (Haystack ReContinued helps with this)

 

(Edit.. wow.. your first post. Welcome to the forums!)

Edited by JAFO
added link
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

First, thanks to all for the encouraging replies every now and then :)

On 3/22/2019 at 2:17 AM, Geowil said:

Is it possible to allow us to multi-select objects for some tasks?  I routinely go through my save file and clear out debris as it builds up quickly and causes a mess of things both when navigating in game and performance-wise.  Being able to select multiple debris vessel objects to delete them all at once would make my life so much easier instead of having to delete 40+ debris objects one at a time.

The suggested in-game solution should have done the trick for your task. Having multi-select seems pretty straight-forward for deletion, but causes issues with other actions from context menu. The whole menu and details view would have to adapt and in most cases somehow come up with some interpretation of what you mean by that for multiple entries… and would probably be often wrong in this guess. So I'd rather not go with multi-select.

On 3/22/2019 at 2:17 AM, Geowil said:

However there are a few things that could enhance the usability of the tool.  Namely inclusion of keyboard event handling for commonly used keys; for example, deleting a highlighted object(s) when the delete key is pressed.

But you definitely made a point on that. I've just put a bunch of new keyboard shortcuts in together with the copy & paste for attributes and a total rework of the kerbals details view to have the attribute editing equal to the one on the tree tab.

I'll think over and then make a new release soon.

Link to comment
Share on other sites

Just uploaded release 0.8.1, see OP.

GitHub now thinks it's a good idea that you need an additional click to expand "Assets" :rolleyes:

And it seems like something on the forum prevents me from specifying new keyboard command as "Left" in square brackets in OP?!

Link to comment
Share on other sites

About GitHub I found out, that I could use a link to ../releases/latest if and only if there were full (non-pre-release) releases. And then the assets would start expanded again. I will think about dropping the pre-release tag as it feels close to 1.0 anyways. Playing around with this I built in a online check for updates (which of course is of no use yet, so not worth a preview build). For the paranoid among you: Yes KML will soon call home, but it will only get a JSON from GitHub and not put anything.

Edited by Mythos
Link to comment
Share on other sites

  • 2 months later...

@Bruce the Loon notified me about an issue since 1.7.3 where the surface attachment node can have a third parameter.

Example: srfN = srfAttach, 80,COLLIDERADAPT

He provided a save where this occurs for some "nfs-panel-deploying-concentrator-1x4-juno-1" parts. Can anyone help to clarify what this is, when this occurs and if this is DLC or a mod?

More info in GitHub issue https://github.com/my-th-os/KML/issues/5

I'm very thankful he not only pointed out this problem but came up with a solution as well. Until this is fixed in the next release, be aware that KML will have problems if your save has such a part attachment. 

Link to comment
Share on other sites

Just uploaded release 0.8.2, see OP. 

This is now implemented:

On 7/31/2019 at 1:05 PM, Mythos said:

@Bruce the Loon notified me about an issue since 1.7.3 where the surface attachment node can have a third parameter.

Still not 100% clear when this is needed and if it should extended to other cases as well. Feel free to contribute your knowledge to https://github.com/my-th-os/KML/issues/5

Just 3 years later and I found time to implement this request as well:

On 7/27/2016 at 10:40 AM, TheCardinal said:

@Mythos, a great tool!

A nice feature would be if you could add the ability to create a list of mods which are used for a craft by checking each part of that craft against the mods in gamedata.

 

 

 

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

Just have to add my own thanks to @Mythos. Had the infamous docking port bug and I was about ready to start "disassembling" my ginormous ship with the object thrower, KML Editor fixed multiple docking ports with just a click! :D Now to choke on the landing and crash it into the surface... :(

Link to comment
Share on other sites

  • 4 months later...

Yahoo! My station had 3 pairs of docks and a grapple all "glued". I fixed the first pair of docks in Wordpad and it took me at least an hour. Then I discovered the miracle of KML and *POW* it's done. I was grappled to a docking port and it fixed that too. 

You probably know this but it gives warnings for Kerbals sitting in external command chairs "part not attached to parent part" but I just ignored those. 

Rant: The devs have got to fix this docking port garbage. Why would I buy KSP2 if they can't get the fundamentals right on KSP1 after 5 years??? I did have the docking port alignment indicator mod installed before so I wonder if that is implicated. It was giving me graphics glitches, helmets jumping on/ off their heads for example, when in physics range of another vessel. It hasn't done that after uninstalling that mod.  

Link to comment
Share on other sites

I'm glad KML helped again… and again and again. Yes, this bug is quite old and still not fixed. KSP2 will be rebuild from scratch, so it will hopefully not appear there again. But having KSP2 coming, I think the motivation to fix KSP1 decreases?!

16 hours ago, Krazy1 said:

You probably know this but it gives warnings for Kerbals sitting in external command chairs "part not attached to parent part" but I just ignored those. 

Well, no, I did not know that. Probably I never had kerbals in external seats in any test save. Still new things to learn about part connections :) And yes, it's fine to ignore any warnings like that.

Link to comment
Share on other sites

  • 1 month later...

How do i fix the problems ? I have a problem with my Ships can't be undocked, have this thing but pretty much don't know what to do, all i can find is "Dock part is parent of other dock part, Docking state should be 'Docked (docker)' or 'Docked (dockee)' but is 'Ready'...", which seems to be the issue.

Edited by GRS
Link to comment
Share on other sites

3 hours ago, GRS said:

How do i fix the problems ? I have a problem with my Ships can't be undocked, have this thing but pretty much don't know what to do, all i can find is "Dock part is parent of other dock part, Docking state should be 'Docked (docker)' or 'Docked (dockee)' but is 'Ready'...", which seems to be the issue.

EDIT: Okay, I didn't realise this upon my first reading, but now I think you mean your problem came about from using this tool.  The advice below might help still.

I'm not sure the source of the problem, but sounds like the structure of the docked vessels are now a bit screwed up.  A screenshot would help.  I don't have time to dig through it, but you could share a copy of a savegame to see if someone can suss out what's wrong.  Also, you could see if there's a save or an autosave from earlier that doesn't have the problem.

There's still the problem of what caused the error in the first place.  That's likely to be some mod or mods that interacted with the post-docked vessel.  You should follow the link in my signature about getting help for a modded install.  You'll need the logs, a savegame, and the screeshot from above.

Edited by Jacke
Link to comment
Share on other sites

6 hours ago, GRS said:

How do i fix the problems ? I have a problem with my Ships can't be undocked, have this thing but pretty much don't know what to do, all i can find is "Dock part is parent of other dock part, Docking state should be 'Docked (docker)' or 'Docked (dockee)' but is 'Ready'...", which seems to be the issue.

Is the question about how to use KML? When you found such a problem, right click the warning ad select "repair this connection...". Then save the file and reload it in KSP. If still problems exist, save again and repair once more (sometimes double-repair is necessary). If then problems aren't fixed, please report some more details here, how the state was initially, what you fixed and how exactly the final state looks like, e.g. with an uploaded savefile. 

Link to comment
Share on other sites

Thanks...i still used the infos this tool shows to deal with the id to find the broken parts, didn't realize i can just do that, but thanks, thanks to this tool, i know what's really wrong...

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