ShotgunNinja

[1.2.x] PartOrganizer 1.1.0

Recommended Posts

 

PartOrganizer

Version: 1.1.0
Download: githubspacedock, CKAN
Source: github
License: Unlicense
Require: ModuleManager
 

This simple mod allow the creation of custom part categories in the KSP Editor.


EditorCategory
The mod parse all EditorCategory entries it can find inside the .cfg files in GameData, and use that information to create custom categories.

properties.png

 

Icons
An icon is required, and it need to be 32x32 pixels in size. The url to the icon is the path inside GameData, without file extension. If another image is present with the same url but ending with '_selected', that image will be used when the category is selected.

 

Tag
The tag system is exploited to identify parts that belong to a category. In the example above, any parts that contain the string '_electrical' in its 'tags' field will be included in the Electrical category.

 

Issues
To avoid showing a part in a custom category and in the stock category at the same time, the part 'category' field can be set to 'none'. This reduce the clutter, but has the drawback that the part can't be filtered by tag anymore in the stock search system.

 

Included categories
Only a category is provided, as an example: Scanner. It include stock and SCANsat scanners.


Adding a category

Spoiler

// define the category
EditorCategory
{
  name = ExplosiveDevices
  tag = _explosive
  icon = MyMod/icons/tnt
  tooltip = Explosive devices
}


// add parts to that category
@PART[Bomb01,NuclearDevice]
{
  @tags ^= :$: _explosive:    // add tag to the part
  @category = none            // optionally, hide the part from stock category  
}

 

 

Changelog

Spoiler

1.1.0
Ported to KSP 1.2.x

1.0.0
First public release

 

 

Edited by ShotgunNinja
ported to KSP 1.2.x

Share this post


Link to post
Share on other sites

YES!

We've needed this forever. Was it PartCatalog that did it pretty well so long ago? Well, I'm glad this with us now.

Thank you, ShotgunNinja!

Share this post


Link to post
Share on other sites

I can't figure why Squad hasn't made a few extra catagories, such as the electrical parts and decouplers. I guess they would rather introduce more useless things, than things people are actually asking for. Hope this mod does well, I will check it out.

Share this post


Link to post
Share on other sites

OK, so this can be a cool mod, but it will need work from the community. Would it be possible to perhaps make a selection of new categories here (Community Catagories :wink: ), and have people make MM patches for certain mods, which can then be placed here for everyone to download? 


I have categories so far for Electrical, Solar, Thermal, Decouplers, DockingPorts, Antennas and am keeping only the definition for the category with the matching squad parts in the main patch, and adding separate patch files in a Mods directory for SSTU, NF Electrical, NF Solar, HeatControl (will do more later possibly). Maybe we can make a standardized basic set that everyone can agree on? Stoked about this mod!

Edited by Jimbodiah
zpeling

Share this post


Link to post
Share on other sites

@Jimbodiah I'm glad you find it useful.

The category Electrical is more an example of how to use the mod, and incidentally is also one that I wanted to use for myself. I don't plan to add more in the download. But I could add links to third party curated 'category packs' in the OP, absolutely.

The problem with a "standardized set that everyone agree on" is that nobody agree on anything... I think the best way is for each part pack to add its own category, instead of grouping by functionality. It is simpler for the author to write, simpler for the player to find the parts, and some mods already do it.

 

Share this post


Link to post
Share on other sites

Thanks for this, looks interesting.

Just a quick note if you're not aware, it doesn't appear to be on ckan yet.

Share this post


Link to post
Share on other sites
1 hour ago, Torih said:

Thanks for this, looks interesting.

Just a quick note if you're not aware, it doesn't appear to be on ckan yet.

It's not going to be, some work needs to be done on the netkan file.  If no one else gets to it, I'll work on it this evening

Share this post


Link to post
Share on other sites

@ShotgunNinja i can upload what I have for myself. Right now I have patches for SSTU, Probes Plus. Bluedog DB, NF solar, NF electrical, Heat Control and maybe some others soon. My utilities tab is no longer ten pages long, this is a godsend!

Edited by Jimbodiah

Share this post


Link to post
Share on other sites
19 minutes ago, linuxgurugamer said:

It's not going to be, some work needs to be done on the netkan file.  If no one else gets to it, I'll work on it this evening

Thanks, btw is that related to Unlicense?

 

2 minutes ago, linuxgurugamer said:

So how is this different from Filter Extensions?

I didn't use Filter Extension myself, but from what I read the differences should be:

  • add category icons in the 'Filter by Function' section of the editor
  • abuse the tag system to associate a part to a category

Share this post


Link to post
Share on other sites
3 minutes ago, ShotgunNinja said:

Thanks, btw is that related to Unlicense?

 

No idea.  Other than seeing that it failed the checks, I don't know.  I have a script at home which will create a good file, if I get some time this fternoon I'll see if I can remote into my home system and do this.

Share this post


Link to post
Share on other sites
33 minutes ago, linuxgurugamer said:

No idea.  Other than seeing that it failed the checks, I don't know.  I have a script at home which will create a good file, if I get some time this fternoon I'll see if I can remote into my home system and do this.

