Train Simulator 2014

Geometry Exporting

Network Geometry

You can now select any type of network geometry (track, lofts, roads) and export the geometry to Wavefront .obj format, a geometry format recognised by most 3D modelling software.
  1. Select some network geometry, by either individually clicking, or dragging a circle around it. It does not matter if the scenery is also part of this selection, as it will be ignored.
  2. Press Ctrl + C to copy the network geometry to the clipboard.
Note: currently, if you press Ctrl + C on some track that has speed limits or other network properties, it will flag the route as “Modified” and ask if you want to save changes when returning to the game. This may modify the tracks.bin file, and possibly break scenarios. Therefore, it is recommended that you do not make any changes to the route that you wish to save before exporting geometry, then click “No” to prevent saving changes.
  1. Press Ctrl + Shift + E to export the current clipboard network geometry.
  2. A file named “network00.obj” will be created in the Export folder. This can then be imported into 3D modelling software such as 3ds Max.

Terrain Geometry

You can export an area of terrain around the current camera position into Wavefront .obj format.
  1. Position the camera where you want to export terrain, and press T in object edit mode (not terrain edit mode).
  2. A file named “terrain.obj” will be created in the Export folder. This can then be imported into 3D modelling software such as 3ds Max.

Combining Terrain with Network Geometry

You can import both network geometry and terrain into 3D modelling software and both will be positioned relative to the current “near origin”. The near origin is a coordinate in the Train Simulator world that updates at certain intervals when the camera moves. It is basically used to prevent inaccuracies in coordinates that would occur if you travelled too far from the origin - coordinates are only precise at 6 significant figures.

Basically, what this means is that it’s possible that you could export some network geometry, move the camera somewhere else in the world, and export the terrain, but the network geometry and terrain would not match up because the “near origin” changed.

If you wish to export both network geometry and terrain and have them both match up, the camera should remain stationary when the above steps for both are performed.

In-Game Script Reloading

Scripts can now be reloaded in-game, without having to first exit a scenario and re-enter. This allows incremental changes to scripts that can be observed immediately, reducing development time and improving the quality of scripts.

Scripts can be reloaded by pressing Ctrl + End. This may change if an in-game debugging console is added at a later date.

Notes:
  • All scripts are re-initialised. This means the “Initialise” function is called for every currently loaded script. All values stored in scripts at that time will be lost, as the whole script file is reloaded.
  • Signals will default to their original state, so clear signals may change to danger. Passing over a signal link should force the signal ahead to update itself and pass signal messages along the track, updating other signals.

Scenario Chaining

Scenario Chaining is a new feature that has been added to Train Simulator 2014 which allows scenarios to be linked together. On completion of one scenario, another one can automatically be loaded without requiring the player to go back and forth between menus.

In order to use Scenario Chaining, you will first need to add a driver instruction; this can be anything you like, from a ‘stop at destination’ instruction to a ‘pick up passengers’ instruction, so long as it has a target destination. The target destination should be the pivot point at which the scenarios are linked (e.g. when linking an Edinburgh to Glasgow scenario with a GARL scenario you would use Glasgow Central as the target destination) although this is not a requirement (you can effectively link any scenario with any other).

To add an instruction, go to the timetable view in the scenario editor by clicking the timetable icon in the toolbox. This will bring up the timetable view with a list of driver instructions on the right-hand side. 

As an example: choose a ‘Stop at Destinations’ instruction from the top toolbar. This will add a new instruction to the list. Click the hand icon on the list entry to bring up the target properties dialogue.
 
You will now notice a new section at the bottom of the properties dialogue. This section is for chaining scenarios. By clicking the checkbox on the right-hand side you will notice the text field becomes activated, this indicates that when this target instruction is complete, a new scenario will be loaded. The text field on the left contains the GUID of the scenario that you wish to be loaded. 

Note: In order to find GUIDs for particular scenarios you can use the ‘NameMyRoute.exe’ executable located in the installation folder of Train Simulator. Right-clicking on a scenario in this application will give you the option to ‘Copy GUID Only’ after which you can simply paste the result straight into this text-field using Ctrl + V.

When this instruction is satisfied, a flag will be set indicating to the game that a new scenario should be loaded when this one is complete. One condition is that the scenario must be completed successfully in order to progress to the next scenario. This means that a final destination is also required. A typical use case of this would be to place a stop at destination instruction where the destination is the same as the final destination. This means the player will wait at a platform for a small period of time and then a new scenario will be loaded.

Screen Space Decals

TS2014 offers a new type of decal known as a “Screen Space Decal” that can be applied to any surface at any angle and will follow the shape of the underlying geometry. They are similar to terrain decals but will follow the geometry of any surface, not just terrain. It is less costly to use than the old terrain decals if used correctly. Normal maps and specular/reflective properties can also be applied to the decal.

Two new blueprints have been added, these are: “Screen Space Decal Blueprint” and “Screen Space Decal Material Blueprint”. Both are required to set up a decal.

