Creation Sharing [editor Mod Download] Tsw 4 - Better Cooking Inside Editor And Easy Paking For Distribution V1.3

Discussion in 'PC Editor Discussion' started by trainsimcz, Jan 28, 2024.

  1. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
     
  2. MichaelPlant

    MichaelPlant Well-Known Member

    Joined:
    Jul 14, 2023
    Messages:
    199
    Likes Received:
    259
    If you don't want to unblock the files manually, you can enter
    Code:
    Get-ChildItem -Recurse 'C:\Program Files\Epic Games\TrainSimWorld4MOD' | unblock-file -confirm
    into Windows PowerShell (change path if editor is installed in different location)
     
    • Helpful Helpful x 1
  3. Daunfr59

    Daunfr59 Member

    Joined:
    Dec 8, 2016
    Messages:
    63
    Likes Received:
    69
    Thanks to both of you for responding so quickly. I remember the unblocking issue when you (CFTFC) raised it before but it's so long since I tried out the cooking mod that I had completely forgotten.

    I have now got my plug in to cook correctly and will move on to try the new Distribute / paking tool.
     
  4. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    I have a question when packing files that are cooked, are the pak files supposed to be 1kb in size? I cooked the content and distributed them so I don’t know what I did wrong l
     
  5. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
    Pak files should be larger than 1kb. Sounds like cooking has failed. Look in the Cook log to see if there is error messages.

    Also take a look in Windows Explorer in your plugin folder, is there a Saved folder along with the Content folder. Look in the Saved folder and you should a structure similar to,
    ..\TrainSimWorld4MOD\TS2Prototype\Plugins\THB_OSD_Timetable\Saved\Cooked\WindowsNoEditor\TS2Prototype\Plugins\THB_OSD_Timetable\Content
     
  6. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    Yes there is a Saved folder but didn’t notice much of a difference in the log when cooking the content
     
  7. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
    Navigate into your Saved folder all the way to the Content folder as shown in my previous post. Is there an assetregistry.bin file and what size is it. You can also download FModel to look inside your pak file and see what's there.

    Try removing any mods before cooking and watch the output log when you cook to see if anything looks out of place.
     
  8. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    I currently have 3 KB of space on the assetregistry.bin and I just took out the mods from the TSW4 directory to see if that did it but it didn’t work. I looked at my output log of the cooking after it failed and I see that the PublicEditor-cmd.exe executable. Needs to be built first. Is that correct or incorrect?
     
  9. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
    Can you attach your output log because that doesn't sound right (C:\Users\[MyUser]\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+TrainSimWorld4MOD\)
     
  10. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    Here's my output file I don't know what could make it not package my cooked content.
     

    Attached Files:

    • Log.txt
      File size:
      22.3 KB
      Views:
      5
  11. Daunfr59

    Daunfr59 Member

    Joined:
    Dec 8, 2016
    Messages:
    63
    Likes Received:
    69
    Does your pak. file have the name of your "DLC" in it ?

    I mistakenly generated several 1KB files because I hadn't hit return after typing the DLC name into the "Distribute" box before clicking on the Distribute button. It then generates a blank pak file with a name like TS2Protype.Windows No editor _.pak .(The DLC name should be after the hyphen.)

    When I typed in the name of my DLC and hit Enter it checked whether the cooked files existed and if there was an error in cooking it printed a message saying "This mod isn't cooked or doesn't exist."

     
  12. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    Does this mean I have to put a DLC name after the name of my plugin? I don’t understand how that works
     
  13. Daunfr59

    Daunfr59 Member

    Joined:
    Dec 8, 2016
    Messages:
    63
    Likes Received:
    69
    No - sorry if I have confused you.

    If you are using the new Distribute button in the editor you click on "Add Mod" and then type the name of your plug in in the box.
    You then have to press RETURN before clicking on the Distribute button to pak your plug in.

    If you don't the Distribute button will create a blank pak file which is very small and doesn't include your plug in name.

    If you do press enter after typing your plugin name the cooking tool checks whether a cooked "mod" exists with that name and will either come back with the "not cooked" message or (if cooking has worked) it waits for you to press "Distribute" and then generates the correct pak .file (which will include your DLC name.)

    Apologies if I have misunderstood what you are trying to do but after cooking my plug in yesterday I ran into this problem while trying to pak. the plug in. It was only when I read "trainsimcz" instructions I realised what I was doing wrong and the "not cooked" message helped me to check and correct the errors in cooking (which were caused by a few DTG textures I had copied).
     
    • Helpful Helpful x 1
  14. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    478
    Likes Received:
    1,886
    Just for make that clear... first you fill your Plugin name, then press ENTER (thats important step) and then checkbox next to that field needs to be checked too (again press ENTER there once you checked it... you will have to press ENTER probably 2 times on checkbox becouse first enter will disable it so second one will enable it again). That checkbox is for generating important files and it need to be checked if you are paking your original plugin (the one you created, not the DTGs ones)..., if you dont check it then it will generate pak file without important files like uplugin, .dlc, upluginmanifest...
     
  15. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    478
    Likes Received:
    1,886
    Yes, config was for my externa easy pak utility but its not needed anymore because i added that option directly into the Editor (that new Distribute button). So its detecting editor folder by itself. And that way its blocked by any AV programs which is much better.
     
  16. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    I tried pressing Enter and it shows it’s unable to create a pak file after it shows where it’s located and it’s not there either.
     
  17. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
    It looks like you are using the Epic Game Launcher to open the PC Editor. You need to use the StartEditor.bat (included with the cooking mod) located at D:\UE_4.26\TrainSimWorld4MOD.
     
  18. Daunfr59

    Daunfr59 Member

    Joined:
    Dec 8, 2016
    Messages:
    63
    Likes Received:
    69
    Thanks for your reply. I thought that was probably the case.

    You are right about the AntiVirus programs.
    With earlier versions of your cooking mod my Norton anti virus deleted several files during unpacking (and I had to restore them individually) but version 1.3 installed without any problems.
    Thanks again for all your work in producing this mod.
     
  19. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    I was using the shortcut of the Editor s that must be the Epic Store version of the Editor.
     
  20. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
    This came from the log you uploaded,

    ERROR: Missing D:\UE_4.26\TrainSimWorld4MOD\TS2Prototype\Binaries\Win64\TS2Prototype\Binaries\Win64\TrainSimWorldPublicEditor-Cmd.exe executable. Needs to be built first.

    Notice TS2Prototype\Binaries\Win64\ is repeated which happens if you use the Epic Game Launcher and is the reason you can not cook your mod.
     
  21. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    I got the pak file to show it full of content but fails to show up in the game. Any reason why it's not showing up in game?
     
  22. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
    That's a bit of a loaded question cause if the pak file isn't set up correctly it won't show in game. I can only guess as I can't see what you have done but here is some questions to think about,
    - Does your plugin work in the "Play in Editor"
    - Does your plugin have a ContentManifest file
    - In the location where the log file you uploaded is, is there another file called Cook-[date]-[time].txt
    - Did you verify that your files have been cooked and are in the Saved folder.
    - Are you using any already cooked files in your plugin as they will be ignored when you cook and need to be copied over to the Saved folder manually.
    - Have you used FModel to verify the pak file is set up properly.
     
  23. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    Yes my scenario is working for play in editor and yes I made a Content Manifest and and are you talking about the Cooked folder stuff that’s there too? Not so easy using the Editor paking function. I used Fmodel to see my pak file too
     
    Last edited: Jun 18, 2024
  24. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    478
    Likes Received:
    1,886
    What are you making... scenario ? Did you fill all fields in ScenarioDefinition ?
     
  25. spikeyorks

    spikeyorks Well-Known Member

    Joined:
    May 31, 2023
    Messages:
    935
    Likes Received:
    1,380
    Has there been any change to the 'old' method of cooking and paking plugins?

    Only this morning I have been unable to manually move anything due to the "Saved/Cooked/WinNoEd/TS2Prototype/PlugIn" folder not generating? (It was fine yesterday).

    Everything else seems OK. I have my Cooking Button and it seems to work. The cooking process takes the usual 20 seconds or so and all the other folders inc Metadata generate according to the time the mod was cooked?


    RESOLVED - I had forgotten that I had removed one of the core TSW routes from my system (GWE). Putting it back in again solved my cooking issue. Everything OK now :)
     
    Last edited: Jun 18, 2024
  26. ScottN

    ScottN Active Member

    Joined:
    Sep 1, 2020
    Messages:
    220
    Likes Received:
    130
    Yes I did make a scenario and filled out all fields in the Scenario Definition.
     
  27. JRWH30

    JRWH30 New Member

    Joined:
    Nov 21, 2021
    Messages:
    11
    Likes Received:
    0
    I would like to make a mod, but which link in this thread is the version that I can use now without problems?

    I recently tried using PC Editor with the one at the first link in this thread, but had the following problems
    1. I can't drag and drop files from Explorer. (It can do with the regular PC Editor.)
    2. When I press the Cook button, I get an error. (This may be my mistake).

    Best regards
     
  28. CFTFC

    CFTFC Active Member

    Joined:
    Apr 18, 2020
    Messages:
    100
    Likes Received:
    112
    The current version is V1.3. You can download the full version TSW4_Cooking_and_EditorTools_1.3.zip from here,

    This patches the official PC Editor and doesn't replace it. Make sure you use StartEditor.bat that is installed at X:\Program Files\Epic Games\TrainSimWorld4MOD with the patch to open the Editor otherwise cooking will fail.
     
  29. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    478
    Likes Received:
    1,886
    There is no problems with the mod, let me explain what is wrong with your editor:
    1) you cant drang and drop files from explorer because my Distribute button require Admin Access and this is blocking that drag and drop from explorer (maybe if you run explorer like a Admin then maybe it will work, i dont test that. But if you not gonna use Distribute button in the same step like cooking then you can say no for admin and editor should start like normal version... but distribute button will not work correctly.

    2) errors during cooking - its hard to say if you dont provide any log... so my guess is that if its not really cooking and crash directly with errors then you dont unlock .dll files So basically Windows 10 and 11 is blocking .dll files downloaded from somewhere else. You need to unblock them (all those .dll files which you are overwriting from the .zip file). There is some powershell command for that. But this can be only one of the errors, without log i cant really tell you what is wrong there.
     
    • Helpful Helpful x 1
  30. JRWH30

    JRWH30 New Member

    Joined:
    Nov 21, 2021
    Messages:
    11
    Likes Received:
    0
    Thank you for your response.
    I understand.

    For example, In the case to change the color of the Class 801 bogie, I changed the material of the bogie and made RVV, RVD and FRM, but the Cook Mod button on the Editor gives me a Cook error.

    I will post the log file.
     

    Attached Files:

  31. JRWH30

    JRWH30 New Member

    Joined:
    Nov 21, 2021
    Messages:
    11
    Likes Received:
    0
    Changing the color of the bogie is like repainting a rusty, brownish one during maintenance, for example.
    When previewed on the editor, the changed material appears to be reflected.
     

    Attached Files:

  32. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    478
    Likes Received:
    1,886
    Go to your Plugin folder and there should be save folder, if you go thru it you will find again your plugin folder and content and then maybe .uasset and .uexp files. If they are there then its cooked. Cooking is always crashing in the end. You can even test if your plugin is cooked by clicking on Distribute button, adding new plugin and then type plugin name and then press enter. It will give you error message if its not cooked.
     
  33. hebertar

    hebertar New Member

    Joined:
    May 5, 2022
    Messages:
    10
    Likes Received:
    7
    I lost my cook button, I’m using the separate “starteditor” shortcut.

    Anybody else?

    I tried installing the ver1.3 patch also.
     
  34. JRWH30

    JRWH30 New Member

    Joined:
    Nov 21, 2021
    Messages:
    11
    Likes Received:
    0
    Thanks for your reply.

    I ran the Distribute button on the editor as the cooked folder existed.

    Here is the message after the execution
    Your pak is saved here: D:/Program Files (x86)/TrainSimWorld4MOD/TS2Prototype-WindowsNoEditor-PBD801B.pak

    But when I go to look at that file path, it is only 210KB.

    Maybe it is not working.
     
  35. trainsimcz

    trainsimcz Well-Known Member

    Joined:
    Dec 12, 2016
    Messages:
    478
    Likes Received:
    1,886
    210 KB is file which include something for sure. Not sure what is your mod about. You can send me private message with link to download the .pak file and i can check if its right.
     
  36. JRWH30

    JRWH30 New Member

    Joined:
    Nov 21, 2021
    Messages:
    11
    Likes Received:
    0
    Thanks for your reply. How do I send a private message?
     

Share This Page