A repository with a bunch of tools and resources to ease Rf2 server usage.
This guide is based on:
To do so, you need a license of the rFactor 2 game plus the DLCs you wish to add to the server.
- A directory on the target computer with read/write access
- The target computer has access to internet.
- Create directory on the target computer
- Copy the script install-new-dedicated-server
- Set the Rf2InstallationDirectory parameter to set the dedicated server installation path
- Run the script
The steamcmd archive is downloaded to the current directory. Then the steamcmd command is invoked to download rFactor2 dedicated server.
- Copy the install-create-serverShortcut to the target computer
- Launch the script with ServerInstallPath and ShortcutSuffix parameters
- By default, the shortcut are generated at the same level as the script.
- Set ShortcutDestinationPath so specify a custom destination.
In order to have tracks and car on the dedicated server, you need to download the addons you wish to use to you dedicated server Packages folder.
- Copy the download-item-workshop.ps1 to the target computer
- Set SteamCMDFolder to the steamCMD folder path
- To pass workshop item, you have to options
- Comma separated list using the WorkshopItems parameter
- A file with one item id per row using the ItemsIdFilePath parameter
- Go to steam from a webbrowser.
- For free content
- Then go to rFactor 2 workshop and look for the url workshop/community/filedetails?id=123456789
- The id parameter is the one to use with the scripts
- For paid content
- Login to steam
- Go to your profile
- Click on your name > Inventory
- Select rFactor 2
- Click on a badge then on the left "See workshop item"
- You land on an error page, but the url is sharedfiles/filedetails/?id=123456789
- The id parameter is the one to use with the scripts
- On the dedicated server computer launch the server once
- Grab the ServerKeys.bin file
- Send it to your gaming PC with rFactor 2 installed
- Copy the ServerKeys.bin file to the UserData folder of your rFactor2 game installation
- Launch the game and get to the main menu
- Close the game
- Go to the UserData folder of your **rFactor2 game **
- Grab ServerUnlock.bin
- Send it to the dedicated server computer
- Copy ServerUnlock.bin to the dedicated server UserData folder - replacing the existing one.
- Launch mod manager using the generated shortcut
- OK: title should have "keys loaded"
SteamCMD has downloaded the items from the workshop, but they are not installed in the dedicated server yet.
- Copy copy-dlc-to-packages.ps1 to the dedicated server computer
- Set SteamCMDFolder and ServerInstallationDirectory
- Launch the script
- Launch mod manager, and ensure you see "keys loaded" in the title
- Select the DLCs you want to install
- Click install
The workshop item are downloaded as rfcmp file in the steamCMD content folder. The script recursively copy them to the Packages folder of the dedicated server installation.
- On the toolbar, click on the 4th icon from the left, "Set package directory"
- Select the dedicated server Packages folder
- Click on the 6th icon on the toolbar to create a package
- Click on "Create New Mod Package"
- Give the mod a name
- Select the track(s)
- Select the car(s)
- You arrive at the Create Mod Package screen
- Click package
- Click install
- Click done
Based on this guide Publishing to the Steam Workshop.
- In a folder copy the rfcm file of your mode
- Create a text file with a vdf extension
- Use the vdf body bellow
"workshopitem"
{
"appid" "365960"
"publishedfileid" "0"
"contentfolder" "<CURRENTFOLDER_ABSOLUTE_PATH_HERE>\OutSteam\content"
"previewfile" "<CURRENTFOLDER_ABSOLUTE_PATH_HERE>\OutSteam\preview.jpg"
"visibility" "0"
"title" "<TITLE_DISPLAYED_IN_STEAM>"
"description" "<DESCRIPTION_OF_THE_ITEM_IN_STEAM>"
"changenote" "<CHANGENOTE_OF_THE_ITEM_IN_STEAM>"
}
Path have to be set in an absolute way to work. The OutSteam folder contains a content folder. The content folder contains the rfcmp file we created for the car.
- Copy uploadToSteam.ps1 to the CURRENTFOLDER_ABSOLUTE_PATH
- Replace the login and password parameters
- Run the script
Once the upload is done, the vdf file publishedfileid is updated to the file id of your item.
This id is the one the item url :
https://steamcommunity.com/sharedfiles/filedetails/?id=123456789
The VDF file has to be kept for the next update.