Your "for some strange reason" here
Chem plant not running recipe #2
Chem plant not running recipe #2
This is why I say that.
Because it happens when the second recipe -should- execute.
It knows it -can-
Thats why it changes to working
And that's why I'm ~~saying ~~suggesting the internal recipe list are backwards.
Because it SHOULD pick the second recipe, but it instead picks the first.
However the first one isn't started yet, sot he green bar showing 100% utilization
hasn't been reset for the new recipe yet
then it hangs because it has picked a recipe but not finished it
then once the buffer has 15 space available
it starts
seems like a bug to me
When I said it made sense I didn't mean to imply it was working as intended, only that it made sense why it does it.
My latest video masks the UI bug, but perhaps it does an even better job at revealing the internal issue
but if the internal issue is fixed, the UI bug becomes moot
here is the issue in another view, I selected the recipes i the other order -- reveals another perspective
The recipe showing 100% progress and the machine switching to State.Working exactly when the second recipe would have enough output buffer to and should run, but will not because the first recipe should still be locking the machine into "Output is full" until it outputs its full 15 into the buffer.
That is what leads me to believe the recipes are being confused in some way.
So it's like the first recipe runs, but can't output to the internal buffer, so it locks the machine from running another recipe until it can. The code continues to check repeatedly for the next recipe that allows the machine to go into State.Working (likely) without considering the state of the output buffers. At some point it decides that the second recipe -can- execute, and when it tries to execute it, it cannot, because the machine is still locked to the first recipe.
However this failure seems to occur AFTER it sets the machine's state to State.Working, but before it actually selects the second recipe, which is why it briefly shows State.Working and 100% completion on the first recipe.
If I had to gamble, I would say TryGetNewWork method's prioritization of the first State.Working recipe without considered output constraints, combined with m_recipeResult locking the machine causes the foundational issue.
The only way I see this getting fixed would be to make the recipes
be able to partially output products & not have to do that in entire batches of the recipe result,
but that's likely to degrade the simulation performance of/for all machines.
eryk500 [discord] wrote:
The only way I see this getting fixed would be to make the recipes
Why is this the only way? It works as intended for the Ethanol/Fuel Gas recipes.
Just discovered that this issue exists on the Electric Boiler as well. I set the priorities as per the picture, expecting that the 2nd recipe would be run when the steam exited slowly (<12/60). However, what happens is that it enters the same buggy state as the Chemical Plant, where the main status says 'working', the first recipe's progress bar is marked green, but in fact it doesn't do anything until enough steam has exited to allow the first recipe to actually run.

This leads to jerky power demand (intermittent 9 MW instead of continuous 4.5 MW).
It's also consuming 4.5 MW of power and full maintenance whilst faux-working


