Awww, stop it.
Not possible. You won’t get around making some sort of custom movement mechanics. Some kind of “train” concept (moving multiple entities at the same time or rather managing them) is required, too.
Roads are weird. Basically, your basic road is just a replacement (“replace block (-5, 1, 3) grass → road_cobble”) and telling the terrain (component) “at (-5, 1, 3), scale the speed by factor X”. This is not per-entity, it’s a global kind of thing (for all classes that implement it). Because of the modularity, radiant.terrain.get_movement_speed
is only used in one location - but that one is used everywhere.
So you would have to code your own system. From zero. It’s not a good approach in my opinion, however. I mean, it’s a sound idea and all, but you wouldn’t end up with proper trains.
Setting the movement speed to zero will likely cause this area to be ignored, or heavily avoided, by all pathfinding related actions: No AI would walk over those tracks, ever. You would need an own pathfinding, which wouldn’t be too bad, all things considered…
I mean, I do value your effort to create something purely using data. That’s some serious thinking to work around a system like that (a valuable trait that comes in handy often). I just don’t think that you’re going to get far in this case - at the very least, not without some very serious side effects that maybe can be avoided, but doing so will cost you much more time than learning lua and creating a component or two.
I’ve laid out my concept a bit over in the RepeatFeed - but of course, there’s many definitions of “train”. I chose one that I found appropriate. However, you might get some input from there: