[1.1.77] Loader electric energy buffer looks bugged - wrong buffer size, double buffering

This subforum contains all the issues which we already resolved.
Post Reply
Honktown
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Thu Oct 03, 2019 7:10 am
Contact:

[1.1.77] Loader electric energy buffer looks bugged - wrong buffer size, double buffering

Post by Honktown »

Some observations: The buffer fills twice for loader energy usage. Specified buffer_capacity is ignored and is set to a small value? (15kJ -ish per lane? something * energy_per_item per lane?)

data-final-fixes:

Code: Select all

local es = {
	type = "electric",
	usage_priority = "primary-input",
--	drain = "0W",
	buffer_capacity = "1MJ",
	input_flow_limit = "10kW",
}
for _, loaders in pairs({data.raw["loader"], data.raw["loader-1x1"]}) do
	for name, prototype in pairs(loaders) do
		prototype.energy_per_item = "13kJ"
		prototype.energy_source = table.deepcopy(es)
	end
end
Mod:
loader_electric_0.0.1.zip
(927 Bytes) Downloaded 47 times
Save:
loader_electric_buffer.zip
(448.17 KiB) Downloaded 47 times

Result: rapid charge, filling twice. The usage is as expected: very slow for an input of 10kW and usage of 13kJ per item. The buffer in the Prototype Explorer, and via

/c game.print(game.player.selected.prototype.electric_energy_source_prototype.buffer_capacity)

is 1MJ. The loader is clearly not that, though. Energy at full charge: /c game.print(game.player.selected.energy) is 13866.6 repeating, or only 1/60th above 13 kJ (1 + 1/60)

The double-buffer filling *looks* like both lanes: two items get transferred at "full" charge, but the items *don't* need to be on opposite sides, so it seems like half-lane power usage wasn't fully implemented or is bugged?
Last edited by Honktown on Sat Mar 04, 2023 7:58 am, edited 2 times in total.
I have mods! I guess!
Link

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2253
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.77] Loader electric energy buffer looks bugged - wrong buffer size, double buffering

Post by boskid »

Thanks for the report. Loader will increase the buffer size to at least ElectricEnergySourcePrototype::buffer_capacity starting from 1.1.78.

Post Reply

Return to “Resolved Problems and Bugs”