Screen Space Decal Material Blueprint

The purpose of these blueprints is to create a single material with a texture atlas that can be reused for many types of decal. E.g. you may have a number of concrete surface irregularities that all share the same specular and reflective properties. It is recommended that these are all placed on a single diffuse texture, and the decals will use different UV coordinates to select the part of the texture.

For this example, we will use the following texture (RGB and Alpha):
  1. Open the blueprint editor and create a new Screen space decal material blueprint. You can create this anywhere under provider/product. E.g. RSC\TestDecals\Decals\Materials\PlatformDecalMaterial.xml
  2. For the Diffuse texture ID enter the location of the texture ACE file.

    It is also possible to add a Normals texture ID for a normal map and adjust specular and reflection (cubemap) properties, but we will leave these for the purpose of this tutorial.
  1. Save the blueprint.

Screen Space Decal Blueprint

  1. Create a new Screen space decal blueprint. We will create a new decal for each part of the decal texture we want to use. For this, we will create a decal for the upper left tarmac texture. For this example, we have called it RSC\TestDecals\Decals\PlatformDecal_Tarmac.xml
  2. Fill in the Browse information section. We will call this decal “Platform Decal - Tarmac”. Pick a category for this decal to appear under. For this, we will place it under Misc
  3. The Volume component section defines the initial size of the decal when placed in the world. The “height” defines how far the decal will project from the top of the volume onto a surface below. We will use the following values:
 Minimum Width 1.0
 Minimum Height 0.1
 Minimum Length 1.0
 Width 5.0
 Height 0.2
 Length 1.667
 Maximum Width 20.0
 Maximum Height 20.0
 Maximum Length 20.0
  1. We also want to choose some geometry for Geometry ID. This is not shown in-game, only in the editor, and is used to grab onto the decal to move it around the world, similar to point and spot lights.
  2. For the screen space decal component, this is where we define the material and UV coordinates to use. For the upper left tarmac part of the texture, we will use the following UV coordinates (note, UV coordinates are 0 to 1 from left to right, and 0 to 1 from top to bottom).
 UV top left0.025, 0.025
 UV bottom right0.581, 0.224
  1. The Projection fade multiplier defines how much the decal fades depending on how close the projection is to the top and bottom of the decal box. This value is by default 0.25, and we can leave this as is.
  2. For the Material blueprint reference the material blueprint we created before.
  3. Export the decal. The material blueprint will export with the decal if it is not up to date.

Usage

Open the route editor and place the decal in the world. Drag and rotate the decal and anywhere you like, e.g. a platform loft.

Note: Placing the decal too high above a surface will cause problems with the texture "stamping" on to other objects placed on top. The decal will apply to any surface at all. To avoid this, make sure the decal is as close to the surface as possible as to make this unnoticeable or avoid placing decals where dynamic objects such as passengers are likely to move through. However, also note that the lower you place the decal, the greater the chance of Z-fighting, depending on the surface.

Decals can be rotated into any orientation so that they can be applied to horizontal and vertical surfaces. To prevent stretching of the decal, the box should be aligned perpendicular to the surface being projected on.

Result

Screen space decals are a powerful tool for making plain surfaces appear more realistic without having to author many variations of the same asset. As with all assets, screen space decals should be used in moderation. They do not impact performance as much as terrain decals, but neither do they replace them in functionality. Terrain decals are still useful for cutting holes in the terrain for tunnels and having decals that only apply to the terrain and nothing else.

For best performance with screen space decals, re-use the same material for a number of decals. For example, a single decal texture could have a number of decals used for platforms, roads, track or terrain. If it is clear that they are impacting performance (keep an eye on frame rate), then remove some.

Google Maps Overlay

To use Google Maps Overlay in the editor simply press Ctrl + G to toggle it on and off. This will show an overlay on top of the terrain displaying an accurate mapping of Google map image data to its corresponding location in the world.

After enabling the overlay, it may take a few seconds for the map data to stream in from the servers so some patience is required (depending on bandwidth and resolution settings), this also happens when you move to a new area of the map. The overlay data will be cached to within a few kilometres of the current camera position and only when the camera crosses an invisible boundary will new data be streamed in.

You can freely move the camera about and use route markers to transport to new locations and the overlay will (eventually) catch up as long as it is activated.

When you toggle the overlay, a new flyout dialog will appear at the bottom right-hand side of the screen. The slider at the top of this dialog controls the transparency of the overlay, adjusting this will essentially blend the overlay with the underlying terrain. The Slider just below the alpha slider controls how high the overlay is off the ground, adjusting this to its full height will allow you to go under the overlay.

The pause and play buttons at the bottom of this dialog control the streaming process; pressing the pause button will stop any further tiles from being streamed in and leave the current tiles as they are, no matter where the camera is. Pressing the play button will simply resume the streaming process as normal.

