Jump to content

[0.20] Subassembly Loader - 0.20 Compatibility Patch


TheUndeadFish

Recommended Posts

I'll revert what I've done (Not much) in regards to a work around for not saving the fuel lines, and upload the delete part.

Edit:

Link:

Edited by sal_vager
Link to comment
Share on other sites

I'll revert what I've done (Not much) in regards to a work around for not saving the fuel lines, and upload the delete part.

Edit:

Link: https://dl.dropboxusercontent.com/u/1598459/Games/KSP/subassemblyLoader/subassemblyLoader%20for%200.20.2-v1.2.zip

You forgot to add a subfolder in GameData for subassembly loader.

Link to comment
Share on other sites

Just wanted to alert you in case you hadn't noticed, Temstar appears to have found a work around for the fuel line issues. It's in post #2 of his release thread here:

Edited by sal_vager
Link to comment
Share on other sites

You forgot to add a subfolder in GameData for subassembly loader.

Whoops... So I did. I'll fix that and submit. Thanks.

@Hoy: I think he got lucky. I'm going to play with this some more tomorrow and see what I can come up with. I'd rather not muck around with files to "get it to work" but if I can get the software to do the job, even better.

Edited by Pontiac
Link to comment
Share on other sites

Thanks Fish. I'd like to hear your ideas though!

So after a good 12 hours worth of sleep, I finally caught on to what is happening with the pipes not attaching, and it took me a whole 30 seconds to SEE what is happening, and I doubt there is anything I can do about it, even with attaching a fake command pod as a root part.

The problem seems that if you pick something up that isn't the root part, pipes and struts are temporarily disconnected. So when you click on the subassembly icon to save, the ship is saved in that state, with pipes disconnected. Forcing a command pod to be attached during the saving process, then removed at when loaded, I don't think is going to help any, because the pipe doesn't have a proper connection point when its saved, but when its reconnected to a part of the vessel that has parts connected, it works.

Things I know:

- When a subassembly of the ship is removed from the main part of the ship with the root command module, the pipes are temporarily disconnected.

- When that segment is reattached, the pipes know who to connect to.

- If you duplicate the same segment of the ship and attach, the pipes know who to connect to, and its not the prior part.

- You must save the ship in a state with all parts connected.

I *THINK* part of it comes down to a routine in the code that checks to see if things are connected or not. It doesn't actively do anything other than return TRUE or FALSE. I'll poke at that for a while.

Link to comment
Share on other sites

Did you read the post I linked? The way the game now handles ships after you've removed the command pod is how Temstar got the fuel lines to work. He saved the ships with no command pods. Maybe there's a way to change this so it works similarly? I've got no clue but there was a change with .20 that makes it actually possible for it to work.

Link to comment
Share on other sites

After a fourth re-read of what he's done, he's not doing anything different in the assembly of a ship, other than changing the root part from a command pod to a decoupler. He skipped a lot of steps to get the results that he desired in his post which caused me to do the re-reads and filling in some of the blanks. I'm not discrediting him, and I think this definitely good stuff.

Here's what he's doing step by step for his "delete root" trick.

- He first takes and removes all his fuel stages, and puts it to the side, but keeps his decoupler attached to the main part of the ship.

- He then takes the rest of the ship (Payload) and deletes it, so now he's left with an unselected fuel assembly, and no root part.

- He goes into the Structure tab, selects the decoupler. The decoupler now becomes the new root part.

- He re-attaches his fuel stage to the decoupler, and probably adds the RCS jets.

- He then saves and does his file management stuff.

With the existing methodology SAL uses, I can't reproduce all those steps. First, I can't do any activity in the editor without a root part. Second, selecting the parts that need to save and dragging them up to the SAL icon is borked because of the temporary disassembly of certain parts and their state when the save is done.

So using his methodology to get the ship to a certain stage, as long as you drag the entire ship up to the SAL icon, you're golden, and SAL is working as intended. This never was the fight I've been having, although I may have skewed by looking at command pods only. Should have been looking at the "root" part. Unfortunately I associated the root part as a command module.

The bottom line differences at the actual saving stage within KSP is that when SAL saves, the ship is partially disassembled, UNLESS you drag the root part. Using his method, the ship is assembled. By all rights, all he has to at that point is just drag the ship up from the decoupler to the SAL icon, and he can skip on the file management.

So this means one of two things, and I'm open to a third, fourth, fifth... hundredth option;

A> Leave things as is and just deal with broken pipes and struts. Just throw a warning if a fuel line or decoupler is found saying something like "Loading this structure may not work due to fuel lines and struts not being attached during the save process" when saving.

B> Allow saving only if the root part of the ship is selected. Error/cancel out if the part isn't selected.

Option A seems the most tasteful as there might be times when you just want to save an overly complicated RCS tank with about 50 RTGs.

Link to comment
Share on other sites

A> Leave things as is and just deal with broken pipes and struts. Just throw a warning if a fuel line or decoupler is found saying something like "Loading this structure may not work due to fuel lines and struts not being attached during the save process" when saving.

