Skip to content

Model Config File Format

Christian Bronk edited this page Feb 3, 2019 · 12 revisions

Introduction

Kerbal Konstructs currently supports only one Type of cfg file for static objects, But it is best praktice to seperate the Model defining configuration and the placement configuration into different files.

One model can have zero or more static modules (the same type with different parameters is also supported).

Static Modules currently are:

Model defining config

example of an model defining config:

STATIC
{
    name = kshelipadbasic
    mesh = ksidehelipadbasic.mu
    author = AlphaAsh
    title = Basic Helipad
    category = Helipads
    manufacturer = KashCorp
    description = Helicopters pancake on it.
    cost = 25000
    impactThreshold = 1000
    DefaultLaunchPadTransform = ksidehelipadbasic_spawn
    DefaultLaunchSiteLength = 20
    DefaultLaunchSiteWidth = 20


 // optional modules
 Module {
    namespace = <ModuleNameSpace> // required
    name = <Modulename>
    parameter1 = value1
    ...
 }
 Module {
 .....
}
}

header

Basic Settings

Entry Function Example Required comment
name internal unique identification of the model ksairracearrowpole1 yes no funny thinks like _ or space or slashes
title human readable identification Race Arrows Pole 1 yes you need this in the static editor
mesh the used 3d model ksairracearrowpole1.mu yes
category model category in the editor Air-racing no highly recommended for better filtering
Author Name of the models Creator AlphaAsh no
manufacturer KashCorp no
description some descition about this model Race this way no recommended.
keepConvex keep the models colliders ( compute new when missing or "no" ) yes no
impactThreshold how much force the building can resist before exploding 2000 no default is 1000

Launchsite default settings

These are the default settings, when a model is made a launchsite. they are optional, but recommended, If you intend to use a static as an launchsite, because the spawn_transform is impossible to guess.

Entry Function Example Required
DefaultLaunchPadTransform name of the launch tranform, when the facility is placed as a launchsite ksidehelipadbasic_spawn no
DefaultLaunchSiteLength max length of launched vessels 20 no
DefaultLaunchSiteWidth max width of launched vessels 20 no

Instances

Instances are optional an can be moved to an own cfg file. see: Instance Config