Jump to content

[1.9.*, 1.10.*, 1.11.*] DockRotate - lightweight robotics - rotational control on docking ports (plus NodeRotate, make any part rotate)


peteletroll

Recommended Posts

License: MIT

Needing deployable arms for antennas on your satellites?

Wanting to try VTOL vehicles with moving engines?

Tired of misaligned solar panel trusses on your space stations?

This plugin can help you.

Docked port pairs ( * ) can rotate via right-click menu or action groups ( ** ). They can rotate to snap for perfect alignment. And if you want to uninstall the module, you won't lose any ship, because there's no new parts involved (this is true for docking ports, but not true if you use NodeRotate parts). Your station parts will stay aligned, and your satellite arms will stay deployed.

Rotation will malfunction if parts on opposite sides of the rotating joint are connected by struts.

All sorts of decoupling/docking/undocking/klawing/unklawing while moving are fully supported. Yes, you can build a working Kanadarm.

Autostruts are removed during motion, and restored after.

If advanced tweakables are enabled, you can access to the experimental smart autostruts. If the "Smart Autostruts" flag is enabled only the autostruts that cross the rotating joint are removed. This can misbehave with crossing struts, use with caution and quicksave before!

( * ) Should work with any port based on ModuleDockingNode.

( ** ) Since version 1.4.4.15, Mod key reverses action group rotations.

( *** ) DockRotate can be compatible with Kerbal Joint Reinforcement: see @Geonovast's post here, and @linuxgurugamer's post here.

( **** ) DockRotate is reported to work fine with Konstruction weldable ports: you can rotate to snap for maximum precision, then weld.

Download here: https://github.com/peteletroll/DockRotate/releases

Source here: https://github.com/peteletroll/DockRotate

Available from CKAN.

 

NodeRotate

This module can be used to turn any connection node of any physically significant part into a rotating joint.

NodeRotate is intended for modders who want to create new rotating parts. There's an example NodeRotate.cfg file in the distribution, see there for details.

@Psycho_zs contributed a few motor parts. You can find them in VAB/SPH in the Utility section.

 

@Kottabos made this video, and I thank him very much for this:

 

This is a variable geometry F-14 Tomcat fighter made by @EvenFlow:

dxv2Qvl.jpg

This is the right-click menu:

VMFJktu.png

These are the rotating parts contributed by @Psycho_zs:

qGhdOEQ.png 6Y3kqlo.png

This is a space station with perfectly aligned solar panels:

HjUEwsi.jpg

Edited by peteletroll
New release
Link to comment
Share on other sites

So I downloaded it and opened the .zip and...

GrGJCUP.png

Yeah, this doesn't look right.

Module Manager should usually be in the GameData folder one level above the mod folder. Having it like this might cause bugs.

The idea sounds nice, though and I'll give it a try. Now I finally don't need to undock stuff to rotate it!

Edited by Gatrnerd
clarification
Link to comment
Share on other sites

Brilliant as this mod is, I do have a few requests. And that is adding this functionality to the shielded docking port, the inline docking port, and of course I want to know how keen you are to do patches for mods? Because I can think of a few that are just begging for this treatment.

Even so, I have added this mod as one of my essentials. Brilliant idea and well executed.

EDIT: Just found out this mod is incompatible with Kerbal Joint Reinforcement. Could you look into fixing that?

Edited by NomenNescio
Link to comment
Share on other sites

What are the odds of this mod conflicting with the mod that adds the ability to weld docking ports together? I believe made by RoverDude? would be great if the 2 play nice together, that way I could use this mod to align parts to dock, then weld the bits together with the construction mod. Just curious if you know, I'm using the welding mod, and downloading this one. I'll let you know how it goes later if you don't know already.

EDIT: Yes it's safe to use both, because I  forgot the construction docking ports are new parts added to the game, not a function added to the existing docking ports.

Edited by vardicd
Link to comment
Share on other sites

Thanks for the support, guys!

