Jump to content

[1.10.0] AnimatedAttachment 2.1.5 (2020-07-15)


Katten

Recommended Posts

This mod adds a PartModule that enable generic animations to move sub parts! Thus, it is a light-weight option for modders and players to use instead of the more advanced robotics mods out there. Even works for stock parts!

When a part contains components that move (due to animations, gimballing or moving control surfaces), this part module can move any connected part in response. Thus, a part modder may add a moving boom, rotators, hinges etc without learning anything more than they already know from before. 

Parts are moved by using physical forces in the joints. This means that they will obey the laws of physics.

Limitations & known issues

#3 There is a caveat for physics-less parts - while they and any other physics-less sub-parts to them will move with the animation, any physics-enabled sub-parts will not. For example, a cubic strut connected to a hinge will move with it, but a tank connected to the cubic strut will not.

Basic usage

AnimatedAttachment will be automatically added to all parts containing a ModuleAnimateGeneric, ModuleGimbal or ModuleControlSurface. So there is no need to do anything else to your config.

Players simply use the "Deploy" button or similar to run the animation and any connected sub-part will move with it.

Advanced usage

A player can adjust this in the VAB by enabling the stock feature "Advanced tweakables" in the settings and then right clicking the animated part, to set maximum force and spring strength.

Part modders may potentially override the default settings in the part module, but this has not been tested much yet.

Mods using AnimatedAttachments

Rocket Emporium contains several parts that uses this part module 

Spoiler

Samples.png?raw=true

Compatibility

This mod has been tested for compatibility with

* KJR

* KIS/KAS

License

Released under CCA-NC-SA 4.0

Credit

Thanks to @Rudolf Meier@blowfish and others for answering many questions about quaternions and whatnot, and @HebaruSan for the awesome work with CKAN.

Change log

Spoiler

v1.2.0
* Can now disable the updating of the positions temporarily in order to move attached parts in the editor for tuning by clicking "Animated attachments = disable" (remember to enable it again afterwards!)
* Now survives time warp
* Now survives launch revert
* Now survives saving and loading
* Increased default springs and dampers
* Fixed the download path in the version file

v1.2.1:
* Solved #1: Now applies scaling from models to attach nodes
* Briefly tested in 1.4.4

v1.2.2:
* Stock wheels create auto-struts that inhibits robotic mods to move them. All auto-struts are now removed while any animation is running. They are recreated after the animation has stopped. 

v2.0.0:
* Now supports animated surface attachments! 
* Now makes it possible to surface attach stuff on cargo doors and engine bells
* Now adds support to all moving stock parts (generic animations, engines and control surfaces)

v2.0.1
* Improves compatibility with KJR by implementing IJointLockState
* Cleanup, since the above fix also works for stock wheel auto-struts

v2.0.2
* Cleaned out some dlls that were mistakenly included in the release

v2.0.3
* Implemented a work-around for an issue in stock wheel auto-struts

v2.1.0
* Now compatible with KIS/KAS.
* Fine-tuning now works without having to disable the mod
* Increased default spring&force

v2.1.1
* Now compatible with PangolinMechanicsToolkit.

v2.1.2
* Updated version file to target KSP 1.6.1

v2.1.3
* Compiled for KSP v1.7.0

v2.1.4
* Added support for launch clamps

v2.1.5
* Compiled for KSP v1.10.0

Download

Download from CKAN or from github.

Edited by Katten
Link to comment
Share on other sites

On 6/14/2018 at 6:23 AM, Daishi said:

Wait, so RCS quads on a cargo bay door will follow the opening arc, and still function? :O

It doesnt work with surface attached parts.. yet at least =) I think it is possible to solve it 

Edit: now supports surface attached parts too

Edited by Katten
Link to comment
Share on other sites

Oops, noticed now that transform scales in the models are not properly applied. Will be fixed, but for now make sure that your meshes/armatures/empties are in 1,1,1 scale in Blender.

