Jump to content

Discreet (not just aircraft anymore) Parts. (Updated 21-06-15)


Recommended Posts

I'm not sure if it's in all the airship cfg's, but it is in the Ray one. Near the bottom is a solar panel module that's been made inactive.

This one ?

// Kerbal Space Program - Part Config
// Hooligan Labs Airship Envelope

PART
{
// --- general parameters ---
name = HL_AirshipEnvelope_Ray
module = Part
author = Hooligan Labs

// --- asset parameters ---
// mesh = HL_AirshipEnvelope_Ray.dae
scale = 0.5
// texture = HL_AirshipEnvelope_Una.png
specPower = 0.2
rimFalloff = 0.5
alphaCutoff = 0

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z

node_stack_bottom = 0.0, -0.6, 0.0, 0.0, -1.0, 0.0, 1

node_attach = 0, -0.6, 0, 0, -1, 0, 1

// --- FX definitions ---


// --- editor parameters ---
TechRequired = advLanding
entryCost = 100
cost = 400
category = Aero
subcategory = 0
title = Inflatable Parachute "Ray"
manufacturer = Hooligan Labs
description = Why simply fall slowly when you could float? This "paracute" relies on buoyant force rather than drag. Recommended for entering or leaving the atmosphere. This larger model can work on thinner atmospheres like Duna.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,0,0,0

// --- standard part parameters ---
mass = 0.149632
dragModelType = override
maximum_drag = 0.5
minimum_drag = 0.5
angularDrag = 0.2
crashTolerance = 2
breakingForce = 9999
breakingTorque = 9999
maxTemp = 3100
fuelCrossFeed = False


MODULE
{
name = HLEnvelopePartModule

// The volume of the blimp - affects the lifting capacity
envelopeVolume = 935.2

// This multiplies the lifting volume of the envelope,
// allowing for visually smaller envelopes to act as though they were larger.
// For realistic lift, set to 1.
envelopeVolumeScale = 40

// The initial fraction maximum possible volume, from 0.0 to 1.0
specificVolumeFractionEnvelope = 0

// Rate (per second) that gas can be compressed
compressRate = .05

// Rate (per second) that gas can be expanded
expandRate = .05

// When pressure drops below this value the blimp will undeploy
minAtmPressure = 0.005

// If this envelope has animation this is true.
envelopeHasAnimation = true

// Name of animation
animationName = Default Take

// Deployed drag, ~10% of large parachute would be 50
dragDeployed = 4

// Maximum speed you can be traveling to "Make Stationary"
makeStationarySpeedMax = 10

// Maximum vehicle speed when "made stationary"
// You can set higher than 0.2 but it may affect saves
// And EVA walking ability on the vessel
makeStationarySpeedClamp = 0.05
}


//MODULE
//{
// name = ModuleDeployableSolarPanel
//
// sunTracking = false
//
// raycastTransformName = suncatcher
// pivotName = suncatcher
//
// isBreakable = false
//
// resourceName = ElectricCharge
//
// chargeRate = 5
//
// powerCurve
// {
// key = 206000000000 0 0 0
// key = 13599840256 1 0 0
// key = 68773560320 0.5 0 0
// key = 0 10 0 0
// }
//}

// End
}

Looks like he could just take this part out

//	powerCurve
// {
// key = 206000000000 0 0 0
// key = 13599840256 1 0 0
// key = 68773560320 0.5 0 0
// key = 0 10 0 0
// }

Because looks like Squad changed to just

	MODULE
{
name = ModuleDeployableSolarPanel
raycastTransformName = suncatcher
resourceName = ElectricCharge
chargeRate = 5
}

It's just missing animationName = *

Edited by Mecripp2
Link to comment
Share on other sites

In case there isn't an easy solution to the solar panels problem, I might have another, actually imho quite elegant solution.

WHILE(!) it would demand a rework of the animation... The solar panels could be a "rigid" part of the envelope, double-functioning as "cover". Instead of the Mk1-part opening up and exposing the envelope, it could just start getting larger and by doing so, push the "cover/solar panels" upwards. They're still part of the envelope, but double as cover when the envelope is deflated.

That way, they could always produce electricity "legitimate", as they would always be: directed into the same direction (up) and exposed to "the outside".

