Project Cybersyn - Logistics Train Dispatcher


Creates a feature-rich train logistics network through cybernetic combinators. With just this mod you can coordinate the economic inputs and outputs of your entire megabase.

Content
3 days ago
1.1 - 2.0
25.5K
Logistics Trains Circuit network

i Remove of create_direct_to_station_order

6 months ago

I would like to have one stop request items for multiple individual train stops. This requires no temp steps being generated. I commented lines 281 and 283 from factorio-api.lua, but that generated errors each time a train arrives back at a depo. Commenting, line 165 from train-events.lua stops them, but Im sure multiple features are broken. Is there any chance that this could become a feature?

6 months ago
(updated 6 months ago)

I think I got it, and I think it maintains all features.

factorio-api.lua function set_manifest_schedule

Remove/Comment the "create_direct_to_station-order" that are in the file. I think there were like 5. One of them might not have been needed to be removed I didnt think about it too much.

train-events.lua function on-train-changed
add a depot check to the bit that leads to the on_train_arrives_depot "if stop and stop.valid and stop.name == "train-stop" and map_data.depots[stop.unit_number] then"

Remove all bits referencing "Rail"

main.lua function se_add_direct_to_station_order

Remove the direct to station order so this basically does nothing.

I know this will never be used by anyone other than me, but yeah.

5 months ago
(updated 5 months ago)

Far from the truth. I needed this as well. Thanks alot for the great guide!

I think it would be nice to have this as an option to toggle. Making this feature toggleable is a little bit harder than the guide provided. The main reason is the way how "create_direct_to_station_order" is called in "set_manifest_schedule".

A few clarifcations for the guide above:

"factorio-api.lua":

  • the function is called "create_direct_to_station_order" (instead of "create_direct_to_station-order")

  • in "add_refueler_schedule", "create_direct_to_station_order" is added to the schedule. Here the increment of "i" needs to be prevented
    Hence, remove "table_insert(schedule.records, i, create_direct_to_station_order(stop))" as well as the one "i = i + 1" in the next line.

"train-events.lua":

  • the function is called "on_train_changed" (instead of "on-train-changed")
  • in "on_train_changed" the variable is called "rail" (instead of "Rail"). All checks against this variable needs to be removed. (hence, the check against "connected_rail", "if rail" and so)

New response