Jump to content

[1.8+] Procedural Parts


NathanKell

Recommended Posts

So in order to accommodate myself I added my own patch that adds both "hollow cylinder" or "hollow cone" to procedural decoupler and have been playing with it since my previous post with no problems, which makes me think even more that it was an oversight and proc. decouplers should have that option and that release should have updated them also.

Link to comment
Share on other sites

Do the proc parts have actual aerodynamics, or are they treated as just a big rectangle?

A spaceplane project I've been working on has a large nose made out of a proc liquid tank configured to a cone shape. The spaceplane has terrible aerodynamics, and I've been gradually working through all possible causes of it. Does KSP's aerodynamics actually treat the liquid tank as a cone shape, or is it treated as a large block?

Link to comment
Share on other sites

Spoiler

KSP cares about the following things for aerodynamics (possibly more):

  • The aerodynamics of each and every singular part. In stock aerodynamics everything has drag cubes. How much a part produces drag is based on how much surface area from each of 6 sides is exposed to airflow. Drag can be reduced in a given direction (per the 6 sides) if a node exists and is pointed in that direction and a pointy thing is attached. Surface attached things do not reduce drag.
  • (This point may be the main reason why your plane has terrible aero.) Everything that doesn't have the lift surface module produces lift (body lift) in any direction, which is completely useless (and can be quite opposed to) controlled flight. If your plane is made largely out of only cylinders, or anything at all that isn't made to be a blended wing body, it will be quite easy to yaw out of control and will require lots of vertical stabilizer to subdue it.
  • If a part has the lift surface module it will only produce lift in one axis which is essential to controlled flight.
  • If you rotate a part after attaching it (such as to make a a long tapered cone like a Soyuz booster, or using many parts to make a makeshift bowl or giant "flying wing"), you skew the lift vector and so it will create a lot of angled aero force when the vessel flies straight.
  • Aerodynamic occlusion:
    • The forward part will only protect the parts behind it from shock heating.

KSP does not care about the following things for aerodynamics (possibly more). These are among the reasons why FAR exists:

  • The aerodynamics of the shape of the vessel as a whole and single object. See next point:
  • Aerodynamic occlusion:
    • Fuselage stacks that are touching on one axis should reduce each other's ability to produce sideways lift in that axis. Unfortunately, they will always produce this lift to full effect.
    • Angled aero force due to a rotated part should be scaled with how much the angled part is clipping into another part.
    • Extra aero force (in general) from a wing that is partically clipped or is stacked/layered should not be produced. That clipped or layered wing will always produce lift to its full effect.
    • The forward part (depending on the angle of attack) should prevent the parts behind it from producing lift and drag. If this existed in stock, there would be no need for a specific module for shielding radius for things inside a cargo bay or a hollow structural part and wheels attached to a cargo bay wouldn't randomly fail to operate.

 

TL;DR @AmateurAstronaut1969 your plane's problem is likely that it has a lot of fuselage that isn't lift surface so it will produce a lot of sideways lift and will yaw out of control. You can try to subduw it by building a lot of vertical wing area for yaw control.

In case you aren't using it already, involve Proc Wings in your plane design and build wings as long, wide and thick as you need.

 

Edited by JadeOfMaar
Link to comment
Share on other sites

  • 2 months later...

v2.5.0
The Smooth Cone now has the ability to have an offset!

Other Changes:
Fixed a bug where setting the truss shape to length 0 would mess up the node positions if going back to a non-zero length.
Added the default metallic and black TU colors to the color picker presets when using TexturesUnlimited.

Link to comment
Share on other sites

  • 3 months later...
On 3/21/2023 at 7:55 PM, Chris Bolland said:

Question! Why does recovering the procedural parts yield negative funds? I wanted to make an reusable SSTO out of the procedural fuel tanks, but you can't recover them for positive funds.

Picture here:

https://imgur.com/gallery/2aT0YeC

This is a common bug even affecting vanilla with parts that can change their cost based on how you assemble them.

This mod fixes this bug and several others:

 

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to make a Procedural Parts Life Support patch for Kerbalism Simplex and I've got it mostly running but I'm having some annoying issues. It works out of the box but whenever I duplicate a procedural life support tank any duplicated part loses it's resource value. For example: I place one tank on a vessel, I alt+drag the part to duplicate it and the duplicate has no resource value, I can still switch between the tank's resources but the bar listing the amount is gone and the game registers it as 0 for that resource.

Here's the cfg if anyone can spot where I'm going wrong:

PARTUPGRADE:NEEDS[Kerbalism]
{
	name = ProceduralPartsKerbalismLSTank
	partIcon = proceduralTankKerbalism
	techRequired = heavyRocketry
	title = Procedural Life Support Tank (Expanded)
	description = Procedural Life Support Tank dimensions are increased
}

+PART[proceduralTankLiquid]:FIRST:NEEDS[Kerbalism]
{
	@name = proceduralTankKerbalism
	@author = AncientGammoner, NathanKell, Swamp Ig, OtherBarry, RoverDude, Rafael acevedo

	@TechRequired = survivability
	@category = Utility
	@title = Procedural Life Support Tank

	!MODULE[ProceduralPart] {}
	MODULE
	{
		name = ProceduralPart
		textureSet = Mu
		costPerkL=980
		diameterMin = 0.1
		diameterMax = 1.5
		lengthMin = 0.1
		lengthMax = 0.5
		volumeMin = 0.1
		volumeMax = 1.0

		!UPGRADES {}
		UPGRADES
		{
			UPGRADE
			{
				name__ = ProceduralPartsKerbalismLSTank
				diameterMax = 3.0
				volumeMax = 3.0
				lengthMax = 1.0
			}
			UPGRADE
			{
				name__ = ProceduralPartsTankUnlimited
				diameterMin = 0.01
				diameterMax = Infinity
				lengthMin = 0.01
				lengthMax = Infinity
				volumeMin = 0
				volumeMax = Infinity
			}
		}
	}

	@MODULE[TankContentSwitcher]
	{
		!TANK_TYPE_OPTION,* {}
		%TANK_TYPE_OPTION[Consumables]
		{
			dryDensity = 0.32
			%RESOURCE[Consumables] 
			{ 
				unitsPerKL = 33712 
			}
		}
		
		%TANK_TYPE_OPTION[OrganicSlurry]
		{
			dryDensity = 0.32
			%RESOURCE[OrganicSlurry]
			{
				unitsPerKL = 4750
				forceEmpty = true
			}
		}

		%TANK_TYPE_OPTION[Air]
		{
			dryDensity = 0.32
			%RESOURCE[Air] { unitsPerKL = 43602 }
		}

		%TANK_TYPE_OPTION[BadAir]
		{
			dryDensity = 0.32
			%RESOURCE[BadAir]
			{
				unitsPerKL = 46077
				forceEmpty = true
			}
		}
	}
}
Link to comment
Share on other sites

  • 3 months later...
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...