[REL] Selecting subsets of content for single-player

Seven Smiles

Registered
Edit: New, much simpler version with GUI below

It’s lovely to have an rFactor with only the 60s F1 cars and just click Select All to race against them. And just the 60s F1 tracks so you don’t have to scroll through all sorts of irrelevant and often confusingly-named others.
__________________________________________________________________________________

I have about 150 tracks installed (multiplied by all their variants) and a similar number of cars. With the present UI this means it's hard to find my way around, also possibly slows loading rFactor. I never want all this content available at one time so I came up with a way of dividing it into subsets and only selecting a subset of tracks and a subset of cars. It's all done with the magic of symlinks and a Windows batch file :cool:

First you have to create the subsets.
  1. Add a new folder rFactor 2\UserData\ContentStorage
  2. In there put the familiar Locations and Vehicles folders and a new one SafetyCars
  3. Now decide on the subsets you want and make a folder for each under Locations and Vehicles
I went with
  • Australasia
  • Europe
  • F1
  • Fantasy
  • Historic
  • Karting
  • New (tracks I haven't tried yet)
  • NorthAmerica
  • SE_Asia
  • UK
and
  • F1
  • Historic
  • Karts
  • LMP
  • Novel
  • OpenWheelers
  • Saloons
  • Sports
  • Sports_GT
but you can make whatever categories you want.
4. Now move all your content into your folders (and SafetyCars) as you like
5. Finally, delete rFactor 2\Installed\Locations and Vehicles

Now you're all set. All you need is some batch file magic which I've attached.

To use it:
  1. Extract rF2_content_selector.bat from the zip and save it somewhere
  2. It has to be run as Administrator so that it can set up symlinks
  3. https://windowsreport.com/make-files-apps-run-as-admin-windows-10/
  4. In brief: make a shortcut to the file then set "Run as admin" in the shortcut
  5. Run it
  6. It asks Do you want a specific SUBSET (S or Return) or ALL content (A)? : if not goto 12
  7. If you've previously selected content it asks whether you want to change. If not, goto 12.
  8. Press TAB until the set of locations you want is shown
  9. Press Enter
  10. Press TAB until the set of vehicles you want is shown
  11. Press Enter
  12. It starts rFactor 2 Launcher
  13. (At this point there is a temporary symlink pointing to all your content so the Launcher is happy)
  14. Once the rFactor 2 Launcher is loaded
  15. If you selected SUBSET earlier it deletes the temporary symlink and all rF2 can see is your selected Locations and Vehicles subfolders.
  16. Voila! When you start single-player only the tracks and cars you've selected are present.
___________________________________________________________________________________
Once you have used it to select a subset you must always use it to start the Launcher. If you want to stop using it, answer A to "All content" That will leave a symlink set up to all content, without that the Launcher will re-install the "missing" content. Similarly if you want to start a Multiplayer session running content that is not in your subset.
___________________________________________________________________________________


To completely uninstall it

  1. Remove the directory rFactor 2\Installed\Locations (removes the symlink)
  2. Remove the directory rFactor 2\Installed\Vehicles ( " )
  3. Create new Locations and Vehicles directories
  4. Move your content back from rFactor 2\UserData\ContentStorage
___________________________________________________________________________________
Here it is in use

Code:
rFactor 2 Content Selector V0.4
===============================
Do you want a specific SUBSET (S or Return) or ALL content (A)? :
Currently Locations is set to "UK" and Vehicles set to "LMP"
Do you want to change content? (Y/N): y
Available sets of tracks:

Australasia
Europe
F1
Fantasy
Historic
Karting
New
NorthAmerica
SE_Asia
UK

Press TAB until the set of locations is reached: Europe

Using Location set -- Europe --

Available sets of cars:

F1
Historic
Karts
LMP
Novel
OpenWheelers
Saloons
Sports
Sports_GT

Press TAB until the set of vehicles is reached: F1

Using Vehicle set -- F1 --


(Note: Simlink to ALL location/vehicle files so Launcher doesn't re-install them)
Starting rFactor 2 Launcher...
Once the rFactor 2 Launcher is loaded
Press any key to continue . . .
Only Locations "Europe" and Vehicles "F1" present

___________________________________________________________________________________

In c:\...\rFactor 2\UserData\ContentStorage I have this folder structure
Code:
   Locations
       Australasia
       Europe
       F1
       Fantasy
       Historic
       Karting
       New
       NorthAmerica
       SE_Asia
       UK
   SafetyCars
       Clio_PC
       CorvettePC
       CorvettePCLights
       ISI_MercedesSLS_SafetyCar_2012
   Vehicles
       F1
       Historic
       Karts
       LMP
       Novel
       OpenWheelers
       Saloons
       Sports
       Sports_GT
___________________________________________________________________________________

One small gotcha: if the Launcher installs a new file it will go into the currently selected Locations or Vehicles subfolder. Just cut and paste it to which subfolder you want.
 

Attachments

Last edited:
Very nice solution!
One small gotcha: if the Launcher installs a new file it will go into the currently selected Locations or Vehicles subfolder. Just cut and paste it to which subfolder you want.
I guess you mean here about automatic steam updates?
 
More awesome work! But this is beginning to depress me, and I'm beginning to seriously wonder why haven't Studio397 hired you already?! Does it really take an unofficial modder to quickly improve the UX on his own? Especially with your fantastic work on the gearbox and lights simulation also.

Please don't let my opinion on this discredit your work, which I think is amazing. But why aren't you getting paid for doing this? And/or why aren't Studio397 working on stuff like this themselves.
 
Haha! I'm available :D But just like everyone else modding cars and tracks and stuff, I'm just doing it as a hobby, driven by the need to do things just a little bit better (or the way I want them anyway). This one I knocked out in a few hours and as long as I resist the temptation to add features, maybe a GUI, it's finished.
 
I think my "HistoricF1" category needs a bit of work...
HakkinenLongford.JPG
 
More awesome work! But this is beginning to depress me, and I'm beginning to seriously wonder why haven't Studio397 hired you already?! Does it really take an unofficial modder to quickly improve the UX on his own?
And/or why aren't Studio397 working on stuff like this themselves.
Seeing as S397 are neck deep in unravelling and rewriting the unfriendly ISI method of coding the UI I would imagine, from a business side, that it would be false economics to bother adding to the old UI.
 
Seeing as S397 are neck deep in unravelling and rewriting the unfriendly ISI method of coding the UI I would imagine, from a business side, that it would be false economics to bother adding to the old UI.

I'd say this is more UX actually. It's function over form. If he put some of his ideas and code to Studio397 I'm sure they could use it and add the functionality to the new UI.

But yes, I appreciate they have a hell of a task. I'm just getting frustrated seeing unofficial addons like this which are fantastic, and nothing new from the official channels.
 
I completely agree. But all the work you've done so far should be included in the core of the game itself in my opinion. Flashing headlight tool, gearbox simulation tool, content subset tool or filter. All these things I'm 'hoping' will be included in the new UI but I've seen no indication of that yet.

I'm hoping they have someone employed who is doing all this behind the scenes. If not, they have your details here @Seven Smiles ;)
 
I'd say this is more UX actually.
:confused:
Dopey me saw UX in your first post and thought it was a typo and you meant UI.
I then see Seven Smiles use UX. :eek:
Curiosity wins and I use the free 24hr hotline to Professor Google.

Knowing what UX is I now see what you meant.
My apologies. :oops:
 
I have an improved version. It sets up a dummy "rFactor" folder with links back to the original but populates it with only the Locations and Vehicles you specify in a data file. As it's all done with links it's practically instantaneous, doesn't modify the rFactor installation at all and takes up virtually no HD space.

V1.6 @Dave^ edition Allows the modfile to be dragged and dropped on to ModMaker.bat
V1.8 Minor change: temporary_copy folder follows any change in rf2dir
V1.9 Make sure the temporary_copy folder is successfully created


Now there's a GUI wrapped round it (ModMaker.bat is included in the .exe)


(If Steam is not running it will start it, otherwise the Launcher starts to download all the stuff it thinks is missing)


Code:
c:\> ModMaker.bat 1960s_F1_UK.modfile.txt

rFactor 2 ModMaker V1.6
Using 1960s_F1_UK.dryrun.modfile.txt
Name: 1960s_F1_UK
rf2dir: c:\Program Files (x86)\Steam\steamapps\common\rFactor 2
temporary_copy: c:\Program Files (x86)\Steam\steamapps\common\rFactor 2\UserData\temporary_copy

"Steam.exe" is running
Creating rFactor copy in c:\Program Files (x86)\Steam\steamapps\common\rFactor 2\UserData\temporary_copy\1960s_F1_UK

Added Location CRYSTAL PALACE 1969
Added Location Silverstone90s
Added Location BrandsHatch
Added Vehicle Brabham_1966
Added Vehicle Ferrari_312_67
Added Vehicle Historic Challenge_EVE_1968

Starting rFactor 2 singleplayer...
rFactor loads and runs
When you exit

Code:
c:\Program Files (x86)\Steam\steamapps\common\rFactor 2\UserData\temporary_copy\1960s_F1_UK deleted.
Press any key to continue . . .

The data file contains
Code:
# Comment
name=1960s_F1_UK

Location=CRYSTAL PALACE 1969
Location=Silverstone90s
Location=BrandsHatch

Vehicle=Brabham_1966
Vehicle=Ferrari_312_67
Vehicle=Historic Challenge_EVE_1968

You can make copies with different content as you like.

____________________________________________________________________________

Technical stuff that doesn't affect most people


By default it puts the copy in a folder in rFactor 2\UserData\temporary_copy but if you add a line to the mod file you can put it anywhere you want, even on another drive.

temporary_copy=c:\temp

Also if your rF2 is not installed in the default path it can be overridden in mod file
rf2dir=<path to rF2 install>
Similarly for the command to start Steam
SteamCmd=<Steam.exe command>



There are two more options, for fault-finding:
verbose=2 prints stuff as it's working
dryrun=1 does everything but skips loading rF2
 

Attachments

Last edited:
You are a very smart guy :-)

So if i understand this correctly I could have all of my install on another drive and only link to it saving space on my main harddrive ?
 
I suppose so but why not just install rFactor on the other drive? I suppose a modified version of what I’ve done (one with permanent symlinks rather than temporary ones) could split the install but the most obvious split is to put the Steam download folder on another drive. I had already done that after I saw it suggested here somewhere. This one maybe https://forum.studio-397.com/index....-by-moving-workshop-folder.59125/#post-931830
 
Been playing around with this today, I'm sure I had something similar for SCGT.

I can get the early version to work fine, but the "simpler" version leaves me a bit confused. o_O:D

What am I supposed to do with the data files once I have them?

I've tried double-clicking the bat file, which just tells me how to creat the data files, and I've drag-n-dropped the data file onto the bat file, which does nothing...

Am I being dumb? :p
 
You have to open a command window and run the batch file giving it the name of the mod file.
Like this

Code:
c:\> ModMaker.bat 1960s_F1_UK.modfile.txt

I’m "old school" so that’s obvious to me, I’ve never thought a dragging a data file onto a batch file, I don’t think Bill Gates has either :D

I made a start on a gooey version but got over ambitious with features and work on it slowed to a crawl.
 
Last edited:
I tried to create a shortcut with that and that didn't work either.

Just waiting for a new see to turn up so I can finish building my pc, so I'll start afresh and try again.

Ta.
 
Awsome. :cool:

While I've got your attention... :D

Your exe for creating the career.blt file for the rankings, could you edit that so it opens the rankings site on the upload page?

I created a bat file yesterday to run your exe, then open the website, but it would be much neater if it was all in one package. ;)
 
Back
Top