In order to use Google Maps Overlay, you will need to set up the Google Maps API key correctly. To do so:
  1. Go to the API Console at https://code.google.com/apis/console and log in with your Google Account settings.
  2. Expand the APIs & Auth heading on the left.
  3. Click on APIs and find Static Maps API service in the list.
  4. Activate this service using the Enable button.
  5. Once the service has been activated, click the Credentials button on the upper-right.
  6. Click 'Create Credentials'.
  7. Click the Create button and a new key will be generated.
Once you have the API key, go to the Settings menu in Train Simulator, select Tools and then click the Google Maps button. Paste your API key into the box provided and then click Save.

The API key is required so that Google can identify who is downloading map data and limit the number of downloads per user or per application. Currently, the maximum amount of images that can be streamed from Google Maps per user on a daily basis is 25,000. If the Google map overlay stops appearing in the editor for unknown reasons it may be because you have exceeded this daily limit, in which case you could either borrow someone else's API key temporarily or set up a billing profile from the Google API console, see: https://code.google.com/apis/console/Billing.

There are also some other options in this menu which are explained below:

Resolution

There are currently two options in the resolution slider:
  • 640x640
  • 1280x1280
Map Type

The Map Type can either be one of the following:
  • Road
  • Satellite
  • Hybrid
  • Terrain
These determine the type of image that will be displayed in the overlay.

Editing is not affected at all by the overlay; placing assets, texturing and editing of terrain are done exactly the same way as before.

Zoom Level

The zoom level determines how much detail is in the overlay image, this value can be in the range 0-21 but is restricted in Train Simulator to 13-21 (going below 13 is simply impractical (but entirely possible)). Changing the zoom level to a higher value will give more detail whereas a lower value will give less. It also affects the size of the tiles that are displayed; this is due to the fact that at higher zoom levels the overall Google map consists of a higher resolution image and when we specify a fixed resolution type (either 640x640 or 1280x1280) per tile it inevitably means that the surface area per tile will be smaller the higher the zoom level.

Note: Some zoom levels are not supported in various places in the world. Generally, anything below 16-17 is quite well supported but if you find that at a high zoom is streaming in blank/black tiles then try changing the zoom level to something lower.

Tiles Displayed

This is the number of tiles that will surround the player when they enable the overlay. This was added because at high zoom levels, tiles become fairly small and we needed the overlay to cover a reasonably sized surface area. It is recommended that this value stays at either 3x3 or 5x5 for performance reasons.

Palettisation

Palletisation allows artists to reuse a single model for many variations. For example, a palletised character model will use the same geometry, UV mapping and luminosity texture, but can vary by different coloured clothing or skin.

The implementation of palletisation in TS2014 allows for up to 3 different palettes per material. This means for a material with 2 palettes, you could have a palette for skin colour and a different palette for clothing colour.

Models are set up in exactly the same way as before, but textures must be created differently to a standard diffuse texture.

Gradient mapping is heavily used in Photoshop for creating palettes. A gradient map takes in a luminosity value and maps that to a specific colour. Using this method, specific ranges of luminosity values can map to specific shades of different colours.

In 3ds Max, the shader for the material we will use is “SkinDiffusePallete2.fx”. This shader requires a luminosity map and 2 palette textures.

Photoshop Setup

In this tutorial, we will use Photoshop CS2, instructions may vary in later versions.
We need to work with RGB values directly in Photoshop, so it is important that Photoshop is set up in the correct colour space.
  1. In Photoshop go to Edit > Colour Settings. Change “Settings” to Monitor Colour and click OK.
  2. Go to View and uncheck Proof Colours

