Auto-Switch Techs


Reorder the research queue when one science pack runs out

Utilities
a month ago
2.0
2.96K

g Difficulties switching when low tech is missing

2 months ago

There's been a lot of moments when my factory runs rather lean on the lower sciences, meaning if I have enough science I immediately build more labs. I have steel prod (purple highest), plastic prod (gleba) and processing unit prod (fulgora) and bot speed (fulgora + yellow + space science) in the queue.
If chemical/blue science is missing, it doesn't switch from steel to processing unit, and I'll have to expand until purple is the bottleneck again – then, it seems it's more easily able to switch by switching to bot speed (away from purple) and from bot speed switch to processing unit prod (away from yellow).

This is at a 0.96 availability to switch, but it doesn't really matter – if low science is below threshold but high science isn't, and all high science need the same low science, it has difficulties switching and prioritizing, or switching away from the "secondary bottleneck".

2 months ago

Ok, I added a setting in the new version to use a different lower threshold when a science pack is needed for all the sciences in the queue. That should fix the issue with the set of techs you mentioned, since now red/green/blue science will use the lower threshold so it'll switch based on the higher sciences.

There's some cases where that still doesn't work, like if you put infinite health research (no blue science needed) in the queue, it'll go back to using the higher threshold for blue science. So even if you can't actually do the health research because Gleba science is missing, it still breaks switching between the other ones. Not sure how to fix that.

(Originally I was thinking the mod should do multiple passes, and if no tech has all sciences available, it should lower the threshold until one more science pack crosses it and then do another pass with the lower threshold, and repeat until it can switch to something. I don't think that would fix your issue though.)

2 months ago
(updated 2 months ago)

I think that can be fixed with my other idea, the custom science pack priorities (https://mods.factorio.com/mod/AutoSwitchTechs/discussion/686169917dbf6f0992d2a0d7, where I elaborated the idea with "lowest number, highest priority")

If you add it in a way where "highest number, highest priority" instead of lowest number, you could:
Divide priority by science pack availability, sum of all prio/availability would then be the overall priority. This would allow you to just set red, green, blue science to 0 priority, making the algorithm only consider purple, yellow, space and planetary sciences.

2 months ago

The "turn off mod until science pack X" could then also set the default for all scipacks before that scipack to 0, thus ignoring them in the switcher even after you get them, prioritizing only the packs after the scipack that switched on the mod.

New response