Jump to content

Did I mess up in the code?


wolpie

Recommended Posts

So I wanted to recreate the Juno: New Origins solar system ingame ( for fun ) and for some reason KSP crashed when I tried opening.

 

here's scrip

 

@Kopernicus:AFTER[Kopernicus]
{
    Body
    {
        name = Juno
        cacheFile = Juno New Origins/Cache/Juno.bin
        barycenter = false
        identifier = Juno New Origins/Juno
        randomMainMenuBody = true
        contractWeight = 15
        HazardousBody
        {
        Instance
        {
             ambientTemp = 270
             biomeName = Star
             sumTemp = true
             HeatMap = MyMod/PluginData/MyPlanet/heatmap.dds
             AltitudeCurve
             {
                key = 0 1
                key = 20000 0.9
                key = 40000 0.75
                key = 75000 0.5
                key = 100000 0.35
                key = 150000 0.1
                key = 200000 0
                }
                LatitudeCurve
                {
                    key = -75 0.1
                    key = -30 0.7
                    key = 0 1
                    key = 30 0.7
                    key = 75 0.1
                }
                LongitudeCurve
                {
                    key = -160 1
                    key = -125 0.2
                    key = -75 0.8
                    key = -35 0.3
                    key = 0 1
                    key = 35 0.5
                    key = 75 0.9
                    key = 125 0.1
                    key = 165 0.6
                }
            }
        }

        Debug
        {
            exportMesh = true
            update = true
            showSOI = false
        }
        Template
        {
            name = Sun
            removeAtmosphere = false
            removeAllPQSMods = true
            removeOcean = true
        }
        Properties
        {
            description = No one knows how it ended up here. Only thing we know that there are the enemies of Kerbalkind.
            radius = 500000
            geeASL = 1.2
            rotates = true
            rotationPeriod = 18600
            initialRotation = 12
            tidallyLocked = false
            isHomeWorld = false
            timewarpAltitudeLimits = 0 10000 20000 40000 75000 150000 300000 400000
            sphereOfInfluence = 52500000
            maxZoom = 100000
            ScienceValues
            {
                
            }
            biomeMap = Juno New Origins/JNOTextures/PluginData/Juno.dds
            Biomes
            {
                Biome
                {
                name = Star
                value = 1.25
                color = 0.5, 0.2, 0.1, 1.0
                }
            }
        }
        Orbit
        {
            referenceBody = Sun
            color = 0.7,0.7,0.7,1
            inclination = 173
            eccentricity = 0.12
            semiMajorAxis = 19620000000000
            longitudeOfAscendingNode = 40
            argumentOfPeriapsis = 10
            meanAnomalyAtEpoch = 2.01
            epoch = 0
        }
        ScaledVersion
        {
            type = Star
            fadeStart = 00000
            fadeEnd = 00000
            Light
            {
              sunlightColor = 1.0,0.384,0.345,1.0
              sunlightIntensity = 0.9
              sunlightShadowStrength = 0.75
              scaledSunlightColor = 1.0,0.384,0.345,1.0
              scaledSunlightIntensity = 0.9
              IVASunColor = 1.0,0.384,0.345,1.0
              IVASunIntensity = 0.9
              ambientLightColor = 0.6,0.06,0.06,1.0
              sunLensFlareColor = 1.0,0.352,0.301,1.0
              givesOffLight = true
              sunAU = 13599840256
              luminosity = 1360
              insolation = 0.15
              brightnessCurve
              {
                key = -0.01573471 0.217353 1.706627 1.706627 // 1/0 - At furthest or unreal distance.
                key = 5.084181 3.997075 -0.001802375 -0.001802375 // 1/5 AU
                key = 38.56295 1.82142 0.0001713 0.0001713 // 1/38 AU - At an extremely close distance.
              }
              IntensityCurve
              {
                key = 0 0.9 0 0
                  key = 1 0.9 0 0
              }
              ScaledIntensityCurve
              {
                  key = 0 0.9 0 0
                  key = 1 0.9 0 0
              }
              IVAIntensityCurve
              {
                  key = 0 0.8099999 0 0
                  key = 1 0.8099999 0 0
              }
            }
            Material
            {
                noiseMap = BUILTIN/sunnoisenew
                emitColor0 = 0.245, 0.825, 0.675, 1
                emitColor1 = 0.36275, 0.75, 0.47365, 1
                sunspotTex = BUILTIN/sunsurfacenew
                sunspotPower = 0.75
                sunspotColor = 0.2875, 0.315, 0.0565, 1
                rimColor = 0.2875, 0.9085, 0.75, 1
                rimPower = 0.7925
                rimBlend = 2.25
            }
            Coronas
            {
                Corona
                {
                    rotation = 0
                    speed = -1
                    updateInterval = 5
                    scaleLimitX = 0
                    scaleLimitY = 0
                    scaleSpeed = 0
                    
                    Material
                    {
                        texture = BUILTIN/suncoronanew
                        inverseFade = 1
                    }
                }
            }
        }
        PQS
        {
            // PQS Detail Settings
            minLevel = 2
            maxLevel = 10
            minDetailDistance = 8
            maxQuadLengthsPerFrame = 0.03

            // Surface physics material
            PhysicsMaterial
            {
                bounceCombine = Multiply
                frictionCombine = Maximum
                bounciness = 0
                staticFriction = 0.9
                dynamicFriction = 0.9
            }
            
            //PQS fades, should roughly line up with ScaledSpace fades
            fadeStart = 60000
            fadeEnd = 120000
            deactivateAltitude = 160000

            mapMaxHeight = 8000
            
            materialType = AtmosphericOptimized
            Material
            {
                ...
            }

            Mods
            {
                ...
            }
        }

Link to comment
Share on other sites

WAIT!

I think I found something, @wolpie

Thing #1

On 10/12/2024 at 2:53 AM, wolpie said:

HazardousBody
        {
        Instance
        {
             ambientTemp = 270
             biomeName = Star
             sumTemp = true
             HeatMap = MyMod/PluginData/MyPlanet/heatmap.dds
             AltitudeCurve
             {
             SNIP
                }
                LatitudeCurve
                {
                   SNIP
                }
                LongitudeCurve
                {
                    SNIP
                }
            }
        }

 

You don’t need this, stars all ready emit heat.

Thing #2

On 10/12/2024 at 2:53 AM, wolpie said:

removeAtmosphere = false
            removeAllPQSMods = true
            removeOcean = true

If you don’t need to remove the whole atmosphere, maybe don’t put the node thing there? That’s more of a nitpick though.

However, this is not a nitpick…

Something to remember is, the Sun and Jool do NOT have PQS or oceans.

So that isn’t needed.

This also means, delete the entire PQS node.

Thing #3

On 10/12/2024 at 2:53 AM, wolpie said:

   fadeStart = 00000
            fadeEnd = 00000

Just set this to 0.

I think there might be something else wrong, but I need to go checkup on how stars work.

Link to comment
Share on other sites

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...