Texture Setup

  1. Create a new texture in Photoshop as you would normally for a diffuse texture. This texture will be used to contain 2 masks in the red and green channels respectively, and luminosity values in the alpha channel. Blue will be ignored. The way textures are compressed makes the alpha channel most suitable for luminosity values, as opposed to red, green or blue.

    The masks are used to determine whether or not the texture is skin or clothing, so the correct palette is used.

  2. Delete all layers in the image, and create groups in the layers window with the following hierarchy. This hierarchy is specific to this particular character model and can vary. However, reusing this hierarchy will allow you to reuse the same palettes for different characters.
  • Final Image
    • Gradient Mapped Skin
      • Skin
    • Gradient Mapped Clothes
      • Legs
      • Torso 1
      • Torso 2
      • Torso 3
  1. Under the Legs group, we’ll create a greyscale layer for luminosity values for trousers and shoes. Add a mask to the Legs group to isolate the part of the texture that will represent the trousers and shoes. Name this layer “Base Luminosity”.
  2. Also in the Legs group, create a gradient map layer (From the menu bar, Layer -> New adjustment layer -> Gradient Map...). This layer should be above the legs greyscale layer and named “Luminosity Map”. Delete the mask on this new layer, as we only care about the group’s mask as a whole.
  3. Repeat this for the other 3 groups in the “Gradient Mapped Clothes” group, so that 3 parts of the texture are for 3 different parts of the torso (e.g. coat, undercoat and vest).

    Next, we want to adjust the luminosity for all 4 groups of the clothes group, so that each group has a unique range of luminosity. The “Luminosity Map” layers will be used to map the values 0 - 255 to a quarter of this range, i.e. 0..63, 64..127, 128..191, 192..255.

    For Torso 3, change the luminosity map’s gradient by clicking the black/white circle on the layer.Change to a greyscale gradient from 0 - 58 for each RGB value. For Torso 2, use 69 - 122, for Torso 1, use 133 - 185 and for Legs, use 196 - 255.

    These values are roughly 25% of the full range, with padding to compensate for texture compression artefacts. I.e. instead of Torso 2 starting at 64 and ending at 127, it starts at 69 and ends at 122, giving padding of 5 at either end of the range.
  4. Turning visibility on for the luminosity map layers should show the Legs part of the texture is the brightest. The darkest part of the Legs group is still lighter than the lightest parts of Torso 1. The clothes are now uniquely identified by the range of their luminosity values.
  5. We now need to create a gradient map that will become a “palette”. For this example, we will create 3 gradient maps. Create 3 gradient map layers under the Gradient Mapped Clothes group, above the 4 clothes groups as follows. Turn visibility off for now.
  6. Create a mask for the Gradient Mapped Clothes group that combines all masks of the child groups, so that the mask shows the portion of the texture that represents all clothing.
  7. For the first gradient map we created, create a gradient that is split up into 4 subgradients through the use of gradient stops. Each subgradient is 25% of the total gradient. Adjust/add/remove the gradient stops in each subgradient as required to display the range of colour for different areas of clothing.
  8. Repeat for the other two gradients.
  9. These 3 gradient maps will now be our palettes for this character. Texturing other characters in a similar way would allow these palettes to be reused so that the same character can differ by palettes, and different characters can differ by models.
  10. Repeat the above for the Gradient Mapped Skin group. You may want to create sub-ranges for hair, eye and lip colour, but for this example, we’ll just use the entire range of luminosity for skin colour.
  11. Finally, create a completely opaque white layer at the bottom of both the Gradient Mapped Skin and Gradient Mapped Clothes groups. These are required for exporting the image in the format the game requires.

Exporting as DDS

Create an alpha channel for the image if one does not already exist. Make sure all luminosity layers and adjustments are visible and copy and paste the image merged into the alpha channel.
  1. Return to the RGB channels, and turn off the visibilities for all subgroups under Gradient Mapped Skin / Clothes. You should have a completely white texture.
  2. Right-click Gradient Mapped Skin -> Group Properties and make sure only G is checked.
  3. Right-click Gradient Mapped Clothes -> Group Properties and make sure only R is checked.

    This means all areas that are red are clothing, and all areas that are green are skin. This allows the shader to determine which palette texture should be used for both parts of the texture.

  4. Export as .DDS, giving any filename to the texture. Make sure the DDS is saved as 8.8.8.8 ARGB. In 3ds Max, this texture is to be used in slot 1 for a palletised shader.

Palette Textures

The final step is to create the palette textures. A palette spans a single row of a 256x16 texture. This means you can have up to 16 palettes in one texture. For this example, this means we can have up to 256 variations of a single character, using 1 1024x512 texture for luminosity and 2 256x16 textures for palettes.
  1. Save the gradient maps you created for skin and clothes
  2. Create a new 256x16 image
  3. Create a new gradient fill layer (Layer -> New Fill Layer -> Gradient...)
  4. Select one of the clothes gradients you saved, and change the angle to 0 degrees.
  5. Create a mask for this layer so only the first row of pixels are visible. This will be the first palette in the texture
  6. Repeat for other gradients until the texture has been filled up with palettes.
  7. Export this texture without mipmaps, and the filename suffix _nocomp, e.g. clothes_palette_nocomp.ace. _nocomp will prevent the texture from being compressed when exported through the blueprint editor. This is important as the palette be free from compression artefacts to allow for exact mapping.
  8. Assign this texture in 3D Studio Max to the palletised material slot 2. This is texture will be used for any pixels that are visible in the red channel mask.
  9. Repeat this process for the skin palettes, and assign to material slot 3 in 3ds Max.

Check List

  1. Luminosity texture - red and green channels with masks to determine clothing or skin, alpha
  2. with luminosity values
  3. Palette texture (256 x 16) for clothes
  4. Palette texture (256 x 16) for skin and hair
  5. All 3 textures assigned to the slots in palette material 3D Studio Max
  6. Palette texture filenames end with _nocomp (e.g. clothes_pallete_nocomp.ace)

Blueprint Setup

All blueprint types that have a render component now have 4 additional properties related to palletisation. These are:
  • Palettised (def: false)
    • set to true if this scenery is to use palettes.
  • Palette 0 Index (def: -1, min: -1, max: 255)
    • Palette index for the first palette
    • -1 = random palette selection, otherwise use a specific palette
  • Palette 1 Index
    • Palette index for the second palette
    • -1 = random palette selection, otherwise use a specific palette
  • Palette 2 Index
    • Palette index for the third palette (not used by SkinDiffusePallete2.fx)
    • -1 = random palette selection, otherwise use a specific palette
