GithubHelp home page GithubHelp logo

ksp-configparser's Introduction

KSP-ConfigParser

A .NET Core class library for parsing KSP configuration files and extracting node relationships and attribute definitions.

This is not meant to be used as a replacement for the official KSP configuration file parser or anything that ModuleManager does. It was a white-room reverse engineering of the configuration file syntax to gather some data that I needed for an add-on project. The parser handles everything that I've thrown at it so far, but there are no guarantees of fitness for purpose. But if you want something simple to search through thousands of configuration nodes and extract information into a CSV format, this may be useful.

Overall, I recommend parsing the ModuleManager.ConfigCache file instead of looking at the original KSP part configuration files. ModuleManager will handle a lot of the oddities that can happen in .cfg files, plus it applies any MM patches in the various files.

Current analyzers

All of the pre-written analyzers are in the samples/ folder. They will parse the configuration file(s) and output a CSV file with the desired information.

  • AntennaBalanceValues: Pulls a list of all parts which can act as an antenna (direct, relay, internal). I used this heavily to work on my KSP Stock Antenna Balance addon.
  • ProbeCoreValues: Pulls a list of all parts that have ModuleCommand. Includes information like min/max crew, antenna values, mass, cost, etc..

Spreadsheet Links

Getting Started

You will need to have installed the .NET Core 2.1 (or later) SDK. This is available for macOS, Linux and Windows. For the moment, that is the only prerequisite to be installed prior to forking/cloning the git repository.

Take a look at run-samples.sh for how to run the sample projects on macOS/Linux.

Technology

  • .NET Core 2.1
  • FileHelpers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.