Ok, the netkan has passed the checks, when they next do a merge, it should become available.

Part of the problem was the Unlicense, there was another issue as well.

 

Share this post


Link to post
Share on other sites

Here's my config so far if anyone is interested.. Maybe I missed a part here and there, but let me know if this is interesting to anyone.

This has categories with vanilla parts already assigned for:
- Antenna
- Decouplers and separators
- Fairings
- Parachutes and Heat shields
- Docking Ports
- Electrical
- Engines, Electrical (mostly for mods like NF Propulsion etc, so only has one stock engine in it)
- Engines, Airplane
- Engines, Solid fuel
- Engines, Nuclear
- Probe Cores
- Solar panels
- Thermal radiators
- Wheels, landing gears and landing legs 

Unzip into the PartOrganizer folder and it will add the above categories. Just remove any category file you don't want and it will not get changed in the game.

Download link

 

And my patches for the following mods (Work in Progress)
- Bluedog Design Bureau
- Far Future Technologies
- Near Future Construction
- Near Future Electrical
- Near Future Propulsion
- Near Future Solar
- HeatControl
- Kerbal Atomics
- Coatl Probes+
- SSTU

Unzip into the PartOrganizer folder.

Download link

 

 

Edited by Jimbodiah

Share this post


Link to post
Share on other sites

@Jimbodiah That's some impressive productivity. For the icons, there is this site that may be helpful. Choose 32x32 pixels, black, then invert the colors in an image editor to get the '_selected' version.

electronics_32.png
probe cores

antenna_6_32.png
antennas

solar_panel_32.png
solar panels

Edited by ShotgunNinja

Share this post


Link to post
Share on other sites

Thanks, I will check it out tomorrow.

I've been annoyed for ages about the fact that KSP forces every mod to just dump 3/4 of their parts into Utilities because they are too stuborn to make a few extra categories. With big mods you sometimes have hundreds of parts under that tab, which is insane. So I'm happy to finally have a way to make a handy addition to the standard tabs.

[edit] just updated the zip as I found a lot of the icons under the Squad icons folder.

Edited by Jimbodiah

Share this post


Link to post
Share on other sites
4 hours ago, Jimbodiah said:

Here's my config so far if anyone is interested... I do not have the icons made yet (they all use the "Electrical" one for now) and maybe I missed a part here and there, but let me know if this is interesting to anyone.

Fantastic! Let me know if you need help with the icons. I like to think of myself as quite skilled in Photoshop.

Fun fact: the PartOrganizer mod, with its DLL, passed the virus scanner without any problems. Yet, your zipfile with just a bunch of plaintext cfg files was flagged as "dangerous." Hahaha!

Share this post


Link to post
Share on other sites

Dangerous configs! :wink:

I found the icons I need in the Squad folder and already added them in the current download version. I'll work on the ProcFairings some more today as for some reason they would not "take", as well as some SSTU solar panels. My Utilities folder is only 1 page long now and I have 4 engines tabs to make looking for srb/nukes/jet engines easier :)))

Share this post


Link to post
Share on other sites

@Jimbodiah Having a little issue with your extra configs. It seems to be completely hiding the Proc Parts battery. Its not in any category and searching for it does not locate it.

I've tested on a fresh install with only Proc Parts and Part Organiser and its the same. I've also downloaded your file again since you said its been updated (not sure if it is the right file however as it doesn't have any extra icons).

 

@ShotgunNinjaJust double checked without the extra configs and that is also causing different issues with the search, you cannot locate any stock batteries in the search field, but they do show in the electrical category.

Share this post


Link to post
Share on other sites

@Torih It is mentioned in the OP:

Quote

Issues
To avoid showing a part in a custom category and in the stock category at the same time, the part 'category' field can be set to 'none'. This reduce the clutter, but has the drawback that the part can't be filtered by tag anymore in the stock search system.

 

Share this post


Link to post
Share on other sites

Ah sorry missed that, cheers. Filter Extensions works with the search so guess I'll stick to that :)

Edited by Torih

Share this post


Link to post
Share on other sites

I'll check the procparts battery in a sec... But yeah, the parts no longer show up in the search, but as everything is better organised, you should not need the search anymore. This is the main motivation for me in regards to this mod, that I can have tabs with a handfull dedicated parts instead of 3-4 pages of scrolling only to look over it anyway and need to use the search. So pros and cons, I can understand this is not for everyone.

 

[edit] hmmm, both Procedural Parts and Fairings mods will not work for some reason, they do indeed dissappear though I can't see why. I'll remove them from the zip for the moment.

Edited by Jimbodiah

Share this post


Link to post
Share on other sites

Unfortunately the stock search-by-tag system stop working as soon as you set 'category' to 'none' for a part. That is also the only way to remove a part from one of the stock categories. So you can retain search-by-tag functionality by not setting the 'category' to 'none', but that will mean the parts will be present both in the custom category as well as the stock one.

Share this post


Link to post
Share on other sites

This is very cool. Good job and thanks for making it easy to add categories!

Share this post


Link to post
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.