Jump to content

[WIN] KML - Persistence file editor


Mythos

Recommended Posts

10 hours ago, 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,.

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.

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.

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

32 minutes ago, 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?

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

1 hour ago, Kobymaru said:

is your tool 1.2-compatible?

I didn't notice any changes in savegame syntax for any version update lately. So I would say its compatible with at least any version from 1.0 to 1.1.3.

Link to comment
Share on other sites

On 12.10.2016 at 10: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:

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...
1 hour ago, TheRagingIrishman said:

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

 

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

1 hour ago, 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! :-(

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 4: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!

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 ‎27‎.‎12‎.‎2016 at 7: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?

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

15 hours ago, jmill050 said:

Fantastic tool for bug squashing, thank you. Auto repair didn't do what I needed for the docking ports, but allowed me to easily identify and fix it manually. Thank you!

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

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 8:18 AM, Mythos said:

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

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

 

11 hours ago, jmill050 said:

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

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

 

PART
{
    part = KIS.Container3_4288402680
    partName = Part
    pos = 0.595946908,21.6458092,0.322449952
    attPos = 0,0,0
    attPos0 = 0,-0.974999905,0
    rot = 0,0.707106948,0,0.707107067
    attRot = 0,0.707106769,0,0.707106769
    attRot0 = 0,0.707106829,0,0.707106829
    mir = 1,1,1
    symMethod = Radial
    autostrutMode = Off
    rigidAttachment = False
    istg = 3
    resPri = 0
    dstg = 6
    sidx = -1
    sqor = -1
    sepI = 6
    attm = 0
    modCost = 30493.457
    modMass = 1.04399991
    modSize = 0,0,0
    link = LETladderF3m_4292754882
    link = TPmono2mL05000_4292531846
    link = SEP.StorageShort_4287831636
    link = SEP.StorageShort_4287823820
    link = mediumDishAntenna_4287803876
    link = mediumDishAntenna_4287803876            <=== Why?! Stop doing this to me, whatever evil code you are!
    attN = top,TPmono2mL05000_4292531846
    attN = bottom,ScoutLanderMk2_4285907654
    EVENTS

 

        UPGRADESAPPLIED
        {
        }
    }
}
PART
{
    part = mediumDishAntenna_4287803876
    partName = Part
    pos = 0.595947623,21.5574303,1.61843872
    attPos = 0,0,0
    attPos0 = -1.29598868,-0.0883789063,8.34465141E-07
    rot = 0.707106829,2.08616186E-07,-1.63912716E-07,0.707106709
    attRot = 0,0,0,1
    attRot0 = 0.500000238,-0.499999791,0.49999994,0.500000179
    mir = 1,1,1
    symMethod = Radial
    autostrutMode = Off
    rigidAttachment = False
    istg = 3
    resPri = 0
    dstg = 6
    sidx = -1
    sqor = -1
    sepI = 6
    attm = 1
    modCost = 0
    modMass = 0
    modSize = 0,0,0
    srfN = srfAttach,KIS.Container3_4288402680
    EVENTS
    {

(removed)

 

        UPGRADESAPPLIED
        {
        }
    }
}
PART
{
    part = mediumDishAntenna_4287803876    <=== KIS isn't a solution as the ship is fubar and tearing itself apart at launch
    partName = Part
    pos = 0.595947623,21.5574303,1.61843872
    attPos = 0,0,0
    attPos0 = -1.29598868,-0.0883789063,8.34465141E-07
    rot = 0.707106829,2.08616186E-07,-1.63912716E-07,0.707106709
    attRot = 0,0,0,1
    attRot0 = 0.500000238,-0.499999791,0.49999994,0.500000179
    mir = 1,1,1
    symMethod = Radial
    autostrutMode = Off
    rigidAttachment = False
    istg = 3
    resPri = 0
    dstg = 6
    sidx = -1
    sqor = -1
    sepI = 6
    attm = 1
    modCost = 0
    modMass = 0
    modSize = 0,0,0
    srfN = srfAttach,KIS.Container3_4288402680
    EVENTS
    {

Edited by Morashtak
formatting
Link to comment
Share on other sites

10 hours ago, Morashtak said:

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

For the moment KML can load craft-files because it was no big deal. But any check for problems does only work for savegames so far. Now I know about this possible bug, I may add a check for this.

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