Tutorial Road Splines

Discussion in 'PC Editor Discussion' started by FreddieTheShepherd, Feb 29, 2024.

  1. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    Hi!
    I´ve found a way how to make road splines work and it´s really easy.

    • Placing Road Splines, (Cars will follow along this line): Go on any official TSW route map and search for "traffic" in the World Outliner. There, you should find a "TrafficManager". Just copy it and paste it into your route. Then, draw road splines, using "BP_RoadSpline_LFR" for example I used VBRG aasets). After that you can test your map and should now see cars running down the spline. You can edit which cars you want to see in the traffic manager. To edit the speed of the cars or their density, then edit the road spline.
    • Bonus - plane splines: So, again, place the traffic manager and now the first difference: add your plane (a plane can be found in the general "Content"-folder) or whatever you like into the "Routespecific 1" Then place a road spline, but now in the air and make sure, that the spline only uses the "Routespecific 1" vehicles. Increase the speed that it looks more realistic. That should work.
    • Cars stopping at level crossings (thanks to pilot21 and fceschmidt for solving this issue!): So, place your spline over the level crossing and make a spline point in front of the level crossing, name it and remember it for later. Then go also to the level crossing assets and type the same name into "Level crossing actor base" After that, select the crossing link and search in the components-scrolling frame (!) for Train/SignalActivatedLevelCrossing. Go to "Edit Property" and under "Level crossing property base", type your level crossing name into the first field, called "Level crossing name" Then it should work. See pictures from pilot21 further below!
    I´ll update this thread when I find out new things like connecting splines or how intetsections work!:)
     
    Last edited: Mar 1, 2024
    • Helpful Helpful x 6
  2. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    278
    Likes Received:
    449
    Thanks! Boy, that would have saved me a lot of work, in fact I'll probably start switching it over to the in-game system when I get home. Have you had a look at how intersections work yet?
     
    • Like Like x 1
  3. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    Actually, I am searching for a solution on level crossings, because I need that more for my route, but after that I will have a look at intersections too!:)
     
  4. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,609
    Really nice tip with the Traffic Manager.

    I looked before if I could find a blueprint in the DLC files without having to open a new map and do the copy process, but indeed there is no "TrafficManager" blueprint or something like that. Hmm, I wonder where is this TrafficManager stored? But anyways, It only works with copying as you stated.

    However I tried what you described, and it does not work here. Cars do not spawn on the road splines (neither on the ones I created so far nor the ones I created after copying the traffic manager into my world outliner). :(

    Don't know why it is different at your setup. I worked with the traffic manager from Dresden-Riesa, also used road static meshes for the splines and road blueprints from Dresden-Riesa (so no DLC incompatibility should be possible) and still no cars are spawning. Even if I scale the car spawn rate multiplier from 3.5 to 12.

    Hmm, did you changed any parameter of the traffic manager to a certain value which I did not not?
    Or do road splines have a certain parameter ticked or maxed up?

    BTW: Why is in your screenshot no road spline to see?
     
    Last edited: Feb 29, 2024
  5. pilot21

    pilot21 Well-Known Member

    Joined:
    Feb 28, 2023
    Messages:
    106
    Likes Received:
    478
    To make level crossings work you have to place a spline point of your traffic spline in front of the level crossing where the cars have to stop. Then select this point and then you have to put the Level Crossing name into Selected Points> Road and Point Name
     
    Last edited: Feb 29, 2024
    • Helpful Helpful x 2
  6. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    I have used the traffic manager from S-Bahn Vorarlberg and the spline comes from the Vorarlberg Content folder. I haven´t edited any settings and the picture is from Play in Editor, otherwise you wouldn´t be able to see any pictures!
     
    • Like Like x 1
  7. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    I have discovered that already on LFR and WSR. How do I give a level crossing a name and has it to be in the same order like you said?
     
  8. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    The last word should be "cars"
     
  9. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    312
    Likes Received:
    405
    The name just has to match the name which you have set in the Level crossing which is linked to the track (it's a property inside the TrainActivatedLevelCrossing or SignalActivatedLevelCrossing) :)
     
    • Helpful Helpful x 1
  10. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    278
    Likes Received:
    449
    Just thought I'd let you know I seem to have been able to create a new TrafficManager for my plugin by clicking the add/import button, selecting blueprint class, and then doing the same kind of "traffic" search ("trafficmanager" would probably also work.) There was one, way near the bottom of the results that just said "TrafficManager" in bold. Added it to my level, and it opens up in the editor, though it seems it's a data-only blueprint. Still haven't gotten cars to work on it, but it's probably something obvious I'm overlooking. No dependency on other DLC! Woohoo! Hope this helps, but either way I'm tired and I need to go to bed.
    ScreenHunter_58 Feb. 29 20.42.jpg
     
    Last edited: Mar 1, 2024
    • Helpful Helpful x 1
  11. pilot21

    pilot21 Well-Known Member

    Joined:
    Feb 28, 2023
    Messages:
    106
    Likes Received:
    478
    Did somebody found a way to snap the traffic splines to the Landscape Road spline? Because handplacing every spline for my Highway would be a pain.
     
    • Like Like x 2
  12. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,609
    Ah, okay. Will try it with those later. I thought you used the TrafficManager from Left Rhine/Linke Rheinstrecke because you mentioned a road spline blueprint from LFR. But I guess it was Dovetail who put it into the Vorarlberg folders, as well, as with so many other assets.

    Okay no other tweaked parameter but my last question was why there are no roads to see while you do play the level? It seems that cars drive without any roads at this screenshot.
     
  13. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    312
    Likes Received:
    405
    I initially thought landscape roads were the solution but I think I went wrong with that...
    But for normal splines here's the trick: drag the traffic spline onto your map, click the small lock icon in the very top right corner of the details panel (above the Blueprint/Add Script button).
    Right click on a spline point of the actual "road" spline, then select all spline points.
    In the details panel, which is still showing the details of the traffic spline, scroll down and click "add all spline points" in the road spline tools section, then delete the original spline points which were created when you dragged the traffic spline onto the map.
    Now select all spline points of the traffic spline and be aware that you can apply a left/right offset and optionally reverse the spline directionality in the details panel. And you can release the lock again.

    I think for landscape roads you can really just auto-deform the terrain and use the end key to snap the traffic spline to the now adjusted ground.
     
    Last edited: Mar 1, 2024
  14. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,609
    Was about to ask the same question and whether the TrafficManager only works with road spline blueprints.

    Because just yesterday before I read this post, I placed so many road splines in landscape mode, which is the IMHO superior method to place roads in the Editor.

    I will not replace all of my already laid landscape road splines with road spline blueprints nor continue to work with road spline blueprints simply because placing roads like that (curves, roads with gradient and road networks/intersections,) is a pain and so much easier with landscape splines.

    Also when using landscape splines, there is an option to select all or a single spline segment to adapt the terrain to the road, which is pretty neat when you place roads on an uneven surface.

    If car traffic only works with spline blueprints, it would be much harder to incorporate traffic on roads as I thought and probably only can do it for a portion of it.
     
    Last edited: Mar 1, 2024
  15. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,609
    It works now!



    And I know now why it didn't work yesterday and maybe you could read it in my posts above.
    My issue was that I confused a road spline blueprint (what actually is a road) - for example BPC_RoadDE_01_2L and something called a "RoadSpline" blueprint (I guess this is also what you called a "traffic spline" before) - one dedicated for each DLC, for DRA it is "BP_RoadSpline_DRA".

    These are two separate things!

    This explains now also why in FreddieTheShepherd screenshot there is no road to see. Cool!

    Well, the only questions which remains now is how pilot21 said to connect these RoadSpline aka "traffic splines" to landscape road splines in the best way.
     
    Last edited: Mar 1, 2024
    • Helpful Helpful x 1
  16. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    Well, I have found these assets, but I don´t have a clue how to use them - I only know the way how it´s mentioned in matinakbary´s documentation collection. I also haven´t found a way how to give names in it and none of the newer TSW routes seems to use it... LevelCrossing_1.jpg The only thing I have seen that the level crossing barriers have names in their Level Crossing Actor Base.
     
  17. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    So, I have now tried to name the level crossing assets like they seem to be named on other TSW routes: LevelCrossing_3.jpg But then, the level crossings don´t work anymore and cars drive through anyways....
    LevelCrossing_2.jpg
     
  18. pilot21

    pilot21 Well-Known Member

    Joined:
    Feb 28, 2023
    Messages:
    106
    Likes Received:
    478
    You have to put the same name into the level crossing link

    levelcrossing1.PNG
    levelcrossing2.PNG
     
    • Helpful Helpful x 1
  19. FreddieTheShepherd

    FreddieTheShepherd Well-Known Member

    Joined:
    Dec 11, 2023
    Messages:
    471
    Likes Received:
    1,997
    THANKS!!!
    I didn´t see that I can scroll there in the components! - Thank you so much, I´m sorry that I was wasting your time!
     
  20. pilot21

    pilot21 Well-Known Member

    Joined:
    Feb 28, 2023
    Messages:
    106
    Likes Received:
    478
    Absolutely no problem! Glad it works for you now.
     
    • Like Like x 1
  21. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    278
    Likes Received:
    449
    And the same thing applies to the RoadSpline blueprint class, as well! couldn't get my car to spawn in, then I noticed I had the spawn rate multiplier set to 0. (I can math, honest!)

    matinakbary , you may want to include the creation of the pre-existing default blueprint classes, for anyone who wants their plugin to be self-contained, but I'll leave that up to you. I'll include some more useful screenshots here.
    ScreenHunter_60 Mar. 02 09.17.jpg
    ScreenHunter_61 Mar. 02 09.17.jpg
    ScreenHunter_62 Mar. 02 09.20.jpg
    ScreenHunter_58 Feb. 29 20.42.jpg
    ScreenHunter_59 Mar. 02 09.06.jpg
     
    Last edited: Mar 2, 2024
    • Helpful Helpful x 1

Share This Page