Maybe make them less efficient than similar sized kerbal-panels, because of technobabble to make them more resistant to crashes, reentry effects, etc (as they're always exposed).

Just food for thought :3

Link to comment
Share on other sites

I don't know if you've seen that, but here's teh video regarding airship part.

Ah yes that lovely video. Unfortunately the deployment method used there doesnt lend itself to modular designs very well, so I went a somewhat different route.

Link to comment
Share on other sites

Is it possible to have those 2 winglets on your envelope? Or maybe a vertical one for lateral control? For ideas, maybe look at USI Survivability Pack, the inflating lifeboat has 4 of them. :)

Turboedit: there is no need for control surfaces, just for stability purposes.

Link to comment
Share on other sites

Is it possible to have those 2 winglets on your envelope? Or maybe a vertical one for lateral control? For ideas, maybe look at USI Survivability Pack, the inflating lifeboat has 4 of them. :)

Turboedit: there is no need for control surfaces, just for stability purposes.

If it were a rigid envelope, it might be possible. But because this is animated it makes things a bit more complicated. In the long run I may be able to figure something out for this, but not right now.

Link to comment
Share on other sites

So the wings TECHNICALLY work now. I had to break them into 3 parts, but 3 parts for a pair of folding wings is better than 10-15 parts.

The only problems lie with the animation bugging out a bit with the ailerons, and figuring out the best lift stats for this thing.

Link to comment
Share on other sites

If it were a rigid envelope, it might be possible. But because this is animated it makes things a bit more complicated. In the long run I may be able to figure something out for this, but not right now.

Thank you for considering it. :)

So the wings TECHNICALLY work now. I had to break them into 3 parts, but 3 parts for a pair of folding wings is better than 10-15 parts.

The only problems lie with the animation bugging out a bit with the ailerons, and figuring out the best lift stats for this thing.

What are dimensions of the wings compared to stock straight wings? A little bit less of that should be balanced enough me thinks. :D

Do you plan on making straight wings only or is it possible to have arrow like wings too?

Link to comment
Share on other sites

Thank you for considering it. :)

What are dimensions of the wings compared to stock straight wings? A little bit less of that should be balanced enough me thinks. :D

Do you plan on making straight wings only or is it possible to have arrow like wings too?

It would be possible to have narrow wings also.

Though another issue I've come up to is that the wings wont change their center of lift, or any of the lift stats in general when stowed in stock KSP, FAR will detect the change though. Another issue with adding animations to parts that dont usually use animations. A plugin that allows me to change the drag and lift of the part according to its place in the animation would work, same as the solar panels, but its getting that plugin (or learning to make it myself, it seems several parts will be needing this, but I really suck at programming so if someone could help out I'd be eternally grateful).

Link to comment
Share on other sites

It would be possible to have narrow wings also.

Though another issue I've come up to is that the wings wont change their center of lift, or any of the lift stats in general when stowed in stock KSP, FAR will detect the change though. Another issue with adding animations to parts that dont usually use animations. A plugin that allows me to change the drag and lift of the part according to its place in the animation would work, same as the solar panels, but its getting that plugin (or learning to make it myself, it seems several parts will be needing this, but I really suck at programming so if someone could help out I'd be eternally grateful).

Isnt it possible to fix drag/lift values with the 2 absolute statuses (stowed/fully deployed)? But i dont know how KSP handles the time between :D

Link to comment
Share on other sites

Isnt it possible to fix drag/lift values with the 2 absolute statuses (stowed/fully deployed)? But i dont know how KSP handles the time between :D

I'm experimenting with IR at the moment. It seems to shift the parts and COL properly, I just need to see how it handles multiple moving parts in one object.

Edit: IR really doesnt like multiple moving parts in one object.

Edited by electronicfox
Link to comment
Share on other sites

I'm slowly figuring things out, and started on a very basic plugin. It still doesnt do anything, and I'm not sure why. But it exists, so thats something.

If anyone can point out why this wouldnt work, that'd be great :D I believe I'm calling the animation in the wrong way, but I cant be sure.

using UnityEngine;

namespace Animate2Variable