For a character to appear with a random palette for skin and clothing, all that needs to be changed is “Palettised” from false to true.

Export the blueprint as you would normally for a character and additionally setup as a platform character.

Result

Placing the character as scenery will select a palette at random for each instance. Palettes are saved, so palletised scenery always looks the same once placed.
The more palettes you use, the more variation.

Considerations

  • Palette textures should always be 256 pixels wide. They can vary in height, but a height of 16 should be sufficient.
    • Number of rows in the palette x number of palette textures = number of possible variations of a single character model
  • Palette textures should be reused for different character models. There’s no need to create separate palettes for each character unless necessary - e.g. unique high-vis clothing for workmen characters. This will reduce content creation time, and perform better in game.
    • An example of re-use would be the skin colour palette, that could be shared by every character model
  • The luminosity texture does NOT require _nocomp. Compression is fine to use for this texture and works well since luminosity is in the alpha channel. Ensure you use uncompressed DDS textures as the source image, you don’t want artefacts due to double compression when converted to TgPcDx
  • It is possible to use alpha in the palette to define transparent colours for diffuse.
  • It is important that when creating sub-ranges of luminosity in the alpha channel that there is padding between ranges. This prevents texture compression causing subranges to overlap.
  • This should also be considered if any pixels in the palette are transparent.
  • Parts of the texture that use different luminosity sub-ranges should have padding between parts. E.g. trousers and torso parts of the texture should have a few pixels separating them.
  • This should prevent colour bleeding due to mipmap blur.
  • You can blend palettes together. The shader takes the sum of the RGB channels and uses this to determine blend factor

Distant Terrain Texturing

Re-included from TS 2012 the distant terrain generator has been re-enabled for TS 2014. Additionally the system now also generates pre-baked textures for terrain beyond the normal 4km square area textured by the original system.

To generate terrain and textures:
  • Firstly import as much terrain as is required and do all texturing for the route.
    • The distant terrain will render up to 32km from the camera so import any nearby mountainous areas.
    • Make sure to use the existing auto-texturing functionality so that rocky and snow-covered distant areas are marked.
    • Save the route and reload
  • Create a new scenario at the origin so as to start at 0,0 before going to the route edit tools. (This is very important the tool requires the origin to be at 0,0 and may fail if elsewhere)
  • In the paint tools tab
    • The last button opens the generate tool
    • Hit the generate button
    • The tool will generate patches for distant terrain and build textures as well
    • Once complete the tool will automatically start a process to convert the saved textures into the internal .TgPcDx format
    • The new files are stored under Terrain in a new Textures folder
    • Only the .TgPcDx files need shipping the .DDS files may be deleted
      • Alternately these DDS files may be hand edited and converted using the batch file
    • ConvertDDSToTg in the deployment folder
    • Save the route
    • The new terrain patches are stored in DistantPatches.bin

Per-route Camera Blueprints

Routes can now override the default camera blueprints for:
  • Edit camera (flying cam / free view cam)
  • External camera (chase cam)
  • Trackside camera (flyby cam)
  • Coupling camera
  • Yard camera
  • Derailment camera
This allows you to adjust various properties such as max altitude or distance from target a camera move.
  1. Create a blueprint for the camera type you would like to override.
  2. Adjust the values in the blueprint to suit the route.
  3. Set the blueprint ID in the “Route blueprint” for the given camera type.

Additional Cab Camera Views

It is now possible to have any number of alternative views in a cab. These views can have their own direction, FOV and degrees of freedom. The degrees of freedom are around the initial rotation of the camera.

The “cab camera” blueprint has additional fields:

 NameDefaultUnitsUsage
 Has window cameraTrueN/AFalse if the second "Camera Offset" and "Camera Direction" are to be ignored
 Min FOV0.4N/AMinimum FOV as a fraction of the default game FOV
 Max FOV1.0N/AMaximum FOV as a fraction of the default game FOV
 Window min FOV0.4N/AMinimum FOV for the second camera position as a fraction of the default game FOV 
 Window max FOV1.0N/AMaximum FOV for the second camera position as a fraction of the default game FOV 
 Timeline EntryN/AN/AAdditional cab camera positions in order of how they will be cycled through. The sequence forwards will always be:

Default Position > Second Position > Timeline Position 1 >  Timeline Position 2 > ... > Timeline Position n > Default Position

(second position will be omitted if "has window camera" is false)

