[0.17.11] Cloning combinators doesn't preserve signals "in flight"

Things that we don't consider worth fixing at this moment.
Post Reply
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Wed Oct 18, 2017 11:32 pm

[0.17.11] Cloning combinators doesn't preserve signals "in flight"

Post by mulark »

When cloning a set of combinators, for example a memory cell, the signals stored by/on the wires of the combinator are not cloned.

The most simple example of this is an arithmetic combinator feeding back into itself, A+1 output A, the cloned combinator will begin the count at 0, not the value the original had.

Factorio Staff
Factorio Staff
Posts: 12231
Joined: Wed Jun 11, 2014 5:23 am

Re: [0.17.11] Cloning combinators doesn't preserve signals "in flight"

Post by Rseding91 »

Thanks for the report however I don't consider this worth changing. The clone logic doesn't preserve this kind of data on almost anything. The data isn't actually on the entity but on the logistic network itself which is not cloned/cloneable.
If you want to get ahold of me I'm almost always on Discord.

Fast Inserter
Fast Inserter
Posts: 120
Joined: Wed Aug 23, 2017 10:17 pm

Re: [0.17.11] Cloning combinators doesn't preserve signals "in flight"

Post by SuicideJunkie »

This does come up in game for Space Exploration mod.
Whenever a ship is launched and the contents are cloned to the travel surface, all of our combinator computers get rebooted.

When power is cut, combinators retain their outputs.
Even when not connected to any network, the powered-down combinator remembers.
It is this internal combinator state that is failing to get cloned.

PS: The combinators taking a tick to power up is important here; when pausing and replacing all the wires without the electical blip, the data is lost.
It seems like we need to refresh the tally of outputs in the network when the wires change.

For example: I've fed a math combinator with some starter values, and then removed the power. It remembers its outputs many ticks later:
combinator_retention.png (583.38 KiB) Viewed 462 times
I then delete all logic networks from the map.
null_network.png (200.39 KiB) Viewed 462 times
Restoring power and adding a brand new logic network to feed back, which currently has no signal tally in it.
null_network2.png (155.12 KiB) Viewed 462 times
And it just works. Signal values from the combinator state itself.
null_network3.png (165.26 KiB) Viewed 462 times
It looks to me like the network is holding a cache with the sum of combinator outputs, used for display purposes and speeding up logic calculations, but that cache needs to be refreshed at the beginning of the tick if there are any changes, and the combinators are where the true source of the data is.

As a fancier logic test, a fibbonachi sequencer was able to operate successfully after powerdown, complete wire replacement, and resume.

Post Reply

Return to “Won't fix.”