doomeer / factorio

Factorio Planner
MIT License
137 stars 40 forks source link

Amount of assemblies already build #16

Open MxFlix opened 7 years ago

MxFlix commented 7 years ago

It would be wonderful if for shared resources, we could specify how many assembly machines/drills/etc. we already have for them. That way, when more of a certain resource is needed, the planner can easily say, "You need X more Assembly Machines producing Y"

For example: For the production of 1 Science Pack 1 per second, 3.81 electric iron drills are needed. To avoid overflow, I would usually build 4 drills, which I then would input into the planner. If I then later on want 2 SP1 per second, which needs 7.62 drills, the planner could have behind that number, for example, a "+3.62" (or maybe just "+4", to make it even simpler to read).

Is that even possible, or way too far fetched?

MxFlix commented 7 years ago

Nevermind, looks like this is already perfectly possible by using A-# and so on! =D

MxFlix commented 7 years ago

Sorry about reopening the issue again. The solution I thought I had found is unfortunately not working the way I expected, as inputting negative values into an item subtracts the value "necessary" resources as well, screwing the whole calculation up again.

doomeer commented 7 years ago

Interesting idea. If I understand correctly, you want incremental updates? Something like showing the difference, in shared resources, between a setup and another, larger setup?

I'm not sure how to integrate this well with the GUI though.

MxFlix commented 7 years ago

No, I think you misunderstood, but my explanation wasn't really all that good. Let me try again :)

Let's start with a completely empty slate. Let's say I want to produce 1 Science Pack 1 per minute. Now, the Planner tells me that I need: 10 Assembly Machine 1 producing SP1 3.5 Stone Furnaces producing Copper Plates 3.572 Burner Drills producing Copper 1 Assembly Machine 1 producing Iron Gear Wheels 7 Stone Furnaces producing Iron Plates 7.143 Burner Drills producing Iron

Now I'm gonna plop down the one burner drill I have at the beginning on some iron, and connect it to the Stone Furnace (let's leave coal out of the equation for now. Gotta open up a separate issue for that ;)) Now, my idea is that I could input the fact that I already have 1 Burner Drill producing Iron, and one Stone Furnace producing Iron Plates (which we'll assume are fed onto a shared hub or the like. After I input that into the planner, the display would change, now telling me that I need 10 Assembly Machine 1 producing SP1 3.5 Stone Furnaces producing Copper Plates 3.572 Burner Drills producing Copper 1 Assembly Machine 1 producing Iron Gear Wheels 6 Stone Furnaces producing Iron Plates 6.143 Burner Drills producing Iron

(Though technically it might make more sense in this case to round up on the front-end side, as I can't plop down .143 Burner Drills)

I hope this explanation made it clearer what I'm trying to say :)