A timeline entry has the following fields:

 NameDefaultUnitsUsage
 Camera offset(0, 0, 0)N/AThe position of the camera
 Camera direction(0, 0, 0)N/AThe direction the camera is facing. A magnitude of 0 for this vector will default to a vector of (0, 0, 1)
 Vertical directional freedom0RadiansHow many radians the camera can be rotated up and down from initial direction
 Horizontal directional freedom0RadiansHow many radians the camera can be rotated left and right from initial direction
 Transition in*FalseN/ATrue if the previous position in the timeline has a smooth transition into this position
 Transition out*FalseN/ATrue if the next position in the timeline has a smooth transition from this position
 Min FOV0.4N/AMinimum FOV as a fraction of the default game FOV
 Max FOV1.0N/AMaximum FOV as a fraction of the default game FOV
*If either of 2 camera positions in the timeline has a transition in or out to each other, then a transition will occur. The purpose of both fields is to allow the default and second camera positions to transition into a timeline position. The default and second camera positions will always transition between each other.

Usage

The left and right keys will transition backwards and forwards respectively through each cab camera position.

Alignment tool

Added in TS2014 is a new tool for aligning objects to each other, this is primarily for speeding up gantry placements when gantries are manually added but can be used to align any objects to each other.
  • Clear selection by right clicking on window with mouse
  • Select tool
  • Left mouse click to choose the object to align
  • Left mouse click to choose the object to align to
  • Shift key held to snap as well as align
  • Ctrl key to snap to child
  • Ctrl-Shift to snap to midpoint of children (useful for gantry placement)
  • Right-click to cancel tool
Note: One of the major reason for this tool is to allow gantries placed with only hanger arms and no gantry object to be retrofitted with a custom gantry object using the Ctrl-shift to align and snap to the midpoint of children.

Platform Tools

To access the platform properties double-click on a platform loft.

Time of day platform density

Indicated by the clock icon is a table for % density of passengers at different times of day:
  • The plus symbol is used to add an entry
  • The bin to delete a selected entry
  • The up/down icons to move an entry up/down.
  • The time is the start of the period using the 24hr clock

Platform Area Tool

You can now edit the platform area to provide irregular areas, once a loft has been created and selected, the editor will show its outline in white.
  • To edit this chose the resolution and click the generate button
  • Drag the edge markers to the required positions

Seasonal Characters

Seasonal/Weather character variations may now be marked by setting the "Use in" flags.

Point of Interest Markers

A new variant of the platform gate is now available in the field Gate Direction as well as Entry, Exit and both there is now also ‘Point of Interest’.

Points of interest are areas on platforms that a passenger might walk over to while waiting for a train, for example, near train time posters or coffee/food outlets. Placement is done by selection from the browser and dropping the marker on the platform and linking to the ribbon.

Collision Areas

While scenery can have collision areas defined, which are picked up by the platform characters, it may sometimes be necessary to add a manual collision box for an obstacle or group of obstacles, in particular where fence lofts are used.

The new Platform Collision volume can be placed and resized to fit around obstacles that block platform areas, the volume is resizable by dragging the extent markers on the gizmo.

Misc

The platform characters may now have multiple idle animations by naming these wait1, wait2 etc. These are chosen at random.

In-Game Asset Editing

In-Game asset editing is a new feature in Train Simulator 2014 which allows users to easily reload blueprints, textures and models (i.e. assets) from within the editor and also from within the game. This feature will check all asset files in the ‘Assets’ directory (located in deployment) and reload those asset files which have been modified since the last reload time.

This allows artists and content creators to modify resources, export them from the blueprint editor and then reload them in-game without having to restart the game or use the asset editor.

Note: This feature does not replace the Blueprint Editor as this is still needed for child entity placement, etc. but rather is intended for quick modification of assets when they are noticeably incorrect when viewed in the editor/game.

Usage

To use this new feature the user will simply press F9 in the editor/game. This will bring up a dialog showing those files which have been modified since the game started (or since the last reload time) and prompt the user to confirm that they want those files to be reloaded. After which all entities which reference those modified blueprint, texture and model files will automatically be updated to reflect the new changes.

The initial reloading process counts the number of files in the Assets directory so that for any subsequent reloads an accurate progress bar will be displayed where the ‘Gathering for first time...’ text is. Any files that have been modified will be listed in the list box. Click Reload to reload the listed assets or Cancel to discard.

This process may take a little while but will be significantly less time than closing and restarting the game.

Headlight Flares

Headlight ‘flares’ is a new graphical effect in TS-2014 which can be added to new rail vehicles and placed in routes, scenarios etc. in the same way as any typical spotlight can. It produces a lens flaring effect which is the result of light scattering through the lens of the virtual camera.

The effect is generally implemented by drawing a billboarded sprite in front of each headlight and is usually combined with a lens flare technique for added dramatic effect.

Usage

You will now notice a new blueprint type in the blueprint editor called “Head light blueprint”, this is essentially the same as a spotlight blueprint but contains one extra component called “Head light flare component”. This is the component in which most of the parameters for the flare effect will be specified (with the exception of the diffuse colour which is queried from the spotlight component). To create a new headlight simply: Right Click > Add Item > Blueprint > Head light blueprint. This will load the blueprint into the editor.

