[REL] Selecting subsets of content for single-player

Discussion in 'Other' started by Seven Smiles, Sep 8, 2019.

  1. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    55
    Likes Received:
    50
    Thanks for your help...

    here ist the Command-window
    rFactor 2 ModMaker V1.7
    Usage: C:\Users\KIPP-G~1\AppData\Local\Temp\_MEI63002\ModMaker.bat <Modfile>
    The Modfile must have
    NAME=<Name for the mod> (preferably one word)
    LOCATION=<Track folder name>
    repeat as required
    VEHICLE=<Vehicle folder name>
    repeat as required

    For example
    name=1960s_F1_UK
    Location=CRYSTAL PALACE 1969
    Location=Silverstone90s
    Location=BrandsHatch
    etc.
    Vehicle=Brabham_1966
    Vehicle=Ferrari_312_67
    Vehicle=Historic Challenge_EVE_1968

    Anything on a line after # is a comment

    If your rFactor is installed somewhere other than
    c:\Program Files (x86)\Steam\steamapps\common\rFactor 2
    then you can add a line like this
    rf2dir=c:\Program Files (x86)\Steam\steamapps\common\rFactor 2

    Similarly for the command to start Steam
    SteamCmd=c:\Program Files (x86)\Steam\Steam
    Drücken Sie eine beliebige Taste . . .

    Here the modified Favourite-File:

    {
    "# %ProgramFiles(x86)% will be expanded to your Windows setting but you can write it explicitly if you want": "",
    "# Same for %LOCALAPPDATA%": "",
    "# Use / not backslash": "",
    "#MyPostCommand: use this call a program or batch file after rF2 runs": "",
    "#MyPreCommand: use this call a program or batch file before rF2 runs": "",
    "#SteamDelaySeconds: How long it takes Steam to start up before we can start rF2": "",
    "CrewChiefArgs": "RF2_64BIT",
    "CrewChiefExe": "\"%ProgramFiles(x86)%/Britton IT Ltd/CrewChiefV4/CrewChiefV4.exe\"",
    "DiscordArgs": "--processStart Discord.exe",
    "DiscordExe": "%LOCALAPPDATA%/Discord/Update.exe",
    "MyPostCommand": "",
    "MyPostCommandArgs": "",
    "MyPreCommand": "",
    "MyPreCommandArgs": "",
    "SteamDelaySeconds": 10,
    "SteamExe": "d:/Zusatz/Steam/steam.exe",
    "TeamSpeakExe": "\"%ProgramFiles(x86)%/TeamSpeak 3 Client/ts3client_win64.exe\"",
    "UserData player": "player",
    "VolumeControlExe": "\"%ProgramFiles(x86)%/VolumeControl/VolumeControl.exe\"",
    "rF2root": "d:/Zusatz/Steam/steamapps/common/rFactor 2"
    }

    Here the Modmaker-file

    # Created by rFactoryModManager

    Name=micha

    rf2dir=d:\Zusatz\Steam\steamapps\common\rFactor 2
    SteamCmd=d:\Zusatz\Steam\steam.exe

    Vehicle=BMW_M6_GT3_2018

    Location=Autopolis

    and the last: The scenario-File:
    {
    "Mod Selection": {
    "cars": [
    "BMW_M6_GT3_2018"
    ],
    "tracks": [
    "Autopolis"
    ]
    },
    "ModManagerOptions": [
    "micha.modfile.txt"
    ]
    }

    What ist wrong:
    Thanks for your help...

    Micha
     
  2. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    785
    Likes Received:
    850
    I can't see anything wrong. I created a copy of your environment by
    Code:
    D:\Zusatz>mklink /j Steam "c:\Program Files (x86)\Steam"
    Junction created for Steam <<===>> c:\Program Files (x86)\Steam
    so d:\Zusatz\Steam points to my Steam install. I then run your data file with ModMaker.bat

    Code:
    >ModMaker.bat micha.modfile.txt
    rFactor 2 ModMaker V1.7
    Using D:\Zusatz\micha.modfile.txt
    Name: micha
    rf2dir: d:\Zusatz\Steam\steamapps\common\rFactor 2
    temporary_copy: c:\Program Files (x86)\Steam\steamapps\common\rFactor 3**\UserData\temporary_copy
    
    "Steam.exe" is running
    Creating rFactor copy in c:\Program Files (x86)\Steam\steamapps\common\rFactor 3\UserData\temporary_copy\micha
    
    "Locations\Autopolis" not found
    "Vehicles\BMW_M6_GT3_2018" not found
    
    Starting rFactor 2 singleplayer...
    
    c:\Program Files (x86)\Steam\steamapps\common\rFactor 3\UserData\temporary_copy\micha deleted.
    Press any key to continue . . .
    rFactor runs fine (though there are no cars and tracks so I can't actually load anything)

    ** I hacked ModMaker.bat to work in the non-existent "c:\Program Files (x86)\Steam\steamapps\common\rFactor 3" just to make sure that path wasn't the problem. It simply created "c:\Program Files (x86)\Steam\steamapps\common\rFactor 3\UserData\temporary_copy"
     
    Last edited: Dec 6, 2019
  3. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    785
    Likes Received:
    850
    I wonder if you have misunderstood how ModMaker.bat works? There is no need to make any change to the rFactor install, ModMaker makes its own temporary shadow copy of the folders using symlinks to the original folders and deletes it afterwards.
     
  4. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    785
    Likes Received:
    850
     
  5. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    55
    Likes Received:
    50
    Thanks again for your help. I understood the principle, but Rafctor does not start with me. Nothing happens. I just do not understand that.
    Without the modmaker Rfactor starts properly. So I suspected a mistake somewhere.

    I do not understand that ... too bad ... but thank you very much. I'll keep trying
     
    Last edited: Dec 6, 2019
  6. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    55
    Likes Received:
    50
    I'm already a bit further.

    The Modmaker.bat from the temp directory now starts from the command window and rf2 works with the appropriate modfile. That's a success.
    >ModMaker.bat micha.modfile.txt

    If rfactorlights is running in the background, rfactor 2 will hang with the startup logo. :-(

    I can not get it to work with RfactorModManger.
    I suspect that my installdir will not be taken over.
     
  7. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    785
    Likes Received:
    850
    With a lot of assistance from @ctbr we have unearthed a bug in the ModMaker.bat . Just possibly it will fix @Vanisch's problem too.

     
    Last edited: Dec 12, 2019
    atomed and Vanisch like this.
  8. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    55
    Likes Received:
    50
    Unfortunately the new version doesn't change the problem for me. Modmanager started, cars and race track selected, start rfactorbutton: nothing.
    :-(

    if the Mod Maker.bat is started in the Temp directory with a suitable module, everything works. I also created a batch file.

    ModMaker.bat micha.modfile.txt

    The Modfile is:
    # Created by rFactoryModManager

    Name=micha

    rf2dir=d:\Zusatz\Steam\steamapps\common\rFactor 2
    SteamCmd=d:\Zusatz\Steam\steam.exe

    Vehicle=F1_Legends_Racing_2_Season_1967

    Location=Eifel Betonschleife

    Addendum: Works only with the old version. The new version makes an error message that everything should already be there.
     
    Last edited: Dec 14, 2019
  9. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    785
    Likes Received:
    850
    Something odd is happening: when rFactoryModManager.exe runs ModMaker.bat rFactor doesn't see any plugins. Run ModMaker.bat itself and rFactor does see all plugins. SimHub uses a plugin so...

    I'm investigating.
     
  10. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    785
    Likes Received:
    850
    Last edited: Apr 6, 2020
  11. Dave^

    Dave^ Registered

    Joined:
    Oct 14, 2019
    Messages:
    158
    Likes Received:
    64
    Is there a way to "drill down" the car selection?

    For example "Apex Modding's FIA GT3 2012" has a lot of different series and years of GT3 cars, would be nice to be able to pick for example the 2014 blancpain cars only.

    I know I can do this by creating a mas file, but that takes ages and also takes up quite a bit of storage space.

    Just wondering if it's something which could be added to this?
     
    atomed likes this.
  12. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    785
    Likes Received:
    850
    I don't think so - I had a quick look at those data files and yes you'd have to create a "teams" MAS file for each car. That could be done programmatically but then a different mod might well handle the different classes/subsets differently.

    rFactor really needs to have a few command line options added (or a new config file) to select content rather than me playing games with the data files to fool it into doing what I want.
     
    Dave^ and atomed like this.
  13. Dave^

    Dave^ Registered

    Joined:
    Oct 14, 2019
    Messages:
    158
    Likes Received:
    64
    Thanks for that, I thought that would be the case. If it could be done you'd have done it already. :D

    SCGT was great for stuff like this, thought there might be something similar in RF2.
     

Share This Page