{

public class AnimatedWing : PartModule

{

[KSPField(guiActive = true, guiActiveEditor = false,

guiName = "deflectionLiftCoeff", isPersistant = false)]

public float deflectionLiftCoeff;

public void FixedUpdate()

{

if (part.Modules.Contains("ModuleControlSurface"))

{

deflectionLiftCoeff = part.animation["Deploy"].time ;

((ModuleLiftingSurface)part.Modules["ModuleControlSurface"]).deflectionLiftCoeff = deflectionLiftCoeff;

}

}

}

}

Edited by electronicfox
Link to comment
Share on other sites

Now then, I feel like this SHOULD work, I get the error that my anim(Anim).normalizedTime but is a 'field' but is used like a 'method'

I have no idea what that means.

namespace Animate2Variable

{

public class AnimatedWing : PartModule

{

public Animation anim;

[KSPField(isPersistant = false)]

public string Anim = "";

[KSPField(isPersistant = false)]

public float LiftMultiply = 0;

[KSPField(guiActive = true, guiActiveEditor = false,

guiName = "deflectionLiftCoeff", isPersistant = false)]

public float deflectionLiftCoeff;

public void FixedUpdate()

{

anim = part.FindModelAnimators(Anim)[0];

if (part.Modules.Contains("ModuleControlSurface"))

{

deflectionLiftCoeff = anim(Anim).normalizedTime;

((ModuleControlSurface)part.Modules["ModuleControlSurface"]).deflectionLiftCoeff = deflectionLiftCoeff;

}

}

}

}

Edited by electronicfox
Link to comment
Share on other sites

Now then, I feel like this SHOULD work, I get the error that my anim(Anim).normalizedTime but is a 'field' but is used like a 'method'

I have no idea what that means.

The syntax for a method call usually is <methodname><openBracket><0-to-n-parameters><closeBracket>.

And that's exactly what you wrote there:

deflectionLiftCoeff = anim(Anim).normalizedTime;

You want to call a method named anim with the parameter Anim. Then you want the normalizedTime attribute or property of the object the method anim returns and put it into deflectionLiftCoeff.

I think you wanted to code this:

deflectionLiftCoeff = anim.normalizedTime;

Link to comment
Share on other sites

EUREKA! It works! I have now officially popped my plugin cherry.

I can also apply similar code to other folding parts, including the troublesome solar panels on the blimp, I just need to swap some parts around but the base code works!

For those interested, I replaced "anim(Anim)" with "anim[Anim]" (Credit to Sarbian for helping me with that)...that was the only thing wrong. The code works nicely now :D And I've included a lift multiplier variable in the CFG so the final lift value can be edited without more plugin messing.

Thanks for the help guys :D

Now a gif.

eureka.gif

Link to comment
Share on other sites

So many outstanding mods popping out of nowhere, and i want to get my hands on all of em :D

Is it possible to have a prerelease? :D

- - - Updated - - -

We can play around with it and you can work without too many nuisances on your popcorn engine part :D

- - - Updated - - -

Oh and it doesnt seem to be wobbly, i am pretty impressed.

Link to comment
Share on other sites

So many outstanding mods popping out of nowhere, and i want to get my hands on all of em :D

Is it possible to have a prerelease? :D

As I said before, when the 3 prototype parts are finished and fairly balanced, I'll do a prerelease. So now I just need to texture the wings (and fix the buggy aileron animation), and make the engine.

Link to comment
Share on other sites

Cool. May I propose that the models differ from each other? The electricity version looks pretty good in your OP, but the fueled version could/should have some sort of nacelles(turboprop?) imho. Maybe i am just over my head because i dont know how much work there is to it...

Sorry for sounding pushy or somewhat, english is not my mother language.^^

Link to comment
Share on other sites

Cool. May I propose that the models differ from each other? The electricity version looks pretty good in your OP, but the fueled version could/should have some sort of nacelles(turboprop?) imho. Maybe i am just over my head because i dont know how much work there is to it...

Sorry for sounding pushy or somewhat, english is not my mother language.^^

Thats no problem. So long as people dont start demanding release dates :P Some guys might recall what I did with the tracks mod when that got out of hand.

Turboprops are a good idea, but different from regular fuel-driven props, and the deployment will need some thought due to their larger size.

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