I'd like to control which infinite research is currently being researched with the circuit network.
Implementation:
- for every infinite research, add a corresponding "recipe" signal to the circuit network.
- Add function "research availability" to the selector combinator. This function reads science pack signals on the input. The values are ignored, they just need to be greater than 0 to be considered. It outputs all research recipe signals possible with the given science packs. The output value of the recipe signals have 2 options: a) the level that would be researched if active b) the remaining amount of science packs for this research
- Allow biolabs to be connected to the circuit network. Give them the option to "set recipe". The given research recipe is being researched. If multiple recipes are given or multiple biolabs are connected and different recipes are given, signal precedence rules apply. If any biolab is in "set recipe" mode but no research recipe given, no research will be active. The option "read recipe" will output the recipe for the current research. The option "working state" will output an 1 for a custom signal if the biolab is currently performing research.
- trivial use case: Connect a biolab, provide a research recipe signal with a constant combinator. This research is being researched.
- Use case: Do research only if science packs are available. Feed the science pack inventory (for example by reading a roboport) to a selector combinator in "research availability" mode. Feed its output to a biolab in "set recipe" mode. The research will change to whatever there are enough science packs for. It's probably required for game engine reasons to not allow switching every tick. In this case, accept the next signal only every few seconds. Or make it a challenge: turn all science packs in a biolab into spoilage on research recipe change, so the player will try to change only if it's really useful. Or just pause research for 1 second after recipe change. If recipes are constantly being changed every few ticks, no research at all will be performed.
- Use case: research mining productivity until level 50: feed the corresponding science packs to a selector combinator in "research availability" mode. With a decider combinator, set condition mining productivity recipe 0 and <=51, output mining productivity=1. Feed the output of the decider combinator to a biolab in "set recipe" mode.
With the proposed game additions, it's possible to automate research switching what the player is currently doing manually:
- check what we got so far, then decide what to research next
- check if research stopped because some science pack is missing, then change to a research we have enough science packs for
- check if there are too much science packs buffered, then choose a research to consume them
- Sometimes we want to research until some given level
- Sometimes we want to increase every research in some kind of round-robin way to level them equally