CommonAPI

版本 v1.6.7·更新於 2025-10-01

A modding library for Dyson Sphere Program. Currently is under development.

模組介紹 作者原文

CommonAPI

A modding library for Dyson Sphere Program. Provides multiple features to make adding custom content to DSP easier.

List of features

  • Easily register new items, recipes and more using ProtoRegistry system
  • Create new buildings with custom behavior and custom UI using ComponentSystem
  • Register new recipe types. This allows to create new machine types without writing almost any code.
  • Register and use custom tabs.
  • Register new KeyBinds that players can rebind
  • Easily create new systems that exist in each Planet or Star. An example of such system is ComponentSystem
  • Picker Extension tool allows to extend behavior of Item and Recipe pickers. For example use any filter defined by a function.
  • Support translation for at least for English, Chinese and Franch by using String Protos

Full list of modules and other utilities can be found here.

More will come in the future. If want write your own module and add it to the list you can open a Pull Request. Contrubitions are welcome.

Installation

With Mod Manager

Simply open the mod manager (if you don't have it install it here), select CommonAPI by CommonAPI, then Download.

If prompted to download with dependencies, select Yes.

Then just click Start modded, and the game will run with the mod installed.

Manually

Install BepInEx from here

Install LDBTool from here

Install DSPModSave from here

Unzip folder patchers into Dyson Sphere Program/BepInEx/patchers/CommonAPI/ (Create folder named CommonAPI)

Unzip folder plugins into Dyson Sphere Program/BepInEx/plugins/CommonAPI. (Create folder named CommonAPI)

Feedback and Bug Report

Feel free to contact me via Discord (Kremnev8#3756) for any feedback, bug-reports or suggestions.

How develop mods using CommonAPI

All features are written as self-contained modules (Inspired by R2API). By default NO modules are loaded. To use a module at the top of your BepInEx plugin class add an attribute CommonAPISubmoduleDependency. That will ensure that specified modules are loaded. Make sure you don't ask to load modules that you are not using.

How to setup development environment

  • Download and install CommonAPI and its dependencies
  • Create development environment. You can find how to do that here
  • Add LDBTool, DSPModSave and CommonAPI assemblies to your references. You can use NuGet to get them. You can find them by typing DysonSphereProgram.Modding into nuget package search.
  • You also likely will need a Unity Project. You can find instructions on setting that up here

Usage Example

[BepInPlugin(GUID, NAME, VERSION)]

[BepInDependency(CommonAPIPlugin.GUID)]

[CommonAPISubmoduleDependency(nameof(ProtoRegistry), nameof(CustomDescSystem))]

public class MyPlugin: BaseUnityPlugin

{

public const string MODID = "myplugin";

public const string GUID = "org.myname.plugin." + MODID;

public const string NAME = "My Plugin";

void Awake()

{

//Make use of modules here

}

}

This library is still under development.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

xiaoye97-BepInExxiaoye97-LDBToolCommonAPI-DSPModSave

檔案與校驗

檔案名稱
CommonAPI-1.6.7.zip
檔案大小
3.4 MiB
SHA-256
296519c0d338f61b11262e559e0415c68f8482f422839754b118eb237a23f630
入庫時間
2026-10-06 19:26