Jump to content

[0.18/19/20/21] KerbalEdit - Take Control of your Data


Recommended Posts

Update 8/5

Minor patch applied to fix part loading issue for KerbalEdit, future versions will include better browsing for parts, this patch will make it so you can at least load and edit parts correctly. Simpily download the latest edition of KerbalEdit and delete any old copies you have if you are no longer using KSP versions prior to 0.21.x Please let me know if you have any issues.

KerbalEdit v0.3.1 - KSP Data Editor for Windows

hxnlmnu.png

  1. Open a KSP Install by Typing in the path of your KSP install and clicking "Load" or clicking "Folder" and using the picker.
  2. Navigate your files and data using the tree. Don't worry! Nothing is changed unless you make an edit and Save it.
  3. Edit data values directly just as if you were editing the file, get to your data elements quicker.
  4. Data Values and the tree items that hold them highlight to let you know what has been changed since the data was opened
  5. Right-Click menu on many nodes provide quick access to a number of quick update method

What is Kerbal Edit?

KerbalEdit is a Reference application based upon the KerbalData. It is a fully usable

end user application with source to give other developers a guide in thier own KerbalData Applications.

KerbalEdit allows you to:

  • Load/Edit/Save KSP Save, Craft (both global and under a specific save), Part and game settings.
  • Scan a KSP install for all available data files
  • Import/Export Files to your game quickly
  • Automatically backs up changed files, keeps a copy of original data to restore live object.
  • Save Development Time : Time Savings
  • Do simple popular actions
  • Clear all debris and unknown items from a save
  • Put any craft currently in game (on the pad or in orbit) in orbit around any body
  • Refuel any or all craft in your save with a single command (fills any resource to max)
  • more to come (looking for suggestions)...

Requirements

  • Windows XP/Vista/7/8 (Mac and Linux versions are planned but not yet available)
  • .NET 4.0 Framework

Download Here

Source Here

Powered by KerbalData

Edited by Manitcor
Link to comment
Share on other sites

Update 4/19

Forum failure lost the thread so reposting it, still need to add back everything the old thread had. I have been slammed with work so have made little progress as of late however I am back to looking at KerbalEdit and KerbalData and hope to get some serious code in soon.

Link to comment
Share on other sites

This is a nice utility. A very handy way to review all the kerbal data.

I have a suggestion. KSP memory is always at a premium. Would it be possible to add the ability to choose a vab part, search all crafts to see if it is used then provide an option to delete it if it's not. I have a ton of parts installed but I'm afraid to delete anything in case it's used on one of my ships somewhere. A parts manager would allow me to easily remove parts that I don't use and reduce the memory crashes.

Thanks.

Link to comment
Share on other sites

  • 1 month later...

I am in need of a persistent.sfs file to CSV/Excel/Access/OpenOffice exporter. I am looking into using KerbalData as in your link or https://github.com/ROFLCopter64bit/Konversion , but I am a major programming noob. Anyway, it would be perfect if this utility (that I use often), could just export its data to a CSV.

I am trying to find a way to record statistics of vessels in the game (especially resources, collected resources of docked ships/stations, etc.)

Link to comment
Share on other sites

I am in need of a persistent.sfs file to CSV/Excel/Access/OpenOffice exporter. I am looking into using KerbalData as in your link or https://github.com/ROFLCopter64bit/Konversion , but I am a major programming noob. Anyway, it would be perfect if this utility (that I use often), could just export its data to a CSV.

I am trying to find a way to record statistics of vessels in the game (especially resources, collected resources of docked ships/stations, etc.)

I can make a sfs-CSV converter easily. I can add it to Konversion.

Link to comment
Share on other sites

  • 1 month later...

It's been a little while since I have had time to code for personal projects so I haven't done a ton with this. The design is made to be future proof to a certain degree. I have tested the current release of KerbalEdit with 0.21 and file editing and loading works just fine. Feel free to continue to use KerbalEdit on your latest 0.21 save, config and craft files. Please let me know if you have any issues.

Link to comment
Share on other sites

Is it possible to transfer data from one save to another one?

Not yet sadly. I want to get back into working on this as it is a planned feature. I need to spend some time writing unit tests first so I can validate the work better. I first wrote this on a lark and have been a bit sloppy about proper unit testing and have been doing manual tests to ensure data integrity. At this point it makes it too easy for me to over-complicate or break things without the right tests.

tl;dr No, not yet, sorry ;.;

Link to comment
Share on other sites

Hey great start on this utility. I love the generic hierarchical approach tot he many files.

