Table of Contents
Rolling Stock Ownership (RSO) is a mod for the 2019 VR compatible train simulator Derail Valley. It introduces a game mechanic of purchasing and managing railroad equipment—a.k.a. rolling stock—the locomotives and wagons that the player must use to complete job contracts in the game.
Use the Comms Radio to purchase and clear equipment.
Integrates with Custom Car Loader. Custom Car Loader integration returning soon.
Building the project requires some initial setup, after which running dotnet build
will do a Debug build or running dotnet build -c Release
will do a Release build.
After cloning the repository, some setup is required in order to successfully build the mod DLLs. You will need to create a new Directory.Build.targets file to specify your local reference paths. This file will be located in the main directory, next to DVOwnership.sln.
Below is an example of the necessary structure. When creating your targets file, you will need to replace the reference paths with the corresponding folders on your system. Make sure to include semicolons between each of the paths and no semicolon after the last path. Also note that any shortcuts you might use in file explorer—such as %ProgramFiles%—won't be expanded in these paths. You have to use full, absolute paths.
<Project>
<PropertyGroup>
<ReferencePath>
C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\DerailValley_Data\Managed\;
C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\CommsRadioAPI\;
C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\DVCustomCarLoader\;
C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\DVLangHelper\;
C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\MessageBox\
</ReferencePath>
<AssemblySearchPaths>$(AssemblySearchPaths);$(ReferencePath);</AssemblySearchPaths>
</PropertyGroup>
</Project>
It's recommended to use Git's autocrlf mode on Windows. Activate this by running git config --global core.autocrlf true
.
To package a build for distribution, you can run the package.ps1
PowerShell script in the root of the project. If no parameters are supplied, it will create a .zip file ready for distribution in the dist directory. A post build event is configured to run this automatically after each successful Release build.
Linux: pwsh ./package.ps1
Windows: powershell -executionpolicy bypass .\package.ps1
Some parameters are available for the packaging script.
Leave the package contents uncompressed in the output directory.
Specify a different output directory.
For instance, this can be used in conjunction with -NoArchive
to copy the mod files into your Derail Valley installation directory.
When compressing the package contents, a temporary directory is created and later removed.
This can be used to leave the temporary directory in place for inspection, debugging, etc.
It has no effect when used with -NoArchive
.
Source code is distributed under the MIT license. See LICENSE for more information.