ElysiumKSP MDK

ElysiumKSP, Unofficial Mod Devlopement Kit for KSP 1.12.5

Logo

ElysiumKSP MDK

ElysiumKSP MDK is an unofficial lightweight modding development kit for Kerbal Space Program 1.12.5, built on .NET Framework 4.2 and C# 5.

✨ Features

  • Simplified and compact game event handling
  • Button manager for quick UI integration
  • Integrated SteamAPI and optimized calling system
  • Annotations for faster mod prototyping
  • Added Localization on en-us and ru
  • Have a .obj file converter to Mesh and Mesh (with .obj data) converter to GameObject

📦 Current version

v0.0.1-prerelease-4

This is an early release aimed at making KSP API calls shorter and easier to use.


🚀 Designed for mod developers who want to prototype faster without writing long boilerplate KSP API calls.

🔹 Summary

ElysiumKSP MDK is an unofficial Mod Development Kit for KSP that adds a compact event system, configuration menus, a performance optimizer, and utilities for handling game objects.


✨ Features

  • 📡 Event System

    • Orbit change & SOI change detection
    • Landing detection
    • Atmosphere entry / exit
    • Orbit decay & collision warnings
    • Low fuel & low electric charge events
  • ⚙️ Configuration Menu

    • Adjustable thresholds for speed, periapsis/apogee accuracy
    • Fuel & electric charge limits
    • Logging options and internal settings
  • 📂 Mod Manager

    • Scans installed mods
    • Shows DLL versions
    • Detects configs
  • 🚀 Performance Optimizer

    • Automatic adjustments when FPS drops
    • Simplifies physics for distant vessels
    • Reduces particle count and rendering load
    • Controls rigidbody settings for optimization
  • 🌐 Optional Networking API

    • Vessel sync support
    • Resource sync events
    • Custom inter-mod messaging
  • AsyncLoader for async file reading and onComplete option

  • New MeshPro for obj to Mesh and Mesh to GameObject converters


About Steam API

Sorry steam api not longer support in MDK.

Optimized Calls (only for this MDK)

This is a new fuction of this KSP 1.12.5 MDK, Optimized method calls!!! In this version added a using ElysiumKSP.OptimizedCalls; for optimized methor running

AsyncLoader

Async file text reading, have a one method LoadAsync(string path, Action<string> onComplete): void Example of using

using ElysiumKSP.OptimizedCalls;
using KSP;
// Other usings...

// Classes, namespaces and other...
void LoadSomewhere()
{
    AsyncLoader al = new AsyncLoader();
    al.LoadAsync(KSPUtils.ApplicationRootPath + "\\MyMod\\Keys\\SHA-256.txt", (s) => { ... });
}


ElysiumKSP.cginc CG Inner Include

ElysiumKSP.cginc is the main shader include for ElysiumKSP MDK,
containing math utilities, PBR lighting functions, Fresnel reflections, and compute shader support.

File location: KSPPath/GameData/Elysium/Kernel32/ElysiumKSP.cginc

✨ Features

  • Realistic Physically Based Rendering (PBR) lighting (Metal/Rough workflow)
  • Fresnel reflection and microfacet BRDF models
  • HDR-compatible lighting equations
  • Built-in math/vector utilities for shader developers
  • Full compatibility with UnityCG.cginc
  • Designed for KSP 1.12.5 (Unity 5.4 shader model)

💻 How to include

In your shader file, add:

#include "Elysium/Kernel32/ElysiumKSP.cginc"

Then you can use built-in lighting functions, for example:

float3 color = PBR_Shade(normal, viewDir, albedo, metallic, roughness);
return float4(color, 1);

or the simplified variant:

fixed4 frag(v2f i) : SV_Target
{
    return ElysiumPBR(i);
}

License This file distributed the EMDK Mod License (see LICENSE

Example:

Shader "Elysium/ExamplePBR"
{
    Properties
    {
        _MainTex ("Albedo (RGB)", 2D) = "white" {}
        _NormalMap ("Normal Map", 2D) = "bump" {}
        _MetallicRoughnessMap ("MetallicRoughness", 2D) = "black" {}
        _AOMap ("AO", 2D) = "white" {}
        _EmissionMap ("Emission", 2D) = "black" {}
        _Metallic ("Metallic", Range(0,1)) = 0.0
        _Roughness ("Roughness", Range(0.04,1)) = 0.6
        _AO ("AO", Range(0,1)) = 1.0
        _Exposure ("Exposure", Float) = 1.0
    }

    SubShader
    {
        Tags { "RenderType" = "Opaque" }
        Pass
        {
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"
            #include "ElysiumKSP.cginc"

            struct appdata
            {
                float4 vertex : POSITION;
                float3 normal : NORMAL;
                float4 tangent : TANGENT;
                float2 uv : TEXCOORD0;
            };

            struct v2f
            {
                float4 pos : SV_POSITION;
                float3 worldPos : TEXCOORD0;
                float3 worldNormal : TEXCOORD1;
                float4 tangent : TEXCOORD2;
                float2 uv : TEXCOORD3;
            };

            float4 _MainTex_ST;
            float _Metallic;
            float _Roughness;
            float _AO;
            float _Exposure;
            float3 _EmissionColor;

            v2f vert(appdata v)
            {
                v2f o;
                o.pos = UnityObjectToClipPos(v.vertex);
                o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
                o.worldNormal = UnityObjectToWorldNormal(v.normal);
                o.tangent = v.tangent;
                o.uv = TRANSFORM_TEX(v.uv, _MainTex);
                return o;
            }

            // Simple forward-light (main directional light) for example
            fixed4 frag(v2f i) : SV_Target
            {
                float3 V = normalize(_WorldSpaceCameraPos - i.worldPos);
                float3 Ldir = normalize(_WorldSpaceLightPos0.xyz);
                float3 lightColor = _LightColor0.rgb;

                float NdotL;
                // call our PBR shade utility
                float3 col = PBR_Shade(i.uv, i.worldNormal, i.tangent, V, Ldir, lightColor, NdotL); // From ElysiumKSP.cginc

                return float4(col, 1.0);
            }

            ENDCG
        }
    }

    FallBack "Diffuse"
}

➕ Pros

  • Clean and easy-to-use event system
  • Developer-friendly API
  • In-game GUI for configuration
  • FPS improvements during heavy gameplay
  • Compatible with most mods

➖ Cons

  • Needs more testing in large modpacks
  • Optimizer may simplify visuals too aggressively at times
  • Localization only in EN/RU

The ElysiumKSP MDK Team

profile avatar
  • 1
    Projects
  • 30
    Downloads