Make source/target inventories of inserters writeable

Post Reply
Allaizn
Inserter
Inserter
Posts: 43
Joined: Sat Mar 03, 2018 12:07 pm
Contact:

Make source/target inventories of inserters writeable

Post by Allaizn » Wed Aug 01, 2018 11:39 pm

Currently, inserters always figure out by themselves which inventory they interact with, if multiple are possible.
The current behavoir allows us to manipulate this through build order. Consider the following setup:
im2.png
im2.png (652.29 KiB) Viewed 780 times
The car is positioned in such a way that all four inserters are able to interact with it, but two of them would prefer the beacons if they had the choice.
We can "trick" them into choosing the car anyway by placing the beacons after the car and after the inserters.
It's currently rather tedious to correct the link between inserters and inventories, especially on if you need to check multiple thousands. Note that this is only one example of many: similar interactions happen for belt vs car, assembler vs car, etc., too.

It would be nice if I could write some lua script that does that for me.
This is especially important since the new editor clone tool does not copy this link, which can again be at least fixed by a helper script/mod.

I'm not sure on whether or not any entity should be allowed, or only ones that are actually reachable, but I'd say either is fine, so please implement whatever is easier :)

Rseding91
Factorio Staff
Factorio Staff
Posts: 9038
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Make source/target inventories of inserters writeable

Post by Rseding91 » Sat Aug 11, 2018 7:04 am

If I find time I'll try to see if this can be implemented in a safe way.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2755
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Make source/target inventories of inserters writeable

Post by eradicator » Sun Aug 12, 2018 1:56 pm

This would also greatly help modding concepts that have multiple hidden entities overlapping each other (i.e. miniloader). The current behavior as far as i can tell is that inserters dynamically chose a new input inventory if the current one is empty for some time. Would be a great help if that dynamic changing of in/output could be disabled and replaced by script-set forced in/out inventories. (simply disabling the dynamic changing would already be pretty helpful. build-order is easy to manipulate for create_entity.)
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 385
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: Make source/target inventories of inserters writeable

Post by Therax » Wed Aug 15, 2018 8:25 pm

Duplicate / additional use case for my request here? viewtopic.php?f=28&t=61442
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

mulark
Inserter
Inserter
Posts: 46
Joined: Wed Oct 18, 2017 11:32 pm
Contact:

Re: Make source/target inventories of inserters writeable

Post by mulark » Thu Aug 16, 2018 3:10 am

Here's a bit of lua I made for copying 1 area (ie 1 blueprint + cars) as many times as specified. Basic usage is to start at y = 0 and go north for N tiles that your design will encompass. Supply N to the script. And then run the first command to copy everything except beacons. The second command copies all the beacons. I tried to make both commands in 1 "line" but even when beacons were placed second, it seems like they still were placed in the same tick, so the inserters did not link properly.

https://gist.github.com/mulark/bf2b8f63 ... 773ec2dd85

Post Reply

Return to “Implemented mod requests”

Who is online

Users browsing this forum: No registered users