A feature request: I'd love to be able to edit craft in the persistence (or save) files. For example, delete unneeded parts to reduce part count. Looking at the file structure this would involve renumbering all the part references within that VESSEL to make up for the missing one. I think it would make sense to remove all symmetric parts at once, just like the VAB does.

For example, removing part 16, which is a "solarPanels5", would require all references to part 16 (and up) to be decremented by one. The references I've noticed are in the "sym", "parent", and "attN" references. Removing a parent would (reasonably) remove everything attached to it. These little static solar panels are my bane. I put them on everything early on to make it quasi independent and now that I've docked lots of things together I have dozens and dozens of them.

Link to comment
Share on other sites

Hey great start on this utility. I love the generic hierarchical approach tot he many files.

A feature request: I'd love to be able to edit craft in the persistence (or save) files. For example, delete unneeded parts to reduce part count. Looking at the file structure this would involve renumbering all the part references within that VESSEL to make up for the missing one. I think it would make sense to remove all symmetric parts at once, just like the VAB does.

For example, removing part 16, which is a "solarPanels5", would require all references to part 16 (and up) to be decremented by one. The references I've noticed are in the "sym", "parent", and "attN" references. Removing a parent would (reasonably) remove everything attached to it. These little static solar panels are my bane. I put them on everything early on to make it quasi independent and now that I've docked lots of things together I have dozens and dozens of them.

That is something I most certainly want to do. My initial focus was to get the base file format tools working. Posts like yours are immensely helpful for when I get to adding more features as most of the "advanced" stuff requires specific knowledge of how to mutate the data properly. Keep it coming ;-)

Link to comment
Share on other sites

This is not quite working the way it used to, since the part cfg format changes. It doesn't actually load the parts. Basically, it's kinda useless at the moment. Unless I'm missing something very basic.

It scans the Parts folder which is now empty, rather than the GameData folder where everything has gone. At least, that's what the source code suggests. I'm still picking my way through that, trying to make sense of how it parses the files. Not straightforward in that regard.

Edited by JeBuSBrian
Link to comment
Share on other sites

This is not quite working the way it used to, since the part cfg format changes. It doesn't actually load the parts. Basically, it's kinda useless at the moment. Unless I'm missing something very basic.

It scans the Parts folder which is now empty, rather than the GameData folder where everything has gone. At least, that's what the source code suggests. I'm still picking my way through that, trying to make sense of how it parses the files. Not straightforward in that regard.

KerbalEdit does no file parsing, KerbalData handles that. KerbalEdit simply directs some KD parameters. Ill take a peek tonight and see what is up, I didn't test part files as much as I should have it seems. You can open them individually by pointing to a specific file, you just won't get the tree with all of your data.

Link to comment
Share on other sites

KerbalEdit does no file parsing, KerbalData handles that. KerbalEdit simply directs some KD parameters. Ill take a peek tonight and see what is up, I didn't test part files as much as I should have it seems. You can open them individually by pointing to a specific file, you just won't get the tree with all of your data.
Kinda splitting hairs there, considering you made them both, and this is just about the only thing that uses KD, don't ya think? :P

Anyhow, from the looks of it, KD isn't recognizing that parts now use the Part{} wrapper. It's trying to use them in the old format. So even importing parts isn't going to do much good. Though, this is me just jumping into the deep end of your code, so you'd know better than me.

Link to comment
Share on other sites

Kinda splitting hairs there, considering you made them both, and this is just about the only thing that uses KD, don't ya think? :P

Anyhow, from the looks of it, KD isn't recognizing that parts now use the Part{} wrapper. It's trying to use them in the old format. So even importing parts isn't going to do much good. Though, this is me just jumping into the deep end of your code, so you'd know better than me.

the reason I bring it up is if you are looking at source the problem may not be in KE and you did not specify where you were looking. Like I said, I'll take a look later tonight, no promise on a fix right away though, this was a little evening project that does still need a lot of love, thus the use of the term alpha.

Link to comment
Share on other sites

Kinda splitting hairs there, considering you made them both, and this is just about the only thing that uses KD, don't ya think? :P

Anyhow, from the looks of it, KD isn't recognizing that parts now use the Part{} wrapper. It's trying to use them in the old format. So even importing parts isn't going to do much good. Though, this is me just jumping into the deep end of your code, so you'd know better than me.

These libraries don't work quite the way you think. The issue lies in the new paths for parts here as KerbalData does not rely on specific section names in the file. The system uses nant style paths to locate files in the system. It's something I want to make configurable in the future but right now is hardcoded. I made a minor change to KD so that the parts will load again. For this version all the files will load flat, in future versions this will be fixed so you can see the tree structure Squad has put into the file system.

Try this new version of KerbalEdit with the patched copy of KerbalData and let me know how it goes: https://kerbaledit.codeplex.com/downloads/get/714182

