Jump to content

[Plugin][Part][0.16] Animated Cargo Bay


Recommended Posts

Since, I've been trying to launch satellites into space using SSTO spaceplanes, I've been frustrated with the lack of an animated cargo bay to hold the satellite in. As the adage goes, if you want something done, do it yourself, and so I present to the KSP community, an animated cargo bay:

2012-08-29SSTOinLKOwithbaydoorsopen.png

I have received permission from C7Studios to base my parts on his old Flight Pack for better stock part integration.

Watch on YouTube to see the annotations - I wasn't comfortable narrating it by voice.

SkyDrive Folder: https://skydrive.live.com/redir?resid=11CF26D6E58AF2E3!513

CodePlex Page for PartModule project: http://eeksppml.codeplex.com/


Contents (v 0.1)

[table]

[tr][td]Part name[/td][td]Description[/td][/tr]

[tr][td]EE_Fuselage_Floor_Static[/td][td]A standard, non-animated cargo bay floor with two internal mounting points for 1m diameter parts[/td][/tr]

[tr][td]EE_Fuselage_Roof_Bay[/td][td]An cargo bay roof with animated bay doors. Defaults to z to open/close, but can be changed via Part.cfg or a ship's .craft file[/td][/tr]

[/table]

[table]

[tr][td]PartModule name[/td][td]Description[/td][/tr]

[tr][td]ModuleAnimatedPart[/td][td]Module for invoking an animation in a PartTools created model on a key press. It will switch back and forth between playing the animation forwards and backwards.

Fields


string: animationName = {Animation Name}
string: activationKey = {Unity.Input.GetKey() key name
(http://docs.unity3d.com/Documentation/Manual/Input.html)}
int: animationState = {Initial animation state: -2 for at the beginning, 2 at
the end (to play animation backwards)}

Example


name = ModuleAnimatedPart
animationName = RoofOpening
activationKey = z
animationState = -2
}
MODULE {

[/td][/tr]

[/table]


[table]

[tr][td]Version[/td][td]Notes[/td][/tr]

[tr][td]0.1[/td][td]Initial Release.

Parts:

  • Mk3 Fuselage-compatible Cargo Bay Floor, Static
  • Mk3 Fuselage-compatible Cargo Bay Roof, Roof Bay Doors

PartModules:

  • ModuleAnimatedPart: Used to animate a part on a key press. Requires a PartTools model with an animation.

[/td][/tr]

[/table]

Parts:

[table]

[tr][td]Go back through the current parts and think of shorter Titles, better descriptions and better categories[/td][td]In Planning[/td][/tr]

[tr][td]Create a Mk3 Fuselage-compatible cargo bay floor with a ramp

May need to drop if I can't work out how to detect collision with ground from a PartModule[/td][td]In Planning[/td][/tr]

[tr][td]Create Mk3 Fuselage-compatible tail with a drop ramp

May need to drop if I can't work out how to detect collision with ground from a PartModule[/td][td]In Planning[/td][/tr]

[tr][td]Create Mk3 Fuselage-compatible tail with clamshell doors[/td][td]In Planning[/td][/tr]

[/table]

PartModules:[TABLE]

[tr][td]Delete ModuleAnimatedPart and split its current functions into separate but more capable PartModules[/td][td]Pending[/td][/tr]

[tr][td]Create replacement Animation PartModule which plays an animation from a list of animations based on additional data embedded in a KSPEvent. Also fires part-definable KSPEvents on animation start and completion.[/td][td]In Development[/td][/tr]

[tr][td]Create a StackIcon PartModule which sets a part's stackicon properties from a list of states. State chosen from additional data embedded in a KSPEvent.[/td][td]In 0.2 Release of EE_KSPPML

Module_EE_StackIcon is untested with symmetry groups & state changing[/td][/tr]

[tr][td]Create a Controller PartModule which sets the buttons on a part's right-click menu. Each entry can have an associated keyboard mapping. Again, each entry will have a list of states which can be changed via KSPEvents[/td][td]In 0.3 Release of EE_KSPPML

Module_EE_UserEvent lacks keyboard binding at this time[/td][/tr]

[tr][td]Create a sound playing partmodule. It will have a list of available sounds to play, and is picked in a similar fashion to the animation PartModule.[/td][td]In Planning

Module_EE_UserEvent lacks keyboard binding at this time[/td][/tr]

[/table]

Other[table]

[tr][td]Create a CodePlex/SourceForge account and make a SVN/GIT repository.[/td][td]Done[/td][/tr]

[tr][td]Create an icon for the plugin dll.[/td][td]In Planning[/td][/tr]

[tr][td]Spice up this thread with logos and stuff.[/td][td]In Planning[/td][/tr]

[tr][td]Make up a better name for my PartModule project and my series of parts. "Echo 8 ÉRÀ's KSP PartModule Library" (or EE_KSPPML) is a bit of a mouthful, and a tad boring.[/td][td]In Planning[/td][/tr]

[/table]

All assemblies and their source code is licensed under the Microsoft Reciprocal License (Ms-RL).

The remainder of the work (aka the models, part.cfgs, etc.) is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Edited by Echo 8 ÉRÀ
Link to comment
Share on other sites

Excellent work - looking forward to using this. I reckon that with the Mk3-Mk2 and Mk2-Mk1 adapters for cockpit attachment, you could build a vessel with this upside down, thus making a bomb bay.

With a Mk3 cockpit with a hatch in the back, Kerbals could exit the cockpit straight into the bay, effectively IVA.

Your other parts in planning look exciting - might be able to roll a Liltrak straight out the back of a carrier using those. I hope the Liltrak fits!

Link to comment
Share on other sites

Some issues...

1) I cannot find which key to use in your post, only in the part.cfg

2) Saving a ship with opened cargo bay fails (after loading, the doors are closed, but if you press the key, they insta-open then close again)

