whale_2

[1.3.1 - 1.7.1] Inner Lock - lock your inner parts

Recommended Posts

Posted (edited)

This is rather niche mod and can be of interest if you make some complex contraptions with Infernal Robotics (both "Classic" and "Next", and note, "Classic" has an unofficial recompile for 1.6.1) and/or DockRotate or similar stuff with lots of moving parts.

Infernal Robotics is infamous for its wobbly parts that also drift apart after time warp or scene change. This mod partly solves this issue by doing following things:

- First, it allows internal collisions between certain parts, so if you stow one moving part against some base part, chances are fair that after time warp it will remain in the same place.   

- Second, it creates a joint between "lock halves", and it increases chances even more.

- Third, by creating said joint it can enhance the stiffness of your contraption in general while allowing movement when it is necessary. In that this mod is akin to ActiveStruts, but with internal collision feature it also can enforce some fixed predefined position.

Super-neat lock model was created by @ZodiusInfuser in his marvelous style of Infernal Robotics Model Rework.

Update - version 0.1.1

- Fix part config allowing locking between different vessels

- Lock alignment is checked in a more strict way now

- Minor in-editor fixes  

 

Update - version 0.1.0

- New part from ZodiusInfuser - a lock that looks even more surface-attachable

- "Launch locked" feature. Align lock halves in SPH/VAB and they will be launched in already locked state.

- Lock is now stronger, an autostrut-like joint is created between parts the lock halves are attached to.

 

Some examples how this could be used:

Spoiler

 

 

Models and textures licensed under CC BY-NC-ND 4.0


Code and everything else licensed under MIT License

Development Thread

Source code

Download from GitHub

Download from SpaceDock

 

Known issues:

- When unlocking, sometimes lock halves go through each other, if you move them apart and back again, they will continue to work as before. 

- Lock in general is not super-strong, avoid hanging heavy stuff on it

 

Bug reports are welcome as usual.

Some more parts are planned for future - like rails and bogies that could slide on them. This could make stuff like telescopic ladders or gantries more stiff and robust. 

 

Bonus content:

There's a patches.zip file on release page, extract it under GameData if you want internal collisions between stock trusses and most cargo bays, for instance, if you don't want stuff to protrude through cargo bay walls. Examples could be found in development thread.

 

Edited by whale_2
v 0.1.1

Share this post


Link to post
Share on other sites

Glad to see this out in the wild! If anyone's interested, I modelled the lock after this IRL locking mechanism I developed during my PhD, but swapped out the latches for electro-permanent magnets.

Share this post


Link to post
Share on other sites

This looks really interesting! I haven't been using IR since like 1.2 was new, and the wobblyness issue was one of the main reasons I stopped using it. I guess I'm now forced strongly compelled to start using it again.

Share this post


Link to post
Share on other sites
Posted (edited)

Another application example - here the Kanadarm-like manipulator is being held by Inner Lock so it won't swing back and forth while stowed:

 

bbArKe6.png 

 

Edited by whale_2

Share this post


Link to post
Share on other sites
51 minutes ago, whale_2 said:

Another application example - here the Kanadarm-like manipulator is being held by Inner Lock so it won't swing back and forth while stowed:

  

bbArKe6.png 

 

Sorry, I can't see what is working and how.. "Inner lock" is the red locker in the robotic sequencer ? And what is your part at the end of the Kanadarm ? Is it onepart that can magnet other ones ?

Share this post


Link to post
Share on other sites
Posted (edited)
4 minutes ago, TarTi said:

Sorry, I can't see what is working and how.. "Inner lock" is the red locker in the robotic sequencer ? And what is your part at the end of the Kanadarm ? Is it onepart that can magnet other ones ?

Yeah, sorry, not very clear. The Inner Lock is the part (two parts, actually) with bright green dashes. At the end of the arm there's standard magnet grappler from IR Model Rework, however, it requires KAS to operate and I'm not sure does it work with KAS 1.0 or not.

About how does it work - check out the video in the top post.

Edited by whale_2

Share this post


Link to post
Share on other sites
3 minutes ago, whale_2 said:

The Inner Lock is the part (two parts, actually) with bright green dashes.

Okay I just took a look at the video and this looks really cool and even well-designed. It still looks that I can put one half at the end of a Kanadarm, and the other half on each vessel I want to be able to move in space with the Kanadarm ?

 

Quote

At the end of the arm there's standard magnet grappler from IR Model Rework, however, it requires KAS to operate and I'm not sure does it work with KAS 1.0 or not.

So, I should use this to make my vessel manoeuvers from a Kanadarm ? Or just wait for releases in IR and KJR ?

Share this post


Link to post
Share on other sites
Just now, TarTi said:

Okay I just took a look at the video and this looks really cool and even well-designed. It still looks that I can put one half at the end of a Kanadarm, and the other half on each vessel I want to be able to move in space with the Kanadarm ?

This should work, however, must admit it, I didn't test it.

 

Just now, TarTi said:

So, I should use this to make my vessel manoeuvers from a Kanadarm ? Or just wait for releases in IR and KJR ?

I really have no idea will it work in newer versions. I went deep down to RSS/RO and it uses KSP 1.3.1.
 

Share this post


Link to post
Share on other sites

Okay, in any case, your work looks really cool in video and I so want to test it with ships and loads in orbit  in my carreer, but I have to upgrade my R&D facility and earn a lot of science.. As said in the IR topic, would be cool to have this part unlockable between 3 and 5 tech levels and not 7th ;) Seems fair for me at least to have it at the same time you unlock the first official docks :)  

Share this post


Link to post
Share on other sites
2 minutes ago, TarTi said:

