Install encrypted cars in DevMode

Discussion in 'Car Modding' started by lagg, Nov 17, 2021.

  1. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,958
    Hi all
    I've to create, from time to time, skinpacks for our champs.
    In the last Q&A, Paul Jeffrey answered me that it's possible to create transparent screenshots in DevMode
    Is it possible yo install a encrypted car in DevMode, to create the screenshots, to make the icons for the new UI?

    Thanks.
     
  2. Corti

    Corti Registered

    Joined:
    Sep 29, 2014
    Messages:
    1,362
    Likes Received:
    2,517
    Crea una carpeta con el nombre del mod que aparece en el archivo manifiesto (BMW_M4_Class1_2021) despues añades los dos archivos mas que se encuentran en la carpeta de instalacion del juego (car.mas & car-encrypted.mas) y listo. Deberia funcionar. Aunque solo consigo ver el showroom :(

    Create a folder with the name of the mod that appears in the manifest file (BMW_M4_CLASS1_2021) then add the two more files that are found in the game installation folder (car.mas & car-encrypted.mas) and ready. It should work. Although I only get to see the showroom :(
    upload_2021-11-17_21-56-17.png
     
    atomed, Mauro and svictor like this.
  3. PatientRF2fan

    PatientRF2fan Registered

    Joined:
    Aug 30, 2020
    Messages:
    297
    Likes Received:
    513
    It's unfortunate as I would like to make specific AIWs for many of the encrypted cars. I tried to put the usf2000 in dev mode. Can drive it but no setup options, just default and the AI just fall off their wheels onto the track LOL
     
    vava74 likes this.
  4. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,958
    Hola @Corti
    El M4 sí que lo veo en el showroom y con los cambios del player.json que ha indicado Paul Jeffrey las capturas salen con fondo transparente, así que creo que podré crear los iconos de los skinpacks de la nueva UI, sin problemas.
    Muchas gracias a los dos.

    Hi Corti
    I can see the M4 in the showroom and after doing the changes in the Player.json suggested by @Paul Jeffrey , the screenshots have transparent background, then i think that i can create the icons of the new UI without problems.
    Thank you very much, both.
     
    Corti likes this.
  5. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    @lagg I don't know if you know it already, but we have made a "special" DevMode Showroom, to get less distorted and identically positioned Screenshots and on my Online-Tools Site (Link in my Signature), you can find a Tool that creates all needed Icon Files, from the uploaded Screenshot(s).
    Maybe that can be helpful for you. ;)
    Here is the Site about the Showroom.
     
    Emery, Corti and jayarrbee36 like this.
  6. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,958
    Yes. I always use the showroom and your tools to create the icons.
    Thank you very much, those are very useful.
    My problem was only with the transparent background.
    With the old system we could do a screenshot and have an image to use with your tool.
    With the new system we have to make the background transparent manually. With almost 40 cars, and sometimes different, it's a tedious work.
    Knowing how to install the encrypted cars in DevMode makes the process simpler again.

    Thank you all very much for your help.
     
    redapg and Corti like this.
  7. FuNK!

    FuNK! Registered

    Joined:
    May 26, 2013
    Messages:
    626
    Likes Received:
    491
    I know this is drifting off topic here, but just wanted to add that I made a greenscreen showroom and used Blender to remove the green background. The results are great, you can even generate an alpha that can be reused. However, that technique is not something for everyone. You would need some experience with Blender to be able to finetune the output.
     
    haunetal1990 and Corti like this.
  8. Mauro

    Mauro Registered

    Joined:
    Oct 14, 2011
    Messages:
    2,136
    Likes Received:
    4,024
    hi guys

    i'm trying to make icons for f1 1966 carset based on brabham bt20 (encrypted car)
    i tryed to put it in devmod but cars don't load in devmod showroom (original bt20 and custom skin too).

    any solution?

    this is my devmod folder structure
    [​IMG]
    (i tryed to put custom skin files in main Brabham_1966 folder but same result)

    an this is devmod showroom
    [​IMG]
     
    Last edited: Jan 8, 2022
  9. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,958
    Can you see the original cars in the showroom?
    If the answer is "yes"
    Make a new car.mas file including your cars.
    Otherwise, i don't know:oops:
     
  10. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    237
    Likes Received:
    113
    The transparent background screenshots are still saved here in the modev folder. The ones that get saved to the other steam folder always are opaque black. Took me some time to figure this out but was relieved I didn't have to manually make the backgrounds transparent and still preserve the opacity of the windows etc. Here is the path to the folder.
    C:\Program Files (x86)\Steam\steamapps\common\rFactor 2\ModDev\UserData\ScreenShots

    I have found I had to go back and erase around the vehicle and border when Chris's tool wouldn't delete all of the whitespace. Perhaps a stray pixel is sometimes generated in the corner. I've just lived with this workaround.
     
  11. ThomasJohansen

    ThomasJohansen Registered

    Joined:
    Dec 27, 2019
    Messages:
    956
    Likes Received:
    2,191
    its a shame the pngs from screenshots are not transparent in normal mode.
    but normally I just use an all white showroom, and remove the background quite easily in gimp, and then remove the shadow and add a blurred shadow.
    Take about 2 min if there are some contrast between livery and white background.
     
    Mauro likes this.
  12. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,958
    Just for info.
    In addition to what @Brent said, the screenshots have transparent background in devmove if you have previously modified these parameters in the player.json of the devmode userdata.
    Code:
        "Screenshot Depth Alpha":true,
        "Screenshot Depth Alpha#":"Save the scene depth in the alpha channel of screenshots",
        "Screenshot Format":3,
        "Screenshot Format#":"0=default (jpg), 1=bmp, 2=jpg, 3=png, 4=dds, 5=clipboard",
     
    vava74, Nick9320, redapg and 3 others like this.
  13. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    237
    Likes Received:
    113
    @lagg I'm very sorry I totally forgot about that detail, yes that needs to be done, this jogs my memory now. I spent hours and hours of frustration before I found this in the devmode player.json. It's been a year or two and I totally forgot. I don't understand why this can't be set as default?

    I wish the devs would add a section in the user and dev guide on how to create these icons. They could easily provide a simple rfcmp showroom, explain what parameters can be changed like how to adjust the camera if necessary, maybe provide a photoshop script to save off the various different sizes of icons and document all that are needed for the various overlays etc, that the 1 and 2 key turn on and off any background models in the showroom. Everyone who paints a custom livery, league admin, or modder runs into needing to know this and there is no guide or standard of consistency.
     
    vava74, redapg, lagg and 1 other person like this.
  14. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    237
    Likes Received:
    113
    I want to thank Chris for his RF2 online tools site. Thank GOODNESS he's put together a showroom and batch tool for creating the icons online. I've used his icon creator for at least a hundred vehicles, nearly 4000 images with his creation tool.

    http://meetme.bplaced.net/rF2_onlineTools/
     
  15. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,342
    Just to add some extra info about getting DLC car to show up in DEV mode showroom for Skin Livery Icon Creation, as some friends have raised this question a few times recently.

    For most DLC car, simply copy to DEV mode will work (make sure to move all mas file to a single folder, rather than multiple subfolder).

    For some DLC & also other car mods that use specific SEARCHPATH in spinner.gen, copy method won't work. It requires a few extra steps to make the car load in DEV mode showroom.
    1. Copy DLC car folder into ModDev\Vehicles folder.
    2. Open Dev mode, select DLC car from list, select any track.
    3. Alt-Tab to windows explorer, go to ModDev\UserData\Log folder.
    4. Alt-Tab back to game, click RACE, then immediately Alt-Tab back to windows explorer, and watch LOG folder.
    5. As soon as a file called something like VehGen*********.scn appears in LOG folder, left mouse select the file then press Ctrl+C & Ctrl+V as fast as you can (This has to be done very quick, or you may miss the file). Then game will crash (as normally would for DLC car).
    6. Open this VehGen*********.scn file in Notepad, find a SEARCHPATH line such as below:
    SEARCHPATH=INFINITI\Q50_BTCC
    7. Now you just have to create correct folder path that matches the SEARCHPATH in the GEN file. For example, Infiniti Q50 folder path will be:
    ModDev\Vehicles\INFINITI\Q50_BTCC
    8. Place all mas files in the new folder. Done.

    In any case, this remains as a workaround, hopefully there will be an official tool soon, so that modders don't have to go through the painful process to create some nice looking icons.
     
    atomed, Felix Schendel, lagg and 5 others like this.
  16. Felix Schendel

    Felix Schendel Registered

    Joined:
    May 31, 2014
    Messages:
    132
    Likes Received:
    83
    I tried this but I wasn't fast enough to do the copy paste process. Maybe my SSD kicks my ass ;) So I googled if its possible to do this with a powershell command. And yes I found a solution sorry I lost the link where
    Code:
    ### SET FOLDER TO WATCH + FILES TO WATCH + SUBFOLDERS YES/NO
        $watcher = New-Object System.IO.FileSystemWatcher
        $watcher.Path = "F:\Steam\steamapps\common\rFactor 2\ModDev\userdata\log"
        $watcher.Filter = "*.scn"
        $watcher.EnableRaisingEvents = $true
    
    ### DEFINE ACTIONS AFTER AN EVENT IS DETECTED
        $action = { $path = $Event.SourceEventArgs.FullPath
                    Copy-Item $path -Destination "F:\Steam\steamapps\common\rFactor 2\ModDev\userdata"
    #                $changeType = $Event.SourceEventArgs.ChangeType
    #                $logline = "$(Get-Date), $changeType, $path"
    #                Add-content "F:\Steam\steamapps\common\rFactor 2\ModDev\userdata\log\scn.txt" -value $logline
                   
                  }  
    ### DECIDE WHICH EVENTS SHOULD BE WATCHED
        Register-ObjectEvent $watcher "Created" -Action $action
    #    Register-ObjectEvent $watcher "Changed" -Action $action
    #    Register-ObjectEvent $watcher "Deleted" -Action $action
    #   Register-ObjectEvent $watcher "Renamed" -Action $action
        while ($true) {sleep 0.5}
    Save this code as StartMonitoring.ps1 for example and execute it by right click and select "execute with Powershell". Then start rF2 in DEV Mode und select the car and the track und click race.

    You need to adjust the $watcher.Path line and the -Destination in the Copy-Item line. I had to play abit with the Value of the sleep but with 0.5 ( I think it's seconds) it works. For example when I use 1 (seconds) I get the scn file of the Pace Car
     
    Nick9320, McFlex, redapg and 2 others like this.
  17. Nick9320

    Nick9320 Registered

    Joined:
    Feb 8, 2012
    Messages:
    419
    Likes Received:
    2,773
    Thanks guys! You are a legends! :rolleyes:

    Just add one thing from my side: for Bentley GT3 car I also had to rename the car.mas to CONT_GT3_2020.MAS as it was in SCN-file. Maybe it will be helpful.

    [​IMG]
     
    lagg, Corti, svictor and 1 other person like this.
  18. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    Is it still done that way?
    I need to make icons for all GT3 cars for a league, and most of the cars don't show up in the showroom. Your method of looking in the log folder doesn't work for me.
    Why doesn't S397 standardize this and make all cars show simple, as some are done? Why is everything in rF2 complicated and non-standard? I always try to bring more drivers into rF2, but there are many things that should be simple, that are made unnecessarily difficult.

    Anyway, has anyone managed to map the path of all GT3 and can help by sharing?
    Or could the S397 make these paths available for cars that are non-standard and do not work in the showroom?
     
  19. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    It should work in the Single Player Side View Showroom now.
    Read THIS and the following Posts.
     
  20. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    But in Moddev it doesn't work yet, right?
    To work in Single Player we need to assemble the car, create the MAS, generate the rfcmp, enter Single Player, take the screenshots and then go back and remake the car again, generating the MAS and the rfcmp just to check if everything went well . In Moddev just drop the loose files that works. It's much easier and faster.

    Or in Single Player does it work droping loose files too?
     
    Last edited: May 3, 2023

Share This Page