3) Does not work if the cargobay wasn't activated by staging

4) It still works if the ship is not controllable anymore (all on EVA etc)

5) Why not a context menu instead of a key? You don't have to quickly open and close the cargo bay, so using a key here is overkill in my opinion. It could also result in conflicts with other plugins (some have HARDCODED keys AFAIK!)

6) It's possible to control them from outside the ship. This can of course be seen as an advantage, but it might become annoying if you have multiple cargo bays at the same spot. Using a context menu whould help here too.

Link to comment
Share on other sites

Excellent work - looking forward to using this. I reckon that with the Mk3-Mk2 and Mk2-Mk1 adapters for cockpit attachment, you could build a vessel with this upside down, thus making a bomb bay.

I have a Mk3 bomb bay in the works, but right now, I haven't even started texturing it. 3D modelling just isn't my strong point, and I've been busy working on my partmodule library.

With a Mk3 cockpit with a hatch in the back, Kerbals could exit the cockpit straight into the bay, effectively IVA.

I thought about that, but modelling a new cockpit seemed a bit beyond me. My current modelling process involves mathematically mapping out half my points in Excel... I know that close enough is close enough, but I'm a bit OCD about getting the walls a certain exact thickness :D

Your other parts in planning look exciting - might be able to roll a Liltrak straight out the back of a carrier using those. I hope the Liltrak fits!

Yep, that's one of the things I looked at in my initial planning. I figured that even if there isn't a cart small enough, someone would make it (at the time liltrak didn't exist yet).

I don't know which key opens the bay doors...

Although it looks very nice in the videos. Great job!

Now to have a cargo bay for use in the VAB... Unless this one works.

I'll try it soon.

It's z, but you can change it in the Part.cfg, and due to how KSP loads data, the .craft file for each individual ship as well.

Some issues...

1) I cannot find which key to use in your post, only in the part.cfg

2) Saving a ship with opened cargo bay fails (after loading, the doors are closed, but if you press the key, they insta-open then close again)

3) Does not work if the cargobay wasn't activated by staging

4) It still works if the ship is not controllable anymore (all on EVA etc)

5) Why not a context menu instead of a key? You don't have to quickly open and close the cargo bay, so using a key here is overkill in my opinion. It could also result in conflicts with other plugins (some have HARDCODED keys AFAIK!)

6) It's possible to control them from outside the ship. This can of course be seen as an advantage, but it might become annoying if you have multiple cargo bays at the same spot. Using a context menu whould help here too.

1) I completely forgot to mention the key in the post. I kept seeing the "activationKey = z" line in my documentation on CodePlex that I automatically assumed that I put it in there.