how about, "Fuel lines and struts may not work if saved this way. Drag from the 'Root Part' to insure a clean save"

or something like that?

Link to comment
Share on other sites

Thanks Fish. I'd like to hear your ideas though!

Here's some assorted ideas:

- Making the category/subassembly list window scale larger when someone is running with a larger resolution. It's a shame when I have all this space on the screen but it uses so little. This should be rather easy, just basing some of the sizing on the current screen height or width.

- Making the button have two distinct icons. One for saving and one for loading. It would switch between them on the fly depending on whether or not the user is currently dragging a subassembly. This would make it clearer which action will happen if the user clicks the button at that moment.

- Since subassemblies are saved as craft files, I would guess it ought to be fairly easy to make a way to import a normal craft file into the current build. In some cases I find I would rather keep something in a normal save but also be able to attach it to another craft. Being able to do that without the extra step of going through a subassembly save would be convenient. This could possibly be presented as an Import button under the normal Open button.

- Normally whenever you detach something from a vessel in the VAB, you can only ever attach it back via the same point (unless I've missed something in KSP itself). I think this has something to do with root node stuff in the detached parts. It would be wonderful if there could be a way to take the current subassembly being dragged by the mouse and change between viable nodes that it could use to attach back with. I'm guessing KSP exposes enough to accomplish this, but it might be challenging.

If you want me to help collaborate on any improvements to this mod, I would be willing. Otherwise, I'm working towards some mods of my own (which have nothing to do with the functionality of this one).

Link to comment
Share on other sites

Here's some assorted ideas:

- Making the category/subassembly list window scale larger when someone is running with a larger resolution. It's a shame when I have all this space on the screen but it uses so little. This should be rather easy, just basing some of the sizing on the current screen height or width.

Easy enough.

- Making the button have two distinct icons. One for saving and one for loading. It would switch between them on the fly depending on whether or not the user is currently dragging a subassembly. This would make it clearer which action will happen if the user clicks the button at that moment.

You're referring to the top button where you drag the assemblies to? I've been pondering that one myself. I've been thinking that instead of dragging and saving, skip the dragging part, and click the SAVE button and it'll save the assembly as is, and would get rid of this stupid issue of pipes and struts not connecting.

- Since subassemblies are saved as craft files, I would guess it ought to be fairly easy to make a way to import a normal craft file into the current build. In some cases I find I would rather keep something in a normal save but also be able to attach it to another craft. Being able to do that without the extra step of going through a subassembly save would be convenient. This could possibly be presented as an Import button under the normal Open button.

Brilliant. POSSIBLE support could be added to check other saves so you can import your ships, instead of having to drag them around. The only problem I foresee is that you MIGHT have to have a root part on screen. But I'm going to play with that and see if I can convince SAL to allow for an immediate load.

- Normally whenever you detach something from a vessel in the VAB, you can only ever attach it back via the same point (unless I've missed something in KSP itself). I think this has something to do with root node stuff in the detached parts. It would be wonderful if there could be a way to take the current subassembly being dragged by the mouse and change between viable nodes that it could use to attach back with. I'm guessing KSP exposes enough to accomplish this, but it might be challenging.

The most "parent" or "root" part becomes the part that has the focus, and I "think" that root parts top node becomes the active node. Single parts seem to act differently, but assemblies with more than one part fall into this. I'm not entirely sure as I'm usually focused on dropping a single part on, or, a bulk part that is supposed to have a single accessible node.

If you want me to help collaborate on any improvements to this mod, I would be willing. Otherwise, I'm working towards some mods of my own (which have nothing to do with the functionality of this one).

As I'm still a noob when it comes to C# and how its handled in KSP, I'll be asking for help. For sure. :]

I should also mention that I won't be able to work on this mod until after Jun 24 due to RL commitments.

Edited by Pontiac
Link to comment
Share on other sites

So, I've been looking through this thread, can someone provide the link to the latest / best working build for this mod on the latest version of KSP? I would use the one in the original post but, after reading, I don't want to risk getting a version which isn't as good as another one.

Thanks guys!

And, if you guys are picking this up, might I suggest creating a dedicated mod post until DeadBeef shows himself and decides whether to claim development again?

Edited by Forloftol
Link to comment
Share on other sites

@astro> Browse to {YourKSPDir}\GameData\subassemblyLoader\icons\ and make sure you have the following:

buttonDisabled.png

buttonHover.png

buttonInactive.png

file.png

folder.png

@Forlo> I'll take care of that Friday. Almost done my shift at work, and haven't had a chance to touch my computer at home in the past week. :( {sniff}

Edit: So, I decided to put a couple hours into this before going to bed...

Thread removed by Skunky. DeadBeef apparently is around, but just too busy.

Edited by Pontiac
Link to comment
Share on other sites

After a fourth re-read of what he's done...

I think you missed the part where he DOESN'T let Subassembly Loader save the craft, but instead saves it from KSP VAB, then copies the .craft file to SL folder using Windows Explorer, hence not f***ing with the order parts are added to the .craft file.

No? =)

Just had to register to add this remark.

/Luxius

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...