Link to comment
Share on other sites

Minor patch applied to fix part loading issue for KerbalEdit, future versions will include better browsing for parts, this patch will make it so you can at least load and edit parts correctly. Simpily download the latest edition of KerbalEdit and delete any old copies you have if you are no longer using KSP versions prior to 0.21.x Please let me know if you have any issues.

Link to comment
Share on other sites

  • 2 weeks later...

Hey there and thanks for this tool. However, I registered on the forum to report a problem I have with it regarding 0.21.1/steam. Hopefully, this is the right place.

When I open my save game, refill the resources on any one ship in an orbit using the context menu, and save it back, it essentially breaks the save game by doing the following:

* Before loading: The "age" of the save game as displayed in the in-game save game selection screen becomes negative, usually around -67 days.

* After loading: All but one ship (not the edited) are removed from the Space Center selection menu, despite the save game selection menu still stating "9 ships".

When I check out the resources on empty or non-full tanks, the editor does regularly display non-sane "current" values, instead it shows very long integers, where the first couple digits would make sense, but it kind of gets screwed up because of this mantisse-style appendix. So i.e. for an oxidizer reading it would not show like 1286/3520 (current/max), but 128612939245729103/3520, where 1286 would be a value correlating the factual value from the in-flight UI.

Resetting this to 3520/3520 screws up the save game, and also resetting something like 0/3520 to 128612939245729103/3520 screws up the save game. Even refilling the fuel on a mono tank from 0/40 to 40/40 screws up the save game. My guess is that the data type has changed somehow, or some kind of check sum is missed.

Anyways, this basically renders this promising tool unusable for me.

My question: What can I do to help you pin down this problem? A screenshot? A transcript of real-life examples of these long numbers? An example save game? Pre-/Post-broken? More data about my system or installation?

Many many thanks in advance!

Best regards,

hiergiltdiestfu

Edited by hiergiltdiestfu
(clarifications, context)
Link to comment
Share on other sites

Hey Manitcor,

I downloaded and am working with your KerbalData library. This looks like a great tool, thanks! However, I can't seem to enumerate your "StorableObjects<T>" collections as this object doesn't implement the IDictionary (and therefore neither the IEnumerable) interface. I took a look at the documentation and the example to no avail; I could have missed something. Any help would be greatly appreciated!

Thanks in advance,

Eric

Link to comment
Share on other sites

Follow-up:

I ended up with an abstraction layer exposing this:

_kd.CraftInVab.Names.Select(n => _kd.CraftInVab[n]).ToList();

So I could do this in my code:

foreach (var craft in _kspMgr.VabCraft) vabCraftListBox.Items.Add(craft.DisplayName);

- Eric

Link to comment
Share on other sites

My question: What can I do to help you pin down this problem? A screenshot? A transcript of real-life examples of these long numbers? An example save game? Pre-/Post-broken? More data about my system or installation?

Many many thanks in advance!

Best regards,

hiergiltdiestfu

You provided a lot of detail, I will take a deeper look this week and let you know. Clearly I need to clean up my test suite and make better regressions.

EDIT:

If you can provide me with a save file pre and post these bad edits it will be helpful in nailing this down. I don't play as much as I used to so I don't have many save files kicking about that represent real usage.

Edited by Manitcor
Link to comment
Share on other sites

Follow-up:

I ended up with an abstraction layer exposing this:

_kd.CraftInVab.Names.Select(n => _kd.CraftInVab[n]).ToList();

So I could do this in my code:

foreach (var craft in _kspMgr.VabCraft) vabCraftListBox.Items.Add(craft.DisplayName);

- Eric

That would be the correct idea. StorableObjects<T> is a generic class but not an enumeration (not all generic classes are enumerations, generic properties are used for many reasons). The idea is that there is a single repository implementation (StorableObjects) that supports any kind of data file sporting the KSP format. Everything under a StorableObjects repository should be either enumerable or a dictionary of sorts.

Link to comment
Share on other sites

If you can provide me with a save file pre and post these bad edits it will be helpful in nailing this down. I don't play as much as I used to so I don't have many save files kicking about that represent real usage.

Thanks for your quick reply and for taking up the challenge :) I will be able to provide the requested files tonight after work.

Best regards,

hiergiltdiestfu

Link to comment
Share on other sites

Thanks for your quick reply and for taking up the challenge :) I will be able to provide the requested files tonight after work.

Best regards,

hiergiltdiestfu

Awesome, thank you!

I am planning to sit down tonight and go over this. I am planning 2 releases, a patch ASAP to fix this specific bug and an updated release with better test data and testing for future updates.

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