Adding Extra Foliage To A Route

Discussion in 'PC Editor Discussion' started by fakenham, Sep 30, 2023.

  1. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    Just been practicing in the editor opening up a route adding assets/foliage and was thinking it would be nice to create a foliage upgrade for ECML, as I feel the lineside trees are plenty but look a bit bare - the trunks need covering up with a few bushes etc. I realise we can't remove assets but we can add. Does anyone know of the procedure in the editor to save your new work layer and create a file to upload and share? Thanks.
     
    • Like Like x 1
  2. eldomtom2

    eldomtom2 Well-Known Member

    Joined:
    Jul 31, 2022
    Messages:
    2,330
    Likes Received:
    2,500
    I think you can only add assets if they're attached to a scenario/timetable, but I'm not sure about that.
     
    • Helpful Helpful x 1
  3. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    You should be able to add a permanent layer to the route as well, in the same way as they build mastery layers with the scenery overlay definition asset and overlay tool, then link it to the existing scenery tiles. Haven't had any time with this editor yet, but we did it with the unofficial editor for a couple of route mods. I'll have a deeper look tomorrow. It should in theory actually be easier, as tiles are auto generated in the tsw editor.
     
    • Helpful Helpful x 2
  4. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Using the scenery overlay definition asset does the trick Fakenham.

    1. Create a new plugin. Make a folder called 'Map' inside there. P
    [Details on how to make a blank plugin can be found on a thread written by Matt P]

    2. Create a new scenery overlay definition file in your newly created Map folder. This will allow you define which route your tiles overlay will be used on.
    [Right click inside Map folder in content browser. Choose Miscellaneous>Data Asset. Search for Overlay Definition]
    I'd recommend renaming that file to something that makes sense to you and is pertaining to the route you're modding.
    Open you newly created overlay definition file and edit the 'route field' to point to the main route you want to attach your overlay to. Save.

    3. Now open Window>TSW Tools>Overlay Scenery Tool
    A new window opens. From the drop down list pick the overlay scenery definition file you just created (You see why renaming this helps now).

    Click 'Load the correct level'. It's a white box that appears only when you select you definition file.

    After scenery loads, check the box labelled 'Enable scenery edit globally'.

    Now when you place new scenery, they should layer onto your layer tile (the actual tile files auto generate as you place scenery). Ensure when placing the assets, they are going onto SST tile NOT ST tile. The lower right of the viewport will show you this. If they go on ST there will be a problem somewhere, and they won't save. (ie. Being placed on read-only tiles)

    If you leave the editor and return to continue working. DO NOT load the main map. Just go to step 3.
     
    Last edited: Oct 1, 2023
    • Helpful Helpful x 7
    • Like Like x 4
  5. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    That's great Bescot, many thanks for taking the time to explain this.
     
  6. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    So a noob question Bescot, all go's well until this point. It says ST tile, not SST. Not sure how I change to SST? Currently practicing on Somerset.
     
  7. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Can you make sure you haven't loaded the main map files by restarting the editor and going to step 3?
     
  8. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    Yep, still the same.

    I think I've misunderstood step 1and 2! So I've created a plugin called Mapwithin - or do you mean I should create a folder within that new plugin called mapwithin?

    And also
    When you say Map folder, which map folder is this?

    Sorry for being a bit thick, new to this stuff!
     
  9. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    The Plugin can be called anything you like.

    The folder you create inside that plugin should be called 'Map'. Only to use the same file structure that DTG use.

    That's the folder you will right click inside to create the overlaydefinition file.
     
    Last edited: Oct 1, 2023
    • Like Like x 1
  10. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    Yep, thanks, done that. However, I'm getting a wrong level loaded message when I select my definition file from the drop down, then it loads just to the ST tiles. Also I tried opening up some other DTG mastery files and they still load the ST files?
    I'm doing something wrong somewhere, I'll figure it out, but thanks again Bescot.
     
  11. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Very odd, it all works here. After setting up as above I navigated to the scenery folder in content browser and dragged a skip scene into the viewport. It was automatically placed on the SST overlay tile. A tile was autogenerated in the Tiles folder.

    upload_2023-10-1_11-37-20.png
     
    • Like Like x 1
  12. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    Hurrah, got it working! (edited). What was happening is that I was using the foliage tool, which doesn't seem to play ball, whereas single placement works. Thanks again, and now I know a bit about plugin file structure - I was thinking I should call it mapwithin, not create a map folder within the plugin! lol. Brain getting old I think...
     
    Last edited: Oct 1, 2023
  13. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    I know the problem, glad you got it sorted! I think that the 'load the correct level' pop up box is misleading. I thought it was a tooltip, but you HAVE to click it

    upload_2023-10-1_12-21-1.png
     
  14. pilot21

    pilot21 Well-Known Member

    Joined:
    Feb 28, 2023
    Messages:
    106
    Likes Received:
    478
    Hello, is the foliage tool working with the scenery overlay tool or do i have to hand place everything?
     
  15. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Foliage tool works, but I haven't figured out how to get it to paint to the overlay, I hope this can be done
     
  16. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    Well, with this now sorted thanks to Bescot, I'm on my way to finally sorting out those speed signs (and relearning Blender) - it's going to be ridiculously tedious to go through the whole route overlaying these on top, but what the heck. Hopefully the clever folks will be able to come up with a better solution to apply to all UK routes! There must be surely...
    ecml.png
     
    Last edited: Oct 1, 2023
    • Like Like x 2
  17. Jamesclass37

    Jamesclass37 New Member

    Joined:
    Apr 1, 2018
    Messages:
    6
    Likes Received:
    16
    Thanks for this thread bescot. I've been using this to try and add some custom built signage to the GWE route for Royal Oak. I've set up the plugin and successfully installed my assets, though I'm wondering now how would I package this up to overlay into the actual game? I assume this won't just magically work like this. Do you know how this is done? TIA.
    upload_2023-10-1_15-56-24.png
     
    • Like Like x 4
  18. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Nice job guys! Well we'd cook and pak but that doesn't work right now.

    I still haven't had any joy getting the foliage paint tool to save onto the layer, which kinda puts my plans on hold.
     
    • Helpful Helpful x 1
  19. Jamesclass37

    Jamesclass37 New Member

    Joined:
    Apr 1, 2018
    Messages:
    6
    Likes Received:
    16
    Ah ok then. Hopefully either DTG add that later, or someone creates a plugin that allows us to eventually.
     
    Last edited: Oct 1, 2023
  20. fakenham

    fakenham Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    775
    Likes Received:
    1,124
    Whoops, didn't realise that this aspect doesn't work, having never used the unofficial editor. Does this apply for our own route creation as well or is it just not available for level enhancements like above? Again, very new to this stuff so apologies if I sound silly.
     
  21. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    That applies for everything. Nobody can get their work into the game yet. The only way we can test is in PIE. Play in editor button inside the editor. . But that's very slow running.
     
    • Like Like x 1
    • Helpful Helpful x 1
  22. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Sorry DTG Matt Do you know anything about the mastery layers? I know I'm trying to use this for a purpose it's not originally designed for, but you mentioned this method in a stream. Is it not possible to use the procedural foliage tool in the SST tiles? After using the tool on a SST overlay, selecting the placed foliage is showing it's 'placed' on the read only ST tile - which obviously wont save or cook.
     
  23. DTG Matt

    DTG Matt Executive Producer Staff Member

    Joined:
    Nov 17, 2016
    Messages:
    3,332
    Likes Received:
    18,792
    Not tried it - i'll ask tomorrow but it was designed with a specific purpose in mind so... it wouldnt surprise me.
     
    • Like Like x 1
  24. 2TallTyler

    2TallTyler Well-Known Member

    Joined:
    Apr 6, 2023
    Messages:
    120
    Likes Received:
    279
    bescot - Your latest mods indicate that you've figured out how to use mastery layers for scenery overlays. Any chance you'd want to update this thread to explain how to use this method, and why you've chosen it over Overlay Definition?
     
    • Like Like x 1
  25. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Ah yes, for foliage painting you need have a scenario scenery definition file too.

    I can't edit the initial post any more, but here's a guide:


    1. Create a new plugin. Make a folder called 'Map' inside there.

    [Details on how to make a blank plugin can be found on a thread written by Matt P]

    2. Create a new scenery overlay definition file in your newly created Map folder.

    This will allow you define which route your tiles overlay will be used on.

    [Right click inside Map folder in content browser. Choose Miscellaneous>Data Asset. Search for Overlay Definition]

    I'd recommend renaming that file to something that makes sense to you and is pertaining to the route you're modding.
    Open you newly created overlay definition file and edit the 'route field' to point to the main route you want to attach your overlay to. Save.

    2b. Create a Scenario Definition file next to the previous file.

    This will allow you to use more tools that a simple overlay, we dont need it for scenarios in this case.

    [Right click inside Map folder in content browser. Choose Miscellaneous>Data Asset. Search for Scenario Definition]

    I'd recommend renaming these files to something that makes sense to you and is pertaining to the route you're modding.
    Open you newly created scenario scenery definition file and edit the 'timetable field' to point to any timetable in the route you want to attach your overlay to. Save.


    3. Now open Window>TSW Tools>Scenario Scenery Tool

    A new window opens. From the drop down list pick the overlay scenery definition file you just created (You see why renaming this helps now).

    Click 'Load the correct level'. It's a white box that appears only when you select you definition file.

    After scenery loads, check the box labelled 'Enable scenery edit globally'.

    Now when you place new scenery, they should layer onto your layer tile (the actual tile files auto generate as you place scenery). Ensure when placing the assets, they are going onto SST tile NOT ST tile. The lower right of the viewport will show you this. If they go on ST there will be a problem somewhere, and they won't save. (ie. Being placed on read-only tiles)



    If you leave the editor and return to continue working. DO NOT load the main map. Just go to step 3.

    NB. if you notice that the foliage paint is going to the original ST tile, just drop an asset somewhere on that tile. It'll register then than it's a SST tile you're working with.
     
    Last edited: Mar 20, 2024
    • Helpful Helpful x 4
  26. bescot

    bescot Well-Known Member

    Joined:
    Dec 14, 2016
    Messages:
    729
    Likes Received:
    1,468
    Also, to note; the game will read any tiles you place inside the route's default map folder and automatically layer them!

    So you can build an overlay using the method above, cook it, then manually recreate the original folder structure in windows. Drag the cooked tiles from your plugin into that map/tiles folder then pack. With that method, end users won't have to select anything in the Mastery Overlay part of the game.

    With this method you don't need to include your plugin or the defn files.
     
    Last edited: Mar 21, 2024
  27. TheShotte

    TheShotte Well-Known Member

    Joined:
    Jun 16, 2020
    Messages:
    390
    Likes Received:
    666
    In order to have your painted foliage be properly saved in your Overlay, paint your foliage, switch to the Select mode, click on your painted foliage, and in the Levels window, find the tile with the SST_ prefix that corresponds to your current tile (shown in the bottom right of viewport in white text. Once you have located the appropriate tile in the Levels window, right-click on it, and select "Move Selected Actors to Level", as shown in picture below.


    [​IMG]


    Once you do this step, when you save your overlay tiles, all of your foliage will be saved just as well. This works for anything that you can place down and select in your level. If you have something that mistakenly was added to an ST tile instead of the SST tile, this is how you move it over to an SST tile.
     
  28. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,609
    I don't know if this is a typo and you meant "scenario definition file" instead of "overlay scenery definition file" but I tried what you've written and it is not possible for me to select the Overlay definition file in the Scenario Scenery Tool. Only the Scenario definition file can be chosen in the Scenario Scenery Tool for me.

    So I continued with having the Scenario definition file selected there, however misery begins...

    Yes and No. So I tried it with foliage first. This will generate no SST tiles. Then I placed a blueprint of something onto the surface and this - just like the Overlay Scenery Tool - autogenerates the SST tiles. I deleted the blueprint and saved the SST tile.

    However coming back to the Foliage tool now and me wanting to paint some grass, I noticed that indeed right at the bottom of the viewport the SST tile were shown to be active layer and thus perhaps the grass is assigned to, however unlike placing a regular blueprint the SST tile does not get this little star in the bottom left corner of the asset which signifies an unsaved change to the tile.

    My question to is, is this okay so for the painted foliage? Because I think if the grass should be correctly assigned to the SST tile, the SST tile should get this little star which then means I have to save the tile in order to save the changes, right? My assumption is that the SST is shown in the bottom right corner because I placed the blueprint before, and not actually because of the painted foliage.

    I mean I could proof if it still works but it would waste so much time if indeed the grass were not assigned to the SST tile as I assume it did not. So I felt like asking you back before, if it was in the same way when you did it on WCML.

    When I go into main menu Select mode, clicking on my painted foliage does not do anything. When I go into Select mode of the Foliage tool (which is probably what you meant here) and try to select my painted grass, the Editor instantly crashes for me. I don't even get as far as going into the Levels window.

    I tried that in both ways, with the Scenario Scenery Tool and the Scenerio definition file and with the Overlay Scenerio Tool and Overlay definition file.

    I have no clue how you got this to working and not crash on your Editor.
     
    Last edited: Mar 9, 2025
  29. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,609
    So I thought about the possibility that DTG might removed the option to insert an Overlay Definition file in the Scenerio Scenrio tool in a recent patch (either intentionally or accidently as sideeffect of something else), and tested the same in the TSW4 PC Editor.

    But exactly the same result with not being able to do so and crashing when clicking on my newly painted grass using the Foliage tool. And despite SST tile is shown in the bottom right corner of the viewport being the active tile to place things at, exactly the same that the SST tile itself won't get any changes (no star for unsaved changes) when painting grass.

    Restarting the Editor, and loading the map via Scenario Scenery Tool gives me first an Invalid Bounds error for the SST tile, first I tried with clicking on "No", then restarted the Editor, did the processes again and clicked on "Yes" but in both cases, painted foliage was not there anymore.

    Why the holy Editor god doesn't it work for me but does when you do it? Why can't I place an Overlay Defintion file in the Scenario Scenery Tool but you can?

    That's completely weird to me at the moment.
     
    Last edited: Mar 10, 2025
  30. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,609
    Since I had a few issues with some plugins due to Muff's cooking mod adding some files which messed up access to some data assets, I thought about that maybe could be a cause why it doesn't work for me but does for you all. And then I thought I might need to remove all mods out of the DLC folder of the game, since this is known to cause issues in-game.

    So 1.) I did a fresh installment of the TSW5 Editor now, having only the vanilla files in the Editor installation folders, and 2.) removed all mods from my DLC folder, but it still doesn't work for me to add a (Scenery) Overlay Definition file to the Scenario Scenery Tool or vice versa a Scenerio Definition file to Overlay Scenery Tool. :mad:

    I have really no clue left what could cause this.

    Reading several times through bescot 's notes, following the logic in there, I also don't understand why it would be important
    to do that, adding a Scenario Definition file:
    Which I did by the way, but just follow the logic it doesn't make much sense to add a Scenario Definition file, since after the notes only the OverlayDefinition data asset is being used by the Scenario Scenery Tool, the Scenerio Definition data asset is not used anywere.
     
    Last edited: Mar 14, 2025
  31. kyrickthor

    kyrickthor New Member

    Joined:
    Apr 28, 2020
    Messages:
    16
    Likes Received:
    4
    It seems you and I are both in the exact same situation. This is quite frustrating, especially considering it appears to work just fine for others. As with you, every time I try to interact with a newly placed piece of foliage, the editor promptly crashes and said foliage is never saved to the STT. I hope that a fix for this is in the works.
     

Share This Page