Jump to content

Mod to Disable All Mechanical Intra-Ship Part Interactions


GreeningGalaxy

Recommended Posts

I'm not sure if what I'm after here is possible or practical, but I'd like to get a few experienced assessments if possible.

Part stress physics, as currently implemented in the game, is a headache on a number of fronts: it makes ships twist, wobble, and fall apart when they really shouldn't, it increases part counts with struts and such, and it makes older computers run extremely slowly on high-partcount ships due to the high physics load (and, until 1.1, the necessarily single-threaded nature of said physics load). The old UbioZur Welding mod addressed this to some degree by allowing parts to be fused together into units which behaved like one part, but what I have in mind is a more complete and brute-force solution: disabling part stress physics, either entirely or nearly so.

My questions, then, are thus:

  • Is this at all possible with the modding tools currently available?
  • If so, would it be practical? What necessary limitations would there be?
  • Would it be able to meaningfully improve game performance with high-partcount vessels focused?
  • What limitations would this impose on normal functionality of the game?

To be more specific, these are the specific behaviors I'm looking for:

  • The parts of complex vessels are locked into complete or nearly-complete rigidity; the majority of joints will not wobble or bend in any way whatsoever.
  • Separating parts, such as decouplers or docking nodes, will remain separable.
  • The vessel, as a unit, will still collide normally with terrain, other vessels, kerbals, etc. and be capable of landing normally.
  • All parts, including engines, landing gear, solar panels, and others whose location on the vessel is significant will continue to function normally or nearly-normally.
  • Some measure of performance will be gained as a result of the reduced physics load. In the most ideal form, this will move the main performance bottleneck to graphics rather than CPU.

It seems that a modification of the UbioZur Welding mod to make it automatic could provide these in some capacity, but a complete "relative coordinate freeze" (that preserves the relative origin and external collider of each part, but disregards forces that would move the part relative to its neighbors) is more what I have in mind.

In a perfectly ideal implementation, this would mean that vessels would behave normally when landing on surfaces, reentry/engine heat would appear and propagate as normal, and parts could even explode individually due to physical shock or heat; the only change would be the removal of mechanical stress and joint failure.

I do not claim to have a very clear understanding of how the code governing these behaviors is structured, and I do understand if a mod as described here would have to be too complex or restructure the game too deeply to be practical; I intend this only as a question: is this possible, and can it be done?

Preemptive Answers to Likely/Frequent Comments [READ ME]

This is cheating! Structural failure is an important part of the game!

Yes, it would absolutely be cheating. I, for one, don't care. To be clear, I'm certainly not meaning to imply that mechanical stress as simulated in KSP is undesirable in principle or that it shouldn't be included in the base game - it's simply a feature I would like the ability to opt out of in favor of other potential features. You are absolutely free to dislike and/or refuse to associate yourself with this venture, but please do not use this thread to preach about why you think this isn't "right" or "fair" or "moral."

That sounds impossible! It will never happen.

Okay, cool - but why, specifically? I'm totally willing to believe you if you're sure, but I don't want to hear this if you're just speaking on a hunch and don't have any reasoning or evidence to back it up.

Don't you just want KJR?

No. KJR helps half the problem, but doesn't free up appreciable CPU resources.

You're being way too demanding here!

I'm not demanding anything. I don't expect anyone to rush over here and immediately start writing a free mod for me to my exact specifications just because I asked. All I want to do is toss this out as an idea in case anyone who is both interested and knowledgeable of modding is interested in picking it up, and to open up discussion for other people interested in something similar.

Edited by GreeningGalaxy
Link to comment
Share on other sites

so welding? yeah that exists, but it's hard to code for real time usage (and yes i read your post about freezing stuff in place but it will be a total rewrite of the physics system so i'll ignore it.)- and that's coming from first hand experience main problem is lack of documentation, i have the welding part done(welds certain sections of the ship) but creating a connected vessel out of it and deploying it(and then breaking back into normal mode) is just so cumbersome i am kinda off of it now- maybe in a few months i'll get back into it.

Edited by EladDv
Link to comment
Share on other sites

Changing the settings in unity to strengthen joints is doable and has been done with mods like Kerbal Joint Reinforcement, but I don't think that is going to be the answer to reduce the cpu load. The welding mod would probably be the best option. This reduces the overall part count of a ship, and thus the amount of joints that have to be calculated in real time. The thing is with the welding mod is you have to be aware of how it works. You can't have multiple parts with the same module in one weld. For example, only one landing gear per weld. Also, the more welds you have, the longer the initial load time is going to be and you will have to watch your ram usage. But, I would think that you would have to use a lot of welds for that to start being a problem.

Link to comment
Share on other sites

(and yes i read your post about freezing stuff in place but it will be a total rewrite of the physics system so i'll ignore it.)

I was afraid of that.

Is flex really tied in that strongly with the rest of the physics, or would rewriting just that part be at least somewhat feasible?

I also don't have a particularly good understanding of how joint stiffness is controlled - does it set the magnitude of a restoring force on the joint, or the tolerance for wobble?

Link to comment
Share on other sites

It would be something of a hack, but what you might do is look into the thrust-under-timewarp mods. If you then made the game run in 1x timewarp you'd be getting somewhere. The most difficult elements remaining would probably be to handle landings and aerodynamic flight.

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