Opening up the Head light flare component you will see a list of attributes associated with the effect, each attribute and its parameters are listed below with explanations for each:

Blueprint Parameters

Primary Flare

 Flare Texture IDThis is the texture used on the main sprite displayed just in front of the headlight source. It is usually described as a circular fade or other elaborate fade effects, the colour of the this should always be defined in greyscale (i.e. r, g and b components should be equal for each pixel) as it multiplies itself with the colour of the spotlight to give the final output colour.
 Flare Size X/YThe size (in meters) of the flare sprite displayed in the world. The larger these values are the larger the flare in front of the headlights will be.
 Extrusion OffsetThe extrusion offset is how many meters the headlight flare sprite will be offset from its actual position towards the camera before being rendered. This avoids the flare sprite intersecting with the nearby geometry such as rail vehicles and engines. This value should generally be set to 1.0 meters or less.

Lens Flare

The lens flare effect is highly customizable and allows artists to specify each individual flare component (i.e. circular sprite) and it’s specific offset. Artists can place as many flares as they wish by simply adding new components to the Lens Flare tab in the blueprint editor. Each individual flare component has the following parameters:

 Lens flare texture IDThis is the texture that will be used for the lens flare effect on the screen, if you do not intend to have a lens flare effect for a particular headlight then this parameter can and should be left blank.

The Lens flare texture is a composition of X-number of sub-textures where X is defined as the ‘Num flare textures’ parameter (specified below). These sub-textures are aligned evenly horizontally.

Each lens flare component the user adds to the blueprint will then address a specific sub-texture using it’s index (between 0 and ‘Num flare textures’-1).
 Num flare texturesThe number of sub-textures in the lens flare texture (divided horizontally).
 Fade start/end distanceThe lens flare effect is attenuated (linearly) based on the distance the headlight is from the camera. The fade start and end distance specify the range at which this fade process begins and ends respectively.
 Lens flare intensityA constant ambient fade factor for the lens flare effect (between 0 and 1). Specifying a value of 1.0 will have no effect whereas a value of 0.5 for e.g. will cause the overall effect to be less transparent to the viewer.
 Image indexThe index of the image to use in the lens flare texture. This value has to be between 0 and NumFlareTextures-1
 Lens scale X/YThe size of the lens flare component relative to the vertical height of the screen. This value must be between 0 and 1 where a value of 1 would equal the height of the screen. Aspect ratios are maintained so that when the X and Y values are equal the flare image displayed is perfectly square (i.e. an X value of 1.0 will be equal in size to a Y value of 1.0 regardless of the differences in width to height ratios of the display; this also means that an X value of 1.0 will, in most cases, not be equal to the width of the display).
 Lens offsetIf you imagine a line/vector going from the camera position to the headlight position; this value (between -1 and 1) specifies the position at which the flare image should be drawn on this line. A value of 1 places the flare at the headlight position whereas a value of 0 will place it directly in the centre of the screen (i.e. camera position). Values in-between and also less than 0 will give different effects and should be tried and tested until the desired effect is achieved.

Note: If the lens flare effect is not to be included for a certain headlight blueprint, then there is no need to add any flare components to the Lens Flare array.

Workshop Career Scenarios

Career scenarios can now be created by users and published to Steam Workshop. Each published career scenario will have a dynamically generated leaderboard which will hold the scores of users who have subscribed to this scenario and successfully completed it. You can now create a new Career scenario in the same way you would create a Standard scenario by going to the scenario editor menu and selecting New Scenario.

Also in the Scenario Editor menu, you can now edit Career scenarios. Simply select the Career scenario you wish to edit and press the Edit Scenario button.

When a Career scenario has been created it can be published to workshop exactly the same as a Standard scenario. Simply go to the Steam Workshop menu and select the Publish button; any Career scenarios that you have created should now appear in this list.

When you complete a workshop career scenario that you have subscribed to you will notice a new button in the debriefing menu labelled Rate Scenario.

This will take you to the rating menu where you can like or dislike the scenario.

You can also select the Ranking button which will take you to the Scenario rankings menu for that career scenario where you can view the scores of all subscribed players who have successfully completed that scenario.

Tutorial Support

New Scenario Scripting functionality has been added to provide better support for creating tutorial scenarios in TS-2014. A list of newly added API functions is listed below.

Playing Videos

You can now play videos in-game using the following three API calls:

ScenarioManager:PlayVideoMessage( videoAddress, type, paused, controls, style )

