[Mod Request] Proxy-Container Based Wagon Scanner

This is the place to request new mods or give ideas about what could be done.
vitharr
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Mar 08, 2024 3:41 am
Contact:

[Mod Request] Proxy-Container Based Wagon Scanner

Post by vitharr »

I've been on the hunt for more implementations of proxy-container based inventory connections, and one place I think it would excel at is presenting per wagon inventories to train stations. The idea would something along one of these two ideas based on some of the sources I've been trying to parse for potential, https://mods.factorio.com/mod/inventory-selector and https://mods.factorio.com/mod/lab-control-behavior:

Detector Rail Implementation
  • Connects to a parked rolling stock above it, a connection point for circuits, the mirrored inventory is sent via circuit connections from there similar to lab control. This would allow for additional use in the wagon-as-chest implementations of some UPS optimized builds, enabling extremely efficient inventory output to inserter/combinators for controlling swing times
Selector Combinator Implementation
  • A new combinator sharing a likeness with the selector combinator, with an index that declares which rolling stock for it to connect to, the output being the proxy-container linked to that indexed stock. Connecting this to a train station would then leverage the train-states to determine the train incoming and connect the proxy to the declared index of rolling stock in prep for its arrival. A bonus functionality would be the ability to pass the index along via other circuit connections and redirect the proxy container link to another wagon
Osmo
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: [Mod Request] Proxy-Container Based Wagon Scanner

Post by Osmo »

I don't think this would work as there is no way to change how the station reads items from the train without physically removing items ordisconnecting the wagons from the train. One could however make a separate entity for reading the contents of a specific wagon.
vitharr
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Mar 08, 2024 3:41 am
Contact:

Re: [Mod Request] Proxy-Container Based Wagon Scanner

Post by vitharr »

The station connection via circuit is more a 'feel good' type of interface for selecting which station to track to point the wagon index at, it could very well be just a ui link that gave you a list of all stations to pick from, or the aura type interface similar to how cybersyn does their combinator access to stations, what would be doing the 'reading' is the proxy-container entity camouflaged as a combinator. From the testing I've managed to hack together, the proxy-container operates like a symbolic link to whatever inventory its pointed at, reflecting realtime changes to the inventory (and in the case of quezler's other mod, cargo bay inserters, allowing direct access to the inventory as well), so it's not retrieving inventory data from the station via its read cargo or the like, it's just there to point the proxy-container at the appropriate cargo wagon. On the whole I believe a detector rail implementation which is just ambiguously connecting to whatever entity is above it would be 'better', but the idea of making the scanning halt until something is actually there via the train states is there to be more performant. Comparing proxy-container reading of inventories to something like Inventory Scanner, the performance gain is almost an order of magnitude when using non-lua scripted proxy-container type 'scanners', and their data isn't delayed by ticks

I wish I knew more about how to actually implement it, but I'm pretty confident it would be faster to ask those who know what they're doing than trust I could eventually teach myself how to get there, but I'll keep trying to dig away at it
Post Reply

Return to “Ideas and Requests For Mods”