Also, when animating an object in the VAB, the attach node isn't properly updated (used to work but broke it in a cleanup before the release). So it is updated directly when you attach something to it instead.

Edit: solved

Edited by Katten
Link to comment
Share on other sites

Awesome. I think this will be great for implementing customizable all moving horizontal stabilizers for my airliner mod. As a workaround to the surface attach not working, is it possible to have a "dummy-part" in-between, that attaches to a node, then surface attach parts to that?

Link to comment
Share on other sites

2 minutes ago, neistridlar said:

Awesome. I think this will be great for implementing customizable all moving horizontal stabilizers for my airliner mod. As a workaround to the surface attach not working, is it possible to have a "dummy-part" in-between, that attaches to a node, then surface attach parts to that?

It is!

MountingPlate.png?raw=true
 

Link to comment
Share on other sites

  • 2 weeks later...

v1.2.0
* Can now disable the updating of the positions temporarily in order to move attached parts in the editor for tuning by clicking "Animated attachments = disable" (remember to enable it again afterwards!)
* Now survives time warp
* Now survives launch revert
* Now survives saving and loading
* Increased default springs and dampers
* Fixed the download path in the version file

Known issues: 
* Forgetting to re-enable animations after fine-tuning the position of a part before launch will cause problems
* Still doesn't handle scaling of transforms in the model

Overall, this mod is now quite stable and useful! Modders, please give it a spin =)

 

Link to comment
Share on other sites

1 minute ago, VaPaL said:

Excellent work @Katten will check when I gat home. Is it known if this conflicts if Konstruction? It seems unlikely though. If it's unkown, I can check for it tomorrow (I think)

Thanks!

I don't know, but I don't think so. 

Link to comment
Share on other sites

v1.2.2:
In stock KSP, wheels create auto-struts that inhibits robotic mods to move them. All auto-struts are now removed by AnimatedAttachment while any animation is running. They are recreated after the animation has stopped. Please tell me if this is causing issues in any situation!

Edited by Katten
Link to comment
Share on other sites

  • 2 weeks later...

v2.0.0:
* Now supports animated surface attachments! 
* Now makes it possible to surface attach stuff on cargo doors and engine bells
* Now adds support to all moving stock parts (generic animations, engines and control surfaces)

 

 

Link to comment
Share on other sites

Edit: no longer needed =)

I've tested AA with KJR.

The CKAN version seems to be incompatible with KSPv1.4.4, and is not active when installed, so it doesn't cause any issues with AA.

There is a fork of KJR, that works for KSPv1.4.4, available here: 
https://github.com/meirumeiru/Kerbal-Joint-Reinforcement/releases

With this version installed, AA will not work. There is however a mechanism in KJR to enable compatibility with robotics mods, made just for this kind of situations. I will ask them to add the fix.

Meanwhile, you can add the fix yourself by editing the config.xml file in the Gamedata/KerbalJointReinforcment folder.
Add the following line in the xml file:

<string name="exemptModuleType6">AnimatedAttachment</string>

Thanks to TheKurgan who figured out this solution.

Edited by Katten
Link to comment
Share on other sites

v2.0.1
* Improves compatibility with KJR. The above fix is no longer required and will not make any change.

Some issues still remains when using wheels, when KJR is installed.
 

Link to comment
Share on other sites

@Katten is all this really supposed to be in the release? Just curious...

GameData\AnimatedAttachment\Plugins\AnimatedAttachment.pdb
GameData\AnimatedAttachment\Plugins\Assembly-CSharp.dll
GameData\AnimatedAttachment\Plugins\Assembly-CSharp-firstpass.dll
GameData\AnimatedAttachment\Plugins\TDx.TDxInput.dll
GameData\AnimatedAttachment\Plugins\UnityEngine.dll
GameData\AnimatedAttachment\Plugins\UnityEngine.UI.dll

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