BepInEx for KSP 2 CKAN

Modloader for Unity games

License: LGPL

Game Version: 0.1.0.0

Source code: BepInEx/BepInEx

Downloads: 14,251

Author: bbepis

Mod Website: Forum Thread

Followers: 31

Outdated Mod

This mod is not known to work with the latest version of Kerbal Space Program 2. Proceed with caution.

BepInEx for KSP 2

https://github.com/BepInEx/BepInEx

What is BepInEx?

BepInEx is a tool used to allow modding / custom code execution in Unity and other C# based games. As of writing KSP 2 does not support loading arbitrary mods, so the only way to run addons & load assets is through this loader.

Harmony and MonoMod.RuntimeDetour are packaged with this loader, allowing you to modify game code & functions at runtime.

BepInEx uses "plugin" to refer to the equivalent of Addons in KSP.

Additional features as compared to KSP 1 style modding

  • Ability to modify .dll files before they are loaded, which allows for modifications not possible with Harmony.
  • Editing enums, patching static constructors, adding entirely new types to a specific assembly, immune to JIT inlining etc.
  • Much earlier code execution meaning that you are able to modify the game (and Unity itself) before it even starts loading
  • External console & logging so that you don't have to scour game logs for any info / error output
  • Fixes certain issues with Unity operating on platforms other than Windows
  • Includes dependency handling to ensure mods that rely on other mods are loaded in the correct order, or not at all if prerequistes are missing
  • Has a consistent way of reading / writing / manipulating configuration per plugin
  • Contains base libraries (such as Harmony) to prevent conflicts with mods providing their own, differing versions

Other features

  • Immune to being uninstalled by game updates; no files are replaced
  • Supports Windows, Linux and Mac OSX
  • Has dev tools that you can use to assist in plugin development
  • i.e. being able to reload plugins while the game is running, a UI to examine the entire loaded scene etc.

Getting started

For Windows:

  • Download the latest version of BepinEx v5 x64 from here
  • Extract the folder such that your game looks like this:

You are done!

If you get stuck with the installation process, please refer to the documentation: https://docs.bepinex.dev/articles/user_guide/installation/index.html

For Linux/Unix/OSX:

It is more or less the same process, with some minor differences. Refer to the above documentation

Installing plugins

To install plugins, place them inside of your BepInEx/plugins folder. (This directory might not exist for you; launch the game once to have BepInEx generate its folder structure)

While it's possible to place every .dll file in any place in BepInEx/plugins, it's strongly recommended that you have one folder per mod to make it significantly easier to manage updates and uninstallation.

Creating BepInEx plugins

A guide exists here for writing your first BepInEx plugin: https://docs.bepinex.dev/articles/dev_guide/plugin_tutorial/index.html

As reference here is a pre-made C# project for an example plugin that does two things:

  • Creates an in-game notification when you press F2
  • Changes all of the translatable strings in the game to "Chungus" on pressing F3

https://files.catbox.moe/6c48ls.zip

Loading changelog...

Stats for BepInEx for KSP 2

Downloads over time

Downloads per version

New followers per day

Top Referrers

  1. spacedock.info
  2. www.google.com
  3. github.com
  4. forum.kerbalspaceprogram.com
  5. steamcommunity.com
  6. com.google.android.googlequicksearchbox
  7. www.youtube.com
  8. www.reddit.com
  9. www.bing.com
  10. away.vk.com

Export Raw Stats

Export Downloads

Export Followers

Export Referrals

Raw stats are from the beginning of time until now. Each follower and download entry represents one hour of data. Uneventful hours are omitted.