FactoryPlanner
FactoryPlanner copied to clipboard
Input-based calculation
This is the most-requested feature currently. People want to set an ingredient amount, and have the factory spit out how much they can produce with that. This is quite linked to byproduct recipes.
There are quite a few ways to do this, and all of them are quite invasive to the mod. I've come to realize this isn't just a side mode that can be enabled, it's basically wholly different, although in an interesting way: It's the (exact?) inverse of the current approach. Products become ingredients, byproducts become "by-ingredients" (patent pending).
This fact makes it potentially much easier to implement since there's not a wholly separate mode, but just the inverse of the current one. Still though, having the solver be generic enough that it can be flipped on its head will make the code quite a bit harder to understand. The UI will also have to be very adaptable for this, and might need some fundamental changes to make it make sense.
I think a fundamental requirement should be that a factory is either input- or output-based, never both and never (at least easily) toggle-able. Ideally, the underlying structures in the data backend would be generic, so no matter which mode is used, the same underlying variables store the data. Only a single flag determines how they are to be interpreted by solver and UI. I'm not sure if the approaches are quite that mirror-able, but it would be great if they were. Otherwise the complication would be through the roof.
Either way, there is a ton to work out, but this idea will need to be woven into the fabric of the solver rewrite from the start I feel. Maybe if the cognitive load of the rewrite and all that entails is too big, I won't consider it right away, but it would be less wasted work that way. We'll see.