2) Limitation due to how I check for key presses. It only checks during OnUpdate(). To be fixed when I finish up v 0.4 of my partmodule library and have a fully featured animation partmodule.

3) Again, due to how it was implemented, the part has to be active before it can start checking for key presses.

4) I never EVA, so it never occured to me to check. I guess I'll have to account for that in Module_EE_UserEvent, since it also currently uses a simple Input.GetKeyDown() check in OnUpdate(). Might have to wait a bit though. My animation partmodule v2 is currently hitting a few self-inflicted difficulties due to some ambitious design goals.

5) I hadn't worked out how to use KSPEvents properly when I first made the part. In fact, the part started its life as a copy of LandingLeg1-2 with a new model. After that, I simply went about working out how to get it to animate independantly of landing gear. It's only at the end of its creation did I put any thought into even attempting to rectify its limitations, and my partmodule library is the result of that.

6) I hadn't considered multiple ship scenarios when I first produced that simple partmodule, due to running the game on a laptop that can barely handle a single ship. I have to regularly delete my save files to get rid of lag issues.

My main reason for releasing this? To get reports from people who aren't me. Due to having developed it, I'm kind of blinkered, since I know how the parts are supposed to be used (for ex, why I zeroed the throttle and fired off the first stage without as much as an explanation in my video) and have a certain play style which prevented me from foreseeing some of the issues you mentioned. I do have my partmodule library marked as Alpha, after all.

I don't know anyone well enough that I could get them to test stuff out for me before I release it to the general public, so it was a choice of releasing it with only my limited amounts of testing, or never to release it at all. The former results in feedback, the latter results in wasting the dozens of hours I've spent working on my partmodules and dozens more on the models (really, it took me over three days just to go from untextured floor model to what it is now. The roof only took a day or so due to streamlining my process a bit), for little more than the satisfaction that I managed to make an animated part.

Edited by Echo 8 ÉRÀ
Link to comment
Share on other sites

Think you can make a 1meter version of this for .5m Sattelites such as probodyne.

If they're only 0.5m in radius, they should already fit. The FL-T32 is 0.5m in radius and it fits fine:

th_2012-09-10-FL-T32_Fuselage_Size_Comparison.png

That's an earlier version of my models, but the only real difference is that the final version used quads for most of the faces. All the triangles made it harder for me to work out which triangle was for each face when I was trying to texture it :P

If it helps, I can assure you that you can fit a radial decoupler in there + fuel tank on top in there, though you'll have to rotate it to face up. It's what I used to substitute for a satellite during testing. I tried to use the DynaSat L100, but it had a tendency to break open the ship when it deployed its solar panels before it cleared the cargo bay.

Seems like a good first alpha. Maybe incremental releases can makecthis rock solid. :)

Thanks. That's the plan.

Edited by Echo 8 ÉRÀ
Link to comment
Share on other sites

Yes. place a decoupler inside:sticktongue: (There's a bug with snap angles, if it's turned on, you need to rotate the decoupler manually)

I reported some bugs on the previous page, did that got lost due to failBulletin not showing you new posts made while you where typing?

Link to comment
Share on other sites

you need to change your image url targets to direct link to the fullsize images, they're pointing to the Mobile THumbnail versions

They're pointing to photobucket for me, but yes, direct image embedding would be nice. Don't forget the spoiler tags!

And this is a pretty neat looking add-on, however, some sort of decoupling function, perhaps?

Link to comment
Share on other sites

I ment or 1meter shuttles such as the one I,ve made for Voyager Labs.

Could you get me a link to what you mean?

Yes. place a decoupler inside:sticktongue: (There's a bug with snap angles, if it's turned on, you need to rotate the decoupler manually)

I reported some bugs on the previous page, did that got lost due to failBulletin not showing you new posts made while you where typing?

I saw your post after I made mine, so I edited in my reply at the end of mine so I wouldn't double post. Post 6.

you need to change your image url targets to direct link to the fullsize images, they're pointing to the Mobile THumbnail versions

Alright. I picked the thumbnail because I though 1024x768 was a tad large to link directly. Habit from other forums.

does it float??? :D

Pretty sure it does. I know at one point, I had my shuttle crash land in the ocean near the KSC and the main body survived the landing, but I don't know if the changes I made to the Part.cfgs since then would still allow it to float.

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