Fix For Editor Cooking

Discussion in 'PC Editor Discussion' started by trainsimcz, Oct 17, 2023.

  1. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    498
    Likes Received:
    1,981
    Well no surprise that editor is missing some key parts. Sure its just beta but come on... nobody test cooking before releasing ? More funny is that this quick fix takes them ages to release it... cant watch that anymore so i decide to release my work around until they release their fix as with this fix im already cooking in editor for more then a week... now you can do it too...
    You can download my changes here: http://www.trainsim.cz/?mod=article&showid=2705

    Once you download it, extract it into your editor so the files match... overwrite files if needed (they include important changes because i combined unofficial editor with official one so they dont support XSX platform, ps4, etc...)
    - Once extracted then important is to remove all your created stuff from the editor... it should be like you first download it + have activated all owned DLCs... so start editor and check if all your DLCs are loaded.
    - if all that is right then run generate.bat file, that will generate key file for the cooking.
    - once its done (it will take some time so dont rush it), command window will stay open but you will see there AssetRegistry.bin created, saved... so you can close the window when its done
    - start copy.bat file, that will copy key file into the correct folder
    - last is cook.bak.... that you need to edit, fix the paths there as i dont know where is your editor installed...
    Enjoy your cooking...
     
    • Like Like x 9
    • Helpful Helpful x 2
  2. eldomtom2

    eldomtom2 Well-Known Member

    Joined:
    Jul 31, 2022
    Messages:
    2,329
    Likes Received:
    2,499
    If we need to remove all our created stuff from the editor, how can we cook anything?
     
  3. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    498
    Likes Received:
    1,981
    Removing all created stuff is only for the first step... for generating that key file. After you can put your stuff back. You dont repeat whole process always before cooking... its just for make to editor cook. So once you finish generating and copy.bat then you can move all your stuff back.
     
  4. eldomtom2

    eldomtom2 Well-Known Member

    Joined:
    Jul 31, 2022
    Messages:
    2,329
    Likes Received:
    2,499
    Has anyone tried this with e.g. a basic scenario? Can they confirm it works?
     
  5. atpyatt

    atpyatt Well-Known Member

    Joined:
    Nov 28, 2020
    Messages:
    118
    Likes Received:
    314
    Yes, it works, although cooking is only the first half, then you need to worry about packing your plugin correctly so it appears in the game.
    If you aren't already you need to join the discord https://discord.gg/mBh7UWTe and look in the tsw-modddng section. Somebody called Ligithin has taken a lot of time to work it all out and provide examples for others to follow.

    Be warned though you will need to be prepared to invest some time in understanding how everything needs to work.
    upload_2023-10-20_15-29-20.png
     
    Last edited: Oct 21, 2023
  6. ligithin

    ligithin New Member

    Joined:
    Feb 25, 2022
    Messages:
    4
    Likes Received:
    10
    I'm going to take a minute and go over everything I've learned over the past few days, post a link to the build environment that I made and go over how to modify it and how it works and why. Also I'm going to go over the steps I took to get the Cooking fix to work so that way people have a mostly functional editor so they can start to port their works over to the game so it can be distributed.

    I'd like to take this opportunity to thank DTG for giving us the power of Creation, nothing is ever perfect and this software is in Beta so it's 100% expected not to act like a finished product and I think its very benevolent of them to even release it in the first place, a lot can go wrong when moving software packages that are part of a large build control system and micro sizing them down to a single in place install so Kudos to them for even getting it this far along. Also a huge thanks to the Developers who are doing the live streams that stuff is pure gold, keep it coming.

    But for now I'm going to put together a virgin editor on another computer and go over the steps to install the cooking support fix and package your mods to appear in game. I will make a post for that shortly.
     
    • Like Like x 6
    • Helpful Helpful x 2
  7. classthrash#2930

    classthrash#2930 Member

    Joined:
    Jan 13, 2024
    Messages:
    98
    Likes Received:
    25
    I'm trying to cook a service timetable, but when i run the script to cook the timetable (manual version) i end up with a cooked folder containing 1 file "CookedIniVersion" with no files or folders, anyone got any pointers where im going wrong?
     
  8. classthrash#2930

    classthrash#2930 Member

    Joined:
    Jan 13, 2024
    Messages:
    98
    Likes Received:
    25
    Is it possible to cook a service timetable, without route definition/ objective files, I'm trying to cook a timetable with master data file, but after the cooking process has Finnish I only get a metadata folder with a text file, what I'm I doing wrong ?
     
  9. classthrash#2930

    classthrash#2930 Member

    Joined:
    Jan 13, 2024
    Messages:
    98
    Likes Received:
    25
    i keep getting this error when cooking, has anyone seen this before?
    THelper: Cooking MCTRAINZ (Windows): Running AutomationTool...
    UATHelper: Cooking MCTRAINZ (Windows): An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, p
    lease enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
    UATHelper: Cooking MCTRAINZ (Windows): at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
    UATHelper: Cooking MCTRAINZ (Windows): at System.Reflection.Assembly.LoadFile(String path)
    UATHelper: Cooking MCTRAINZ (Windows): at AutomationToolLauncher.Launcher.Run(String[] Arguments)
    UATHelper: Cooking MCTRAINZ (Windows): BUILD FAILED
     
  10. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    139
    Likes Received:
    139
    I had the same problem. You have to Unblock some of the files. I don't remember the exact order but go to ..\TrainSimWorld4MOD\Engine\Binaries\DotNET and right click on AutomationTool.exe then select properties at the bottom. On the next screen at the bottom if it says Security: check the box Unblock then Okay. Next go to ..\TrainSimWorld4MOD\Engine\Binaries\DotNET\AutomationScripts do the same thing to AutomationScripts.Automation.dll and DLCBuilder.Automation.dll. There might be more but just run the cook again and see what error pops up. Unblock and try again till it works. Make sure you are using StartEditor.bat to start the editor otherwise you'll get another error during the cook. Finally make sure your plugins are directly in the Plugin folder ..\TrainSimWorld4MOD\TS2Prototype\Plugins
     
    • Like Like x 1
  11. Spikee1975

    Spikee1975 Guest

    It's amazing and at the same time disturbing to see the brilliant work of trainsimcz being completely ignored by DTG.

    It really seems to me that it is not wanted. Why is this not pinned? Instead we're seeing pinned threads about silly Free roams or a speculation thread index a random user deems important.

    If you ask me, DTG never wanted anyone to release TSW content on their own, the editor is nothing but a recruitment tool. Technically, it's your enemy and I'm not aware of any game that makes it so hard for users creating (and releasing) content. If you look back at games like Q3Arena, one of the most widely used game engines in history, the editor was fully usable right from the start, and so was TSC / Rail Simulator, with Kuju offering the full dev tools (editor, conversion tools) shortly after release.

    It seems each mod, for example timetables, released for free is something DTG sees as lost income. There's no technical reason not to release a full fledged editor, it's purely tactics.
     
    Last edited by a moderator: Feb 16, 2024
    • Like Like x 4
  12. jackthom

    jackthom Active Member

    Joined:
    Aug 22, 2020
    Messages:
    377
    Likes Received:
    186
    That’s still a bit too conspiracy theory for me at the moment Spikee1975 .
    However if the missing files bug and the inability to cook aren’t fixed in the very near future I’ll certainly be with you 100%.
     
  13. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    277
    Likes Received:
    448
    Now you guys have got me wondering why they didn't include any of the loop macros for the blueprints system...
     
  14. 2martens

    2martens Well-Known Member

    Joined:
    Oct 6, 2020
    Messages:
    379
    Likes Received:
    478
    That is no limitation of the editor. The timetable class simply does not support them as it would be very difficult if not impossible to simulate a timetable deterministically.
     
  15. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    277
    Likes Received:
    448
    It seems to me a simple warning not to use them with the timetable class would have sufficed.

    Edit: Sorry if that was overly defensive, you caught me at the end of a tough day at work.
     
    Last edited: Feb 17, 2024
  16. classthrash#2930

    classthrash#2930 Member

    Joined:
    Jan 13, 2024
    Messages:
    98
    Likes Received:
    25
    Thanks for the help, I've managed to get it to work now , happy cooking timetables!!!
     
  17. classthrash#2930

    classthrash#2930 Member

    Joined:
    Jan 13, 2024
    Messages:
    98
    Likes Received:
    25
    Hello,
    I hope you can help, I'm trying to cook a timetable and loco reskins, but if cook them separately, but i can't get the editor to validate the cooked reskin, so i can't use it in my timetable. if i include the reskin file within the timetable folders the cooking crashes.
    Can you tell me what is the correct format to cook a new timetable and loco reskins that reference each other.
    Many thanks
     
  18. Spikee1975

    Spikee1975 Guest

    What does this have to do with TSC? Different game, different teams. TSC will always allow you to easily create content and share it without having a degree in software engineering.

    There's no evil AddOn manager in TSC :), that's why it will outlive TSW - and I am 100% convinced of that.

    Quoting coder legend John Carmack: "If a software is too complicated to use, people will stop using it." And he knows. Nothing more damaging for creativity than having to overcome massive technical hurdles which distract you from putting your plans into reality.
     
    Last edited by a moderator: Apr 29, 2024
    • Like Like x 1
  19. spikeyorks

    spikeyorks Well-Known Member

    Joined:
    May 31, 2023
    Messages:
    1,183
    Likes Received:
    1,882
    My Cooking Button has disappeared again.
    Have DTG altered the game again? (I think I did notice a quick update earlier on).
    Very frustrating if true :(

    UPDATE - Just realised that there was a 29th April update. Has that affected the Editor for everyone?
     
    Last edited: Apr 30, 2024
  20. Spikee1975

    Spikee1975 Guest

    All here for me still...
    20240430_024501.jpg

    Maybe there's a Frying button instead?
     
    Last edited by a moderator: Apr 30, 2024
  21. The7Train

    The7Train Active Member

    Joined:
    Nov 6, 2018
    Messages:
    190
    Likes Received:
    88
    Yup it's broken for all of us.
     
  22. The7Train

    The7Train Active Member

    Joined:
    Nov 6, 2018
    Messages:
    190
    Likes Received:
    88
    Is there any chance an update is coming to the fix? I tried using yours from April 13th but it keeps saying unknown version, so I'm assuming the editor updated again sometime in the last few days.
     
  23. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    498
    Likes Received:
    1,981
    There is no update for cooking fix... its not needed, latest version is still working fine.
     
  24. spikeyorks

    spikeyorks Well-Known Member

    Joined:
    May 31, 2023
    Messages:
    1,183
    Likes Received:
    1,882
    Can you confirm that the correct version is 4.26.1 ?
    (Only I'm having trouble getting a pak file to work. But I think it is me that is the problem and not the mod).
    Thanks.
     
  25. 2martens

    2martens Well-Known Member

    Joined:
    Oct 6, 2020
    Messages:
    379
    Likes Received:
    478
    If the editor is updated, you need to re-run the initial setup of the cooking mod.
     
  26. classthrash#2930

    classthrash#2930 Member

    Joined:
    Jan 13, 2024
    Messages:
    98
    Likes Received:
    25
    have you managed to get TSW 5 PC editor to cook yet?
     
  27. yeecharlie#6454

    yeecharlie#6454 Well-Known Member

    Joined:
    May 29, 2021
    Messages:
    186
    Likes Received:
    588
    Just use the TSW 4 editor with this mod for the time being.
     
  28. classthrash#2930

    classthrash#2930 Member

    Joined:
    Jan 13, 2024
    Messages:
    98
    Likes Received:
    25
    I'm getting fed-up with the multiple blueprint crash errors, i hope they fix it soon!
     

Share This Page