Jump to content

What KSP data can I include in my external application?


Recommended Posts

I've built a small NodeJS desktop application that can tell me exactly what science nodes a particular craft requires to unlock, plus the number of science points required to unlock those nodes. Here's a early WIP screenshot (I started this last night):

kspcraftfilescanner.png

To build that map, I'm currently parsing the appropriate .cfg files within the KSP directory and building an internal database of techs and parts. This happens every time the app is run and though it takes only a few ms to do so, I'd quite like to save my internal database to JSON and load it from there instead.

Additionally, I'm now attempting to get a 3D display of the craft to work, so that parts can be selected, viewed and edited much like they can in the KSP in-game editor tweakable menus but with cool stock-compatible features like adding fuel tanks to structural-adapters that really should have them already (im looking at you Rockomax). I'll need to import and parse the .mu and .dds files for that and store those models and textures in WebGL compatible formats - at least in RAM whilst the app is running.

TLDR; What I'd like to know is;

1. Can I distribute an app that can generate a JSON flat-file database of KSP's tech tree and parts list from a KSP installation?
2. Can I distribute an app that can generate models/textures of parts from a KSP installation?
3. Am I allowed to "duplicate" the UI scheme used in KSP (colours, icons e.t.c)? Im certain I can match it pixel-for-pixel but don't want to tread on anyone's IP.

Obviously, I wouldn't be distributing any of KSP's data/models/textures with my application. The application would ask for the user's KSP installation directory on first launch and generate the required files within the application's directory at that point.

Thanks KSP Community, you're always wonderful!

Link to comment
Share on other sites

Thank You for the advice @Sarbian, that's very much appreciated.

While I've got your attention, I'd like to just say another heartfelt THANK YOU! for your work on Mechjeb. Myself and many many more would not have enjoyed several thousand hours of KSP, or learned quite so much, without it.

Link to comment
Share on other sites

Thanks @Benjamin Kerman that's good advice and I've already made a start on a similar, "flatter" UI.

A related question, for anyone who can answer it (hopefully @SQUAD):

Can I convert all Squad part models and textures from within the GameData/Squad/Parts folder to some more "standard" formats and then distribute those with my app?

I'd like my app to display a 3D model of the user's craft so that they can manipulate it in a familiar fashion.

@taniwha made an excellent Blender plugin (thank you!) that allows the import of models and textures from KSP. Ideally I'd have the app scan the local KSP installation and load the models directly; however I don't have the skills to rewrite taniwha's model/texture converter from Python to something I can use in Node/Ecmascript/three.js. I figure converting the models to something that three.js can handle and bundling them with the app will enable me to move forward.

I checked the Addon Posting Guidelines which state; "You may not decompile, modify or distribute any of the .dll files or other files KSP comes with beyond content of the GameData folder.". Does this mean the GameData folder and files contained are open for distribution, providing my app meets the rest of the criteria?

Edited by whoshotdk
Link to comment
Share on other sites

17 minutes ago, whoshotdk said:

Can I convert all Squad part models and textures from within the GameData/Squad/Parts folder to some more "standard" formats and then distribute those with my app?

I will direct you to this comment on my LPS mod. 

These were stock. Not modified, so maybe not what you're looking at doing, but i wouldnt risk it. 

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