Jump to content

Allow parts to be connected in a loop in the VAB


Recommended Posts

I'm pretty sure the tree structure system would be a a lot of work to redesign or else they'd have done it by now.

I certainly feel your pain though, using struts is a messy work around that adds a lot of drag, extra mass, and most importantly a bunch of additional parts to your part count.

It's definitely a problem but I'm not sure it's one that will ever get fixed sadly.

Link to comment
Share on other sites

2 hours ago, THX1138 said:

Allow parts to be connected in loops in the VAB so the situation in the screenshot below doesn't happen. It's important for large asteroid redirects.

Internally a ship is organized as a tree; each part (node) is connected to one—and one only—parent node. The tree structure has many advantages; it allows unlimited (partwise) ship sizes, makes it easy to establish fuel flow and staging and most of all it's a well understood structure in computer science.

The downside is that loops in the ship topology are not allowed; this is not something that can easily be fixed. You will have to resort to struts and docking ports to close loops. To manage your expectations: it will likely never happen.

Link to comment
Share on other sites

Not only would it be an enormous job for Squad to change this, but it would also break lots and lots of mods.  Certainly it would break pretty much every one of my own.  Would require a substantial rewrite, it's not a simple one-line fix.

I'd guess that this one's in the "not gonna happen" category.  I wouldn't say "never," just because that's an awfully strong word and I try to avoid using it... but I'd say that at best it would be way, way down the priority queue.

Link to comment
Share on other sites

4 minutes ago, THX1138 said:

Okay, but how come struts are able to overcome this? Doesn't a solution of a sort lie in the mechanism behind struts?

Because the 'stray' end of struts are not actually connected the way other parts do. The part description basically just says 'it points in that direction' and the game code 'makes' it connected to whatever it first touches in that direction.

Edited by swjr-swis
Link to comment
Share on other sites

I understand that craft in the VAB are organized as a "tree" for the .craft files, but how does the game handle it for craft in flight? Loops are perfectly doable via multidocking after launch, so how is THAT craft data stored?

Link to comment
Share on other sites

15 hours ago, swjr-swis said:

Because the 'stray' end of struts are not actually connected the way other parts do. The part description basically just says 'it points in that direction' and the game code 'makes' it connected to whatever it first touches in that direction.

And is there anything to prevent the VAB code from just adding a "pseudo-strut" to any part which has its attachment node close by another free node, or its node clipping inside the collider of another part?

Right now the easy way to overcome this problem is to just manually stitch the open nodes to the neighbouring parts with struts, but I don't see why that can't be done automatically.

Multidocking "loops" are already done this way, one docking port makes the actual node connection where the other ports are just holding the ship together structurally through automatically added, invisible struts.

Link to comment
Share on other sites

16 hours ago, JYNg said:

Sorry but I don't understand the post. Anyone mind explaining to me? Why is this loop structure important and how is it related to the screenshot?

To make a truss frame solid (or as solid as the stock game allows), as in the given picture, one end of the horizontal trusses between the longer vertical ones has to be 'fixed' with duct tape struts, because to actually close a square/loop the game would need to allow two (or more) nodes on any single part to be connected at once, where at this point, it only allows one node to connect.

Having to use struts (or docking ports) to overcome this adds more parts, more mass, more drag, is very hard to do without introducing small torque forces or imbalance... and is never quite as solid as it could be if the direct method of attaching were possible.

 

12 hours ago, Jarin said:

how does the game handle it for craft in flight? Loops are perfectly doable via multidocking after launch, so how is THAT craft data stored?

The game makes a special case out of struts and docked ports, checking on their connected state (and presumably, calculating the forces) through a separate module.

 

7 hours ago, Stoney3K said:

And is there anything to prevent the VAB code from just adding a "pseudo-strut" to any part which has its attachment node close by another free node, or its node clipping inside the collider of another part?

Other than missing code to do so, no. Like you said, it's already done in the game for 'special' cases like struts, docked ports, and with invisible struts inside fairings (and bays?).

Personally I wouldn't want it done automatically, or only automatically: game defaults seem to frequently be at odds with my design goals/needs, so I would prefer it to be something I can do or override manually.

For example, holding a certain key in the editor makes attachment nodes visible even without holding a part... at which point the nodes become right-clickable, with the option menu showing an 'attach' button. Clicking that button then surface-attaches that node to any suitably nearby part (or to keep the tree structure as it is now, ray-cast a pseudo-strut, but then with the same attachment strength as a regular surface/node attachment). Alternatively, at clicking the button, let me highlight exactly which part I want to attach that node to (like how the stock root gizmo works) - this would probably work better for those cases where more than one part is nearby enough to be a candidate.

If it requires a separate module, call it ModuleCloseStructure or somesuch. All it needs to store is what other part it is attached to and at what location.

A problem remains with what to do with fuel/EC routing, but this is solved for docking ports already as well, so code-wise that too can serve as an example.

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