Make ElectricEnergySource.buffer_capacity Work on Assembling Machines

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Dweaver
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Aug 28, 2026 8:43 pm
Contact:

Make ElectricEnergySource.buffer_capacity Work on Assembling Machines

Post by Dweaver »

Currently, setting energy_source.buffer_capacity on a CraftingMachinePrototype does absolutely nothing. I ask that it instead do what it normally does in any other context.

This is relevant, for example, on the Cyclotron from the mod Ultracube (https://mods.factorio.com/mod/Ultracube). The design of this building is: it consumes 120MW while crafting, from an internal battery of 240MJ, which charges at 3MW. Thus, it cannot run continuously; it produces its items in a quick burst, and then must be left alone to recharge. In order to implement this behavior, because the single parameter energy_source.buffer_capacity does not work as advertised, an entire separate ElectricEnergyInterfacePrototype must be added, alongside a small spiderweb of control scripting to hook the two entities together. This seems, to me, awfully inelegant.

According to a discussion with Bilka on discord, the reason for this behavior is modules. Because the energy consumption of crafting machines can change, they must dynamically change their internal buffer capacity, so that, as they're typically used, they neither wastefully store more energy than they need, nor unintentionally starve themselves. Fusion generators also do this (I think). Loaders also calculate their buffer size dynamically, and use their calculated buffer size if it is larger than what is set in the prototype (105438). I think it would make sense if crafting machines worked similarly to loaders, if that's possible.
Post Reply

Return to “Modding interface requests”