Hi My Name is Chris and I am a path writer for trains in San andreas and a plane path writer for Vice city. As for the train paths and spawning . i see it as to modes. Mode one is in a mission script where you make a train spawn at one of the many grid references in a path file and set the speed to run at. This way is good if you want to use many trains and see more then one train at once. You can Also change the structure of the train by writing in the mission script to add coach# Name.
in a mission a train is not chosen to drive on a specific path. It is just given a grid reference out of one of the paths and the path with the grid reference selected is used. Where as in pony farm Only tracks.dat is used.
I like mode 2 better.
Mode 2 is purely relying on the power of the exe. (not on mission Mode) The exe makes a train spawn at any grid reference in the tracks.dat file. from a point set by the radius of the characters position.
I don't know for sure if you have solved the trains stopping problem but you must do 2 things. Make sure you have 6 destinations along the path. This means that 6 of the lines in the path file will have a 1 at the end and not a 0. if you build your path and it does not crash then .. i would then add in the 6 station points in the path file. The exe wont handle more the 6 stations. or less. Having less causes a random stop and having more causes crash at loading screen.
By not adding the the grid references forces the train to stop randomly which is set in the exe and the train will stop accelerating at the last grid reference.
--- I have an idea for the structure of the path file that will work if you have 4 or 3 destinations: if you have 2 tracks side by side in a circuit, and have stations on both sides of the track you can have the train drive on each track in 1 circuit on the same path file. when the train has made one revolution of the circuit, make the train shift from one track to the other and it will do a second revolution on the 2nd track. After making this revolution, the train will start again and merge back to the 1st track. You will just have to add a little bit of track between the two tracks to make it look like it is changing tracks... not jumping the tracks. note: i made a mod in San Andreas which made a train do what i described. Behind millies house(gf) it was single track, so this is where i made the path file start. If this post is unhelpful i apologies.