Jump to content

Official API Documentation KSP 1.12.0


Recommended Posts

  • 4 months later...
  • 5 months later...

Does anyone know specifically where the new scenario functionality resides? In particular, I'm wondering if it's possible to design a mission using the stock editor, then programmatically activate that mission in a sandbox/career context.

Link to comment
Share on other sites

45 minutes ago, rhoark said:

Does anyone know specifically where the new scenario functionality resides? In particular, I'm wondering if it's possible to design a mission using the stock editor, then programmatically activate that mission in a sandbox/career context.

By "stock editor" I assume you mean the Mission Builder editor?

The short answer is no, missions need the Mission Builder DLC

Link to comment
Share on other sites

By stock editor I mean Squad-supplied, with the DLC. My understanding is the created missions are run by choosing "Scenarios" at the main menu. I am wondering if a plugin could load a saved mission into career mode.

Link to comment
Share on other sites

The official API docs have been updated in the link in the opening post. Including the Making History Expansions part of the API.

2 hours ago, rhoark said:

Does anyone know specifically where the new scenario functionality resides? In particular, I'm wondering if it's possible to design a mission using the stock editor, then programmatically activate that mission in a sandbox/career context.

You could try... but it would be very difficult. Missions are designed to specifically ONLY run in mission mode. and cannot be added to the other game modes.
 

Link to comment
Share on other sites

23 hours ago, JPLRepo said:

The official API docs have been updated in the link in the opening post. Including the Making History Expansions part of the API.

Will there be any "modders notes" for both 1.4.1 and DLC?

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

I @JPLRepo


In the class "module Engine" ( https://kerbalspaceprogram.com/api/class_module_engines.html)

they are 5 attributs containing curve data :

  • atmosphereCurve  : a curve to determine loss or gain of thrust due to changes in atmosphere vs vacuum values are based on ISP to ATM Pressure
  • atmCurveIsp : Same as atmCurve, but changes Isp not flow
  • atmCurve : Normally thrust is proportional to density, but we allow tuning. Tuning is especially needed because there's no stratosphere, so temperature keeps decreasing and thus speed of sound keeps decreasing
  • velCurve : replacement for the existing module's velocityCurve. Note that its x value is Mach, not m/s velocity. High-bypass turbofans will see thrust decrease steadily from static. Low-bypass turbofans and turbojets will see thrust decrease slightly up to about 0.2 Mach then increase steadily until the limit is reached (both in terms of heat, and incoming compression vs compressor compression). Ramjets have 0 static thrust, and do not light until 0.3 Mach or so, but once lit have steadily increasing thrust until Mach 5, when the incoming air can no longer be slowed to subsonic (combustion must be subsonic for ramjets). Thermal limits also apply, of course. For heat limits, see machLimit, below.
  • velCurveIsp : Same as velCurve but changes Isp not flow

 

For the atmosphereCurve, in some parts, the curve are compose by 2 values  ( Atm / ISP), but in other ( like toroidalAerospike cfg file) curve points are composed by 4 values :

Spoiler

0 340 -50 -73.71224
1 290 -21.23404 -21.23404
5 230 -10.54119 -10.54119
10 170 -13.59091 -13.59091
20 0.001

What is the signification of the 2 others ( -50 and -73.71224) ?

 

The atmCurve seems limited only to JetEngine, each point are composed by 4 values, what are their signification ? ( same as atmosphereCurve ) ?

Same question for the velCurve, each point are composed by 4 values, what are their signification ? ( Mach Number, ? , ?  , ? ) ?

 

I have not found parts with atmCurveIsp or velCurveIsp attributs in .cfg files

 

 

Edit : In the same way, there are a real distinction between Engine implementing ModuleEnginesFX class against those implementing ModuleEngines class ? ( I work on configuration files)

 

Thanks

DrDam

Edited by DrDam
Link to comment
Share on other sites

On 4/30/2018 at 11:50 PM, DrDam said:

I @JPLRepo


In the class "module Engine" ( https://kerbalspaceprogram.com/api/class_module_engines.html)

they are 5 attributs containing curve data :

  • atmosphereCurve  : a curve to determine loss or gain of thrust due to changes in atmosphere vs vacuum values are based on ISP to ATM Pressure
  • atmCurveIsp : Same as atmCurve, but changes Isp not flow
  • atmCurve : Normally thrust is proportional to density, but we allow tuning. Tuning is especially needed because there's no stratosphere, so temperature keeps decreasing and thus speed of sound keeps decreasing
  • velCurve : replacement for the existing module's velocityCurve. Note that its x value is Mach, not m/s velocity. High-bypass turbofans will see thrust decrease steadily from static. Low-bypass turbofans and turbojets will see thrust decrease slightly up to about 0.2 Mach then increase steadily until the limit is reached (both in terms of heat, and incoming compression vs compressor compression). Ramjets have 0 static thrust, and do not light until 0.3 Mach or so, but once lit have steadily increasing thrust until Mach 5, when the incoming air can no longer be slowed to subsonic (combustion must be subsonic for ramjets). Thermal limits also apply, of course. For heat limits, see machLimit, below.
  • velCurveIsp : Same as velCurve but changes Isp not flow

 

For the atmosphereCurve, in some parts, the curve are compose by 2 values  ( Atm / ISP), but in other ( like toroidalAerospike cfg file) curve points are composed by 4 values :

  Hide contents

0 340 -50 -73.71224
1 290 -21.23404 -21.23404
5 230 -10.54119 -10.54119
10 170 -13.59091 -13.59091
20 0.001

What is the signification of the 2 others ( -50 and -73.71224) ?

 

The atmCurve seems limited only to JetEngine, each point are composed by 4 values, what are their signification ? ( same as atmosphereCurve ) ?

Same question for the velCurve, each point are composed by 4 values, what are their signification ? ( Mach Number, ? , ?  , ? ) ?

 

I have not found parts with atmCurveIsp or velCurveIsp attributs in .cfg files

 

 

Edit : In the same way, there are a real distinction between Engine implementing ModuleEnginesFX class against those implementing ModuleEngines class ? ( I work on configuration files)

 

Thanks

DrDam

They are the Keyframe.inTangent and Keyframe.outTangent on the Unity AnimationCurve.
https://kerbalspaceprogram.com/api/class_float_curve.html
Unity uses cubic bezier curves for calculating these, or if you define them in the cfg then the tangent will be set to these values.

This old post might help explain: https://forum.kerbalspaceprogram.com/index.php?/topic/84201-info-ksp-floatcurves-and-you-the-magic-of-tangents/

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 4 weeks later...

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