Create

Create

86M Downloads

Unique redstone identifiers for trains

Chippit opened this issue ยท 3 comments

commented

Describe the Suggestion

Some fun, complex logistics networks should be possible if there was a simpler, more compact way to uniquely identify a train to redstone circuits. Currently, unique IDs could be achieved by positioning redstone contacts in unique positions, but for many combinations this would become unwieldy on the detection side (and probably not especially aesthetic on the trains).

Some potential ideas:

  • A redstone coupling with a placard on it produces a signal only if the contraption/train's coupling has a placard with a matching item.
  • A means to associate a redstone link signal with a train schedule. This would allow a train's signal to change if its schedule changes. Then this could be detected and retransmitted by a new kind of train signal, or perhaps by a redstone link attached to a train station.

Screenshots and Videos

No response

Additional Context

No response

commented

What's your use case exactly? While your idea sounds good, I don't see what "hole" it fills. This can't possibly be used for routing since tracks are static.

Are you worried the wrong train will be loaded/unloaded at the wrong station? You can add some kind of filter next to your item interface, or create an alternative shorter route so the item doesn't go through a wrong station.

Are your item interfaces at different locations depending on each train? Standardise it or add more (un)loaders at the station. If you're feeling creative, you may even create a gantry contraption that moves the interface until it finds items to (un)load.

And in addition to encoding the identity with redstone contacts, you can use a content observer with a specific item in the train's cargo.

commented

Thanks for your reply!

You are right that this is not about routing. The use cases I had in mind were more to be able to use a single loading station for multiple things. Consider the following use case, which is similar to what I had in mind:

A factory with a centralised distribution depot which holds all mass resources (this could be an arbitrarily large number of raw items). Trains deliver outputs of their factories here. The unloading is simple, because it just needs to take whatever's on the train, and use any manner of normal sorting logic to store it appropriately into the depot. However trains would also come here to collect inputs to other factories, when the factory's own stock of its input items starts running low.

Being able to load these incoming trains all at one station (or at least at a number of stations less than the number of total items in the depot, which could be 20 or more) is the convenience I was looking for. A train would arrive, identify what it wants to the depot, and then receive that item specifically out of the depot's storage. I made a proof of concept to do this using redstone contacts, but scaling it up for many numbers of unique items a train may request would've been extremely tedious, possibly requiring binary decoders to be able to support the number of items I would've liked the depot to be able to manage, and that would take up a lot of space.

The alternative in this case is to have a loading station for each resource, but this also doesn't scale neatly.

(Unrelated, but the idea of moving conveyor infrastructure with gantries had not occurred to me before, I will definitely think about how to use this in the future! It might lead to some fun and complex contraptions!)

commented

Thank you for your explanation, I didn't think of this use case.

The "expected" way to do this is probably to have one bay per item type, but I get how it can be hard to scale.

Another way you could do this is to make sure that trains are never completely emptied, so you can use a train observer to know which cargo should be loaded. This can be done at each unloading station, albeit with a little bit of tinkering to make the system reliable, or maybe you can have access to some kind of read-only inventory if you're playing with a modpack? I don't know if that would work TBH.

Nonetheless, having a way to add an item frequency to redstone contacts is a really good idea IMO. You could try to suggest it on the appropriate channel of the Create Discord too (this issue can probably stay open though).

(Just to be clear, I'm not in the Create team. I'm just trying to help them as much as I can and going through issues is what I've chosen to do ๐Ÿ˜„)