I'd like to inform you about a limitation in building railways in GTA1. The whole problem consists in the fact that you are limited by a certain amount of cubes you can set or define as "railway". I discovered it when trying to extend the public transport system in original NYC.cmp. When you exceed the limit, you'll encounter error 134.142 saying "Railway invalid". At first, I thought there was a leftover, a railway cube which was forgotten and left adjacent to the new track, thus causing an error since GTA1 railway needs a complete loop with a clear, undoubtful path to be followed in order to function properly (single railway cubes left apart from the track - i.e. not neighbouring - are considered or treated as unfinished railways and, therefore, do not cause any errors although trains don't generate not only on them - albeit they are set to produce trains - but also on ANY complete and otherwise properly created route). So I checked the loop in GTAcops and there was no mentioned leftover. Then I thought I caused an error due to a collision with another feature in the game, such as TL junction. After a lengthy struggle I discovered there is an in-game limit for building railways. I focused on this hypothesis, testing it from several points of view using various methods. I won't describe them all but as an example: I created a small loop (an additional route to the original one) and it functioned normally (no errors, trains spawned and serviced the route normally). Then, I enlarged the track slightly and checked whether it was still correct. By using this step-by-step method I finally came to a point where the error occured. So I searched for any conflicts it could cause at that place but everything seemed to be right. To test it a bit more, I created a small loop at the same place but this route was perfect and no error appeared. Then I shortened the original route, sparing some 22 railway cubes. I tried if it would help and it helped! I could enlarge the additional route but not more than by that 22 railway cubes. I counted the maximum allowable amount of railway cubes and the result is as follows:
the original route in the original NYC.cmp consists of 662 railway cubes. By testing I found out that I am unable to build an additional loop greater than 218 (maybe 219) cubes. It can be derived that your railway may be composed of max. 880 (maybe 881) cubes regardless of how many loops you created. Logically, the more loops (routes) you create, the smaller the biggest of them must be. The original railway in the original MIAMI.cmp consists of 782 cubes, so it seems to be more efficient to edit this original route than create another.
No matter what is behind this limitation (perhaps game performance of then-existing hardware), it is a significant drawback. It might be removed from .exe where it is probably stored (the very check of that limit surely) but I am not experienced in it. Perhaps, someone could do that.