Space Exploration LTN integration

by harag

Allows LTN to make deliveries through SE's space elevator

Content
1 year, 6 months ago
1.1
22.3K
Trains

b LTN does not assign space elevator as a stop during scheduling

1 year, 1 month ago

Hi,

We have a game of space exploration that is using the LTN integration mod. Everything was running fine when we last played on the 22nd of March. We loaded our game this evening, and trains that are assigned a schedule by LTN do not have the space elevator as a stop, which is causing the trains to fill with cargo at their provider station, then return to their depot, cancelling the request.

We have not updated any of the mods we were playing with since the save was made.

Save file linked (352MB) - https://drive.google.com/file/d/1Sm0J1hdQz6R0Nn0RHWrakfncoToYA2Ts.

To reproduce the bug, load the linked save file, and wait for a train to leave the LTN depot on Odquan. Within a few minutes, LTN will report a problem with red balls (I can't remember the real name, sorry), and the train will return to its depot. Ignore all of the errors about Nauvis not having enough plastic or heat shielding, or Sakiime being stinky, we are not very good at this game (sorry).

Any ideas?

Thanks!
Draxis.

1 year, 1 month ago
(updated 1 year, 1 month ago)

Hm, I enabled LTN's debug log but I see zero logs from se-ltn-glue (it recognizes that setting). This means se-ltn-glue no longer receives the LTN events necessary to do its schedule manipulations. Either LTN isn't sending them or the event subscription somehow got lost.

I tried removing se-ltn-glue from the savegame (which is safe to do) and then re-adding it but that didn't re-establish event processing. I'll have to investigate further what's going on here.

1 year, 1 month ago

This is very odd. LTN sends the required on_dispatcher_updated event but something about the LTN delivery data it contains causes Factorio to silently drop the event so it never is received by se-ltn-glue.

For debugging purposes I used a modified version of LTN that removes all deliveries from the event that aren't new. With that the event gets delivered again and se-ltn-glue works as expected. But that is not a proper fix as it breaks other mods that subscribe to the event and expect the full data.

1 year, 1 month ago
(updated 1 year, 1 month ago)

In the savegame you posted there is a [train=77338828] on surface "Jura" that is running in circles.
Just post that in chat (including the square brackets) and click the link to find it.

According to LTN the train is still on a LTN delivery but the schedule says otherwise.
That delivery also has invalid surface connection data which causes Factorio to drop the event discussed above.
The fastest way to fix things is to send that train to a depot so that LTN abandons that particular delivery.

The invalid surface connection must be the result of an elevator being deconstructed.
I think this requires more delivery cleanup code in LTN to avoid this scenario in the future.

1 year, 1 month ago

Yikes! We'll have a go at fixing that next time we play.

Thank you so much for finding the problem.

5 months ago
(updated 5 months ago)

For the record: I got the same issue (except I didn't demolish the elevator but unchecked the "LTN integration" checkbox in its UI)

I could solve it by disable LTN scheduling in the mod settings, sending every single LTN-train back home to its depot, then saving and reloading the game and enable scheduling again.

New response