Skip to content

Simulation ‐ Sim Creator Wizard

Katy Fox edited this page Feb 19, 2024 · 1 revision

When you are first setting up a new locomotive, the amount of simulation-related scripts can be overwhelming. To help with this, CCL includes a Simulation Wizard that will automatically add all of the necessary scripts for a particular locomotive type. You can then add, remove, or rearrange the components or change the connections to match your own requirements.

Important

In order to run the simulation wizard, you need to start with a prefab that doesn't already contain a [sim] object. If one already exists, you must delete or rename it before you will be allowed to run the wizard.

image

Launch the Sim Wizard by right clicking anywhere on your (main/exterior) prefab and selecting the CCL > Create Loco Simulation option from the pop-up menu. The Sim Wizard window should appear somewhere on your screen. Inside the window, you will be able to select the general type of locomotive you want to create, and then select which default values you would like to apply. For example, in the image below, we've selected the Diesel Mechanical locomotive type, and we'll use the default values from the base game's DM3:

image

Once you're ready to proceed, click the Add Simulation button. Three things will now happen:

  1. A DamageController script will be added to the root (top level) of your prefab. This script allows sim components to signal that they've been damaged. Each field holds an array of Port IDs that identify which damage sources should be tracked.
  2. A new [sim] object will be added and selected. This object holds the master SimConnections script which is used to control the flow of data between components.
  3. Several child objects will be added to the new [sim] object. Each of these children holds one or more sim component scripts - think of them as different sub-systems within your locomotive. For example, these components can be a diesel engine simulation, a fuel tank, or even a cab input definition. There are other components which do not perform an actual physical task, but instead are used for mathematical calculations (such as a ConfigurableAddDefinition component).

image

Clone this wiki locally