Storage Capacity Override

v1.2.3
by Nimb

Dynamically change the capacity of any storage building from its inspector UI.

Stable 1 day ago The Unlicense Source code
Source code
https://github.com/CesarM-Git/StorageCapacityMOD
Tags
Quality of Life Cheat & Sandbox Tweaks Storage

Adds capacity override controls to every storage building inspector (unit, fluid, and loose). Click any storage to see +/- buttons and a custom capacity input. Changes persist across saves.

This mod adds a few simple UI buttons to change the capacity of storages on the fly at runtime. The values are saved on the modfolder in a .json with the name of the Game, so that it's unique per game (beware that multiple saves of the same Game will overwrite each other - that's by design).

No announcements yet.

v1.2.3

Latest
Game version
0.8.7 - 0.8.7
Released
Aug 20, 2026
File size
149.3 KB
License
The Unlicense
Save-game: Add · Remove
Loading forum…

Changelog - v1.2.3

Fixes

* Cut roughly 80 lines of startup log noise. The fluid-picker diagnostic used
to enumerate every one of the ~40 products in the storage picker AND every
product in the train station module picker, on every single load. It now
logs just the totals. The fluids this mod actually unlocks are still listed
individually, so nothing diagnostic is lost.

No gameplay changes. Log verbosity only.

----------------------------------------------------------------------

Changelog - v1.2.2

Compatibility

* Rebuilt for Captain of Industry 0.8.7. Two compile-time API removals had to
be fixed; behaviour is unchanged.
* TextField.NumericOnly() no longer exists. 0.8.7 split it into four explicit
variants — PositiveIntegersOnly, AllIntegersOnly, and positive/signed
decimal equivalents, all wrapping OnValidateInput(NumericInput.Is*Char).
The capacity input now uses PositiveIntegersOnly, which additionally
rejects a leading '-' that the old field would let you type.
* ProductType lost its == and != operators. Comparison is now an explicit
choice between Matches (honours the ANY / NON_MOLTEN wildcards) and
ExactlyMatches (raw type identity). The fluid train-station diagnostic uses
ExactlyMatches, which is what the old == did, so a universal wagon module
typed ANY or NON_MOLTEN is still not mistaken for a fluid module.
* Every game API this mod reaches by reflection was re-checked against the
0.8.7 assemblies and none of them moved or changed shape:
InspectorsManager.m_inspectorsImplTypes and the Dict<Type,Type> indexer /
Add / Remove used to swap the registered inspector,
StorageBase.ForceNewCapacityTo, ProductProto.IsStorable,
StorageProto.StorableProducts, and
TrainStationModuleProto.StorableProducts.
* The inspector chain the runtime subclass is emitted against is also
unchanged: StorageInspector is still non-sealed, still derives from
BaseStorageInspector<Storage>, and still takes the same 8 constructor
parameters in the same order, so the IL-emitted concrete inspector still
binds. BaseInspector.AddPanelRow is unchanged too.
* Storage.TryReplaceSelf still resets the buffer to the prototype default on
a successful replace, so the v1.2.1 move/upgrade fix is still needed and
still fires from the same event.
* min_game_version is now 0.8.7. This build no longer claims support for
older game versions as it wasn't verified for them.

----------------------------------------------------------------------

Changelog - v1.2.1

New Features

* Fluid unlock on train stations: the fluids unlocked by v1.2.0 now also appear
in the fluid train station module's product picker. Exhaust, Steam (super /
high / low / depleted), Core Fuel, Core Fuel (spent), Blanket Fuel, Blanket
Fuel (enriched), and Chilled Water can now be loaded and unloaded at fluid
train stations. Mod-added fluids that follow the same vanilla "cannotBeStored"
flag are picked up automatically.

Fixes

* Capacity is now preserved when a storage is moved or upgraded. Previously
the game's replace logic reset every storage's buffer back to its prototype
default whenever the building was relocated or its tier changed, wiping the
override. The mod now re-applies the saved value immediately after the
game's replace pass, so capacity survives both moves and tier upgrades.
Applies to unit, loose, fluid, and radioactive waste storages.

Notes

* No changes were needed for fluid wagons or train schedule filters — the
wagon picker already gates on a property that flips automatically when a
fluid is unlocked, so as long as Storage Capacity Override is installed the
entire fluid-train chain (wagon filter, schedule load/unload filters, depart
conditions) accepts the unlocked fluids.
* Locomotive refuel stations are intentionally unchanged: their allowed-fuel
list is curated explicitly at registration, so exhaust will not appear as a
locomotive fuel option.
* The move/upgrade fix re-applies the absolute capacity value (e.g. an
override of 50,000 stays at 50,000 after an upgrade), not a multiplier of
the new tier's default. If you want to scale up after upgrading, just adjust
the value in the inspector as usual.

----------------------------------------------------------------------

Changelog - v1.2.0

New Features

* Fluid unlock: vanilla fluids previously flagged "cannot be stored" can now be
selected in any Fluid Storage. This covers Steam (super / high / low /
depleted), Exhaust, Core Fuel, Core Fuel (spent), Blanket Fuel, Blanket Fuel
(enriched), and Chilled Water. Mod-added fluids that use the same vanilla
"cannotBeStored" flag are also unlocked automatically.

Fixes

* Gameplay++ Warehouse compatibility: the Warehouse now correctly displays all
4 product slots and the per-port mapping panel when Storage Capacity
Override is installed. Previously the extra panels were silently dropped.
* Gameplay++ Parking HQ compatibility: the Parking HQ now correctly displays
its full dashboard (parked count, allowed slider, truck types, fuel storage,
CP slots, zone priority) when Storage Capacity Override is installed.
Previously it fell back to a generic storage UI.

Notes

* The above two fixes apply to any future mod that uses Harmony postfixes on
the game's StorageInspector constructor, not just Gameplay++.

----------------------------------------------------------------------

Changelog - v1.1.1

Improvements

* The mod now also works for the "Radioactive Waste Storage" building.

----------------------------------------------------------------------

Changelog - v1.1.0

New Features

* Direct capacity input: a text field on the storage inspector lets you type
in the exact capacity you want instead of using only the +/- buttons.

Improvements

* Revised the mod's Initialize method for cleaner startup and more reliable
patching.

Fixes

* Corrected manifest.json version fields to use the proper min_game_version /
max_verified_game_version schema.
This mod depends on

This mod has no dependencies.

Mods that depend on this

No other mods depend on this mod yet.