Locoswap Tool

Discussion in 'General Discussion' started by andy.malcolm, Nov 23, 2022.

  1. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    I think the OP is talking about when you add a new route in the game.
    In TS Tools you have to click on Route Building Tools > Index Route Properties.otherwise it and the scenarios don't show.
     
  2. Bekns

    Bekns Active Member

    Joined:
    Jan 20, 2019
    Messages:
    141
    Likes Received:
    56
    Does anyone know if there an option to delete a whole consist, I couldnt see one and it wouldnt let me delete all stock from the consist either?

    Handy for when you have an offending consist that will not move no matter what you do :(
     
  3. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    That seems to be a problem where you might wish to remove a static consist because you don't have the wagons.
    You can delete all except 1 vehicle in a consist
     
  4. Reef

    Reef Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    2,806
    Likes Received:
    1,817
    Only reliable and safe way to remove a whole consist is in the scenario editor as far as I know.
     
    • Like Like x 1
  5. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    You can simply use the bottom slider all the way to the right. But I think I will simply move the icon in front of the consist name in a future update!
    There must be a simple way to know if a vehicule is driven (as shown by TSTools), I shall display that in the future!
    I will indeed update the readme so that it sums up what LS can do.
    In a nutshell, it only does stock-swapping but much quicker.
    Main features include :
    - Replacement rules which allow you to retain which stock you used to replace which, and to apply these rules easily afterwards
    - No need to unpack anything, LS will read inside .ap files and find all your routes/scenarios/stocks with no effort
    - Much faster than TSTools in pretty much any aspect
    This point is addressed in the manual. TL;DR : use the TS editor for that.
     
    • Like Like x 2
  6. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    This might be too much to ask, but what about opening an old Rail Simulator scenario? No third party tools for TS support this (probably because the ScenarioInfo page is located outside of the actual scenario folder, inside Scenarios - not a good idea when multiple scenarios might plop the same file there!), but I would be curious if it might be possible to read the files. Perhaps in this case they cannot be edited, but if a ScenarioProperties page could be created upon saving and make it usable, that would be awesome as well as it gives a way to look at really old scenarios and try to improve them.

    EDIT: Here is the basis for my idea. I downloaded file 20549 - "Chilcompton to Evercreech" for the Bath to Templecombe route - from UKTS. I had to take an existing ScenarioProperties file (I chose the nearby "Bruised and Battered" for convenience) and copy all the other info into place. Once done, I reloaded the scenario page and the scenario popped up, loading this:

    upload_2023-2-27_12-12-30.png

    I can now tinker with the stock before trying it in TSC. Why is this LocoSwap step desirable first? Look at all the red bubbles for consists that would fail to load otherwise. If a player consist gets the red bubble, it's mandatory to edit before even going into the editor.
     
    Last edited: Feb 27, 2023
  7. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    love each update of this must have tool for any simmer. Thank you for your continued hard work
     
  8. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    Honestly the todo list is already pretty lengthy, I don't think I will dive into this super-legacy architecture :D
     
    • Like Like x 1
  9. Reef

    Reef Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    2,806
    Likes Received:
    1,817
    You didn't directly reply to this post by me (quoted below) so I'm unsure whether you'd spotted it, but is anything on your extensive todo list likely to address this?

    To resize properly (and for it to remember said size, for a bonus cookie) would be the one QoL update that'd mean the most to me personally, not gonna lie.
     
  10. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    Yes, improving the resize behaviour is on my todo, although diving into the intrications of WPF and XAML isn't particularly appealing :D
     
    • Like Like x 2
  11. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    Probably a good idea. I can tell you though that I managed to construct the ScenarioProperties file, but in my experience LocoSwap would not completely rewrite the file anyway. I did also notice that the ScenarioInfo starts with an open brace - the [ - and then moves to a new line. So most of the tags are the same, it's a matter of how they would be read. That might be difficult. It's not hard to manually construct the file by copying one from somewhere and simply replacing everything one line at a time, then copying the entire FrontEnd section over the one that's already there. LocoSwap recognizes it, and assuming the editor loads it (there is a Scenario file in the right place already), it should rewrite the ScenarioProperties file anyway. It might be possible to create a conversion utility, however, and even so there might be very few scenarios needing it, so it may or may not be worth it...
     
  12. Nick Y

    Nick Y Well-Known Member

    Joined:
    Nov 13, 2020
    Messages:
    2,358
    Likes Received:
    2,091
    Hi folks. I'm having issues locating a certain few assets within locoswap that are definitely installed and showing in the railworks folders.
    I'm looking for the Ocean Liner Express Mk1 FO as shown in the image below. This is not showing in the Locoswap list but is showing in the assets folder within Steam.

    Locoswap
    FO MK1 Ocean Liner Express 2 (a).png

    Railworks assets folder
    AP file Railworks FO Mk1 OLE 2.png
    However, Locoswap appears to be looking for an xml file and it appears there isn't one here.

    I'm also having the same issue trying to find the WCRC_Named folder in Locoswap as it can be found under assets but not listed in Locoswap as it's needed for the same consist.
    WCRC FO Florence.png

    Once again, any help would be appreciated.
     
  13. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    Locoswap sees *.bin files as *.xml - same as TS Tools
    Not sure why it does not see the vehicle in the second picture.

    Try placing the coaches on a section of track to see if they have installed correctly.
     
  14. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    I have had trouble finding AP 319 pieces as well. Not sure why.
     
  15. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    Yes, there was an XML syntax error in the blueprints, I warned AP some months ago and it was fixed. Same for the 317. Just redownload and reinstall :)
    I have PMed Nick Y to check on his problem.
     
  16. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    Ah, very good. Mine were downloaded last May. Those are a problem then?

    Might have to recheck the 317. Not sure offhand when that was fixed.
     
  17. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    The fixes came late June/early July :)
     
  18. Nick Y

    Nick Y Well-Known Member

    Joined:
    Nov 13, 2020
    Messages:
    2,358
    Likes Received:
    2,091
    My AP coach packs are up to date and the items I am looking for in both scenario consists are 3rd party reskins not part of the AP packs.
     
  19. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    That explains why the 319 does not show the one unit. I must update. Can keep my other scenario copies anyway,
     
  20. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    just checked and 319s show perfectly fine for me
    upload_2023-3-6_2-23-58.png

    Same for the 317s show perfectly fine
    upload_2023-3-6_2-25-32.png


    checked the same scenario Nick Y and they are showing up for me fine in locoswap
    upload_2023-3-6_2-28-4.png
    As peter suggested have you tried placing one on the track to ensure it is installed correctly ?
     
  21. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    To be clear, the MTO was not appearing for swapping in my install. Will have to fake the install to manually add the updated vehicles while keeping the older scenarios for v1 of the weather pack. Whee.

    I might not have installed the 317 yet. Have to check. Have the UKTS ones anyway.
     
  22. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    As you can see all shows perfectly fine for me. Don’t know if others have issues as well but appears to be working fine
     
  23. class2ldn2801

    class2ldn2801 Active Member

    Joined:
    Dec 23, 2019
    Messages:
    226
    Likes Received:
    179
    So am I right in saying that any of the scenarios which now show in the different font, ie the ones in AP packs cant be edited and saved as each time I try and save it says scenario.xml error
     
    Last edited: Mar 7, 2023
  24. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    If you are referring to an error upon scenario loading in TS, this can (I think!) be overlooked by pressing F2, then clicking Cancel.
     
  25. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    If the missing item is important to the scenario, like the Player Train, then it won't work.
    Again if it is something the player train follows then it might not work
     
  26. class2ldn2801

    class2ldn2801 Active Member

    Joined:
    Dec 23, 2019
    Messages:
    226
    Likes Received:
    179
    No I mean in locoswap when I try to save them scenarios I'm getting a scenario.xml error , it also won't let me delete any scenarios. Thats on the latest patch 1.5.
    I cant remember the exact wording for the error as I'm at work but it was something like check scenario.xml file for read only or something, the ap scenarios are all showing with a different font but I reinstalled 1.4 and its still coming up with the error but the scenarios are written in normal font.
    One was snow joke I think in cross city.
    Cant save it or delete it .
     
  27. class2ldn2801

    class2ldn2801 Active Member

    Joined:
    Dec 23, 2019
    Messages:
    226
    Likes Received:
    179
    It says access denied while trying to write to scenario files.
    Please check that scenario.bin and scenarioproperties.xml are not write protected.

    Edit. so I went in and unticked read only in the content folder the routes concerned and now it appears to work, should the contents folder be read only?
     
    Last edited: Mar 7, 2023
  28. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    It certainly should not ;)
     
    • Like Like x 1
  29. ajpardy

    ajpardy Member

    Joined:
    Feb 7, 2021
    Messages:
    167
    Likes Received:
    7
  30. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    Have you copied your content folder to the current drive - say like when reinstalling?

    I did that once as I reinstalled the game on a new drive and everything was Read Only
    Obviously that does not work for editing as you are changing something.
     
  31. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    If the route shows correctly in LocoSwap, then this message you see in the debug log isn't a problem.
     
    • Helpful Helpful x 1
  32. PhÜnKî_Rø0sTā

    PhÜnKî_Rø0sTā Well-Known Member

    Joined:
    Nov 28, 2019
    Messages:
    652
    Likes Received:
    581
    Is there a way to swap sounds on stock using this?

    for example, a reskin of a 4 wheel wagon that i have, uses default sounds, but say if I wanted to swap them out for AP 4 wheel sounds, is it possible?

    Cheers.
     
  33. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    No.
    Locoswap is like TS Tools as it enables you to replace something you don't have with something you do in Scenarios

    It does not change any of the files associated with the stock.
     
    • Like Like x 1
  34. class2ldn2801

    class2ldn2801 Active Member

    Joined:
    Dec 23, 2019
    Messages:
    226
    Likes Received:
    179
    I've moved it from the default location but every time I try and untick read only it just reverts back and I dont know how to change it so it doesn't, tried every suggestion and nothing is working, this has only happened with the latest locoswap as it now shows the scenarios in ap files in italic and its them I cant save.

    Had to go back to 1.4 for now
     
    Last edited: Apr 6, 2023
  35. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    I had not upgraded to the latest version so I have not had the problem
     
  36. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    LocoSwap showing scenarios in .ap is just an additional feature, you can safely move to 1.5.1 and just ignore the italic scenarios if for any reason it doesn't work for you.
    If you wish to modify such scenarios, first clone them from the Build section of TS, then they will show in LocoSwap as extracted scenarios.
     
    • Like Like x 1
  37. class2ldn2801

    class2ldn2801 Active Member

    Joined:
    Dec 23, 2019
    Messages:
    226
    Likes Received:
    179
    Didn't think of that, thanks
     
  38. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    They can also be cloned in Ts-Tools if you have that and don't want to open the game just to clone. Note it will enforce a unique scenario name if you do that, however, and you would have to extract them first.
     
  39. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    It adds a Unique Hex Number as you cannot have two with the same but you can call the scenario anything you want.
    A Scenario on London to Brighton is LB League Cup Special which I cloned and changed the traction

    Screenshot (274).png
     
  40. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    My experience in Ts-Tools is that you have to have a unique name even with a different hex number. I wonder if an older version did not enforce that.
     
  41. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    Just tested this on the latest version of loco swap (just keeps getting better) and mine done the same as y ourself with the HEX number.
     
  42. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    You have to have a Unique Hex number but TS Tools does not create the Unique Name
     
    • Like Like x 1
  43. chrisreb

    chrisreb Member

    Joined:
    Dec 12, 2016
    Messages:
    85
    Likes Received:
    12
    Any ideas guys - when I select a particular route that was fine previously ( Bromsgrove-Manchester-Sheffield) LocoSwap instantly does a CTD,
     
  44. paulc

    paulc Well-Known Member

    Joined:
    Feb 24, 2021
    Messages:
    1,489
    Likes Received:
    3,131
    Mine did that a week or so ago, I've no idea why but it's back working ok now.
     
  45. chrisreb

    chrisreb Member

    Joined:
    Dec 12, 2016
    Messages:
    85
    Likes Received:
    12
    Well I have reinstalled the route and it seems to work now so maybe it is very sensitive to something it thinks was corrupted. The only changes I made was to use LS to change a loco in another scenario
     
  46. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    No, it forces you to create a unique name.

    upload_2023-4-10_17-14-37.png
     
  47. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,088
    Likes Received:
    3,145
    Which is what I said.
    If TS Tools is not making a Unique Name then You have to.
     
  48. frankoi1337

    frankoi1337 Member

    Joined:
    Apr 20, 2021
    Messages:
    95
    Likes Received:
    89
    When this happens, quickly make a backup of the debug.log (because it will be erased at the next startup) and send it to me!
     
  49. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    which is EXACTLY what 749006 said. Why do you have to disagree with everyone when you quote EXACTLY what they said.
     
  50. Cyclone

    Cyclone Well-Known Member

    Joined:
    Feb 29, 2020
    Messages:
    3,854
    Likes Received:
    1,324
    I should have phrased that better. I was merely demonstrating it, agreeing that it does not create a unique name. Apologies if that came across as if I was disagreeing.
     

Share This Page