Skip to content

Contract Type

Jeremie Rossignol edited this page Jan 19, 2015 · 21 revisions

Table of Contents

The CONTRACT_TYPE node

The CONTRACT_TYPE node is the main node for all ContractConfigurator contracts. This node is what defines a contract that will be offered by ContractConfigurator.

Also see the detailed pages for the listing of all possible values for PARAMETER, REQUIREMENT and BEHAVIOUR nodes:

Sample CONTRACT_TYPE (can be downloaded here):

// Each CONTRACT_TYPE node represents a type of contract that can be offered
CONTRACT_TYPE
{
    // Unique name of the contract type (required)
    name = SimpleTestContract

    // Contract title is displayed in the window in the corner, shoudl be short
    // and descritive
    title = Simple Test Contract

    // Two options for specifying the description:
    // 1) Supply the full text here in the description field
    //description = A more detailed description of the contract.

    // 2) Supply the following fields, which will be fed into the text
    //    generator.  Use of the CoherentContracts mod is highly recommended,
    //    as it generates far more meaningful text.
    topic = ContractConfigurator  // Topic of the contract.  Should be a
                                  // singular noun.
    subject = Kerbal              // Subject of the contract.  See
                                  // CoherentContracts for some possible values.
                                  // Includes stuff like Kerbal, Experiment,
                                  // Parts, Mun, MunSrf, etc.
    motivation = test             // Motivation for why we are doing the
                                  // contract.  See CoherentContracts for some
                                  // possible values.  Some values used are:
                                  // flags, test, rescue.

    // Contract notes are displayed in mission control.  Use it to give 
    // any special instructions.
    //
    // Optional
    notes = These are the contract level notes.

    // The contract synopsis appears in bold.  Give a quick summary of the
    // contract objective.
    synopsis = We want you to do a thing.

    // The completedMessage is the message that is displayed when the contract
    // completes.
    completedMessage = You have done the thing.

    // Agent (agency).  If not populated, a random agent will be selected.
    agent = Integrated Integrals

    // Contract min/max expiry in days.  If both are set to 0.0, it will result
    // in a contract that never expires.
    // Default = 1.0 and 7.0 days, respectively
    minExpiry = 500.0
    maxExpiry = 1000.0

    // Contract deadline in days.  Default is no deadline.
    deadline = 500

    // Controls for whether a contract can be declined or cancelled, default is
    // true for both
    cancellable = true
    declinable = true

    // Prestige.  If not specified, this contract type will be available at any
    // prestige level.  Otherwise, locked to the level specified.  Values from
    // Contract.ContractPrestige:
    //     Trivial
    //     Significant
    //     Exceptional
    prestige = Significant

    // Target Celestial body - controls where the contract must be completed,
    // has some automated effects on numeric values (increasing science, etc.).
    // Also gets used in some of the parameter classes.
    //
    // Default = null (no celestial body)
    targetBody = Kerbin

    // The maximum number of times this contract type can be completed (0 being
    // unlimited).
    // Default = 0
    maxCompletions = 3

    // The maximum instances of this contract that can be active at one time (0
    // being unlimited).
    // Default = 0
    maxSimultaneous = 1

    // Contract rewards
    rewardScience = 100.0
    rewardReputation = 20.0
    rewardFunds = 100000.0
    failureReputation = 10.0
    failureFunds = 10000.0
    advanceFunds = 10000.0

    // The weight is used in the contract generation process.  Each contract
    // type that is available to be offered is added to a weighted list.
    // Contract types with a higher value are more likely to be chosen.
    //
    // Default = 1.0
    weight = 10.0

    // The PARAMETER node defines a contract parameter.  The following shows an
    // example parameter.  See the Parameters page for examples of all supported
    // parameters.
    PARAMETER
    {
        name = AltitudeRecord1

        // The type defines the type of Parameter.  See the Parameters page for
        // a list of all supported ContractConfigurator parameters
        type = AltitudeRecord

        // This is a parameter specific to the AltituteRecord parameter type.
        // Each parameter type can have include its own custom fields.
        altitude = 45000
    }

    // The PARAMETER node defines a contract requirement - a prerequisite that
    // needs to be met before the contract can be offered.  The following shows
    // an example requirement.  See the Requirements page for examples of all 
    // supported requirements.
    REQUIREMENT
    {
        name = ReachSpace1

        // The type defines the type of Requirement.  See the Requirements page
        // for all supported ContractConfigurator requirements.
        type = ReachSpace
    }

    // The BEHAVIOUR node adds additional special contract level behaviour.
    // See the Behaviours page for examples of all supported behaviours.
    BEHAVIOUR
    {
        name = Behaviour1

        // The type defines the type of Behaviour.  See the Behaviours page
        // for all supported ContractConfigurator behaviours.
        type = Behaviour
    }
}

Contract Reward Modifiers

Thanks to DMagic - these values are pulled from [this forum post] (http://forum.kerbalspaceprogram.com/showthread.php?p=1315411#post1315411).

Contract rewards, advances, and penalties are all affected by a multiplier which is dependent on both the contract prestige and the celestial body. Those values are:

Body Trivial Significant Exceptional
Sun 4 5 6
Kerbin 1 1 2
Mun 2 2 3
Minmus 2 3 4
Moho 7 9 10
Eve 5 6 8
Duna 5 6 8
Ike 5 6 8
Jool 6 8 9
Laythe 8 10 12
Vall 8 10 12
Bop 8 10 12
Tylo 8 10 12
Gilly 6 8 9
Pol 8 10 12
Dres 6 8 9
Eeloo 10 12 15
Clone this wiki locally