Page 1 of 1
[0.17.43] train.carriages order
Posted: Wed May 29, 2019 8:12 pm
by _Attila_
I am not sure if this is a bug, but it sure seems that way to me.
A train L1-C-L2 pulls up to a station with L1 pulling - train was built in same order.
train.carriages has order L2-C-L1
train.locomotives.front_movers is L2
train.back_stock is L1
It seems to me the front of the train should be at the stop and the data in the above tables should reflect that. The way it is, a mod cannot reliably tell what locomotive is at the stop - at least not very easily.
The train has just this stop in its schedule with no conditions.
Re: [0.17.43] train.carriages order
Posted: Wed May 29, 2019 9:04 pm
by Rseding91
Thanks for the report however the order of the carriages is irrelevant to the train. The order they show up when iterating doesn't really matter and isn't a bug if it's not the order you expect.
Re: [0.17.43] train.carriages order
Posted: Wed May 29, 2019 9:24 pm
by _Attila_
So, what is the point of calling a locomotive a front_mover when it is in the back of the train?
Or front_stock, for that matter?
Re: [0.17.43] train.carriages order
Posted: Wed May 29, 2019 9:49 pm
by Rseding91
_Attila_ wrote: ↑Wed May 29, 2019 9:24 pm
So, what is the point of calling a locomotive a front_mover when it is in the back of the train?
Or front_stock, for that matter?
You're seeing the internal name that the game uses to store all of the locomotives that face one direction and the rest that face the other direction.
"front" is meaningless and unrelated to the current direction of a train since a train doesn't drive "forward" but "this speed on the current rail". It could be called "a_movers" and "b_movers". It's just a name so when the train goes to move a given speed it knows which set of locomotives to use.
When speed is positive "front_movers" are used to power the train. When speed is negative "back_movers" are used to power the train.
Re: [0.17.43] train.carriages order
Posted: Thu May 30, 2019 2:54 am
by _Attila_
Thanks for the explanation.
I solved the problem by finding the shorter distance between the stop and the locos at the ends.
Not the most elegant solution, but I do need to know which loco is actually at the stop.