Rail Logistics Dispatcher

by Viidi

Adds a dispatcher (building) to automate railway logistics based on provide and request stations. Has intuitive interface. Was inspired by LTN but went a different way.

Content
a month ago
1.1 - 2.0
4.37K
Logistics Trains

g Frame Drops

2 months ago

Hey,
i use this mod in my latest savegame and it works great, thank you.

My issue is, that the game starts to "freeze" every few seconds for the fracture of a second. The save is in midgame, about 90 train stops with 28 train depots build. Ive done some testing with the installed mods (not many) and narrowed it down to this. When i deactivate it, savegame runs perfectly smooth.

Anything you (or i) can do about this? The stuttering is really bugging.

Savegame, if needed:

https://drive.google.com/file/d/1cbt1e8oL8huMc1ENkd7K3v6-5GVw6aHZ/view?usp=drive_link

2 months ago

Hi. Thank you for your appreciation of my work.

One of the known reasons (and so far the only known one) for periodic freezes is a hack that allows you to save train interruptions. If you don't need them, turn off this hack in the mod settings - it should help.

2 months ago

Hey,

thank you very much, deactivating "save interrupts" works. No more stuttering/freezes! Nice!

2 months ago

Hi. Thank you for your appreciation of my work.

One of the known reasons (and so far the only known one) for periodic freezes is a hack that allows you to save train interruptions. If you don't need them, turn off this hack in the mod settings - it should help.

What are the downsides of disabling that option? Could you explain why it exists? What happens if I disable it to reduce frame drops? Will my trains still operate correctly? If I reboot the server, will my trains continue running smoothly? I'd like to understand how disabling it might impact my trains.

Thanks! :)

2 months ago

Hi. Thank you for your appreciation of my work.

One of the known reasons (and so far the only known one) for periodic freezes is a hack that allows you to save train interruptions. If you don't need them, turn off this hack in the mod settings - it should help.

What are the downsides of disabling that option? Could you explain why it exists? What happens if I disable it to reduce frame drops? Will my trains still operate correctly? If I reboot the server, will my trains continue running smoothly? I'd like to understand how disabling it might impact my trains.

Thanks! :)

When a delivery is created, the mod selects a train and changes its schedule. A specially designed API is used for this. However, this API has a flaw - interrupts (new in 2.0) configured for the train are deleted. Nothing can be done about this at the moment. But it turned out that interrupts can be changed in a blueprint. So I made a hack that creates a locomotive blueprint, changes it, saving the schedule, then places this locomotive on a hidden surface and copies the settings. This allows you to save interrupts. But creating a blueprint, as it turned out later, causes freezes. Therefore, this hack can be turned off, then the standard API will be used, but interrupts will be deleted during delivery. Upon returning to the depot, interrupts can be restored, because the train is placed in a group (also new in 2.0).
We are waiting for the standard API to stop deleting interrupts.

If you have set up interrupts so that the train goes to the refueling station on interruption, this may not work as expected because interrupts will be removed during delivery.

2 months ago
(updated 2 months ago)

Thanks for taking the time to explain; I understand it now. So, with "Save Interrupt" unchecked, this means the train can only refuel when it arrives at the depot. If that's the only downside (for me, since I only have one interrupt), I can live with it, it’s not a big deal.

That said, an updated API would be nice. Do you know if it's in their plans? Or is asking for such a feature in the API considered more of a "dream" request?

If you have some extra time, could you also explain why a train needs to leave the group when it goes for a delivery?

2 months ago

If you have some extra time, could you also explain why a train needs to leave the group when it goes for a delivery?

The reason is the same - there is no API to just add temporary stations to schedule. You can only set the entire schedule. If I set a schedule for a train in a group, then all trains in this group will receive this schedule. And all trains will go to the same delivery :)

Perhaps a suitable API will appear someday. I have supported a request for improvement on the forum for quite some time. But they do not report to me. Some things are done almost immediately, some are ignored.

2 months ago
(updated 2 months ago)

Thanks for your time and for all these replies! :)

New response