I'm currently refactoring to improve joint handling: the way I've handled the joints is not general enough to be applied to inline docking ports; and I need some practice with ConfigurableJoints and Transforms to handle the Clamp-O-Tron Sr.

@NomenNescio, support for all stock docking ports is planned. I never used KJR, so it's really too soon to answer about it.

@Urses OMG! I'M FAMOUS NOW!!!

@fluff space, I'll look into CKAN when all stock ports will be supported. I want to make it work first :-P

@vardicd, I'm designing this mod to keep it as simple as possible, and this should keep it compatible with a lot of stuff.

 

Edited by peteletroll
Spelling
Link to comment
Share on other sites

57 minutes ago, peteletroll said:

I never used KJR, so it's really too soon to answer about it.

Fair enough, but when creating large ships and stations, it's absolutely invaluable. I imagine I'm not the only one who'd like to use both mods. Take my pride and joy the IPV MkII:

uDTVvYc.jpg

This thing would tear itself apart during launch were it not for KJR.

Take your time, get everything working, and keep mod support in mind for later.

Link to comment
Share on other sites

This sounds so awesome, but I'd like to echo a request for mod support. I have absolutely zero idea how this works, but it seems to me it might be possible to have a general version apply automatically to any part with a Docking Node module? Transforms could also possibly be read from the part? Perhaps with provisions made to have more specific requirements (ex, some mods have docking ports that have physical alignment fins and can only be attached in 90 degree increments anyways).

Also going to mention the importance of supporting KJR and possibly autostrut, if possible. Maybe temporarily disabling those features when the ports move? Sorry, I am not a coder, so these may be really obvious 'impossibles'. :)

Link to comment
Share on other sites

50 minutes ago, CobaltWolf said:

This sounds so awesome, but I'd like to echo a request for mod support. I have absolutely zero idea how this works, but it seems to me it might be possible to have a general version apply automatically to any part with a Docking Node module? Transforms could also possibly be read from the part? Perhaps with provisions made to have more specific requirements (ex, some mods have docking ports that have physical alignment fins and can only be attached in 90 degree increments anyways).

Also going to mention the importance of supporting KJR and possibly autostrut, if possible. Maybe temporarily disabling those features when the ports move? Sorry, I am not a coder, so these may be really obvious 'impossibles'. :)

So far I've added to a couple of mod parts (including the extendable docking port in Nerta's SSP redux) and it seems to be fine.  It just requires adding the mod's module (ModuleDockRotate) to the docking part with a MM patch.  I don't know how it would with 1.875 docking ports, e.g., MOLE, HGR, as I don't if they are using the regular docking port or the Senior to set themselves up. The main issue with the autostrut limitation is craft with landing legs as you can't disable those.  However, I'm not sure how much of a limitation this really is as landing craft are usually already well balanced and precise orientation is not as important.

Link to comment
Share on other sites

25 minutes ago, b0ss said:

