Train Network for Players

by leeh

QoL and advanced functionality for players using trains for transport, including improved destination selection dialog and automated train calling.

Content
2 years ago
0.17 - 1.1
7.44K
Transportation

g Rail tool builds temp stop at the wrong side of tracks

4 years ago

Since one of the latest updates rail tool builds temp stop at the wrong side of tracks, ignoring one-way direction. How do I specify the correct side?

4 years ago
(updated 4 years ago)

Interesting. My natural suspicion is there's probably something happening with event ordering on a busy train network, as it relies heavily on events as for temporary stations the mod places stops in both directions (north and south or east and west), adds the north/east stop to the schedule and then tries to force a state change on the train. (I couldn't work out a better way tbh).

What should happen is either the train gets one of the "on the path" events (and therefore the north/east stop is valid and the south/west stop can be deleted), or the train gets one of the "no path" events, at which point it assumes its picked the wrong direction on a unidirectional track -- so it deletes the north/east stop, amends the trains schedule to the south/west stop and tries again. If its removed one of the two train stops, then its decided one of these two events has happened.

Some more info would be useful please, note by direction I mean the direction the train needs to be facing to arrive at the stop -- so an 'east' stop needs a train travelling right to left.

  • Whether you're seeing this particularly in a north/east direction, a south/west direction, or an even mix of both. Basically I'm looking to see whether its decided it couldn't path when it actually could, it decided it could path when it can't, or a mix.

  • Is this single player or multiplayer, is the train network one directional, bidirectional or a mix and a rough number of trains, to the nearest 100 or so (to get an idea of the number of train state events).

Other things that would be potentially useful is whether you know if the train being dispatched is more generally parked or already moving and whether you're seeing this more often closer to junctions than on clear stretches of straight rails.

I've had a play and can't find anything obvious, so I think it's likely to need some scale. If you have a consistent reproduction a save file would be easiest if you don't mind, otherwise I'll see what I can do with some of my older playthroughs, and look at adding some logging to a debug build to work out whats going on.

4 years ago

I've been having a play around and I've found a couple of edge cases that aren't handled correctly -- for example if a train being dispatched is held at a signal when it tries to depart, though it still seems to select the correct orientation so I'm not sure whether the issues I've found are related.

I've prepared a debug 0.9.3 release for you which is 0.9.2 plus a chunk of debugging, if you could run with that for a bit it'd be a massive help: https://drive.google.com/open?id=1Nw94HjmnOmqWmNJUj2IvK70UufQZy8CB -- once loaded, run the command /tnp-toggle-debug and it'll start logging some information around state changes etc to factorio-current.log.

Once debuggings enabled and you see a situation where it gets confused around temporary stop orientation etc, run /tnp-toggle-debug again to disable debug logging (so the broken dispatch is the last one in the log) and then if you could send the factorio-current.log file over I should hopefully be able to work out from there what's going on.

4 years ago
(updated 4 years ago)

I shall do it, but it will happen no sooner than my evening (in 12 hours), or, may be, even tomorrow (in 36 hours)
Upd: could it be the LTN mod somehow?

4 years ago

Err... it wants a google account to download. I don't have one.

4 years ago

Ah, I should've just pushed the zip to github like I was originally thinking ;-)

For simplicity, I've released 0.9.4 which fixes the issues I found with the pathing event detection and tweaks the no path timeout logic so it should be more reliable. Hopefully that should sort the issues you're seeing, but let me know if its still misbehaving and I'll take another look.

4 years ago
(updated 4 years ago)

I think, I found out the reason. It happens, when a one-direction train is standing at a dead-end TNFP station, facing the dead end. Thus, when the mod decides to summon the train, the mod cannot define the way.

New response