Jump to content

[0.14.x+,WIN] .craft and .sfs analyzer


Recommended Posts

It can be quite irritating when you can\'t load a craft or when crafts are removed from a persistent/quicksave file due to missing parts. On the other hand it is irritating as well when KSP abends due to too many installed mods.

I intend to develop a means (in VB6) to determine which parts/mods are minimally required to load a craft (or all those present in the persistent and quicksave files). Currently i have completed the program which collects data from al the part.cfg files in all subdirectories below a given directory and builds the parts database. Works is in progress on the second program which analyses the .craft (or .sfs) file and determines which parts are used. The database is then used to specify the requiered mods.

For testing purposes i would appreciate if KSP users would post some .craft or .sfs files in this thread. If asked, i will post the parts/mods list of the posted files (as soon as the program functions).

Link to comment
Share on other sites

I intend to develop a means (in VB6) to determine which parts/mods are minimally required to load a craft

For those poor Linux users who don\'t have access to VisualBasic:

$ grep part.= Ships/VAB/my.craft | sed \'s/_/ /\' | awk \'{print $3}\' | sort | uniq

;)

Link to comment
Share on other sites

  • 2 weeks later...

Until now i\'ve concentrated on the building the parts-database and analyzing craft files. I\'ve colected 2063 parts so far (but i know i\'m still missing several old mods). At first i only wanted to get a list of the required parts/packs, which the program soon was able to provide. It soon became clear that a lot more was feasable. After some trials and errors i altered the program to become a partpicker/packbuilder. The program now can build a (new) pack consisting of all the required parts, plugins, plugindata, ship and partlist.

As some point in the past parts which had a dot in their name were renamed to parts with an underscore instead of the dot.

A simple rename should mean that changing the names in the craft file should pose no problem and make the craft loadable with new parts in the game. Apparently a misconception because i do get notifications of missing parts.

(f.i. the part isa.RAM.Module -> changed into isa_RAM_Module. After editing the craft file i get Missing part isa_)

Clearly, i still don\'t fully understand the naming conventions/rules in the program/parts.

Should anyone have a clue what i\'m missing i would appreciate the help.

I discovered my error. Although the name of a part may contain a dot (or multiple) in the sfs/craft files, the name in the partfiles is recognised even if the file contains an underscore (or multiple) instead of a dot (dots). Collecting all the parts is therefor sufficient, no editing is required in part.cfg and/or craft/sfs files.

I\'ve started on the sfs files.

* Edit - Cause of error added *

Link to comment
Share on other sites

Cardinal - are you getting close to releasing this, or just want to keep it for your internal use? I appreciate your offer to babysit the mod community base thread and keep it updated, but I was also thinking to just give people instructions on it once this tool is available. I can see it being quite a headache for you to make sure you have the latest mod parts downloaded, let alone the rest of the process this must take!

Link to comment
Share on other sites

Until now, i didn\'t have to think about releasing it and in which form. No one seemed to be interested in the least.

Frankly, i have no problem releasing it to others. The intention of the programis to prevent the frequent crashes due to a lack of memory and the more who (can) use it, the better.

Having said that and thinking a little about releasing, i can see several difficulties. The smallest difficulty is that all possible error situations have to be taken care of. That can be programmed relative easily.

A bigger problem is in what form can i release it? The program consists in fact of two programs. One collects all relevant data of the parts and puts it in a database. The second reads the reads the sfs and/or craft file, determines which parts are mentioned in the file and looks in the database where to find the part. As i keep all mods in separate directories, the directoryname tells in which mod the part can be found. As the directoryname is known, the user can choose to either print a partlist with the name of the corresponding mod but he also has the option to copy all parts into a collection directory (including that partlist). The name of that directory will be similar to the read craft/sfs file and is (currently) stored in the root of drive C:. When necessary, everything can be made configurable.

Releasing both programs would mean that every user has to do everything for himself. Searching for all the mods, naming them recognisable, keeping them stored in such a way that the program can work with it. And filling/updating the database again and again. (Very inefficient if you ask me). I could of course supply frequently a \'standard' database. However that restricts the user to only partlists and he still has to look for the required mods, select the parts and copy them into either the parts directory of KSP or (what i personally think is preferable) a \'collection-mod directory\' which can be added or removed with JSGME.

An other option could be not releasing anything and provide a collection mod for f.i. a craft file if so requested (babysitting as you\'ve called it). And both options at the same time is also possible. I have to think about it some more, but i would like to hear your view on it.

Link to comment
Share on other sites

I think what I\'ll do is put something into the OP on the Community thread saying that if people need an option for much smaller memory requirements, they can PM you. Knowing which base they intend to land at, you (or I) can use Kessler to delete all the craft that aren\'t related to that base, and then you can run your tool in combination with the known mod list to produce the pared-down 'only the essentials' combined mod pack.

What you\'re doing here impresses and amuses me. When I was in college in the early 90\'s using a computer with only 192 KB of RAM, I wrote my own modem comm program because the existing comm programs needed more memory than I had. That comm program was solely so that I could dial into the university\'s internet access and play MUDs over the very minimal 1200 bps modem in that computer. Your efforts to play a game you enjoy in spite of your memory limitations reminded me of that time!

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