Jump to content

[0.25] Simple Part Organizer v1.2.1


Felbourn

Recommended Posts

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.

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

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

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

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

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

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

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

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

Link to comment
Share on other sites

  • 3 weeks later...

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

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

Link to comment
Share on other sites

  • 2 months later...

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!

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