Jump to content

create part database


Recommended Posts

At the moment, I make heavy use of spreadsheets to calculate various things for my KSP career.
I have spreadsheets for designing lifter/transport stages (get the cheapest or smallest stage for a given payload and deltav-requirement) or for managing my habitats (I use USI-LS), calculating the required habitation and fertilizer values for a given amount of kerbals and mission duration.
I'm also thinking about making a fancy GUI with python and Qt.

However, these spreadsheets need a part database.
For my deltav-sheet, I needed all data of the available engines and full tanks, so I opened KSP, went to VAB and typewrote all the data into my spreadsheet. Whenever I unlocked a new engine, I added lines to my spreadsheet.

You see, this is a lot of work.
And anytime a new KSP version is released, I have to check if some values changed.
I did this also for the USI-LS parts, which is even more work.

So, I started to look into the part files.
Sure I can parse these files, using python or something. But, there is ModuleManager which can patch parts during loadtime. And I don't want to reinvent the wheel.

Thus, which is the best way to get a database of all installed parts (stock and addons) and even consider ModuleManager?
Is there an library/API which would get me the needed information?
If so, I guess this cannot be achieved "offline" but must be triggered from within KSP as an addon, due to ModuleManager.
Any ideas?

Link to comment
Share on other sites

MM has a callback for code to be executed after the patching so you could have your code generate whatever you need (csv, json, xml,...) or your could write an addon that runs on the main menu, or insert itself late in the loading process

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