How does pentapod egg production spoilage work exactly?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
SIGILL
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Jun 20, 2018 1:42 pm
Contact:

How does pentapod egg production spoilage work exactly?

Post by SIGILL »

I've put quite some effort into finding an answer to this particular question because multiple related posts exist, but they were about bugs that are said to be fixed by now. Apologies if this still is some duplicate post.

I have a pentapod egg biochamber that refreshes a pentapod egg on a timer so I can produce pentapod eggs on demand. It is fed nutrients by a different part of the factory instead of a dedicated setup, so the amount, freshness and timing of nutrient supply is not totally consistent but nutrients are always supplied on time,fresh enough for this purpose and in large enough quantities. Yet seemingly randomly the biochamber (1 in 20+ times) produces no output. I think I've figured out why, but that makes me wonder how spoilage works for a recipe that is still (paused) in production.

What I think is happening: after the refresh the the biochamber starts production of the recipe again with residual nutrients left on the belt, but the fuel isn't enough to complete it. Production is now paused until the next refresh triggers. This paused state causes the egg to spoil faster or to otherwise invalidate the production.

These tests in sandbox mode seem to confirm that suspicion:

Test initialization (both tests)
  1. Have a biochamber run the recipe once to get 2 eggs with the same spoiling timer.
  2. Re-insert one of those eggs, keep the other as control-egg.
  3. 'Spawn' nutrients from bioflux, insert 30 into ingredients and 1 into fuel to start production. Keep remaining nutrients as control-nutrients. Because there is not enough fuel, production will now become paused.
Test 1
  1. After 5 minutes the nutrients will spoil. The control-nutrients can be used to check this. Although not really needed, to be completely sure we could wait another minute for good measure.
  2. Insert new nutrients into fuel to resume and finish production.
  3. Observe an output of 2 eggs.
So it seems the production does not fail because of in-production nutrients spoiling. In additional tests this succeeded when waiting more than 6 minutes too.

Test 2
  1. After 14 minutes and 30 seconds the egg has 30 seconds left on the spoiling timer. The control-egg can be used to check this.
  2. Insert new nutrients into fuel to resume and finish production.
  3. Observe a lack of output while the control-egg still has some seconds remaining.
This seems to imply the egg's spoiling timer works differently when the egg is in-production (but the nutrients don't spoil or spoil slower)? How does this recipe and the spoiling work exactly? I couldn't find any relevant information other than that you can 't indefinitely keep an egg fresh by pausing production.
Amarula
Filter Inserter
Filter Inserter
Posts: 624
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: How does pentapod egg production spoilage work exactly?

Post by Amarula »

Interesting! I have not tried this so I don't have answers but I do have more questions.

What happens if you leave the craft starved of nutrients for fuel for the full 15 minutes? Does the egg spoil into a baby pentapod?

What happens if you cancel the crafting by changing the recipe in the biochamber? I would expect that you would get back the egg and nutrients, as that is how cancelling usually works. Does this happen? If so, can you compare the egg and the nutrients with the control batch? If it is past 5 minutes, do the nutrients come back as spoil? As you said, I would expect the egg to be equally spoiled as the control egg, but is that confirmed? If you cancel at different intervals, does the egg deteriorate at the same rate as the control egg?
My own personal Factorio super-power - running out of power.
jdrexler75
Fast Inserter
Fast Inserter
Posts: 132
Joined: Sat Nov 28, 2020 5:27 pm
Contact:

Re: How does pentapod egg production spoilage work exactly?

Post by jdrexler75 »

As an aside, initially it was possible to "preserve" the eggs forever by starting a craft and then disabling the biochamber, and it would produce perfectly fresh eggs when it resumed. But unfortunately that got fixed eventually... My first low-throughput Gleba base was built around this and after the bugfix I suddenly had a lot of mad pentapods to deal with.

As far as I have observed, canceling the craft yields no eggs (or nutrients either) after a time.

I don't think this is really a special thing for the eggs, except that they have no spoilage. For other, normally spoiling ingredients if the craft takes too long, I think you just get spoilage out, when the craft eventually finishes or you cancel it.

I haven't paid attention to the internal spoilage rate being different, but at least you could handwave it with the fact that breeding new eggs evidently speeds up their lifecycle a lot.

In the end, I found the best solution to be just continually breeding fresh eggs, albeit inserting them more slowly when there is little demand.
Tertius
Smart Inserter
Smart Inserter
Posts: 1365
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: How does pentapod egg production spoilage work exactly?

Post by Tertius »

As far as I know, it is by design the recipe will not produce an output if the output would spoil before actually being output.
However the observed behavior is different, because it sometimes outputs something if it should output nothing and output nothing if it should output something.

If it comes to the pentapod egg:
- an output is produced if the nutrient part of the ingredients spoiled mid-crafting but not the pentapod egg ingredient
- an exception of the above is if the pentapod egg was not 100% fresh at the time of starting the craft. No output is produced even if the pentapod egg was not yet spoiled. (this is what you observed, and I'm able to reproduce)
- if a completely fresh pentapod egg is inserted, an output is produced up to the last second of the egg lifetime
- if a 1 minute old pentapod egg is inserted an output is produced if the egg has 02:05 remaining at the time nutrients are supplied again
- if a 1 minute old pentapod egg is inserted no output is produced if the egg has 01:58 remaining at the time nutrients are supplied again
This 1 minute was chosen arbitrarily.
Next test was to insert a 50.1% fresh egg and a 49.9% fresh egg. An output is always produced after the remaining time is less than 49%. (I suspected the remaining time must be higher than the elapsed time, but it turned out this is not the case).
So whatever it is, we didn't yet find out what exactly defines getting an output or not.

My approach of keeping 1 egg alive is by waiting until an egg almost spoils, then do crafting a new egg from it before it finally spoils. Works 100%.
  • start a timer, count the ticks
  • at start, the biochamber has 1 fresh pentapod egg as ingredient in the input slot and no nutrients
  • while the timer is over 36000 (10 minutes), nutrients are being inserted slowly into the biochamber, so egg production will eventually start, run, and not stop mid-crafting
  • if egg production finished, a signal on "recipe finished" is pulsed by the biochamber and the timer is reset
  • 1 of the just crafted eggs is reinserted into the biochamber, the other(s) discarded.
  • nutrient supply is stopped, because the timer is below 36000
  • a new craft isn't started immediately, because nutrients were inserted so slowly that not enough were accumulated to start a new craft with the reinserted egg
  • same situation as at start: the loop starts again. Pending nutrients will spoil away, so the biochamber is empty again except for the egg when the timer again reaches 36000
The "provide nutrients slowly" part is provided by an assembling machine with the "nutrients from spoilage" recipe. This way the egg is kept alive even in the case of global nutrient production issues. The assembling machine is set to activate if timer > 36000.
h.q.droid
Fast Inserter
Fast Inserter
Posts: 128
Joined: Mon Nov 18, 2024 12:10 pm
Contact:

Re: How does pentapod egg production spoilage work exactly?

Post by h.q.droid »

I once paused a pair of legendary fish mid-breeding for days. I ended up with legendary spoilage produced instead of fish. So I think there is a dedicated timer for output spoilage in addition to input.

I think it's you somehow triggering the output spoilage timer. Did you use a fresh biochamber for the tests? Were there leftover productivity progress? It could be the previous output spoiling before the new batch of input eggs.
Post Reply

Return to “Gameplay Help”