@Kopernicus:FOR[OPX-SarnusPlus]:HAS[@OPX_SarnusPlus_Settings:HAS[#HaleRevamp[False]]]
{
    @Body[Hale]
    {
        %Properties
        {
            %sphereOfInfluence = 18000
            %timewarpAltitudeLimits = 0 0 0 0 0 0 0 0
        }
        @Orbit
        {
            @referenceBody = Sarnus
            %inclination = 1.5
            %eccentricity = 0.01
			%semiMajorAxis = 12169413
            %longitudeOfAscendingNode = 55
            %argumentOfPeriapsis = 0
			%meanAnomalyAtEpoch = 1.72
            %epoch = 751.7
            %iconTexture = OPX-SarnusPlus/Textures/PluginData/Small.png
        }
    }
}
@Kopernicus:FOR[OPX-SarnusPlus]:HAS[@OPX_SarnusPlus_Settings:HAS[#HaleRevamp[True]]]
{
    !Body[Hale] {}
    Body
	{
		name = Hale
		cacheFile = OPX-SarnusPlus/Cache/HaleNew.bin
		Template
		{
			name = Mun
			removeAllPQSMods = True
		}
		Orbit
        {
            referenceBody = Sarnus
            inclination = 0.5
            eccentricity = 0.01
			semiMajorAxis = 12169413
            longitudeOfAscendingNode = 55
            argumentOfPeriapsis = 0
			meanAnomalyAtEpoch = 1.72
            epoch = 751.7
			color = 0.941176,0.901961,0.54902,1
            iconTexture = OPX-SarnusPlus/Textures/PluginData/Small.png
        }
		Properties
		{
			displayName = #LOC_OPX-SP_Hale_Name
			description = #LOC_OPX-SP_Hale_Desc
			radius = 6000
			geeASL = 0.0023
			tidallyLocked = True	
			sphereOfInfluence = 41000
			initialRotation = 261.447514218415
			isHomeWorld = false
            timewarpAltitudeLimits = 0 0 0 0 0 0 10800 21600
			
			biomeMap = OPX-SarnusPlus/Textures/PluginData/Hale_Biome.png
            Biomes
            {
                Biome
                {
                    name = Macula
					displayName = #LOC_OPX-SP_Hale_Biome_M
                    value = 1.0
                    color = #312f31
                }
                Biome
                {
                    name = AmariusRegion
					displayName = #LOC_OPX-SP_Hale_Biome_AR
                    value = 1.0
                    color = #bba39c
                }
			}
            ScienceValues
			{
				landedDataValue = 12
				splashedDataValue = 1
				flyingLowDataValue = 1
				flyingHighDataValue = 1
				inSpaceLowDataValue = 9
				inSpaceHighDataValue = 8
				recoveryValue = 8
				spaceAltitudeThreshold = 7500
			}

		}
		ScaledVersion
		{
			type = Vacuum
			fadeStart = 7100
			fadeEnd = 7300
			OnDemand
			{
				texture = OPX-SarnusPlus/Textures/PluginData/Hale_Color.dds
				normals = OPX-SarnusPlus/Textures/PluginData/Hale_Normal.dds
			}
			Material
			{
				color = 1,1,1,1
				shininess = 0.3087
				specColor = 0,0,0,1
			}
		}
		PQS
		{
			maxQuadLengthsPerFrame = 0.03
			minLevel = 2
			maxLevel = 10
			minDetailDistance = 8
			deactivateAltitude = 8000
			fadeStart = 7300
			fadeEnd = 8000

			materialType = AtmosphericTriplanarZoomRotation
			Material // get snowed idiot
			{
				factor = 8
				factorBlendWidth = 0.1
				factorRotation = 45
				
				saturation = 1
				contrast = 1
				tintColor = 1,1,1,0
				specularColor = 0,0,0,0
				albedoBrightness = 1.37
				
				steepPower = 0.0001
				steepTexStart = 20000
				steepTexEnd = 30000
				steepTex = OPX-SarnusPlus/Textures/PluginData/Steep_diff.dds
				steepTexScale = 1,1
				steepTexOffset = 0,0
				steepBumpMap = OPX-SarnusPlus/Textures/PluginData/Steep_norm.dds
				steepBumpMapScale = 1,1
				steepBumpMapOffset = 0,0
				steepNearTiling = 1
				steepTiling = 1
				
				lowTex = OPX-SarnusPlus/Textures/PluginData/snow.dds
				lowTexScale = 1,1
				lowTexOffset = 0,0
				lowTiling = 70000
				
				midTex = OPX-SarnusPlus/Textures/PluginData/snow.dds
				midTexScale = 1,1
				midTexOffset = 0,0
				midTiling = 70000
				midBumpMap = OPX-SarnusPlus/Textures/PluginData/snow_normal.dds
				midBumpMapScale = 1,1
				midBumpMapOffset = 0,0
				midBumpTiling = 70000
				
				highTex = OPX-SarnusPlus/Textures/PluginData.snow.dds
				highTexScale = 1,1
				highTexOffset = 0,0
				highTiling = 70000

				lowStart = -1
				lowEnd = -1
				highStart = 2
				highEnd = 2
				
				globalDensity = 1
				
				fogColorRamp =
				fogColorRampScale = 1,1
				fogColorRampOffset = 0,0
				
				planetOpacity = 1
				oceanFogDistance = 1000
			}

			Mods
			{
				VertexColorMap
				{
					map = OPX-SarnusPlus/Textures/PluginData/Hale_Color.dds
					order = 10139
					enabled = true
				}
				VertexMitchellNetravaliHeightMap
				{
					map = OPX-SarnusPlus/Textures/PluginData/Hale_Shape.dds
					offset = 0
					deformity = 3880.546570
					scaleDeformityByRadius = false
					order = 15
					enabled = true
				}
				VertexSimplexHeight
				{
					seed = 82497
					deformity = 32
					octaves = 12.0
					persistence = 0.7
					frequency = 10
					enabled = true
					order = 100
				}
				VoronoiCraters
				{
					name = craters_small
					voronoiDisplacement = 0
					voronoiFrequency = 25
					voronoiSeed = 1234
					deformation = 17.6
					simplexFrequency = 120
					simplexOctaves = 4
					simplexPersistence = 0.5
					simplexSeed = 2345
					jitter = 0.05
					jitterHeight = 2
					rFactor = 1
					rOffset = 1
					colorOpacity = 0.5
					DebugColorMapping = False
					order = 100
					enabled = True
					CraterCurve
					{
						key = -1 -0.75 0 0
						key = -0.5 -0.1 4 4
						key = -0.4 0.25 2 -1
						key = -0.2 0.05 -0.5 -0.5
						key = 0 0 0 0
					}
					JitterCurve
					{
						key = -1 0.4 0 0
						key = -0.75 0.1 0 0
						key = -0.4 0.4 3 3
						key = -0.35 1 0 0
						key = -0.15 0 0 0
					}
				}
				VoronoiCraters
				{
					name = craters_medium
					voronoiDisplacement = 0
					voronoiFrequency = 15
					voronoiSeed = 1234
					deformation = 44
					simplexFrequency = 120
					simplexOctaves = 4
					simplexPersistence = 0.5
					simplexSeed = 2345
					jitter = 0.05
					jitterHeight = 2
					rFactor = 1
					rOffset = 1
					colorOpacity = 0.5
					DebugColorMapping = False
					order = 100
					enabled = True
					CraterCurve
					{
						key = -1 -0.75 0 0
						key = -0.5 -0.1 4 4
						key = -0.4 0.25 2 -1
						key = -0.2 0.05 -0.5 -0.5
						key = 0 0 0 0
					}
					JitterCurve
					{
						key = -1 0.4 0 0
						key = -0.75 0.1 0 0
						key = -0.4 0.4 3 3
						key = -0.35 1 0 0
						key = -0.15 0 0 0
					}
				}
				VoronoiCraters
				{
					name = craters_large
					voronoiDisplacement = 0
					voronoiFrequency = 8
					voronoiSeed = 1234
					deformation = 88
					simplexFrequency = 120
					simplexOctaves = 4
					simplexPersistence = 0.5
					simplexSeed = 2345
					jitter = 0.05
					jitterHeight = 2
					rFactor = 1
					rOffset = 1
					colorOpacity = 0.5
					DebugColorMapping = False
					order = 100
					enabled = True
					CraterCurve
					{
						key = -1 -0.75 0 0
						key = -0.5 -0.1 4 4
						key = -0.4 0.25 2 -1
						key = -0.2 0.05 -0.5 -0.5
						key = 0 0 0 0
					}
					JitterCurve
					{
						key = -1 0.4 0 0
						key = -0.75 0.1 0 0
						key = -0.4 0.4 3 3
						key = -0.35 1 0 0
						key = -0.15 0 0 0
					}
				}
			}
		}
	}
}
