Author: ChrisDeadman
Removes parts from Kerbal Space Program crafts
- Works with .craft and .sfs files
- Checks all links to the removed part(s) and also removes parts with "hard" dependencies
- Adapts "parent", "link", "sym", "SrfN" and "AttN" links on dependent parts - in other words performs a "safe" remove
- Can also print a list of crafts, parts or dependencies
KSPPartRemover v1.0
Compatible with KSP version: 1.1.3
usage: KSPPartRemover.exe <command> [<switches>] -i <input-file>
Commands:
remove-parts
remove one or more parts from one or more crafts
list-crafts
list crafts in the input file
list-parts
list parts in the input file
list-partdeps
same as 'list-parts' but also prints dependencies
the part filter is applied on the dependencies for this command
Switches:
-i <path>
specifies the input file
[Optional]
-o <path>
specifies the output file (modifies input file if not specified)
[Optional]
-c, --craft <name-pattern>
apply craft filter (applies to all crafts if not specified)
'!' in front of the regex performs inverse matching
example for name pattern: --craft '^Asteroid'
example for inverse matching: --craft '!Mün'
[Optional]
-p, --part <id or name-pattern>
apply part filter (applies to all parts if not specified)
if part is a number it is interpreted as the part id
'!' in front of the regex performs inverse matching
example for id: --part 1
example for name pattern: --part 'fuelTank.*'
example for inverse matching: --part '!^PotatoRoid$'
[Optional]
-s, --silent
do not print additional info, do not ask for confirmation
- If no output file is specified, the input file is modified.
- This tool supports a --silent switch and can be used programmatically should you desire.
- It has been tested with the following types of files so far :
- .craft files generated by KSP 1.1
- .sfs files generated by KSP 1.1
- .txt craft files generated by the DarkMultiplayer Server (a pretty old version, quite a while ago)
- Minor changes to output messages
- Compatible with KSP version: 1.1.3
- NOTE: command line interface is not backwards compatible!
- Add support for .sfs files
- Add support for multiple crafts
- New command list-crafts: list crafts in the input file
- New command list-parts: list parts in the input file
- New command list-partdeps: same as list-parts but also prints dependencies
- Add craft- and part-filter support via regex (inverse matching supported)
- Dependent parts are now only removed if they have a "hard" dependency
- Reduce displayed entries per page from 50 to 20
- Fix "output file not found" error - facepalm
- Compatible with KSP version: 1.1
- preserve formatting of input file when adjusting part properties
- fix a bug where output files could get corrupted if they were already existing
- fix bug: throws exception if output file is same as input file
- lower TargetFramework version from v4.5.1 to v4.5
- Compatible with KSP version: 0.24.2
- add initial support for .craft files
- Compatible with KSP version: 0.24.2
- update command-line switches (not compatible with v0.1)
- replace -p/--part-name command with -r/--remove
- support part id as argument for --remove aswell as the name
- add part listing support (-l/--list command)
- Compatible with KSP version: 0.24.2
- Initial release
- Compatible with KSP version: 0.24.2