-
Notifications
You must be signed in to change notification settings - Fork 6
Home
With the update to Simulator, CCL is now more complex and powerful than ever. If you are not familiar with Unity concepts, you are strongly encouraged to watch tutorials on how the Unity Editor works.
The car template and exporter Unity package is available in a zip file under releases. If you need to install the Unity Editor, use version 2019.4.40 (do NOT use one of the 2020 or newer versions, this could cause compatibility issues). You will have to look into the previous releases archive on the Unity site in order to find the correct version.
The following steps assume that you've installed the Unity Editor and have created a new project.
Important
Make sure your Unity version is 2019.4.40!
Caution
Having your mesh or materials named the same as the car prefab can cause a conflict when loading the car into the game. Make sure to use different names for your assets and prefab!
-
Open the
Project Settings
, then thePlayer
tab. In theOther Settings
dropdown, change the color space toLinear
. Afterward, go to theXR Settings
dropdown and setVirtual Reality Enabled
to true, andStereo Rendering Mode
toSingle Pass
. -
Import CarCreator.unitypackage into your project (right-click on your Assets folder in the Project tab and select
Import Package > Custom package...
).
You should now have a folder called "CarCreator" under your project Assets, and a CCL tab in the menu bar.
- Under the CCL tab should now have a new option: Create New Car Type. Click this button to launch a car creation wizard window. Fill out the fields as prompted, and once finished, click the "Create Car" button to proceed.
- The wizard will have created several new assets in a new folder under _CCL_CARS, and selected the scene and car type for you:
- A CustomCarType asset (MyCar_cartype.asset)
- A CustomLivery asset (MyCar_livery.asset)
- A main car prefab (MyCar_template.prefab)
- An interactables prefab (MyCar_interactables.prefab)
- A scene containing an instance of the main prefab and interactables prefab (MyCar_create.scene)
- Now you can modify your car object to align with your vision. Make sure you are modifying the prefabs and not just the objects in the preview scene! You'll likely want to replace the meshes first; the template is set up with a simple cube in place of the car body. Next, you can align your bogies, couplers, chains, etc. so that they match your new mesh. After aligning the bogies, make sure the bogie colliders match the positions of the bogies (see the Bogies and Colliders pages for more details). For the interactables prefab, you can move around the brake wheels and release lever, the simple models will be replaced with the real models when loading into the game.
- Select your car type asset from the project pane and modify its properties to your liking. Once finished, click the Export Car button at the bottom of the inspector. This will bring up the car validator which will run some basic checks on your car structure. If any issues are found, they will be indicated here. Click Continue Export to proceed to the final export window.
-
Click "Export Train Car" once you are ready to export. You can read
[HOW TO EXPORT]
or[HOW TO AVOID ERRORS]
within the window if you are having any trouble. You can check "Open build folder after export" if you want to see the results of the export. -
The export window should open to your Derail Valley directory if it exists within the C:/ drive. If not, navigate to your Derail Valley install location and find the UMM mods folder:
...steamapps/common/Derail Valley/Mods/
-
Create a new folder inside of the Mods folder to hold your new car. (You can reuse the same folder if this is not the first time exporting; be careful to not accidentally clear the previous contents if you don't want that!). Make sure you select or open the folder for your car and that the name is displayed in the bottom of the selection dialog.
Caution
Make sure you are exporting to the correct folder!
The export process might take a minute or so to complete. Once your car is finished exporting though, it is ready to use inside of Derail Valley! It can be spawned using the car spawner mode of the comms remote - make sure it is enabled in the ESC menu settings.
Tip
You can export multiple cars into subfolders to ship them as a single mod.