Jump to content

So i am trying to write my own version of this mod for kerbal space program that allows me to add more planets. Any ways i need help identifying what programming language this is. Just to give you an example 

@Kopernicus:AFTER[Kopernicus]
{
    Body
    {
        name = Bastion

        Orbit
        {
            referenceBody = Sun
            inclination = 0
            eccentricity = 0
            semiMajorAxis = 200500000000
            longitudeOfAscendingNode = 0
            argumentOfPeriapsis = 0
            meanAnomalyAtEpoch = 0
            epoch = 0
            color = 0.1,0.1,1,1
        }

        Properties
        {
            description = Bastion is the king of the gas giants
            radius = 8000000
            geeASL = 1.5
            rotationPeriod = 36000
            rotates = true
            tidallyLocked = false
            initialRotation = 0
            isHomeWorld = false
            timewarpAltitudeLimits = 0 30000 30000 60000 100000 300000 600000 800000

            ScienceValues
            {
                landedDataValue = 8
                splashedDataValue = 1
                flyingLowDataValue = 5
                flyingHighDataValue = 5
                inSpaceLowDataValue = 7
                inSpaceHighDataValue = 5
                recoveryValue = 5
                flyingAltitudeThreshold = 12000
                spaceAltitudeThreshold = 140000
            }
        }

        ScaledVersion
        {
            type = Atmospheric
            fadeStart = 0
            fadeEnd = 0

            Material
            {
                // Common scaled space settings
                texture = KopernicusExamples/Creating New Bodies/GasGiant/PluginData/Color.dds
                shininess = 0
                specular = 0.0,0.0,0.0,1.0

                // Atmosphere settings
                rimPower = 2.06 
                rimBlend = 0.3

                // Atmosphere color ramp texture
                Gradient
                {
                    0.0 = 0.094,0.220,0.643,1
                    0.6 = 0.0549,0.0784,0.141,1
                    1.0 = 0.0196,0.0196,0.0596,1
                }
            }
        }

        Atmosphere
        {
            // effectively the ambient lighting color for all objects on the ground of this body (provides a slight tint)
            ambientColor = 0.006,0.187,0.8,1   

            //
            // shader.invWaveLength = Color( 1 / r^4, 1 / g^4, 1 / b^4, 0.5);
            //
            lightColor = 0.709,0.788,0.543,0

            // General atmosphere settings
            enabled = true
            oxygen = false
            altitude = 200000.0

            // Atmosphere Pressure
            // pressure (in atm) = multipler * e ^ -(altitude / (scaleHeight * 1000))
            pressureCurve
            {
                key = 0 1722.525 -3.68761403636364E-02 -3.68761403636364E-02
                key = 13750 1215.4779 -2.89618181818182E-02 -2.89618181818182E-02
                key = 27500 926.0747733 -1.70812909090909E-02 -1.70812909090909E-02
                key = 41250 745.7422867 -1.22066367272727E-02 -1.22066367272727E-02
                key = 55000 590.39232 -1.03885874909091E-02 -1.03885874909091E-02
                key = 68750 460.0561533 -8.63595672727273E-03 -8.63595672727273E-03
                key = 82500 352.9034533 -7.05044647272727E-03 -7.05044647272727E-03
                key = 96250 266.1688867 -5.6660456E-03 -5.6660456E-03
                key = 110000 197.0872333 -4.48274916363636E-03 -4.48274916363636E-03
                key = 123750 142.8932733 -3.50056581818182E-03 -3.50056581818182E-03
                key = 137500 100.8216733 -2.71949803636364E-03 -2.71949803636364E-03
                key = 151250 68.1071 -2.13953963636364E-03 -2.13953963636364E-03
                key = 165000 41.98433333 -1.65774109090909E-03 -1.65774109090909E-03
                key = 178750 22.51922 -1.00126501090909E-03 -1.00126501090909E-03
                key = 192500 14.44954667 -4.06759432727273E-04 -4.06759432727273E-04
                key = 206250 11.33333333 -2.27824727272727E-04 -2.27824727272727E-04
                key = 220000 8.184366667 -2.25669374545455E-04 -2.25669374545455E-04
                key = 233750 5.127426667 -2.06283192727273E-04 -2.06283192727273E-04
                key = 247500 2.51158 -1.61502101818182E-04 -1.61502101818182E-04
                key = 261250 0.68612 -9.13301818181818E-05 -9.13301818181818E-05
                key = 275000 0 -4.98996363636364E-05 -4.98996363636364E-05
            }
            
            // temperature Curve
            temperatureCurve
            {
                key = 0 141.67 -0.002333333455 -0.002333333455
                key = 33000 104.4583677 -0.0003304941091 -0.0003294753455
                key = 57750 104.4583677 0.0003294753455 0.0003294753455
                key = 85250 131.0381051 0.0001800779636 0.0001800779636
                key = 154000 131.0381051 -0.0002483375636 -0.0002483375636
                key = 220000 90.44359713 -0.0003304941091 -0.0003304941091
                key = 247500 90.44359713 0.0001722816364 0.0001722816364
                key = 275000 111.2241191 0.0002525833091 0.0002525833091
                key = 343750 0 -0.0001634942182 -0.0001634942182
            }
        }
    }
}
 