Okay, in any case, your work looks really cool in video and I so want to test it with ships and loads in orbit  in my carreer, but I have to upgrade my R&D facility and earn a lot of science.. As said in the IR topic, would be cool to have this part unlockable between 3 and 5 tech levels and not 7th ;) Seems fair for me at least to have it at the same time you unlock the first official docks :)  

Makes sense to me, I'll put an update soon.

Share this post


Link to post
Share on other sites
1 minute ago, whale_2 said:

Makes sense to me, I'll put an update soon.

You rules :) I'll wait to launch my new Orbital Station parts so :) 

Share this post


Link to post
Share on other sites
Posted (edited)

Update - version 0.1.0

- New part from @ZodiusInfuser - a lock that looks even more surface-attachable

- "Launch locked" feature. Align lock halves in SPH/VAB and they will be launched in already locked state.

- Lock is now stronger, an autostrut-like joint is created between parts the lock halves are attached to.

- Lock is moved down on the tech tree, now it's more affordable than ever!

- Added recompile for 1.7.1

 

GitHub

SpaceDock

Edited by whale_2

Share this post


Link to post
Share on other sites

@whale_2, does MM patch from alpha to add inner lock module on any desired part still work ? Example:

@PART[MyDesiredPArt]
{
	%MODULE[InnerLock]
	{
		isPermaLock = false
		isSwitchable = false
	}
}

IIRC, above should add InnerLock module to part with collision switched off by default and it would allow you to turn on/off collision in SPH/VAB as needed for such part. Other concern is does such additional switch may cause performance issue if it is turned off ? I guess it will not or it would not be noticable impact on performance at all, but have to ask, just to be sure.

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, kcs123 said:

@whale_2, does MM patch from alpha to add inner lock module on any desired part still work ? Example:


@PART[MyDesiredPArt]
{
	%MODULE[InnerLock]
	{
		isPermaLock = false
		isSwitchable = false
	}
}

IIRC, above should add InnerLock module to part with collision switched off by default and it would allow you to turn on/off collision in SPH/VAB as needed for such part. Other concern is does such additional switch may cause performance issue if it is turned off ? I guess it will not or it would not be noticable impact on performance at all, but have to ask, just to be sure.


I didn't really touch InnerLock module since the time I first wrote it and it was over a year ago (Yes, the naming is rather unfortunate, it doesn't reflect what this module really does) so it should work the way it worked in alpha, nothing really changed there.

I also don't like flag naming. If isPermaLock is set to true, the part will collide with another part also having  isPermaLock set to true. isSwitchable controls if collisions are switchable in editor. isActiveForAll enables internal collision with every other part of the vessel, not only those having InnerLock module and isPermaLock enabled.

Having a lot of parts with internal collisions enabled could be a performance hit though. Actually ferram4 mentioned that here, but that was in 2014 and things could have changed since then. 

I personally didn't test that, the biggest number of locks I have on any vessel is 8. (And 10 in the scene) - it doesn't seem to be noticeable.


Hope that helps.

Edited by whale_2

Share this post


Link to post
Share on other sites

Yep, I would probably not need more than 8-10 per craft, so I think it is probably fine performance wise. But, question is if some part have such switch to turn on/off collision and it is turned off, that should not affect performance at all, right ?

Meaning, if I put that module on some structural parts, like truss or similar and using those to create craft without collision, it should behave the same as before without performance hit. And if I need to have collision on strategic places for 8-10 parts on craft performance should not decrease.

Share this post


Link to post
Share on other sites
Just now, The Destroyer said:

Is/will there be compatibility with Breaking Ground robotics?

The mod should be compatible with it right away - it does not depend on the way parts move.

Share this post


Link to post
Share on other sites

i like the idea. would it be possible too also have options too have a module manager patch that lets u adjust the parts of your craft and their collision with all other parts of the craft, without individual unique parts? like, so i can have the surface of a cargo bay collide with wheels of a docked rover? 

Share this post


Link to post
Share on other sites
1 minute ago, 123nick said:

i like the idea. would it be possible too also have options too have a module manager patch that lets u adjust the parts of your craft and their collision with all other parts of the craft, without individual unique parts? like, so i can have the surface of a cargo bay collide with wheels of a docked rover? 

Such patch is in the patches.zip on GitHub

Share this post


Link to post
Share on other sites
Posted (edited)

So, I come up with following patch that enable InnerLock module on all structural parts from IR next mod:
 

Spoiler

// Install InnerLock collision support on IR structural parts:
@PART[IR_Adapter_*|IR_Segment_*|IR_AthleteTruss*]:NEEDS[InnerLock,MagicSmokeIndustries]:AFTER[MagicSmokeIndustries]
{
	%MODULE[InnerLock]
	{
		isPermaLock = false
		isSwitchable = true
	}
}

 

Only for collision, there is separate parts already that enables connecting two parts of same craft. By default, collision is not enabled, but it is switchable in SPH/VAB, to allow you collision when you want one. So far, I didn't notice any performance degradation at all. But, there is small glitch with GUI in SPH/VAB. Whatever is chosen in SPH/VAB for collision to be turned ON or OFF, when you reload craft or when you revert in SPH/VAB from flight, you always have both options in PAW, to enable or disable collision, while only one option should be shown, to enable or disable, depending on whatever is current set on part.

I'm leaving patch here for anyone else who want to try it and leave feedback about it.

Edited by kcs123

Share this post


Link to post
Share on other sites

@kcs123 Thanks for sharing this, but shouldn't it be isSwitchable = true ?

I'll look into loading issue, probably just a bug waiting to be fixed.

Share this post


Link to post
Share on other sites
12 minutes ago, ZodiusInfuser said:

Btw, you've just been reviewed by Kottabos :) 

Nice, seems like I have to pay more attention to the alignment checking :)

Share this post


Link to post
Share on other sites

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.