-
Notifications
You must be signed in to change notification settings - Fork 214
Parts Browser: How to edit part configurations for RP1
NOTE: this page is currently being edited and rewritten. In the meantime, it has not been verified for accuracy, and may lack important warnings.
The parts browser is a browser-based JSON interpreter tool included in the RP-1 source files that facilitates the editing and generation of RP-1 config files. It handles values including tech tree placement, costs, and entry cost modifiers.
The parts browser runs on Python 3, which you can install from here. Make sure that you select "Add Python 3.* to PATH" when running the installer, otherwise you will have to manually add it to PATH in the environment variables. You will then need to install pip by running Python/Python3*-32/Tools/get-pip.py
. From there, you will also need Flask and slugify, so run pip install flask
and pip install slugify
. After that you can run app.py
(located in RP-0/Source/Tech Tree/Parts Browser
), and then go to http://localhost:5000/dashboard.
The full source code for the part browser can be found in the various .py
files located at RP-0/Source/Tech Tree/Parts Browser
. When run, the program loads the data from the JSON files in RP-0/Source/Tech Tree/Parts Browser/json
, and displays the data at http://localhost:5000/dashboard. Upon loading you will see a home screen - click on "Dashboard" in the top right to view the parts table.
The parts table displays a list of all the parts that have RP-1 configurations. At the bottom you can move through the pages and change the number of items per page. Note that selecting a high number of items per page will make the page slow to a crawl. In the header row of the table, the parts can be filtered by a number of different categories. These will allow you to find the parts you wish to change, and then you can then edit the configurations using the "edit" button in the far right column. Additionally, if you are making completely new configs (eg. for a new mod), you can add a new part using the button at the top.
Category | Description |
---|---|
Name | Internal part name used for MM patching (found as name = *** in config files). |
Title | Part title displayed in game. |
Mod | Mod from which the part originates. |
Cost | Purchase cost of the part in game. |
Entry Cost | Cost of unlocking the part in game. May be affected by ECMs (see below). |
RO | Value of the RSSROConfig field. Parts configured for RO should have this set in the RO config files. This should be left as what is in the RO config files. If it is not configured the first step is to submit a PR to RO before making RP-1 configs. |
RP-0 | Sets the value of the RP0conf field. This must be selected, otherwise parts will be marked as non-RP0 and may be either moved to another category (by Filter Extensions) or hidden entirely (by the NoNonRP0 folder). |
Category | One out of AVIONICS, COMMAND, COMMS, EDL, ELECTRONICS, FLIGHT, HYDROLOX, ION, LS, MATERIALS, NTR, NUCLEAR, ORBITAL, POWER, RCS, SCIENCE, SOLID, SPACEPLANES, STAGED, STATIONS from drop down menu. No effect in game but useful for filtering parts in the parts browser. |
Year | Real-life year of part. No effect in game (see below for tech tree placement) but useful for filtering parts. |
Orphan | Sets tech placement to Orphan node for unconfigured parts if checked. All placed parts should leave this unchecked. |
Upgrade | Used to indicate an engine config upgrade instead of a physical part. Used only for engine configs (mod = Engine_Config ) and should not be changed for individual parts. |
Entry Cost Mods | See ECM section below. |
Identical Part | See ECM section below. |
Engine Config | Defines the engine type. This does not have any functionality in game, as engine config definitions and patches are applied from RO, but is useful for finding the same engine from different mods. |
Info | Any additional notes about the part. No functionality. |
Technology | Tech tree placement. Must be selected from drop down menu in order to be correctly placed by RP-1. May require research and/or community discussion as to an appropriate placement. |
Module Tags | Used for KCT rollout cost multipliers. Valid options and their multipliers can be found at RP-0/GameData/RP-0/KCT_Presets/RP1_KCT_Presets.cfg . |
Editor's note: everything below here is being rewritten.
Part Browser is included in the source of the project and is a browser based JSON interpreter and converter.
It can automatically create the full set of RP-0 configs for all things related to TREE, ECM and costs.
After installing and loading up the http://localhost:5000/dashboard you can sort and find the part you want to modify or add a new part. Select either the "Edit" on the part or the "Add New Part" UI buttons.
Warning selecting a large number of part fields from the selection dropdown will slow the page to a crawl and at ~500 setting will make it appear to be locked up for a while.
After queing an entry you will need to commit the changes to the JSON files or else they will be lost.
Once you are finished editing the parts you need to edit, Generate the configs and test them. Then after successful testing submit the changed JSON files in your PR.
FROM READ ME
RP-0-Parts-Browser
This is a browser/editor application for the RP-0 parts list (converted to json files per mod) that can also generate the needed configs from it.
To get it working:
- It uses Python 3, so that needs to be installed.
- It uses flask, so: pip install flask
- Flask uses slugify (I think) so: pip install slugify
- Then you should be able to hit: python app.py
- Point your browser at: http://localhost:5000/dashboard
RP-0 Needs For RP-0, every part used in the game must be configured in a few ways to be used in the career mode game.
Need to define where it goes in the tech tree as well as an entry cost and a part cost. Need to declare any parts from any mods that represent the same part. (Identical Parts) Need to declare any entry cost modifiers (ECMs) that affect the entry cost of linked parts (for example, unlocking the LR-79 drastically reduces the entry cost of unlocking the LR-89) Need to link engines to their engine configs. Need to generate engine configs. In the past the files that govern these configs (TREE-Parts.cfg, TREE-Engines.cfg, ECM-Parts.cfg, ECM-Engines.cfg, and identicalParts.cfg) were generated from a google spreadsheet with formulas and whatnot. There were several issues with this, so after consulting with Pap and TidalStream I came up with the idea of instead building this browser/editor/config generator that would instead operate on JSON files which could be tracked and source controlled by git instead of relying on the google sheet.
What the browser does Converted from sheet to JSON files per mod I originally read all the data in from the PartSheet.csv (generated from Pap's database) in /original_sheet_data. Then I converted it to JSON files per mod, which are now in the /data directory. Created a Part Browser/Editor that you can run locally as a webapp using Python 3
Browser The Part Browser allows you to view all of the currently known parts in RP-0. Some of these parts have been configured, but by no means all of them. Some are partially configured. Some are 'orphaned' which is kind of a Work in Progress flag. The browser allows for filtering by any of the columns. Easy way to visualize and inspect the currently known parts.
Editor The far right column contains an edit button that pops up a form for that part to be edited. The button at the bottom 'queue changes' will add any changes you make to a 'currently queued changes' list that shows up at the bottom of the page.
http://localhost:5000/ecm-tree
When changes have been made, there will be a button at the bottom that says 'commit changes'. This button will actively make your changes in the JSON files in the /data directory, making them 'permanent'. It's then up to you to create a pull request to have them changes in the git repository.
Config Generation The button at the top of the page will take the current data in the app (including any queued changes that have been committed), and regenerate the config files into the /output folder.
Kerbal Space Program RO/RP-1. Join the discord server for support.
- RP-1 Wiki Home
- Introduction and Overview
- ↱ RO Wiki Home
- ↱ RP-1 Forum Thread
- ↱ KSP-RO Discord
- ↱ Community Screenshot Gallery
- Installation Guides
- Am I ready for RO RP-1?
- Extra Mods to Consider for experienced players
- New RP-1 Career Setup
- Early Career Tutorial
- New Career Settings
- FAQs
- A Primer on Ascent
- The How-To Guide
- ↱ Moving from Kerbin to Earth
- New Player Advice
- Youtube Career Tutorials
- Conversion Guide for Programs and Launch Complexes
- RSS ∆v Maps
- The MechJeb PVG Bible
- Tech Research Advice
- Basics of Avionics
- Tank Types
- Upgrading the VAB and R&D Complex
- Launch Complex and Programs
- What is Tooling?