Jump to content

[WIN] KML - Persistence file editor


Mythos

Recommended Posts

  On 10/12/2016 at 8:35 PM, Mythos said:

You could go to the part and change its name. I can't tell anything about placement of different sized parts, but replacing a LFO-Tank by LiquidOnly-Tank of same size does work this way. Maybe any surface attached part work as well. Because of this positioning problems and unpredicted behavior in general, it may never be automated,.

Expand  

Ok, I understand. Is it currently possible to do so? Because the positioning can be tweaked as well, and after a few Edit-Quickload cycles, it might not be perfect but acceptable. With your editor it's definitely easier than doing it by hand.

 

  10 hours ago, Mythos said:

I had a look, and this is seems to be a good tool for part removal. But he does interpret the game file in his way and I do it differently. Its not only about deleting in the resulting game file. I need to manipulate my own representation of parts to remove them.

Expand  

Ok, I will use his tool for the time being.

 

  10 hours ago, Mythos said:

What to do about deletion is almost straight forward, but its more than a few lines. Its on the TODO list, but not on top :wink:

I didn't manage to code KML for quite a while, but I will do soon.

Expand  

Great, I'm looking forward to it :) BTW, is your tool 1.2-compatible? I guess the syntax shouldn't have changed, only the contents of the persistence/quicksave files, am I correct?

Thanks for your great work!

 

Link to comment
Share on other sites

  On 10/13/2016 at 7:21 AM, Kobymaru said:

BTW, is your tool 1.2-compatible? I guess the syntax shouldn't have changed, only the contents of the persistence/quicksave files, am I correct?

Expand  

Whilst I can only speak to my experience, if you go back a page, you'll see that I successfully used KML to correct a problem with a 1.2pre gamesave file.

Link to comment
Share on other sites

  On 10/12/2016 at 8:35 PM, Mythos said:

I had a look, and this is seems to be a good tool for part removal. But he does interpret the game file in his way and I do it differently. Its not only about deleting in the resulting game file. I need to manipulate my own representation of parts to remove them. What to do about deletion is almost straight forward, but its more than a few lines. Its on the TODO list, but not on top :wink:

Expand  

Too bad there isn't a common library available for reading and writing that format :sealed:
You could call my code though after you did your changes to the file...let the part removal run as a second step or so. Feel free to bundle it with your app :)

Link to comment
Share on other sites

Thank you very much for this mod!  I had two craft glued together by inoperable docking ports and was not looking forward to the persistence file fixes I found on the forums.  Saw a mention of this tool, installed it, and bingo!  Zeroed right in on the issue, fixed the ports in two clicks, and my space station is back in business.  Thanks again!!!

Link to comment
Share on other sites

  • 3 weeks later...
  On 11/10/2016 at 8:28 PM, TheRagingIrishman said:

is there any chance this could be made to work on macOS?

 

Expand  

As I said to the one asking for Linux: It's very unlikely. KML is a WPF application and WPF does not run on Linux or macOS even with mono. So the whole GUI needs to be rewritten. I'm curious to do so, but I don't have the time.

Maybe anyone want's to fork the project?

Mentioning time... I really misjudged my current situation when I said I will have time to work on KML soon... I don't! :-(

Link to comment
Share on other sites

  On 11/10/2016 at 10:18 PM, Mythos said:

As I said to the one asking for Linux: It's very unlikely. KML is a WPF application and WPF does not run on Linux or macOS even with mono. So the whole GUI needs to be rewritten. I'm curious to do so, but I don't have the time.

Maybe anyone want's to fork the project?

Mentioning time... I really misjudged my current situation when I said I will have time to work on KML soon... I don't! :-(

Expand  

No problem. Just wanted to check in case it was as simple screwing with Mono. 

Link to comment
Share on other sites

Any chance we could get the ability to choose which part is the root part of a vessel?

I have a station I'm trying to send to Minmus and during construction of it (with RoverDude's Konstruction ports) the root part changed to one that's not on the same axis as the main thrusters (at right angles because it's on one of the side nodes of a 6-way hub.

This causes big problems for MechJeb and the stock SAS systems when I tell them to "control from here" on the part I want to be root, and then try to use any of the autopilot nodes. Big and increasing oscillations.

When I just let it keep the root node as the control vector, there are no autopilot issues.

I don't want to have to scrap this whole station, but it's looking like I'm going to have to do just that if I can't even get Kill Rot (or stock stability assist mode of the SAS) to hold the dang thing steady.

If I knew how to do it manually, I would. Manual or via this tool, I'd be fine with advice for either method.
As it is, I'm in a dilly of a pickle.

I've successfully used this tool in the past to fix stuck docking ports, so I know it works if it can do what I'm asking. I just don't know if it's possible to re-root a vessel in the save file with this tool. If it's not, that's a feature I'd like to see added.

Edited by SciMan
Link to comment
Share on other sites

@SciMan Re-rooting is a super complicated algorithm which only KSP knows how to do properly. But if you have KIS you can reroot vessels on demand.