if anyone can help me understand this it would be very helpful. 

thanks :)

Project Iridium:   CPU: Intel 4820K   CPU Cooler: Custom Loop  Motherboard: Asus Rampage IV Black Edition   RAM: Avexir Blitz  Storage: Samsung 840 EVO 250GB SSD and Seagate Barracuda 3TB HDD   GPU: Asus 780 6GB Strix   Case: IN WIN 909   PSU: Corsair RM1000      Project Iridium build log http://linustechtips.com/main/topic/451088-project-iridium-build-log/

 

Link to comment
https://linustechtips.com/topic/568905-need-help-identifying-a-programming-language/
Share on other sites

Link to post
Share on other sites

Its not a language its just data structures written out in formatted text. Its basically just an object name then within the parenthesis the data members of said object.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to post
Share on other sites

2 minutes ago, trag1c said:

Its not a language its just data structures written out in formatted text. Its basically just an object name then within the parenthesis the data members of said object.

ahh makes sense. any idea how i can learn more about how to do this kind of thing?

Project Iridium:   CPU: Intel 4820K   CPU Cooler: Custom Loop  Motherboard: Asus Rampage IV Black Edition   RAM: Avexir Blitz  Storage: Samsung 840 EVO 250GB SSD and Seagate Barracuda 3TB HDD   GPU: Asus 780 6GB Strix   Case: IN WIN 909   PSU: Corsair RM1000      Project Iridium build log http://linustechtips.com/main/topic/451088-project-iridium-build-log/

 

Link to post
Share on other sites

14 minutes ago, Maybach123 said:

ahh makes sense. any idea how i can learn more about how to do this kind of thing?

Perhaps try starting with parsing a simple data format such as INI files or Wavefront OBJ (this one is specific to 3D models but is a nice easy format to learn how parse text files.) This is completely language agnostic so it does not matter which programming language you choose to use to parse a file. 

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to post
Share on other sites

Maybe Lua?

Lua is very used very often in games as either a scripting language or a way to store data.

This would describe a monster, for example :

monster = {
    health = 100,
    name "Troll",
    lootTypes = { "gold", "chain_armor" }
}

 

And of course then it comes to actually how you interact with the Lua code. Using a library called LuaTable , it will look something like this (in C++) :

Luatable::Value definition;
Monster monster;
definition.loadFromFile("Troll.lua");

troll.health = definition["monster"]["health"].asInt();
troll.name = definition["monster"]["name"].asString();
Luatable::Array& lootTypes = definition["monster"]["lootTypes"].asArray();
for (int i = 0; i < lootTypes.size(); ++i)
{
    monster.addLootType(lootTypes[i].asString());
}

 

Ah , it's not Lua. It has slight syntax variations. It looks very similar though. As other have said , it's just some data storage format probably.

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×