Jump to content

Part sorting


Recommended Posts

I wrote a (PHP) script for renaming the part folders, http://gist.github.com/grom358/5597258.

To rename the files run the command:

php ksp_rename.php /rename

To restore the folders back to original folder names, run the command:

php ksp_rename.php /restore

The tool creates a rename.json that stores information about the part that is uses for sorting and renaming of the folders. Parts are renamed into the format:

[Category]_[OrderNo]__[ModName]_[PartTitle]

Where OrderNo controls the order that the part appears in KSP. Size is optional and only shows if a size for that part could be detected as part of the name or title of the part.

Before: MRl0OZU.png

After: 5UAvLhq.png

I've made it so you shouldn't need to know PHP in order to change some of the sorting it does. The Control, Structural, Aero, Utility and Science tabs are handled by match the title of the part with list of phrases.

If you wish to change Pod and Propulsion tabs that will require PHP skills as that is handled by a bunch of code (readPart goes about detecting what type of Propulsion part and cmp_part sorts by thrust or capacity size). Pods are sorted by crew capacity size.

Link to comment
Share on other sites

Why isn't this hugely popular / highly bumped?

I found this, hit download, and then forgot about it until just today and I thought "Where is that thread? I need to find that thread!" and it wasn't easy to find...

Seriously, people, this is awesome.

Link to comment
Share on other sites

Hey bluegobln did you find having to get PHP a problem? That is the only issue I see with this tool is the requirement of PHP. I am on the lookout for some option that would allow for small executable but still be modifiable by people to change the sorting order. I can easily adapt to some other language that has arrays, associate arrays with sorting functions.

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