Jump to content

[0.20.x] Subassembly Manager


TheUndeadFish

Recommended Posts

Alright. I wonder why that limitation exists and if it could be fixed. I don't think SAL had that limitation, but I could be wrong. And then changes to KSP itself might have made SAL's method broken anyways. Definitely something to look at improving if it can be done.

Thanks for the answer though. I understand what to do now.

Link to comment
Share on other sites

Currently, you can only attach a subassembly via the same part that you clicked on to detach it in the first place. This is due to the way KSP views things as a hierarchy of parts. The part you click on to detach it is the root of that subassembly and consequently the only one that can be used to reattach. If you take a whole craft and save it as a subassembly, then the root node (the command pod that you used to click and drag it) will be the root of the subassembly and consequently the only one that can be used to reattach. In that case, if you've covered up all the attachment nodes on that root, then you probably won't have any way to reattach the subassembly to another craft.

These are all the same limitations that the old Subassembly Loader had. In fact, the old mod had a check that would prevent you from even trying to save a subassembly if it believed that it would not be reattachable. I haven't put in any kind of check like that, so for better or worse you can currently end up with unattachable subassemblies.

I would like to find a way around these limitations eventually. But I suspect it will involve rearranging some of the part hierarchy of the subassembly on the fly, if it's possible. So that is going to take some time and experimentation.

Link to comment
Share on other sites

Yeah I completely understand how much of a pain (any maybe unavoidable problem) that is. Probably why Squad hasn't shipped any sort of thing like this in-game. Even with that limitation, this is still HUGELY useful. Thanks for SAL 2.0!

Link to comment
Share on other sites

Question, do I need to install the old Subassembly Loader too for Subassembly Manager to work fully? I noticed no button icons and the PluginData/subassemblyLoader/subassemblies folders are not under the GameData folder.

Link to comment
Share on other sites

No, the manager is run by itself. The old SAL was run by a developer who seems to no longer be developing. This is an independent mod.

So I can uninstall the old mod and install the new Subassembly Manager and all the icons, etc. will appear and work?

Link to comment
Share on other sites

So I can uninstall the old mod and install the new Subassembly Manager and all the icons, etc. will appear and work?

