Jump to content

[0.20.x] Subassembly Manager


TheUndeadFish

Recommended Posts

This is my replacement for the Subassembly Loader. It has the same kind of functionality: allowing you to save and load parts of craft. Currently it even uses the same folders that the Subassembly Loader did, so you can still work with all your previously saved subassemblies.

Download

Version 0.1.3

http://kerbalspaceprogram.com/subassembly-manager/

Usage

In the VAB or SPH, after creating or loading a craft, there will be a button available in the upper right corner of the screen, just under the normal buttons.

If you have no parts selected, then the button will read "Load Sub" and will allow you to load a previously saved subassembly.

If you are currently dragging parts with the mouse, then the button will read "Save Sub" and clicking it will allow you to save those parts as a subassembly.

When you detact a part from a craft and save it, that subassembly will only be attachable via the same part.

When drag and entire craft and save it, that subassembly will only be attachable if the root part. If that root part doesn't have any open attachment nodes, then you probably won't be able to attach it at all.

To add new categories, you have to manually go to "Kerbal Space Program\PluginData\subassemblyLoader\subassemblies" on your computer and create folders for them. (This is due to KSP limiting what a mod can do with folders.)

Known Issues

- Some kinds of strut or fuel line configurations might not save properly in a subassembly.

- Saving an entire craft as a subassembly when its root part has no open attachment nodes (and isn't surafce-attachable) will probably result in a subassembly which cannot be attached to anything.

- The category browsing will only work with one level of folders. Subfolders within those are ignored.

Future Improvements

I plan to make enhancements to this in the future including:

- Managing categories within the game.

- Deleting and renaming saved subassemblies.

- Easy way to re-save an existing subassembly.

- Importing a normal craft save as a subassembly.

- Graphics and styling of the user interface.

- A way to change a subassembly to use a different attachment point (if that's actually possible).

Version History

0.1.3

Added the ability to save over an existing subassembly without having to re-type the name.

Added a warning message if the user tries to save a subassembly that probably won't be attachable (no available attachment nodes on root part).

No longer allows trying to save a subassembly without a name.

The save/load button appears in an inactive mode when it's not clickable, instead of being completely invisible.

0.1.2

Revised category/file browser logic to not require double-clicking (thus fixing a major Linux issue).

Moved Load/Save Sub button to just under the normal load/save craft buttons so that it's out of the staging area.

0.1.1

Released on the Space Port.

0.1.1-alpha

Fixed an issue that prevented saving a subassembly made up of a single part.

0.1.0-alpha

Initial Release

License

Copyright © 2013 TheUndeadFish

Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in

all copies or substantial portions of the Software.

An exception is allowed for Squad to use any part or all of this work or

similar ideas and techniques in Kerbal Space Program without any restriction

or conditions.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

THE SOFTWARE.

Edited by TheUndeadFish
Version 0.1.3
Link to comment
Share on other sites

I have installed the dll and also in the PluginData folder the folders \subassemblyLoader\subassemblies with the 3 folders Laderrs, Lifters, Probes.

Now if i I select a part an try to safe it, the next window asks me to select a category, but there is nothing i could select.

Link to comment
Share on other sites

I like the flow. So far, the only issue I've seen is if I pick one part to save, you go through the entire routine of selecting the category you want, type in the name, BUT, it doesn't save.E

Edit: The asparagus problem still isn't working. Greenvalv wrote a routine in the following thread: http://forum.kerbalspaceprogram.com/showthread.php/37009-0-20-2-Subassembly-Support-Thread?p=477516&viewfull=1#post477516 -- I haven't tested.

@onkelsiebdruck> First, where did you get that handle??? Second, make sure you put the PluginData directory in the main KSP directory, and overwrite. The directories used are different between Loader and Manager.

Edited by Pontiac
Link to comment
Share on other sites

I have installed the dll and also in the PluginData folder the folders \subassemblyLoader\subassemblies with the 3 folders Laderrs, Lifters, Probes.

Now if i I select a part an try to safe it, the next window asks me to select a category, but there is nothing i could select.

Did you end up with those category folders under "Kerbal Space Program\PluginData\subassemblyLoader\subassemblies" or did you put them somewhere else (like under GameData)?

Link to comment
Share on other sites

So far, the only issue I've seen is if I pick one part to save, you go through the entire routine of selecting the category you want, type in the name, BUT, it doesn't save.

Hmmm. If there's a problem happening when you click the save button, then an error should hopefully show up in the Alt+F2 debug log and/or the KSP_Data/output_log.txt file. Could you check and let me know what it says?

Link to comment
Share on other sites

Well done! Idk if this works or not yet, but I cannot begin to tell you how frustrated I was with the ridiculousness involving this Deadbeef fellow and his "copyrighted" subassembly LOADER. So excited to see what you do with the subassembly MANAGER :] you are a hero

Link to comment
Share on other sites

If you're going through the same thing I do when you click the button to save, it's as if you clicked elsewhere in the editor which caused you to unintentionally let go of the selection. So that indexing error makes perfect sense.

Do tell that after you finish trying to save if your selection is let go? Because if a save works, you still should be holding the selection afterwards.

Link to comment
Share on other sites

[Exception]: FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

This happens as soon as I hit "SAVE".

Ah, I think I see what's going on. I bet you're trying to save a subassembly made up of a single part. I'll have a fix for this shortly. In the mean time, multi-part subassemblies should work for you.

Link to comment
Share on other sites

Testing so far I haven't experienced any issues. One suggestion I have is to think about a way to allow easy over-writing of existing part assemblies, by either displaying the names of the currently saved files or actually allowing you to double click them to save over. As it is right now you have to remember the exact name and spelling in order to overwrite something.

No doubt plans for something like this is already in your backlog... thanks for taking up the task.

Link to comment
Share on other sites

So far, nothing wrong, but...

-Can you add the ability of saving entire ships while preserving attachment points? I tried attaching a ship I saved as a Subassembly(it is possible), but I then couldn't attach it to a carrier plane I built later. Even putting another command module where I wanted the attachment to be didn't changed anything.

Link to comment
Share on other sites

Thank you! Maybe it would be possible to add a feature to change the main attachable part? I know its a engine limitation that only one part is attachable, but could we choose what part it is...

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