So so cool, such an essential mod. Any word on docking ports and built-in ports (i.e. OPT Spaceplane's built-in cockpit ports) from mods?

You might want to read the OP a little more closely, bud...

On 2/4/2018 at 12:56 PM, peteletroll said:

( * ) Clamp-O-Tron Sr. are more complex, I'm currently fighting with their triple ConfigurableJoint. Shielded and inline ports are in the TODO list.

 

Looking forward to see compatibility with OPT Spaceplane Parts. I can dream again of building a Prometheus quad-VTOL without needing infernal Robotics.

Link to comment
Share on other sites

20 minutes ago, JadeOfMaar said:

You might want to read the OP a little more closely, bud...

Not seeing anywhere that it's compatible with modded docking ports. Or has my ineptitude struck again and I'm just not putting the pieces together? :P

Link to comment
Share on other sites

12 hours ago, vardicd said:

What are the odds of this mod conflicting with the mod that adds the ability to weld docking ports together? I believe made by RoverDude? would be great if the 2 play nice together, that way I could use this mod to align parts to dock, then weld the bits together with the construction mod. Just curious if you know, I'm using the welding mod, and downloading this one. I'll let you know how it goes later if you don't know already.

EDIT: Yes it's safe to use both, because I  forgot the construction docking ports are new parts added to the game, not a function added to the existing docking ports.

The name of the mod is Konstruction (I use it too). Just for clarification, this mod does allow you to rotate the weldable docking ports?

Link to comment
Share on other sites

15 minutes ago, Grenartia said:

The name of the mod is Konstruction (I use it too). Just for clarification, this mod does allow you to rotate the weldable docking ports?

I don't expect compatibility to exist out of the box. I know very little of Konstruction but iirc, Konstruction ports have their own docking type and cannot be paired (even simply for docking, forget about welding) with standard ports?

Link to comment
Share on other sites

22 minutes ago, JadeOfMaar said:

Konstruction ports have their own docking type

It's just a different size, not a type.  Not sure if that's what you meant.

To test I took the stock inline docking port, changed its size to match the Konstruction 1.25m docking port, and they docked just fine.  Obviously can't weld, but will dock normally.

I'd really like to make something that gives all docking ports a PAW option to switch between "normal" and "konstruction" sizes during flight, but I have no idea how.

Link to comment
Share on other sites

3 hours ago, Grenartia said:

The name of the mod is Konstruction (I use it too). Just for clarification, this mod does allow you to rotate the weldable docking ports?

No this mod does not affect the Konstruction weldable docking ports. this mod adds functionality to the stock docking ports, construction adds it's own parts. you can use the 2 mods together, but they will not have any effect on each other.

Link to comment
Share on other sites

2 hours ago, Geonovast said:

It's just a different size, not a type.  Not sure if that's what you meant.

To test I took the stock inline docking port, changed its size to match the Konstruction 1.25m docking port, and they docked just fine.  Obviously can't weld, but will dock normally.

I'd really like to make something that gives all docking ports a PAW option to switch between "normal" and "konstruction" sizes during flight, but I have no idea how.

From what I can tell, they're the same size as their stock counterparts. The primary differences, as far as I can tell, are weldability, and that you can only dock the Konstruction ports once (which is why this mod being compatible with them would be REALLY nice).

Link to comment
Share on other sites

33 minutes ago, Grenartia said:

From what I can tell, they're the same size as their stock counterparts.

Ok, this is what I was thinking.  I just had my terms confused.  They look to be the same size, I'm pretty sure they're stock models using different textures.  nodeType is what's different, and this is where I got size from.

Stock:

    MODULE
    {
        name = ModuleDockingNode
        referenceAttachNode = top
        nodeType = size1
        stagingEnabled = False
    }

Konstruction:

MODULE
    {
        name = ModuleDockingNode
        referenceAttachNode = top
        nodeType = ConSize1
        stagingEnabled = False
        snapRotation = true  
        snapOffset = 90     
        acquireForce = 2
        acquireTorque = 2
        acquireTorqueRoll = 2    
    }

 

If you change the nodeType on a stock docking port to its Konstruction counterpart's value, they'll dock together.  They won't be able to weld.

Here's a quick docking test.  Clamp-O-Tron Construction Port is untouched.

Inline Clamp-O-Tron Const is the stock inline docking port with the nodeType changed to ConSize1 from size1.  If you try to compress, you just get that error.

screenshot644.png

49 minutes ago, Grenartia said:

The primary differences, as far as I can tell, are weldability, and that you can only dock the Konstruction ports once (which is why this mod being compatible with them would be REALLY nice).

Partially right.  You can dock and undock them as many time as you like, using the forced rotation each time.  You can only weld them once, because it actually removes both ports from the ship when you do.  I did the above test so I could start using Konstruction port exclusively and still be able to dock the inline ones to them.

*On a side note I think this new mod is fantastic and will be installing it presently.  I was searching for this exact feature when I was pointed to Konstruction.

Link to comment
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.

×
×
  • Create New...