You don't need the old SAL plugin. And this mod doesn't use any of those icon files. However, this does still use "Kerbal Space Program\PluginData\subassemblyLoader\subassemblies" to save and load subassemblies. (I did it that way mainly so that people can easily start using my mod while continuing to access anything they've previously saved with the old SAL.)

Link to comment
Share on other sites

You don't need the old SAL plugin. And this mod doesn't use any of those icon files. However, this does still use "Kerbal Space Program\PluginData\subassemblyLoader\subassemblies" to save and load subassemblies. (I did it that way mainly so that people can easily start using my mod while continuing to access anything they've previously saved with the old SAL.)

Cool, thanks for the clarification. I'll be downloading shortly and really appreciate your efforts!

Link to comment
Share on other sites

Currently, you can only attach a subassembly via the same part that you clicked on to detach it in the first place. This is due to the way KSP views things as a hierarchy of parts. The part you click on to detach it is the root of that subassembly and consequently the only one that can be used to reattach. If you take a whole craft and save it as a subassembly, then the root node (the command pod that you used to click and drag it) will be the root of the subassembly and consequently the only one that can be used to reattach. In that case, if you've covered up all the attachment nodes on that root, then you probably won't have any way to reattach the subassembly to another craft.

These are all the same limitations that the old Subassembly Loader had. In fact, the old mod had a check that would prevent you from even trying to save a subassembly if it believed that it would not be reattachable. I haven't put in any kind of check like that, so for better or worse you can currently end up with unattachable subassemblies.

I would like to find a way around these limitations eventually. But I suspect it will involve rearranging some of the part hierarchy of the subassembly on the fly, if it's possible. So that is going to take some time and experimentation.

I suggested this to Pontiac and will to you. What if a invisible root part was created when you save the subassembly? Or if the subassembly was possible to be saved as a part?

Link to comment
Share on other sites

I suggested this to Pontiac and will to you. What if a invisible root part was created when you save the subassembly? Or if the subassembly was possible to be saved as a part?

I think you'd have to be careful to then be able to 'deconstruct' this single part you've created once it is imported somewhere. And if I understand what Undead is saying about how KSP handles the hierarchy of parts once you select it.... would there even be enough information to create the logic needed to put the correct nodes on this single part you create?

Link to comment
Share on other sites

I suggested this to Pontiac and will to you. What if a invisible root part was created when you save the subassembly? Or if the subassembly was possible to be saved as a part?

The first wouldn't help. The problem with only being able to reattach a subassembly by the part that it was originally attached to is due to the KSP tree structure and can be seen even without using subassembly manager. Create a new craft starting with a command pod (it doesn't actually have to be a command pod, just as an example). Stack two Hubmax six-way connectors under it. Pick up the Hubmax that is the center piece, so you're removing both Hubmax parts and detach it from the command pod. You will notice that the subassembly that you're holding only has five nodes on it, and all of them were on the Hubmax that had been attached to the base part. None of the nodes on the Hubmax attached to the one you pulled off are active. This will happen even in a stock game, so it's almost definitely not a subassembly manager issue.

The second could have issues as well, since it would require the ability to create new parts on the fly that exactly match the subassembly, and I suspect that at least some of the parts modules may have issues with multiple parts merged into one, and that's ignoring the fact that some parts have stats on them that you don't want the entire structure to take over. On top of that, decouplers/separators in the merged part certainly wouldn't work, defeating the whole point of using a mod like this to create lift vehicles.

The only possibly viable solution that I see that can be done by a modder would be as TheUndeadFish said, rearranging the part tree so that the part you wanted to attach the subassembly by to the craft is the root part. The easiest way I see of doing that would be to have an option either when you save or load the subassembly to designate a part as the root part, so that you could use the nodes of that part, or surface attach that part. Getting all of the nodes on the subassembly to activate is something Squad might be able to fix, but I don't think a mod could do that.

EDIT: From what I understand about struts and fuel lines, those would probably be the hardest part of rearranging the tree, since the vector that controls which way the strut/fuel line points is relative to the root part, so changing the root part would require that vector to be recomputed.

Link to comment
Share on other sites

The first wouldn't help. The problem with only being able to reattach a subassembly by the part that it was originally attached to is due to the KSP tree structure and can be seen even without using subassembly manager. Create a new craft starting with a command pod (it doesn't actually have to be a command pod, just as an example). Stack two Hubmax six-way connectors under it. Pick up the Hubmax that is the center piece, so you're removing both Hubmax parts and detach it from the command pod. You will notice that the subassembly that you're holding only has five nodes on it, and all of them were on the Hubmax that had been attached to the base part. None of the nodes on the Hubmax attached to the one you pulled off are active. This will happen even in a stock game, so it's almost definitely not a subassembly manager issue.

The second could have issues as well, since it would require the ability to create new parts on the fly that exactly match the subassembly, and I suspect that at least some of the parts modules may have issues with multiple parts merged into one, and that's ignoring the fact that some parts have stats on them that you don't want the entire structure to take over. On top of that, decouplers/separators in the merged part certainly wouldn't work, defeating the whole point of using a mod like this to create lift vehicles.

The only possibly viable solution that I see that can be done by a modder would be as TheUndeadFish said, rearranging the part tree so that the part you wanted to attach the subassembly by to the craft is the root part. The easiest way I see of doing that would be to have an option either when you save or load the subassembly to designate a part as the root part, so that you could use the nodes of that part, or surface attach that part. Getting all of the nodes on the subassembly to activate is something Squad might be able to fix, but I don't think a mod could do that.

EDIT: From what I understand about struts and fuel lines, those would probably be the hardest part of rearranging the tree, since the vector that controls which way the strut/fuel line points is relative to the root part, so changing the root part would require that vector to be recomputed.

Well, considering subassemblies are craft files...

Link to comment
Share on other sites

Exactly what I was looking for but sadly it doesn't work at all.

