I am happy to leave an idea for this.
In basic sense, you would need the circuit network to have the same capabilities as the user interface.
So, you must:
- specify which wagon (since you cannot connect to a train, only to a stop and send to the train)
- specify which stop
- specify which resource to get and how many of it
- specify which resource to drop (dropping doesnt use amount iirc)
So, with that, you can send circuit data like this:
https://i.imgur.com/7T5bFoX.png
You need 2 new signals, one for which wagon (1-based indexing) on the train you want to set the logistic data for
and one for which stop on the schedule (also 1-based indexing) for the train at which it should drop/request the resources
(in the image, I used the wagon and stop signals, but you should really make new ones for it)
Optionally, you could also use a relative-stop-signal, taking the "current" stop of the train's schedule and adding/subtracting the value of the relative-stop-signal to get the stop the logistic information would be used for
I am not sure if changing the data for the station, the train is currently at, will do any good, but if it would, that should also definitely be an option
Other than that, requesting/providing resources is pretty simple, you pick the resource you would like and use a positive amount for requests and a negative amount for provision (again, either the amount for providing the resource doesnt matter, or I dont really know all the things about this mod. so a value of -1 would probably be sufficient)
Pulsing these to the station with the option "send to train" enabled should change the requests on the wagons
For clearing the requests/provision, perhaps a special signal could be used too
in the case of that signal being present and resource signals, it should clear and then add those resources to the list
I suppose this would make for a fine addition to the mod... and also something I could use really well for a train logistic system I am trying to pull together
Perhaps I could help in implementing the feature into the mod.