The process is as follows:

  1. park a probe core or any other command module near your vessel
  2. mark it as a "base" type in the rename menu
  3. mark the vessel in question as any other vessel type
  4. place a KAS pipe port or a stock docking port on the part you want to make a root
  5. connect via pipes or docking ports your vessel to the command module
  6. use KIS wrench/screwdriver and the 'H' button to cut your docking port / KAS port from the vessel along with the docked ship
  7. voila, rerooted!
Link to comment
Share on other sites

  On 11/12/2016 at 9:39 PM, Enceos said:

@SciMan Re-rooting is a super complicated algorithm which only KSP knows how to do properly. But if you have KIS you can reroot vessels on demand.

The process is as follows:

  1. park a probe core or any other command module near your vessel
  2. mark it as a "base" type in the rename menu
  3. mark the vessel in question as any other vessel type
  4. place a KAS pipe port or a stock docking port on the part you want to make a root
  5. connect via pipes or docking ports your vessel to the command module
  6. use KIS wrench/screwdriver and the 'H' button to cut your docking port / KAS port from the vessel along with the docked ship
  7. voila, rerooted!
Expand  

Interesting, I happen to have KIS and KAS on my "must-have" mod list, so that's something I'll keep in mind for the future.

As it is, I just de-orbited the whole nearly-complete thing into Minmus (only missing components were final communications array, solar arrays, and crew).
All 2m+ funds of it.
No big loss, I have about 60m funds available, and any remotely significant contract brings in at least a million or 2.

Did I mention I love that those new sliders in the difficulty options go to 1000%?
I'm using Funds Rewards +1000% in my save, as I'm running a lot of mods that add VERY expensive parts in them, and I hate grinding with the passion of a thousand suns.

Edited by SciMan
Link to comment
Share on other sites

  • 1 month later...

Hi everyone. I have a small Mk.1 pod-based ship that I sent to the Mun in the cargo bay of a low-tech SSTO. It was a tight fit, so I clipped some pieces into each other to reduce the length of the cargo, and deployed it in transit to the Mun. Unfortunately, I clipped the engine a little too deeply, and its exhaust gases are heating a toroidal tank that I mounted it to (quickly causing an explosion at even 1% thrust), so the ship is useless. 

I opened up the craft file in KML, and found that the toroidal fuel tank actually thinks it's supposed to be mounted to the nozzle of the engine--on the bottom of it, not on the top between it and the main tank. (I jimmied the screenshot in paint for readability.)

 sKV2bS9.png

I want to switch their places so I can use the ship without having to remove a whole toroidal fuel tank from the craft file. (Which I don't know how to do in the first place, to be fair.)

Is this possible via KML? What do you guys think would be a suitable solution? Let me know if you need more details. 

Thank you!

Link to comment
Share on other sites

  On 12/27/2016 at 6:01 PM, linuxgurugamer said:

@Mythos

i see that there are 5 commits to master since the last release.  Should I use the Apr 28 release, or download and recompile the entire thing myself?

Expand  

3 of 5 commits have only been tests to prepare coming changes... That will take longer than expected, I'm sorry.

2 commits about minor issues where I would not expect them to happen very often.

You can have a look at the preview changelog and download the zip with the preview built I linked in bottom of first post (updated right now).

Link to comment
Share on other sites

  • 2 weeks later...

I started to migrate my own save from 1.1.3 to 1.2.2. Still not done with that but managed to have 1.2.2 working with all the mods I use. First tests are looking good for continuing the save.

I realized the new vessel types plane and relay, at least this has to be represented in KML. So I made this little change, not touching all those more important points from the TODO. Time for that will come one day...

Pre-Release 0.7.2 is now on GitHub and OP updated.

Link to comment
Share on other sites

  On 1/3/2017 at 4:18 PM, Mythos said:

Can you explain what KML has identified but could not repair?

Expand  

Sorry I don't check this too often. Afraid I'm not going to be very helpful :/.No save files with issues right now, so I can't recheck what I meant. Can't remember if there was-

an actual message that popped up that said 'unable to repair'

a successful auto repair confirmation, but the error did not disappear from the GUI. Game confirmed not fixed.

or if the error disappeared from the KML GUI but it was not fixed in game.

Link to comment
Share on other sites

 

  On 1/16/2017 at 4:00 AM, jmill050 said:

error disappeared from the KML GUI but it was not fixed in game

Expand  

For some errors I noticed you need to fix in KML, open the new save in KSP (maybe do something like try to undock), save again and then fix with KML a second time. Maybe it was one of those.

Link to comment
Share on other sites

  • 1 month later...

After having my ships disappear from the VAB for a second time I went carefully thru the last craft saved and found parts had been duplicated, part ID and all.

Looking at your tool there doesn't seem to be a quick way to be notified of, find, or remove duplicate parts.

Am I just missing it or could this be added to the TODO list?

thanks

  Reveal hidden contents
Edited by Morashtak
formatting
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...