I can save things just fine but anything I load back in is completely unusable, can't attach it to anything, can't separate any of its parts nothing it just becomes a useless paperweight.

Link to comment
Share on other sites

Well, considering subassemblies are craft files...

That's correct, but I'm missing your point, because I don't see how that really affects the problem or the discussed possible solutions. Saved craft files still have the tree structure for parts, which is the root of this problem.

Link to comment
Share on other sites

This doesn't work for Docking Ports. It selects everything that is attached to it, not its parent.

Please fix it so it will.

It Does work with docking ports, but you have to save the craft from the docking port down. The easiest way to do this is to just start with a tiny probe, then put the docking port under it and the rest of the craft attaches to the docking port. Now when you want to save it you can just move the docking port and everything attached under it to the icon. You could do the same thing and maintain your struts and fuel lines by moving the tiny probe core to the icon and saving it too, then just deleting it once you've pasted it into the other craft

Link to comment
Share on other sites

Incidentally, you can actually copy a normal craft file to sub-assembly's directory folders and sub-assembly will load it. Someone found out that tends to fix issues with fuel lines and struts, at least with the old version. It seems it didn't save the craft file exactly how the game was expecting it. The root part still needs to have an exposed node, however, when you do this.

I haven't had the time to test this method with this new version though.

Link to comment
Share on other sites

That's correct, but I'm missing your point, because I don't see how that really affects the problem or the discussed possible solutions. Saved craft files still have the tree structure for parts, which is the root of this problem.

The problem is how one saves a subassembly while still preseving the attachment points? Cause the difference between the subassembly save and the normal save is that the normal save preserves all it's attachment points. So, the tree structure is not the same, or at least don't behave the same.

Link to comment
Share on other sites

Yeah Temstar listed exactly how he did this step by step in his newest release of the Zenith family of lifters, I haven't had a chance to try it out for Manager yet however, but it will probably work exactly the same.

Link to comment
Share on other sites

The problem is how one saves a subassembly while still preseving the attachment points? Cause the difference between the subassembly save and the normal save is that the normal save preserves all it's attachment points. So, the tree structure is not the same, or at least don't behave the same.

I think your looking at the plugin in the wrong way. But based on what your saying it should do, I can tell you Exactly how to do it by hand! (This is how I used standard launchers before I found out about SaL or mods in general)

Step 1:

Make your launcher, no payload, whatever command pod or probe core at the top with nothing above it and the decoupler below it.

Make sure you leave the bottom of the launcher close to the floor but not under the floor (fairly important)

Step 2:

Make your payload. Leave the bottom open for however you plan to attach it to the launcher. Ie; docking port or decoupler or whatever.

Make sure you leave the payload high up in the VAB, usually near the ceiling and off to the side a little bit.

Step 3:

Open the .craft file for the payload, go all the way down to the bottom and get ready to add new lines;

Open the .craft file for the launcher, press save as, name it something different so that we don't mess up the original incase something goes wrong. Now on the new saved copy erase everything at the top until you get to the first PART.

Look down a little lower inside the first PART entry and you'll see something like "CommandPod true" or yes, or something along those lines, change it to the opposite (been a while so I forget exactly what it's listed as)

You only have to change that one thing.

Step 4:

Copy everything in your modified Launcher.craft and paste it on to the end of your Payload.craft

Make sure you press enter any the very bottom so the flashing cursor is on its own clean line

Save As whatever you wish to call it,

Step 5:

When you open your newly combined craft (don't need to close or re open KSP.exe to do this) you'll see both crafts inside the VAB as solid, you have to be careful for the moment because once you pick up the launcher it can get glitchy until you attach it to the bottom of the Payload, which should still be up higher with all of its nodes in tact.

Step 6:

?????

Step 7:

Profit!!!

Link to comment
Share on other sites

Can I make a suggestion? I like to keep my subassemblies in a more organized way. For example: Subassemblies/Lifters/American/Constellation/Ares V

Is there any way you can add a functionality to go down a few more levels of organization? I get about this by moving the files to their proper place in Finder after im done with my KSP session at the time, but reducing this would be a godsend

Thanks for all the hard work!

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