2026-08-10 14:57:50 +01:00
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2020-12-22 03:13:43 +00:00
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
using MessagePack;
|
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using Unity.Mathematics;
|
|
|
|
|
|
using static Unity.Mathematics.math;
|
|
|
|
|
|
using static Unity.Mathematics.noise;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public class PlanetSettings
|
|
|
|
|
|
{
|
2020-12-01 20:38:28 +00:00
|
|
|
|
public float ZoneDepthExponent;
|
|
|
|
|
|
public float ZoneDepth;
|
|
|
|
|
|
public float ZoneBoundaryFog;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public ExponentialCurve GravityDepth;
|
|
|
|
|
|
public ExponentialCurve GravityRadius;
|
|
|
|
|
|
public ExponentialCurve WaveDepth;
|
|
|
|
|
|
public ExponentialCurve WaveRadius;
|
|
|
|
|
|
public ExponentialCurve WaveFrequency;
|
|
|
|
|
|
public ExponentialCurve WaveSpeed;
|
|
|
|
|
|
public ExponentialCurve LightRadius;
|
|
|
|
|
|
public ExponentialCurve BodyRadius;
|
2021-04-09 14:01:34 +01:00
|
|
|
|
public float AsteroidVerticalOffset = -5f;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public ExponentialLerp AsteroidSize;
|
|
|
|
|
|
public ExponentialLerp AsteroidHitpoints;
|
|
|
|
|
|
public ExponentialLerp AsteroidRespawnTime;
|
|
|
|
|
|
public float GravityStrength;
|
|
|
|
|
|
public float MiningDifficulty = 500f;
|
2021-05-11 04:45:42 +01:00
|
|
|
|
public float SecureAreaRadiusMultiplier = .45f;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
|
|
|
|
|
|
public ExponentialCurve OrbitPeriod;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public class GalaxyShapeSettings
|
|
|
|
|
|
{
|
|
|
|
|
|
public int Arms = 4;
|
|
|
|
|
|
public float Twist = 10;
|
|
|
|
|
|
public float TwistExponent = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
2021-04-22 02:53:06 +01:00
|
|
|
|
public class NameGeneratorSettings
|
2021-03-10 09:18:07 +00:00
|
|
|
|
{
|
2021-03-12 05:12:01 +00:00
|
|
|
|
public int NameGeneratorMinLength = 5;
|
|
|
|
|
|
public int NameGeneratorMaxLength = 10;
|
|
|
|
|
|
public int NameGeneratorOrder = 4;
|
2021-04-22 02:53:06 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
2021-04-22 02:53:06 +01:00
|
|
|
|
public class SectorBackgroundSettings
|
|
|
|
|
|
{
|
2021-03-10 09:18:07 +00:00
|
|
|
|
public float NoiseAmplitude;
|
|
|
|
|
|
public float NoiseOffset;
|
|
|
|
|
|
public float NoiseGain;
|
|
|
|
|
|
public float NoiseLacunarity;
|
|
|
|
|
|
public float NoiseFrequency;
|
2021-04-22 02:53:06 +01:00
|
|
|
|
public float NoisePosition;
|
|
|
|
|
|
public float CloudExponent;
|
|
|
|
|
|
public float CloudAmplitude;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
|
2021-03-10 09:18:07 +00:00
|
|
|
|
public float fBm(float2 p, int octaves)
|
|
|
|
|
|
{
|
|
|
|
|
|
float freq = NoiseFrequency, amp = .5f;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
float sum = 0;
|
|
|
|
|
|
for(int i = 0; i < octaves; i++)
|
2021-03-10 09:18:07 +00:00
|
|
|
|
{
|
|
|
|
|
|
if(i<4)
|
2026-08-10 14:57:50 +01:00
|
|
|
|
sum += (1-abs(snoise(p * freq))) * amp;
|
|
|
|
|
|
else sum += abs(snoise(p * freq)) * amp;
|
2021-03-10 09:18:07 +00:00
|
|
|
|
freq *= NoiseLacunarity;
|
|
|
|
|
|
amp *= NoiseGain;
|
|
|
|
|
|
}
|
|
|
|
|
|
return (sum + NoiseOffset)*NoiseAmplitude;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public float CloudDensity(float2 uv)
|
|
|
|
|
|
{
|
2021-03-15 11:40:46 +00:00
|
|
|
|
float noise = fBm(uv + NoisePosition, 10);
|
2026-08-10 14:57:50 +01:00
|
|
|
|
return pow(noise, CloudExponent) * CloudAmplitude;
|
2021-03-10 09:18:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
2021-04-22 02:53:06 +01:00
|
|
|
|
public class SectorGenerationSettings
|
|
|
|
|
|
{
|
|
|
|
|
|
public float LinkDensity = .5f;
|
|
|
|
|
|
public int ZoneCount = 128;
|
|
|
|
|
|
public int MegaCount;
|
|
|
|
|
|
public int BossCount;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
2021-04-22 02:53:06 +01:00
|
|
|
|
public class TutorialGenerationSettings
|
|
|
|
|
|
{
|
|
|
|
|
|
public string ProtagonistFaction;
|
|
|
|
|
|
public string AntagonistFaction;
|
|
|
|
|
|
public string BufferFaction;
|
|
|
|
|
|
public string[] NeutralFactions;
|
|
|
|
|
|
public string QuestFaction;
|
|
|
|
|
|
public float LinkDensity = .5f;
|
|
|
|
|
|
public int ZoneCount = 32;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public class ZoneGenerationSettings
|
|
|
|
|
|
{
|
|
|
|
|
|
public ExponentialCurve PlanetSafetyRadius;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public float MassFloor = 1;
|
|
|
|
|
|
public float SunMass = 10000;
|
|
|
|
|
|
public float GasGiantMass = 2000;
|
|
|
|
|
|
public float PlanetMass = 100f;
|
|
|
|
|
|
|
|
|
|
|
|
public int SatellitePasses = 4;
|
|
|
|
|
|
public float SatelliteCreationMassFloor = 100;
|
|
|
|
|
|
public float SatelliteCreationProbability = .25f;
|
|
|
|
|
|
public float BinaryCreationProbability = .25f;
|
|
|
|
|
|
public float RosetteProbability = .25f;
|
|
|
|
|
|
|
|
|
|
|
|
public ExponentialLerp ZoneRadius;
|
|
|
|
|
|
public ExponentialLerp ZoneMass;
|
2021-03-18 00:36:34 +00:00
|
|
|
|
public ExponentialLerp SubZoneCount;
|
|
|
|
|
|
public float ZoneBoundaryRadius;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public float BeltProbability = .05f;
|
|
|
|
|
|
public float BeltMassCeiling = 500f;
|
|
|
|
|
|
|
2020-12-01 20:38:28 +00:00
|
|
|
|
public ExponentialCurve AsteroidBeltWidth;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public ExponentialCurve AsteroidCount;
|
|
|
|
|
|
public ExponentialLerp AsteroidRotationSpeed;
|
|
|
|
|
|
|
|
|
|
|
|
public float ResourceDensityMinimum = .1f;
|
|
|
|
|
|
public float ResourceDensityMaximum = 1.5f;
|
2020-12-01 20:38:28 +00:00
|
|
|
|
|
|
|
|
|
|
public float SunColorSaturation = .75f;
|
|
|
|
|
|
public float SunSecondaryColorDistance = .25f;
|
|
|
|
|
|
public float SunLightSaturation = .5f;
|
|
|
|
|
|
public float SunFogTintSaturation = .5f;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
|
2020-12-01 20:38:28 +00:00
|
|
|
|
public ExponentialLerp GasGiantBandCount;
|
|
|
|
|
|
public float GasGiantBandColorSeparation = .25f;
|
|
|
|
|
|
public float GasGiantBandAltColorChance = .25f;
|
|
|
|
|
|
public ExponentialLerp GasGiantBandSaturation;
|
|
|
|
|
|
public ExponentialLerp GasGiantBandBrightness;
|
2021-03-10 09:18:07 +00:00
|
|
|
|
|
|
|
|
|
|
public string[] NameData;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
}
|
2020-12-10 23:20:38 +00:00
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName: true), JsonObject]
|
2020-12-10 23:20:38 +00:00
|
|
|
|
public class GameplaySettings
|
|
|
|
|
|
{
|
2021-03-15 11:40:46 +00:00
|
|
|
|
public EntitySettings DefaultEntitySettings;
|
2021-03-08 02:57:38 +00:00
|
|
|
|
public RarityTier[] Tiers;
|
2021-03-20 04:20:17 +00:00
|
|
|
|
public ExponentialLerp QualityPriceModifier;
|
2021-03-22 05:22:31 +00:00
|
|
|
|
public float DurabilityQualityExponent = 2;
|
|
|
|
|
|
public float DurabilityQualityMin = 2;
|
|
|
|
|
|
public float DurabilityQualityMax = .25f;
|
|
|
|
|
|
public float ThermalQualityExponent = 2;
|
|
|
|
|
|
public float ThermalQualityMin = 2;
|
|
|
|
|
|
public float ThermalQualityMax = .25f;
|
2021-03-07 01:10:31 +00:00
|
|
|
|
public float DefaultShutdownPerformance = .25f;
|
2021-03-06 02:42:19 +00:00
|
|
|
|
public float SevereHeatstrokeRiskThreshold = .25f;
|
2021-03-05 14:31:18 +00:00
|
|
|
|
public float WormholeDepth = 1000;
|
|
|
|
|
|
public float WormholeExitVelocity = 20;
|
|
|
|
|
|
public float WormholeExitRadius = 50;
|
|
|
|
|
|
public float WormholeAnimationDuration = 4;
|
|
|
|
|
|
public float WormholeExitCurveStart = .8f;
|
|
|
|
|
|
public float ThermalWearExponent = .01f;
|
2021-06-04 14:49:00 +02:00
|
|
|
|
public float DeltaTempWearExponent = .01f;
|
2021-03-05 14:31:18 +00:00
|
|
|
|
public float QualityWearExponent = 2;
|
2021-05-02 20:59:45 +01:00
|
|
|
|
public int WeaponGroupCount = 6;
|
2020-12-10 23:20:38 +00:00
|
|
|
|
public float WarpDistance = 25;
|
|
|
|
|
|
public float DockingDistance = 25;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
public float ProductionPersonalityLerp = .05f;
|
2020-12-10 23:20:38 +00:00
|
|
|
|
public float MessageDuration = 4f;
|
|
|
|
|
|
public float TargetPersistenceDuration = 3;
|
|
|
|
|
|
public ExponentialLerp StartingGearQuality;
|
|
|
|
|
|
public float HeatRadiationExponent = 1;
|
|
|
|
|
|
public float HeatRadiationMultiplier = 1;
|
2020-12-27 22:18:22 +00:00
|
|
|
|
public float HeatConductionMultiplier = 1;
|
2021-01-27 00:05:30 +00:00
|
|
|
|
public ExponentialCurve TemperatureEmissionCurve;
|
2020-12-31 19:53:16 +00:00
|
|
|
|
public float HeatstrokeTemperature = 330;
|
|
|
|
|
|
public float HeatstrokeMultiplier = .00001f;
|
|
|
|
|
|
public float HeatstrokeExponent = 2;
|
|
|
|
|
|
public float HeatstrokeRecoverySpeed = .2f;
|
|
|
|
|
|
public float HeatstrokeControlLimit = .75f;
|
2021-04-10 01:47:16 +01:00
|
|
|
|
public float HypothermiaTemperature = 273;
|
|
|
|
|
|
public float HypothermiaMultiplier = .00001f;
|
|
|
|
|
|
public float HypothermiaExponent = 2;
|
|
|
|
|
|
public float HypothermiaRecoverySpeed = .2f;
|
|
|
|
|
|
public float HypothermiaControlLimit = .75f;
|
2021-01-10 03:59:47 +00:00
|
|
|
|
public float LockIndicatorNoiseAmplitude = 50f;
|
|
|
|
|
|
public ExponentialLerp LockIndicatorFrequency;
|
|
|
|
|
|
public ExponentialLerp LockSpinSpeed;
|
2021-01-11 02:56:37 +00:00
|
|
|
|
public float TorqueFloor;
|
|
|
|
|
|
public float TorqueMultiplier;
|
2021-04-14 03:29:14 +01:00
|
|
|
|
public float AetherTorqueMultiplier;
|
|
|
|
|
|
public float AetherHeatMultiplier;
|
2021-01-25 05:53:36 +00:00
|
|
|
|
public float VisibilityDecay;
|
2021-02-11 03:14:20 +00:00
|
|
|
|
public float TargetInfoDecay;
|
|
|
|
|
|
public float TargetDetectionInfoThreshold;
|
|
|
|
|
|
public float TargetArmorInfoThreshold;
|
|
|
|
|
|
public float TargetGearInfoThreshold;
|
2021-01-27 16:14:41 +00:00
|
|
|
|
public float ConvergenceMinimumDistance;
|
2021-02-26 19:01:47 +00:00
|
|
|
|
public float AgentRangeExponent = .25f;
|
|
|
|
|
|
public float AgentForwardLerp = .5f;
|
|
|
|
|
|
public float AgentMaxForwardDistance = 50;
|
|
|
|
|
|
public float AgentFiringMinDot = .99f;
|
2021-03-08 02:57:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-10 14:57:50 +01:00
|
|
|
|
[Serializable, MessagePackObject(keyAsPropertyName: true), JsonObject]
|
2021-03-08 02:57:38 +00:00
|
|
|
|
public class RarityTier
|
|
|
|
|
|
{
|
|
|
|
|
|
public string Name;
|
|
|
|
|
|
public float Quality;
|
|
|
|
|
|
public float3 Color;
|
|
|
|
|
|
public float Rarity;
|
2026-08-10 14:57:50 +01:00
|
|
|
|
}
|