Kerbal Space Program
1.12.4
|
Classes | |
class | CometTailColor |
Public Member Functions | |
float | GetSpawnChance () |
void | LoadManagerDefinitions () |
Load the comet manager defs from cfgs More... | |
void | SpawnCometFragments (CometVessel cometVessel) |
Tries to instance between minFragments and maxFragments comet fragments as possible, depending on comet class exploded and More... | |
Static Public Member Functions | |
static CometDefinition | GenerateDefinition (CometOrbitType cometType, UntrackedObjectClass objClass, int seed) |
Build a comet definition from a comet orbit type and the range of values that set the size params to be used in data passing More... | |
static double | GenerateHomeSpawnDistance () |
Generate a discovery distance based on the homebody and min/max spawndistance values More... | |
static double | GenerateSentinelSpawnDistance (double distance) |
Generate a discovery distance based on the sentinels current distance from the Sun More... | |
static CometOrbitType | GenerateWeightedCometType () |
Use the weightings of each type to select a comet type More... | |
static Color | GenerateWeightedDustTailColor (CometVessel comet) |
Geneartes a color for a dust tail from the weighted list More... | |
static Color | GenerateWeightedIonTailColor (CometVessel comet) |
Geneartes a color for an ion tail from the weighted list More... | |
static CometOrbitType | GetCometOrbitType (string name) |
Finds the comet definition by name More... | |
static bool | ShouldSpawnComet () |
Public Attributes | |
FloatCurve | atmospherePressureFadeDistributionForVFXFade = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for controlling the fade of the VFX because of atmospheric pressure. More... | |
float | atmospherePressureForVFXFade = 0.05f |
Atmospheric pressure at which the VFX will have completely faded out. Number is in kiloPascal, so 0.05 is 50 Pascal. The formula for fading the VFX based on atmospheric pressure is 1 - (atmospheric pressure / atmospherePressureForVFXFade) More... | |
Transform | comaNearEffect |
The prefab for the near coma effect More... | |
FloatCurve | comaSizeRatioDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the coma size ratio More... | |
List< CometOrbitType > | cometDefinitions |
List< CometTailColor > | dustTailColors |
A list of colors with weightings that will be used to pick an dust tail tint color. Higher the weight the more chance it is chosen. More... | |
Transform | dustTailParticleFarEffect |
The prefab for the long-distance particles dust tail effect More... | |
float | explosionScaleMultiplier = 0.20f |
Base multiplier for the debris explosion comets get when max pressure reached. More... | |
float | fragmentAngleVariation = 22.5f |
Initial Angle variation in which the smaller comets spawned when a comet explodes. A random method is run between -value and value. More... | |
float | fragmentdynamicPressurekPa = 10 |
Maximum dynamic pressure kPa that the comet can be subjected to before it breaks up in an atmosphere. More... | |
int | fragmentIgnoreCollisions = 20 |
Number of frames that a recently spawned comet treated as fragment will ignore. More... | |
float | fragmentInstanceOffset = 2f |
This number will divide the original comet radius in order to get some variation when the fragments are instanced. More... | |
float | fragmentMaxPressureModifier = 1.0f |
Min modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up. More... | |
float | fragmentMaxSafeTime = 20.0f |
Max modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up. More... | |
float | fragmentMinPressureModifier = 6.0f |
Max modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up. More... | |
float | fragmentMinSafeTime = 3.0f |
Min modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up. More... | |
GameObject | geyserEmitter |
Prefab of the geyser emitter More... | |
float | geyserSizeRadiusMultiplier = 0.05f |
Maximum geyser size should be the comet radius multiplied by geyserRadiusMultiplier More... | |
FloatCurve | geysersRatioDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the number of geysers to be generated More... | |
FloatCurve | geyserVFXSizeFromDistance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 1f), new Keyframe(1f, 0f) }) |
Curve describing how the size of geyser VFX changes from Max length to Min length time value 0 is evaluated as the comet having a Pe of 0 time value 1 is evaluated per the comets vfxStartDistance More... | |
float | geyserVisibleDistance = 500 |
Distance from the comet centre that geysers become visible More... | |
float | gravityAdditionForVFXFadeStart = 300f |
Add this value on to the VFX fade out value to get the VFX start value. VFX strength due to gravity is calculated with this formula: ((comet surface speed - gravityFadeEnd) / (gravityFadeStart - gravityFadeEnd) gravityFadeEnd = (abs(gravity) * gravityMultiplierForVFXFadeEnd) - gravitySubtractionForVFXFadeEnd; gravityFadeStart = gravityFadeEnd + gravityAdditionForVFXFadeStart More... | |
float | gravityMultiplierForVFXFadeEnd = 100f |
Multiplier of the gravitic acceleration value that will cause the VFX to end their fade out. VFX strength due to gravity is calculated with this formula: ((comet surface speed - gravityFadeEnd) / (gravityFadeStart - gravityFadeEnd) gravityFadeEnd = (abs(gravity) * gravityMultiplierForVFXFadeEnd) - gravitySubtractionForVFXFadeEnd; gravityFadeStart = gravityFadeEnd + gravityAdditionForVFXFadeStart More... | |
float | gravitySubtractionForVFXFadeEnd = 20f |
Subtract this value from the multiplied gravitic acceleration value to get the final value when the VFX will fade out. VFX strength due to gravity is calculated with this formula: ((comet surface speed - gravityFadeEnd) / (gravityFadeStart - gravityFadeEnd) gravityFadeEnd = (abs(gravity) * gravityMultiplierForVFXFadeEnd) - gravitySubtractionForVFXFadeEnd; gravityFadeStart = gravityFadeEnd + gravityAdditionForVFXFadeStart More... | |
List< CometTailColor > | ionTailColors |
A list of colors with weightings that will be used to pick an ion tail tint color. Higher the weight the more chance it is chosen. More... | |
Transform | ionTailParticleFarEffect |
The prefab for the long-distance particles ion tail effect More... | |
double | maxComaSizeRatio = 1000000 |
Max value for ratio of coma radius from nucleus radius - used in generation and will drive the diameter at Pe as the coma size is determined by the nucleus radius times this ratio More... | |
FloatCurve | maxCometsPerUntrackedObjects = new FloatCurve(new Keyframe[] { new Keyframe(10f, 1f), new Keyframe(250f, 5f) }) |
Curve used for defining how many comets can be in the universe depending on the max untracked space objects count More... | |
int | maxFragmentClassStep = 3 |
Maximum number of comet classes the new spawned comet fragments should step down to. More... | |
int | maxFragments = 5 |
Maximum amount of comet fragments this comet will spawn on break up. More... | |
double | maxGeyserRadiusRatio = 0.04 |
Maximum ratio of geysers to be generated per meter of nucluus radius More... | |
double | maxIonTailWidthRatio = 0.3 |
ratio of the tail width at the head, comparative to the coma width More... | |
double | maxNearDustEmitterRadiusRatio = 0.1 |
Maximum ratio of near dust emitters to be generated per meter of nucluus radius More... | |
float | maxSentinelSpawnDistance = 2f |
Max distance from the Sun (as a ratio of the sentinel SMA) that the comet will first appear as untracked More... | |
float | maxSpawnDistance = 2f |
Max distance from the Sun (as a ratio of the homebody SMA) that the comet will first appear as untracked More... | |
double | maxTailLengthRatio = 100000 |
Max value for ratio of tail length from coma radius - used in generation and will be how long it is at Pe as the tail length is a ratio of the coma size More... | |
double | maxTailWidthRatio = 1 |
ratio of the tail width at the head, comparative to the coma width More... | |
double | maxVFXStartDistance = 2 |
Max radial distance from the Sun (as a ratio of the homebody SMA) that the vfx will start to show More... | |
double | minComaSizeRatio = 10000 |
Min value for ratio of coma radius from nucleus radius - used in generation and will drive the diameter at Pe as the coma size is determined by the nucleus radius times this ratio More... | |
int | minFragmentClassStep = 1 |
Minimum number of comet classes the new spawned comet fragments should step down to. More... | |
int | minFragments = 3 |
Minimum amount of comet fragments this comet will spawn on break up. More... | |
double | minGeyserRadiusRatio = 0.04 |
Minimum ratio of geysers to be generated per meter of nucluus radius More... | |
double | minNearDustEmitterRadiusRatio = 0.1 |
Minimum ratio of near dust emitters to be generated per meter of nucluus radius More... | |
float | minSentinelSpawnDistance = 1.1f |
Min distance from the Sun (as a ratio of the sentinel SMA) that the comet will first appear as untracked More... | |
float | minSpawnDistance = 1.5f |
Min distance from the Sun (as a ratio of the homebody SMA) that the comet will first appear as untracked More... | |
double | minTailLengthRatio = 1000 |
Min value for ratio of tail length from coma radius - used in generation and will be how long it is at Pe as the tail length is a ratio of the coma size More... | |
double | minVFXStartDistance = 0.8 |
Min radial distance from the Sun (as a ratio of the homebody SMA) that the vfx will start to show More... | |
GameObject | nearDustEmitter |
Prefab of the near dust emitter More... | |
FloatCurve | nearDustVFXSizeFromDistance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 1f), new Keyframe(1f, 0f) }) |
Curve describing how the size of near dust VFX changes from Max length to Min length time value 0 is evaluated as the comet having a Pe of 0 time value 1 is evaluated per the comets vfxStartDistance More... | |
float | nearDustVisibleRadiusMultiplier = 2 |
Distance from the comet centre that near dust becomes visible, expressed as a multiplier of the comet radius More... | |
FloatCurve | spawnChance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0.1f), new Keyframe(1f, 0f) }) |
Curve used for determining chance of comet being spawned with respect to the ratio of current comets to max comets More... | |
FloatCurve | tailLengthRatioDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the tail max length More... | |
FloatCurve | tailWidthDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the tail width More... | |
float | vesselRangeOrbitLoadOverride = 150000 |
Override for vessel range orbit load distance More... | |
float | vesselRangeOrbitPackOverride = 1100 |
Override for vessel range orbit pack distance More... | |
float | vesselRangeOrbitUnloadOverride = 151000 |
Override for vessel range orbit unload distance More... | |
float | vesselRangeOrbitUnpackOverride = 1000 |
Override for vessel range orbit unpack distance More... | |
FloatCurve | vfxSizeFromDistance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 1f), new Keyframe(1f, 0f) }) |
Curve describing how the size of VFX changes from Max length to Min length time value 0 is evaluated as the comet having a Pe of 0 time value 1 is evaluated per the comets vfxStartDistance More... | |
FloatCurve | vfxStartDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f)}) |
distribution curve used for weighting the randomization of the vfx start distance More... | |
Properties | |
List< Vessel > | Comets [get] |
List< Vessel > | DiscoveredComets [get] |
A List of Already Discovered Comets More... | |
static CometManager | Instance [get, set] |
Static singleton reference More... | |
static double | VFXUpdateFrequency [get] |
How often in game seconds to update the tail values More... | |
static double | VFXUpdateFrequencyInAtmosphere [get] |
How often in game seconds to update the tail values More... | |
|
inlinestatic |
Build a comet definition from a comet orbit type and the range of values that set the size params to be used in data passing
cometType | Type of Comet orbit |
|
inlinestatic |
Generate a discovery distance based on the homebody and min/max spawndistance values
|
inlinestatic |
Generate a discovery distance based on the sentinels current distance from the Sun
|
inlinestatic |
Use the weightings of each type to select a comet type
|
inlinestatic |
Geneartes a color for a dust tail from the weighted list
comet | CometVessel that we are generating it for |
|
inlinestatic |
Geneartes a color for an ion tail from the weighted list
comet | CometVessel that we are generating it for |
|
inlinestatic |
Finds the comet definition by name
name | name of the definition |
|
inline |
|
inline |
Load the comet manager defs from cfgs
|
inlinestatic |
|
inline |
Tries to instance between minFragments and maxFragments comet fragments as possible, depending on comet class exploded and
FloatCurve CometManager.atmospherePressureFadeDistributionForVFXFade = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for controlling the fade of the VFX because of atmospheric pressure.
Weighting Curve as described in https://docs.unity3d.com/Manual/RandomNumbers.html
float CometManager.atmospherePressureForVFXFade = 0.05f |
Atmospheric pressure at which the VFX will have completely faded out. Number is in kiloPascal, so 0.05 is 50 Pascal. The formula for fading the VFX based on atmospheric pressure is 1 - (atmospheric pressure / atmospherePressureForVFXFade)
Transform CometManager.comaNearEffect |
The prefab for the near coma effect
FloatCurve CometManager.comaSizeRatioDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the coma size ratio
Weighting Curve as described in https://docs.unity3d.com/Manual/RandomNumbers.html
List<CometOrbitType> CometManager.cometDefinitions |
List<CometTailColor> CometManager.dustTailColors |
A list of colors with weightings that will be used to pick an dust tail tint color. Higher the weight the more chance it is chosen.
Transform CometManager.dustTailParticleFarEffect |
The prefab for the long-distance particles dust tail effect
float CometManager.explosionScaleMultiplier = 0.20f |
Base multiplier for the debris explosion comets get when max pressure reached.
float CometManager.fragmentAngleVariation = 22.5f |
Initial Angle variation in which the smaller comets spawned when a comet explodes. A random method is run between -value and value.
float CometManager.fragmentdynamicPressurekPa = 10 |
Maximum dynamic pressure kPa that the comet can be subjected to before it breaks up in an atmosphere.
int CometManager.fragmentIgnoreCollisions = 20 |
Number of frames that a recently spawned comet treated as fragment will ignore.
float CometManager.fragmentInstanceOffset = 2f |
This number will divide the original comet radius in order to get some variation when the fragments are instanced.
float CometManager.fragmentMaxPressureModifier = 1.0f |
Min modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up.
float CometManager.fragmentMaxSafeTime = 20.0f |
Max modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up.
float CometManager.fragmentMinPressureModifier = 6.0f |
Max modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up.
float CometManager.fragmentMinSafeTime = 3.0f |
Min modifier value that will be added to the nextComet fragments dynamic perssure resistance to break up.
GameObject CometManager.geyserEmitter |
Prefab of the geyser emitter
float CometManager.geyserSizeRadiusMultiplier = 0.05f |
Maximum geyser size should be the comet radius multiplied by geyserRadiusMultiplier
FloatCurve CometManager.geysersRatioDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the number of geysers to be generated
Weighting Curve as described in https://docs.unity3d.com/Manual/RandomNumbers.html
FloatCurve CometManager.geyserVFXSizeFromDistance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 1f), new Keyframe(1f, 0f) }) |
Curve describing how the size of geyser VFX changes from Max length to Min length time value 0 is evaluated as the comet having a Pe of 0 time value 1 is evaluated per the comets vfxStartDistance
float CometManager.geyserVisibleDistance = 500 |
Distance from the comet centre that geysers become visible
float CometManager.gravityAdditionForVFXFadeStart = 300f |
Add this value on to the VFX fade out value to get the VFX start value. VFX strength due to gravity is calculated with this formula: ((comet surface speed - gravityFadeEnd) / (gravityFadeStart - gravityFadeEnd) gravityFadeEnd = (abs(gravity) * gravityMultiplierForVFXFadeEnd) - gravitySubtractionForVFXFadeEnd; gravityFadeStart = gravityFadeEnd + gravityAdditionForVFXFadeStart
float CometManager.gravityMultiplierForVFXFadeEnd = 100f |
Multiplier of the gravitic acceleration value that will cause the VFX to end their fade out. VFX strength due to gravity is calculated with this formula: ((comet surface speed - gravityFadeEnd) / (gravityFadeStart - gravityFadeEnd) gravityFadeEnd = (abs(gravity) * gravityMultiplierForVFXFadeEnd) - gravitySubtractionForVFXFadeEnd; gravityFadeStart = gravityFadeEnd + gravityAdditionForVFXFadeStart
float CometManager.gravitySubtractionForVFXFadeEnd = 20f |
Subtract this value from the multiplied gravitic acceleration value to get the final value when the VFX will fade out. VFX strength due to gravity is calculated with this formula: ((comet surface speed - gravityFadeEnd) / (gravityFadeStart - gravityFadeEnd) gravityFadeEnd = (abs(gravity) * gravityMultiplierForVFXFadeEnd) - gravitySubtractionForVFXFadeEnd; gravityFadeStart = gravityFadeEnd + gravityAdditionForVFXFadeStart
List<CometTailColor> CometManager.ionTailColors |
A list of colors with weightings that will be used to pick an ion tail tint color. Higher the weight the more chance it is chosen.
Transform CometManager.ionTailParticleFarEffect |
The prefab for the long-distance particles ion tail effect
double CometManager.maxComaSizeRatio = 1000000 |
Max value for ratio of coma radius from nucleus radius - used in generation and will drive the diameter at Pe as the coma size is determined by the nucleus radius times this ratio
FloatCurve CometManager.maxCometsPerUntrackedObjects = new FloatCurve(new Keyframe[] { new Keyframe(10f, 1f), new Keyframe(250f, 5f) }) |
Curve used for defining how many comets can be in the universe depending on the max untracked space objects count
int CometManager.maxFragmentClassStep = 3 |
Maximum number of comet classes the new spawned comet fragments should step down to.
int CometManager.maxFragments = 5 |
Maximum amount of comet fragments this comet will spawn on break up.
double CometManager.maxGeyserRadiusRatio = 0.04 |
Maximum ratio of geysers to be generated per meter of nucluus radius
double CometManager.maxIonTailWidthRatio = 0.3 |
ratio of the tail width at the head, comparative to the coma width
double CometManager.maxNearDustEmitterRadiusRatio = 0.1 |
Maximum ratio of near dust emitters to be generated per meter of nucluus radius
float CometManager.maxSentinelSpawnDistance = 2f |
Max distance from the Sun (as a ratio of the sentinel SMA) that the comet will first appear as untracked
float CometManager.maxSpawnDistance = 2f |
Max distance from the Sun (as a ratio of the homebody SMA) that the comet will first appear as untracked
double CometManager.maxTailLengthRatio = 100000 |
Max value for ratio of tail length from coma radius - used in generation and will be how long it is at Pe as the tail length is a ratio of the coma size
double CometManager.maxTailWidthRatio = 1 |
ratio of the tail width at the head, comparative to the coma width
double CometManager.maxVFXStartDistance = 2 |
Max radial distance from the Sun (as a ratio of the homebody SMA) that the vfx will start to show
double CometManager.minComaSizeRatio = 10000 |
Min value for ratio of coma radius from nucleus radius - used in generation and will drive the diameter at Pe as the coma size is determined by the nucleus radius times this ratio
int CometManager.minFragmentClassStep = 1 |
Minimum number of comet classes the new spawned comet fragments should step down to.
int CometManager.minFragments = 3 |
Minimum amount of comet fragments this comet will spawn on break up.
double CometManager.minGeyserRadiusRatio = 0.04 |
Minimum ratio of geysers to be generated per meter of nucluus radius
double CometManager.minNearDustEmitterRadiusRatio = 0.1 |
Minimum ratio of near dust emitters to be generated per meter of nucluus radius
float CometManager.minSentinelSpawnDistance = 1.1f |
Min distance from the Sun (as a ratio of the sentinel SMA) that the comet will first appear as untracked
float CometManager.minSpawnDistance = 1.5f |
Min distance from the Sun (as a ratio of the homebody SMA) that the comet will first appear as untracked
double CometManager.minTailLengthRatio = 1000 |
Min value for ratio of tail length from coma radius - used in generation and will be how long it is at Pe as the tail length is a ratio of the coma size
double CometManager.minVFXStartDistance = 0.8 |
Min radial distance from the Sun (as a ratio of the homebody SMA) that the vfx will start to show
GameObject CometManager.nearDustEmitter |
Prefab of the near dust emitter
FloatCurve CometManager.nearDustVFXSizeFromDistance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 1f), new Keyframe(1f, 0f) }) |
Curve describing how the size of near dust VFX changes from Max length to Min length time value 0 is evaluated as the comet having a Pe of 0 time value 1 is evaluated per the comets vfxStartDistance
float CometManager.nearDustVisibleRadiusMultiplier = 2 |
Distance from the comet centre that near dust becomes visible, expressed as a multiplier of the comet radius
FloatCurve CometManager.spawnChance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0.1f), new Keyframe(1f, 0f) }) |
Curve used for determining chance of comet being spawned with respect to the ratio of current comets to max comets
FloatCurve CometManager.tailLengthRatioDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the tail max length
Weighting Curve as described in https://docs.unity3d.com/Manual/RandomNumbers.html
FloatCurve CometManager.tailWidthDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f) }) |
distribution curve used for weighting the randomization of the tail width
Weighting Curve as described in https://docs.unity3d.com/Manual/RandomNumbers.html
float CometManager.vesselRangeOrbitLoadOverride = 150000 |
Override for vessel range orbit load distance
float CometManager.vesselRangeOrbitPackOverride = 1100 |
Override for vessel range orbit pack distance
float CometManager.vesselRangeOrbitUnloadOverride = 151000 |
Override for vessel range orbit unload distance
float CometManager.vesselRangeOrbitUnpackOverride = 1000 |
Override for vessel range orbit unpack distance
FloatCurve CometManager.vfxSizeFromDistance = new FloatCurve(new Keyframe[] { new Keyframe(0f, 1f), new Keyframe(1f, 0f) }) |
Curve describing how the size of VFX changes from Max length to Min length time value 0 is evaluated as the comet having a Pe of 0 time value 1 is evaluated per the comets vfxStartDistance
FloatCurve CometManager.vfxStartDistribution = new FloatCurve(new Keyframe[] { new Keyframe(0f, 0f), new Keyframe(1f, 1f)}) |
distribution curve used for weighting the randomization of the vfx start distance
Weighting Curve as described in https://docs.unity3d.com/Manual/RandomNumbers.html
|
get |
|
get |
A List of Already Discovered Comets
|
staticgetset |
Static singleton reference
|
staticget |
How often in game seconds to update the tail values
|
staticget |
How often in game seconds to update the tail values