Sign in to follow this  
Felbourn

[0.25] Simple Part Organizer v1.2.1

Recommended Posts

Greetings Kerbanauts!

Looking for an update to SPO?

First try out Filter Extensions with Part Search and then decide... do we really need SPO updated anymore?

Probably not.

Edited by Felbourn

Share this post


Link to post
Share on other sites

The top post now has a Spaceport link and the Dropbox link contains the same ZIP.

Share this post


Link to post
Share on other sites

Weird. I swore I clicked it after modifying it to make sure it went to the right place. Anyway, fixed! Thanks for the heads up.

Share this post


Link to post
Share on other sites

Any Chance you can help kill the lag when selecting mods? It's pretty bad for people like me. But then again, you probably have no control over that, and I am totally ignorant.

Share this post


Link to post
Share on other sites

I am definitely going to check if that is something I have control over or not. I'll do it over this weekend and post here with my results. At this point, I don't know either. I have a lot of mods as well, and this has been affecting me since around 0.21 when I started playing.

Share this post


Link to post
Share on other sites
I am definitely going to check if that is something I have control over or not. I'll do it over this weekend and post here with my results. At this point, I don't know either. I have a lot of mods as well, and this has been affecting me since around 0.21 when I started playing.

Just a heads up why the performance lacking.

The function findPartMod which returns the mod corresponding to a part is looking through the config node tree for each part everytime you've filtered for a mod and the partlist is changed somehow.

Better use a Dictionary<AvailablePart,string> to cache that mod lookup.

Share this post


Link to post
Share on other sites

I just took ownership of this mod. I don't really know its functions yet. I will look at ALL of them this weekend and see what I can do. Thanks for giving me the head start on where to look though.

Share this post


Link to post
Share on other sites
Just a heads up why the performance lacking.

The function findPartMod which returns the mod corresponding to a part is looking through the config node tree for each part everytime you've filtered for a mod and the partlist is changed somehow.

Better use a Dictionary<AvailablePart,string> to cache that mod lookup.

This is a good tip. Should be easy to implement: in the Start() method, there's a foreach that cycles through the loaded parts. Just call the findPartMod method in there to stuff the dictionary and replace findPartMod calls with dictionary lookups.

Share this post


Link to post
Share on other sites

Cool. Yea, just need the day job out of the way before I can do anything.

Speaking of the day job (Tech Lead --> http://us.battle.net/hearthstone/en) I have a handful of beta keys left over, and I'd be happy to give a few to some KSP-fan-and-SPO-users from here. Keep it between us so I don't run out too fast though. ;) Just PM me for a key. If I have not run out I will give you one.

Share this post


Link to post
Share on other sites

I spent a few hours on this over the weekend. I sped up the sorts and filters. They are essentially instant now. I also tried replacing the "type" sort list with something dynamic, but it turns out mod makers have a lot of weird modules when you see the very low level names. I need to explore alternatives. I'll try to get an update to this mod within a week, once I look into that and the size filter. I was able to reduce the sizes down to 0.0, 1.0, 1.5, 2.0, 2.5, 3.0, etc. However, I noticed one of my fuel tanks that's an adapter for 1.0 to 3.0 tanks was showing up in the 2.0 section. That makes sense since it's an adapter, but it got me thinking that maybe the sizes should show both sizes when it comes to adapters, so "2.0" versus "1.0 to 3.0" could be shown.

Share this post


Link to post
Share on other sites
However, I noticed one of my fuel tanks that's an adapter for 1.0 to 3.0 tanks was showing up in the 2.0 section. That makes sense since it's an adapter, but it got me thinking that maybe the sizes should show both sizes when it comes to adapters, so "2.0" versus "1.0 to 3.0" could be shown.

Thats a good idea. I think it would be worth putting in.

Share this post


Link to post
Share on other sites

Dev version (logs enabled) of 1.1 available here: *link old, removed*

If there are no issues for anyone then I will release it to Spaceport. Please try it out and let me know how it goes.

Edited by Felbourn
removed bad link

Share this post


Link to post
Share on other sites
This is a good tip. Should be easy to implement: in the Start() method, there's a foreach that cycles through the loaded parts. Just call the findPartMod method in there to stuff the dictionary and replace findPartMod calls with dictionary lookups.

Random tangent: One engineer to another at a meeting at my old company, discussing a performance bottleneck, "I haven't looked at the code and have no idea of the actual details of your problem, but the answer is, use a hashtable." He was right. :D

Share this post


Link to post
Share on other sites

Played quite bit over the holiday and did not have any issues in 1.1. The Speedy response for mod filtering is working very well and much appreciated.

I mainly do mod filter and part sorting, so did not really test the other pieces of the mod.

Menus felt easier to navigate -- don't think i had them disappear on me once. Before they would sometimes close on me before i was able to click into the next layer down of choices.

One thing I thought i noticed was it might have been reverting sorting/filtering choices with the save game? I thought i did some things and quick loaded and my filter choices were back to an old setting. Not a big deal to me.

Great work! thanks for the effort.

Share this post


Link to post
Share on other sites

Hi, I just downloaded and installed this mod. Everything seems to be working well and I'll give it a thumbs up.

So I'm just wondering if there is a way to reverse the sort order. Changing "smallest to largest" to "largest to smallest". I've had a look for a manual and found none so I thought I'd ask here.

Share this post


Link to post
Share on other sites

Version 1.1 now on spaceport.

If revert is losing your selections, it's not something the mod is doing intentionally. Maybe KSP reverts all changes to all files, including the ones that get saved through their mod interface that lets me save local files. I'm not sure how to stop it, unless I bypass their API for saving config files entirely.

The sorting is still the way it was when I took over. It only sorts a few ways, and is not super customizable yet, like reversing the sort order. :(

Share this post


Link to post
Share on other sites

Is it possible to make the mod window not "click-through-able"? I always forget to move the camera so the window isn't over my ship so when I use the mod i always detach a part of my ship. I know some mods are "click-through-able" Like Infernal Robotics but some others aren't like Kerbal Engineer, so I don't know if certain mods can be made to not click through and others can't. It's not a huge problem or anything, just a small annoyance.

Share this post


Link to post
Share on other sites

Good question... I have seen what you're talking about before, but I never had it happen to me with SPO. I'd have to research it find this answer. I don't know off hand.

Share this post


Link to post
Share on other sites

Felbourn, I got an incompatibility report from one of my AntennaRange users, and it looks like the bug is maybe sorta on your end.

For some reason, this mod breaks Simple Part Organizer, which I just can't play without...

http://i.imgur.com/ryNDLId.png?1

It does exactly what the screenshot shows - the mods selection menu doesn't pop up. Here is the KSP log-> https://www.dropbox.com/s/te3bck4qpnjecqv/KSP.log

Oh, and I declare myself former king of the lurkers.

(Edit) https://www.dropbox.com/s/d76hianw453plsb/output_log.txt

In looking at his log and through your code, I'm pretty sure the issue is line 440, which trims the "useful module name" out of, effectively, PartModule::ToString(). AntennaRange overrides ToString and includes no parentheses, so your Substring is looking from 0 to -1, which is Exceptional.

Seems to me it would be easier and safer to use PartModule::moduleName, which should save you most of the trimming and avoid issues with modules that override ToString().

Let me know if / how I can help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this