Player-train In Scenario-folder/scenarioproperties.xml

Discussion in 'General Discussion' started by lulukuchen#3656, Nov 30, 2023.

  1. lulukuchen#3656

    lulukuchen#3656 New Member

    Joined:
    Oct 3, 2022
    Messages:
    11
    Likes Received:
    0
    Hey there,

    i have a little problem, that i want to have solved.
    Right now, i´m working on a Timetable-Mode for the route "Frankfurt-Koblenz".
    To be more precise, I create every train that runs on the route in a specific time in a template scenario and then clone it as often as there are potential player trains. Then i open the cloned scenario, change the player-icon and close it. This is very time-consuming, so i am searching for a method to just change the player-train in the scenario-folder.

    I think there is a method to do that (well obviously), but it doesn´t work.
    In the .xml-file "ScenarioProperties.xml" is every train in the scenario listed. And for every train, there is a line called:

    <PlayerDriver d:type="bool">0</PlayerDriver> Screenshot_146.png

    and for one train there is a:

    <PlayerDriver d:type="bool">1</PlayerDriver> Screenshot_145.png

    I am pretty sure that changing this number should work.
    But when i open the scenario after changing the number, nothing worked, nothing changed, the player train remains the train it was before changing it.

    So how does it work? Do I need to change more?
    I hope someone can help me.

    Thank You!
     
  2. Spikee1975

    Spikee1975 Guest

    Because you would also have to change that in the scenario.bin, which holds the actual consists and timetables. I doubt this will work.

    QD scenarios already kind of serve this purpose.
     
  3. lulukuchen#3656

    lulukuchen#3656 New Member

    Joined:
    Oct 3, 2022
    Messages:
    11
    Likes Received:
    0
    Spikee1975 So there is no method to change the player-train without opening the editor?
     
  4. Spikee1975

    Spikee1975 Guest

    I'm afraid no.
     
  5. lulukuchen#3656

    lulukuchen#3656 New Member

    Joined:
    Oct 3, 2022
    Messages:
    11
    Likes Received:
    0
    Spikee1975 Is it also not possible with TS-Tools?
     
  6. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,268
    Likes Received:
    3,187
    It would be much easier to open the scenario in the Editor and just drag the instructions off the current Player train on to the one you wish to be driven.
    Once done it would stay like that.
     
  7. Spikee1975

    Spikee1975 Guest

    Yes. Doing this manually by editing bin (xml) will mess up the dispatcher instructions tied to each train. No external program can do this but the Scenario Editor. It is different from swapping a loco.
     
    • Like Like x 1
  8. triznya.andras

    triznya.andras Well-Known Member

    Joined:
    Jun 29, 2019
    Messages:
    2,368
    Likes Received:
    2,864
    Minor correction, what you say is correct, I do that sometimes with templates.
    What the OP wants, however, is to create a big timetabled scenario and then choose one train to drive. I played quite a few workshop scenarios clearly using the technique. Most obvious when the player train is in a distant galaxy from scenario marker, causing a slow on-the-fly reload.

    Practically, timetabled scenarios are exactly for that purpose. Same with free roams. The difference is whether you want to see a cursor and a popup. And of course, if the player train is nearby or not. A working version is something like a parallel yard work, and maybe a few trains like a stopping passenger and a couple expresses. Similar to Horseshoe Curve Observer. Otherwise you need to fly first.

    For the latter there is an option I don't recall, enables something like Ctrl+PgDn to cycle through driveable consists. The topic was named something like true free roam, as the typical complaint about the mode is that once you choose a train, you are anchored.
     
    • Like Like x 1
  9. BeenTrain

    BeenTrain Active Member

    Joined:
    Dec 10, 2016
    Messages:
    163
    Likes Received:
    146
    I assume you mean that you have a standard scenario with, lets say two trains, both having their own timetable?
    With one being the player train.

    If you also change the <PlayerDriver d:type="bool">1</PlayerDriver> tags in the scenario.bin it works.
    You will have to deserialize the Scenario.bin with the Serz.exe tool, edit the Scenario.xml and then serialize it again into the Scenario.bin.
    (You can serialize/deserilize bin/xml files by dropping the files on it in Windows Explorer)

    After switch each train still has its own instructions, but the player train has switched.

    I have been playing with this because it is an interesting concept that could mimic a kind of multiplayer process using ThirdRails as man in the middle.
     
    Last edited: Dec 8, 2023
    • Like Like x 1
  10. BeenTrain

    BeenTrain Active Member

    Joined:
    Dec 10, 2016
    Messages:
    163
    Likes Received:
    146
    Inspired by the OP's question I have build a new feature in the upcoming ThirdRails update to switch the Player Train with an AI train. (available ~mid january 2024)
    It will enable you to drive all trains in a scenario without copying or editing the scenario yourself. ThirdRails will do the hard work, the only requirement is that the AI trains should have a full timetable to drive. (No body wants to dissapear in a portal :o)

    Share the scenario with friends, each choose a different service, start and see each other both on the Community Radar and in TSC!
    This brings you closer than ever to full Multiplayer Gameplay and TSW like Service Mode!

    [​IMG]
     
    • Like Like x 1
  11. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,268
    Likes Received:
    3,187
    I think that might be a stumbling block as most AI in scenarios only run for the part they are needed.

    And the current player train going on one direction might see 10 to 20 AI going the opposite direction but you don't normally have another AI train going the same way as the player train unless it is to overtake the player train.

    So if you swapped from a Northbound Player Train to a Southbound AI train you are unlikely to see any other AI trains.
     
    • Like Like x 1
  12. BeenTrain

    BeenTrain Active Member

    Joined:
    Dec 10, 2016
    Messages:
    163
    Likes Received:
    146
    Yes, it is obvious scenario's needs to be created with the 'multiplay' perspective in mind.
     
  13. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,268
    Likes Received:
    3,187
    So the new add-on will only work with new scenarios that have a lot more trains then they currently have.
    I don't see TSC being up to that.
     
    • Like Like x 1
  14. triznya.andras

    triznya.andras Well-Known Member

    Joined:
    Jun 29, 2019
    Messages:
    2,368
    Likes Received:
    2,864
    There already are scenarios with several trains like that, like the old design of the GWML where the entire timetable was programmed.
    Also as an author it's nice to just create a moderate timetable and just run all trains without editing too much.
     
  15. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,268
    Likes Received:
    3,187
    Can you give me an example of a scenario where all trains run to the full extent and there are multiple trains in both directions?
     
  16. triznya.andras

    triznya.andras Well-Known Member

    Joined:
    Jun 29, 2019
    Messages:
    2,368
    Likes Received:
    2,864
    GWML (2007/2012), like I said. I have uninstalled it years ago, but I noticed the map being busy. A bit unusual.
    Also, a lot of quick drives, practically.
    It's really pointless to attack this feature. BeenTrain decided to develop it for fluff and now you can make use of it if you want.
    I don't use his app but I always considered a funny scenario where I just keep extending one of the standard scenarios, following the previous train, instead of just adding new ones. Or like seeing myselves (yes, plural) from the previous quick drives.
    But it's really simple to just plop down 3-5 trains in each direction and then drive whichever. Not a big deal to edit but it has its quirks.
     
  17. BeenTrain

    BeenTrain Active Member

    Joined:
    Dec 10, 2016
    Messages:
    163
    Likes Received:
    146
    Did I say that they have to have a lot of more trains?
    It is up to the creator what he does. He could add as many AI trains within the limits of TS and give a few, if not all, a sensible timetable.
     
  18. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,268
    Likes Received:
    3,187
    I'm not attaching this feature - in fact it is a very good idea
    I was just pointing out that the problems that would happen if applied to most scenarios.

    Sorry if flagging a problem upsets you.
     
  19. triznya.andras

    triznya.andras Well-Known Member

    Joined:
    Jun 29, 2019
    Messages:
    2,368
    Likes Received:
    2,864
    Oh no, it just felt that way. Merely a matter of wording. How can we solve this / It's no good, because. We're good :)
     

Share This Page