where:
  • videoAddress - the address of the .flv video you wish to play (local).
  • type - the video type determines the location and size of the video on the screen, this can either be one of the following:
    • Fullscreen ( 0 )
      • Video completely fills the screen.
      • Used for displaying major information e.g. introduction segments/cutscenes etc.
    • Front and Centered ( 1 )
      • Large centred window
      • Used for displaying major information but without taking the user out of context.
    • Video Call ( 2 )
      • Positioned top left or top right of the screen.
      • Small window.
      • Used for video call type videos, i.e. someone talking to the player, head and shoulders view, scenario briefing etc.
  • paused - determines whether the game is paused in the background when the video plays.
  • controls - determines whether controls are displayed for the video, i.e. play, pause, seek controls etc. values for this are:
    • play 1
    • pause 2
    • stop 4
    • seek 8
  • where, in Lua, you would add the values together e.g. if you wanted a play button and a seek control then you would pass in (1 + 8)
  • style - style flags/hints for borders, positioning etc. (not yet defined).
ScenarioManager:StopVideoMessage ( videoAddress )

where:
  • videoAddress - the address of the video you wish to stop playing.
This will also resume the game if the paused flag was set to true when PlayVideoMessage was called.

ScenarioManager:IsVideoMessagePlaying( videoAddress ) : [ bool ]

This determines whether the video is currently being played.

Localisation

when playing a video message from a script the videoAddress will be translated into it’s localised version by prefixing the language identifier followed by a forward slash, e.g. if you specify the movieName movie.ogg’ and your language settings are English then the final address will be ‘en/movie.ogg’ meaning that you would need to place the movie file into an en directory within the scenario directory. If a movie file (or sound file) cannot be found for a specific language setting then it will revert to en by default.

Note: this localisation technique also applies to audio files as well (see below).

Playing Sounds

Audio files can now be played directly from scenario scripts by calling the function:

ScenarioManager:PlayDialogueSound( filename )

where:
  • filename is the source file (.wav / .dav) of the audio you wish to play.
ScenarioManager:StopDialogueSound( filename )

where:
  • filename is the source file (.wav / .dav) of the audio you wish to stop playing.
Multiple sounds can be played at once.

ScenarioManager:IsDialogueSoundPlayinIsDialogueSoundPlaying( filename ) : [ bool ]

determines whether the audio file is currently being played

Highlighting UI Controls

Controls can now be highlighted from within a scenario script via the new method:

WindowsManager:HighlightControl( controlName, duration, style )

where:
  • controlName - the unique name of the control you wish to highlight (see the Control Reference List for a list of valid control names and the controls they represent).
  • duration - the time in seconds of how long the control is to be highlighted.
  • style - style flags for the highlight (not defined yet, leave as zero).
If any of these controls become redundant in the future then they will simply not display a highlight when called from a scenario script. Likewise, new controls may be added in the future which cannot be highlighted in older scenarios.

The highlight that will be displayed over the UI controls will not concern the scenario scripter but may be changed via the loosely defined style flags.

You can also stop the highlight by calling this method:

WindowsManager:StopHighlightControl( controlName )

where:
  • controlName - the unique name of the control you wish to stop being highlighted.

Looking At Cab Controls

Cab controls can now be focused on via the new script function:

ScenarioManager:LookAtControl( controlName, lerpTime, duration, dstFov )

where:
  • controlName - the name of the control you wish to look at.
  • lerpTime - the time (in seconds) of how long the camera should take to focus on the control (i.e. lerp to the control).
  • duration - how long the camera should focus on the control.
  • dstFov - (degrees) the field of the view the camera will zoom to over lerpTime amount of time.
This method will disable all input control of the camera for lerp_time + duration amount of seconds while the camera focuses on the specified control and waits there for a specific amount of time. This method can be used with message dialogs to inform the player of what the cab controls do and how to use them.

Another method will also be added to restore the camera to its default state:

ScenarioManager:RestoreCameraToDefaulRestoreCameraToDefault( lerpTime )

where:
  • lerpTime is the time (in seconds) of how long it will take the camera to pan back to its original orientation and field of view.
The default state is the camera’s initial orientation and field of view at the start of the scenario.

Saved Messages

You can now save certain message routines in scenario scripts by registering a callback method which will be invoked when the user switches back and forth between these saved messages:

To register a message you call the following method:

ScenarioManager:RegisterRecordedMessage(playCallback, stopCallbackplayInstantly)

where:
  • playCallback - is the name of the method in the scenario script which will be invoked when the user navigates to it using the navigation buttons on the HUD (above)
  • stopCallback - is the name of the method that will be invoked when the user navigates away from the message using the navigation buttons on the HUD. This method should generally close anything that has been opened in the playCallback (e.g. if PlayVideoMessage was called then you should call StopVideoMessage here)
  • playInstanty - (either 0 or 1) used to determine if this message will be saved for the user to navigate to manually or if it should be played straight away.

Ribbon Merge Tool

Previously there has been no way to merge 2 ribbons in the editor, the join tool connects 2 ribbons but this is not useful for platforms which need to be one continuous section.

The Join tool will now merge rather than join 2 ribbons if the CTRL key is held during the operation (the ribbons must have the same direction I.e have been laid in the same direction and be of total length less than 500m for merging to be possible).

This should allow platforms to be created as a single length using the offset tool even when the track work used for the offset contains a junction.