@Kopernicus:FOR[OPX-NeidonPlus]:HAS[@OPX_NeidonPlus_Settings:HAS[#ThatmoRevamp[False]]]
{
	@Body[Thatmo]
	{
		@Orbit
		{
			%semiMajorAxis = 35475900
		}
		@Properties
		{
			%tidallyLocked = false
			%rotationPeriod = -140193.009915742
		}
	}
}

@Kopernicus:FOR[OPX-NeidonPlus]:HAS[@OPX_NeidonPlus_Settings:HAS[#ThatmoRevamp[True]]]
{
	!Body[Thatmo] {}
	Body
    {
        name = Thatmo

		Debug
		{
			exportMesh = true
			update = true
		}
		cacheFile = OPX-NeidonPlus/Cache/ThatmoNew.bin		
        Template
		{
            name = Laythe
			removeAllPQSMods = true
		}
        Properties
        {
			displayName = #LOC_OPX-NP_Thatmo_Name
			radius = 286000
			geeASL = 0.232	
			tidallyLocked = False
            rotationPeriod = -140193.009915742
			rotates = true
			initialRotation = 0
			isHomeWorld = false
			timewarpAltitudeLimits = 0 5363 10725 21450 42900 85800 171600 343200
			description = #LOC_OPX-NP_Thatmo_Desc
			ScienceValues
			{
				landedDataValue = 11.5
				splashedDataValue = 1
				flyingLowDataValue = 9.5
				flyingHighDataValue = 11
				inSpaceLowDataValue = 11
				inSpaceHighDataValue = 10
				recoveryValue = 11
				spaceAltitudeThreshold =  216000
				flyingAltitudeThreshold = 12000
			}
			biomeMap = OPX-NeidonPlus/Textures/PluginData/Thatmo_Biome.png
			Biomes
			{
				Biome
				{
					name = Seas
					displayName = #LOC_OPX-NP_Thatmo_Biome_Se
					value = 1.5
					color = #493d73
				}
				Biome
				{
					name = Shores
					displayName = #LOC_OPX-NP_Thatmo_Biome_Sh
					value = 1.2
					color = #e0ceb8
				}
				Biome
				{
					name = Kadavo Planitia Highlands
					displayName = #LOC_OPX-NP_Thatmo_Biome_KPH
					value = 1
					color = #ecd6dd
				}
				Biome
				{
					name = Kadavo Planitia Lowlands
					displayName = #LOC_OPX-NP_Thatmo_Biome_KPL
					value = 1
					color = #f4e1e5
				}
				Biome
				{
					name = Dathomir Planum
					displayName = #LOC_OPX-NP_Thatmo_Biome_DP
					value = 1
					color = #a59db7
				}
				Biome
				{
					name = Polar Plains
					displayName = #LOC_OPX-NP_Thatmo_Biome_PP
					value = 1
					color = #f2f0f5
				}
				Biome
				{
					name = Northern Floodplains
					displayName = #LOC_OPX-NP_Thatmo_Biome_NF
					value = 1
					color = #9181b7
				}
				Biome
				{
					name = Highlands
					displayName = #LOC_OPX-NP_Thatmo_Biome_H
					value = 1
					color = #dcd4e7
				}
    				Biome
				{
    					name = Midlands
					displayName = #LOC_OPX-NP_Thatmo_Biome_M
	 				value = 1
      					color = #baafcb
				}
    				Biome
				{
    					name = Lowlands
					displayName = #LOC_OPX-NP_Thatmo_Biome_L
	 				value = 1
      					color = #7d718f
				}
			}
        }
        Orbit
        {
            referenceBody = Neidon
            color = 0.901961,0.901961,0.980392,1
            inclination = 161.1
            eccentricity = 0.00043
			semiMajorAxis = 35475900
            longitudeOfAscendingNode = 66
            argumentOfPeriapsis = 0
            meanAnomalyAtEpoch = 2.04731106758118
            epoch = 1953406.32967385
        }
		Atmosphere
		{
			ambientColor = 0.187128,0.2393932,0.3058824,1
			lightColor = 0.74902, 0.74902, 0.74902,0.2
			enabled = true
			oxygen = false
			albedo = 0.74
			altitude = 35000.0
			staticPressureASL = 1.01325

			pressureCurve
			{
				key = 0 1.01325 0 -0.000136962
				key = 1000 0.878903 -0.000131008 -0.000131008
				key = 3000 0.637731 -0.000108284 -0.000108284
				key = 6000 0.375567 -6.74286E-05 -6.74286E-05
				key = 9000 0.219223 -3.94925E-05 -3.94925E-05
				key = 12000 0.126168 -2.36747E-05 -2.36747E-05
				key = 15000 0.0717707 -1.34045E-05 -1.34045E-05
				key = 20000 0.0295354 -4.86204E-06 -4.86204E-06
				key = 25000 0.0138243 -1.97004E-06 -1.97004E-06
				key = 30000 0.00690498 -9.40162E-07 -9.40162E-07
				key = 35000 0 0 0
			}

			pressureCurveIsNormalized = false
			temperatureSeaLevel = 73
			
			temperatureCurve
			{
				key = 0 73.15 0 -0.007975
				key = 9700 54 -0.001126 -0.001126
				key = 17000 54 0.001126 0.001126
				key = 25000 68 0.0008488 0.0008488
				key = 35000 71.5 0 0
			}

			temperatureCurveIsNormalized = false
			temperatureLapseRate = 0.0024
			temperatureSunMultCurve = true

			temperatureSunMultCurve
			{
				key = 0 1 0 0
				key = 9700 0 0 0
				key = 17000 0 0 0
				key = 35000 1 0 0
			}

			temperatureLatitudeSunBiasCurve
			{
				key = 0 0 0 0
				key = 90 -3 -0.54 0
			}

			temperatureLatitudeSunMultCurve
			{
				key = 0 2 0 0
				key = 90 0 -0.36 0
			}

			temperatureEccentricityBiasCurve
			{
				key = 0 0 0 0
				key = 1 0 0 0
			}

			adiabaticIndex = 1.286
			gasMassLapseRate = 2.06477390407027
			atmosphereMolarMass = 0.0289644
		}		
		ScaledVersion
        {		
			type = Atmospheric
            fadeStart = 71500
            fadeEnd = 143000
            Material
            {	
                rimPower = 2.06
		        rimBlend = 0.3
		        Gradient
                {
                    0.0 = 0.72549,0.81961,0.83529,1
                    0.6 = 0.0549,0.0784,0.141,1
                    1.0 = 0.0196,0.0196,0.0196,1
                }	
				specColor = 0.1,0.1,0.1,1
				shininess = 0.1						
            }
			OnDemand
			{
				texture = OPX-NeidonPlus/Textures/PluginData/Thatmo_Color.dds
				normals = OPX-NeidonPlus/Textures/PluginData/Thatmo_Normal.dds
			}
        }
		PQS
        {
			fadeStart = 143000
			fadeEnd = 286000
			deactivateAltitude = 287430
			minLevel = 2
			maxLevel = 8
			minDetailDistance = 6
			maxQuadLengthsPerFrame = 0.03
			materialType = AtmosphericExtra
			allowFootprints = True
			Material
			{
				saturation = 1
				contrast = 1.3
				tintColor = 1,1,1,0
				groundTexStart = 0
				groundTexEnd = 9000
				steepTexStart = 0
				steepTexEnd = 9000
				steepTex = OPX-NeidonPlus/Textures/PluginData/cliff.dds
				steepBumpMap = OPX-NeidonPlus/Textures/PluginData/cliff_normal.dds
				steepNearTiling = 2500
				steepTiling = 25
				lowTex = OPX-NeidonPlus/Textures/PluginData/cracked.dds
				lowBumpMap = OPX-NeidonPlus/Textures/PluginData/cracked_normal.dds
				lowNearTiling = 7500
				lowMultiFactor = 75
				lowBumpNearTiling = 7500
				lowBumpFarTiling = 75
				midTex = OPX-NeidonPlus/Textures/PluginData/snow.dds
				midBumpMap = OPX-NeidonPlus/Textures/PluginData/snow_normal.dds
				midNearTiling = 5000
				midMultiFactor = 50
				midBumpNearTiling = 5000
				midBumpFarTiling = 50
				highTex = OPX-NeidonPlus/Textures/PluginData/ice.dds
				highBumpMap = OPX-NeidonPlus/Textures/PluginData/ice_normal.dds
				highNearTiling = 5000
				highMultiFactor = 50
				highBumpNearTiling = 5000
				highBumpFarTiling = 50			
				lowStart = 0
				lowEnd = 0.26
				highStart = 0.35
				highEnd = 1
			}
            Mods
            {
				VertexSimplexHeightAbsolute
				{
					seed = 879234
					deformity = 300
					octaves = 8
					persistence = 0.5
					frequency = 24
					enabled = true
					order = 20
				}				
				VertexSimplexHeight
				{
					seed = 252343215
					deformity = 300
					octaves = 8
					persistence = 0.5
					frequency = 4
					enabled = true
					order = 30
				}
				VertexColorMap
				{
					map = OPX-NeidonPlus/Textures/PluginData/Thatmo_Color.dds
					order = 50
					enabled = True
				}
                VertexMitchellNetravaliHeightMap
				{
					map = OPX-NeidonPlus/Textures/PluginData/Thatmo_height.dds
					offset = -1280
					deformity = 9192
					order = 1
					scaleDeformityByRadius = false
					enabled = True
					name = new-height
				}
            }
        }	
        Ocean
		{
			ocean = True
			oceanColor = 0.288,0.24,0.45,1
			density = 1.3
			Material
			{
				color = 0.288,0.24,0.45,1
				colorFromSpace = 0.701,0.706,0.739,1
				specColor = 1,1,1,1
				shininess = 1
				oceanOpacity = 0.1
			}
			FallbackMaterial
			{
				color = 0.288,0.24,0.45,1
				colorFromSpace = 0.701,0.706,0.739,1
			}
			Fog
			{
				fogColorEnd = 0,0.0850000009,0.122500002,1
				fogColorStart = 0,0.340000004,0.49000001,1
			}
		}		
    }
}
