DSPPowerPriority

版本 v1.0.0·更新於 2026-09-14

Configurable priority buckets for DSP power generation and energy exchanger discharge, with optional limits on exchanger charging sources.

模組介紹 作者原文

DSP Power Priority

Adds configurable priority dispatch to Dyson Sphere Program power networks.

Instead of all generators sharing load equally, each general source type is assigned to a priority bucket. Lower-numbered buckets are used first. Sources with the same priority share load proportionally, preserving DSP's normal behaviour within that bucket.

Designed for DSP 0.10.34.x and BepInEx 5.4.17.

Default priorities

| Source | Default priority |

| --- | ---: |

| Wind, solar, ray receivers and geothermal | 1 |

| Energy exchangers while discharging | 2 |

| Mini fusion plants, artificial stars and thermal plants burning configured high-grade fuel | 3 |

| Ordinary thermal generation | 4 |

With the defaults, renewable/non-fuel generation is used first, then accumulator discharge through energy exchangers, then high-grade fuel generation, and ordinary thermal generation last.

Priority numbers do not need to be consecutive. Equal numbers mean equal priority.

For example, setting both EnergyExchangers and HighGradeFuelGeneration to 2 causes them to share the same priority bucket and split the required load proportionally.

Configuration

The config file is generated at:

BepInEx/config/lee.dsp.powerpriority.cfg

Priorities

[Priorities]

NonFuelGeneration = 1

EnergyExchangers = 2

HighGradeFuelGeneration = 3

LowGradeThermalGeneration = 4

  • NonFuelGeneration - Wind turbines, solar panels, ray receivers and geothermal plants.
  • EnergyExchangers - Energy exchangers while discharging charged accumulators.
  • HighGradeFuelGeneration - Mini fusion plants, artificial stars and thermal plants burning a configured high-grade fuel.
  • LowGradeThermalGeneration - Other thermal power plant fuels such as coal, energetic graphite, oil and hydrogen.

Values below 1 are treated as priority 1.

High-grade thermal fuels

[Classification]

HighGradeThermalFuelIds = 1801

A comma-separated list of item IDs which cause an ordinary thermal power plant to use the HighGradeFuelGeneration priority instead of LowGradeThermalGeneration.

The default, 1801, is the vanilla Hydrogen Fuel Rod.

This also allows modded fuels to be classified without changing the mod code.

Energy exchanger charging

[EnergyExchanger]

ChargingMaxSourcePriority = 0

Controls which priority buckets may be brought online solely to charge energy exchangers.

  • 0 - Unrestricted. Matches vanilla charging behaviour and is the default.
  • Positive value - Only source priorities up to and including this number may provide the additional generation needed for exchanger charging.

For example, with the default priorities:

ChargingMaxSourcePriority = 3

allows exchanger charging to use non-fuel generation and high-grade fuel generation, but prevents priority-4 ordinary thermal generation from being started solely to charge accumulators.

This setting does not stop lower-priority generators from serving normal factory demand.

How dispatch works

Suppose a network has:

  • Priority 1 capacity: 600 MW
  • Priority 2 capacity: 800 MW
  • Priority 3 capacity: 2 GW
  • Demand: 1 GW

The result is:

  • Priority 1: 100%
  • Priority 2: 50%
  • Priority 3: 0%

Every supplier within the partially used bucket shares that bucket's load proportionally.

Performance

The mod does not replace PowerSystem.GameTick.

It leaves DSP's generator capacity calculation, fuel consumption, ray receiver behaviour, accumulator logic, statistics, animations and other power-system processing intact, and changes only the dispatch ratios used for power suppliers.

The current implementation performs one lightweight additional scan of the generators and energy exchangers in each active power network. It does not repeat DSP's EnergyCap_* calculations, uses no LINQ in the simulation path, and does not allocate per tick.

Compatibility

Built against Dyson Sphere Program 0.10.34.x.

The Harmony transpiler validates the expected power-system dispatch structure before applying its changes. If a future DSP update changes that structure, the mod

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

xiaoye97-BepInEx

檔案與校驗

檔案名稱
DSPPowerPriority-1.0.0.zip
檔案大小
14.0 KiB