Skip to content

SpawnKerbal Behaviour

Jeremie Rossignol edited this page May 25, 2018 · 6 revisions

Behaviour for spawning one or more Kerbals on land or in orbit.

BEHAVIOUR
{
    name = SpawnKerbal
    type = SpawnKerbal

    // The KERBAL node indicates a Kerbal to spawn and can be specified
    // multiple times.
    KERBAL
    {
        // Use this instead of name/gender to use an expression that returns
        // a Kerbal object.
        //
        // Type:      Kerbal
        // Required:  No
        //
        kerbal = NewKerbalWithTrait("Engineer")

        // If the name is not supplied, one will be autogenerated by KSP.
        //
        // Type:      string
        // Required:  No
        //
        name = Kerbediah Kerman

        // Gender of the kerbal.  If not specified, will be assigned a random
        // gender.
        //
        // Type:      ProtoCrewMember.Gender
        // Required:  No
        // Values:
        //     Male
        //     Female
        //
        gender = Female

        // Type of the kerbal.
        //
        // Type:      ProtoCrewMember.KerbalType
        // Required:  No (defaulted)
        // Values:
        //     Applicant
        //     Crew
        //     Tourist (Default)
        //     Unowned
        //
        kerbalType = Unowned

        // Whether the Kerbal should show up as owned or unowned.  If it is
        // owned, then it will be immediately selectable.
        //
        // Type:      bool
        // Required:  No (defaulted)
        // Default:   false
        //
        owned = true

        // Whether the Kerbal should get added to the roster on recovery.
        //
        // Type:      bool
        // Required:  No (defaulted)
        // Default:   true
        //
        addToRoster = true

        // Where the Kerbal should spawn - defaulted from the contract if
        // not supplied.
        /
        // Type:      CelestialBody
        // Required:  No (defaulted)
        //
        targetBody = Kerbin

        // The ORBIT node indicates the orbit the Kerbal is in.  The
        // easiest way to get this information is to create the orbit
        // you want in KSP (using HyperEdit or good old fashioned
        // rocket science), and save your game.  In the persistant.sfs
        // file, search for your craft, and find the ORBIT node.  Note
        // that this information does not need to be provided for a landed
        // Kerbal
        //
        // Note that REF represents the reference body - but will be
        // overriden by the targetBody.
        ORBIT
        {
            SMA = 1449999.99996286
            ECC = 1.07570816555399E-05
            INC = 0
            LPE = 270.690311604893
            LAN = 1.93635924563296
            MNA = 1.55872660382504
            EPH = 31.3999999999994
            REF = 1
        }

        // If you wish to specify a landed Kerbal, you must also 
        // supply the following values.  The alt value represents the altitude
        // above seal level.  If it is not specified, the Kerbal will be spawned
        // on the ground (based on terrain height).
        //
        // Type:      double
        // Required:  See above
        //
        lat = 10.595910968977
        lon = 239.804476675472
        alt = 387.929475510377

        // Specifies the heading of the kerbal in degrees (0 = N, 90 = E...).
        //
        // Type:      float
        // Required:  No (defaulted)
        // Default:   0.0
        //
        heading = 180.0

        // The location name.  Use this instead of lat/long coordinates
        // to specify coordinates based on the location of a PQS city.
        //
        // Type:      string
        // Required:  No
        //
        pqsCity = KSC

        // An optional offset vector from the center of the PQS City.
        // Use this to make your Kerbal relative to the PQS City,
        // which will make it work even for RSS or other mods that may
        // move the PQS city.  To get the offset coordinates, position
        // your ship/kerbal at the desired location and go to the
        // Location tab in the Contract Configurator debug window
        // (alt-F10).
        //
        // Type:      Vector3d
        // Required:  No
        //
        pqsOffset = 447.307865750742, 5.14341771520321E-05, 24.9700656982985
    }
}
Clone this wiki locally