Jump to content

[1.2.x] PartOrganizer 1.1.0


ShotgunNinja

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

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

 

Link to comment
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

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

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

 

Link to comment
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
Link to comment
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
Link to comment
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!

Link to comment
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 :)))

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

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

 

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

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