TABLE OF CONTENTS
- Overview
- Tutorial 1 - UE4 - DLC Project creation and folder structure
- Tutorial 2 - UE4 - Scenario files creation
- Tutorial 3 - UE4 - Formation creation and setup
- Tutorial 4 - UE4 - Scenario timetable setup
- Tutorial 5 - UE4 - Scenario timetable graph
- Tutorial 6 - UE4 - Scenario definition setup
- Tutorial 7 - UE4 - Scenario help tips
- Tutorial 8 - UE4 - Scenario objectives class defaults setup
- Tutorial 9 - UE4 - Scenario objectives components
- Scenario objectives components
- Objective Action Wait setup
- Objective Action Move To setup
- Objective Action Seat setup
- Objective Action Lever setup
- Objective Action Button setup
- Objective Action Junction setup
- Objective Action Fuel Connector setup
- Objective Action Cargo Fuel setup
- Objective Action Speed setup
- Objective Action Enter Exit setup
- Objective Action Simugraph setup
- Scenario objectives components
- Tutorial 10 - UE4 - Scenario objectives event graph
- Tutorial 11 - UE4 - Scenario scenery tiles
- Tutorial 12 - UE4 - Playing a scenario in the editor
- Tutorial 13 - UE4 - Dialogue audio
- Tutorial 14 - UE4 – Calculating Scoring Thresholds
- Tutorial 15 - UE4 – Cooking content to a PAK file
- Summary
Overview
This set of tutorials provides information on the elements that go in to creating a scenario for use in Train Sim World.
We’ll be covering the DLC project creation, creating the different scenario files within the TSW Editor, setting up a scenario timetable, creating rail vehicle formations for use in a scenario, scenario help tips to guide the player, creating objectives, placing scenery within scenario scenery tiles and playing the scenario in the editor.
We’ve assumed that the person reading has a fundamental understanding of how to use their chosen modelling software, manipulating a model, adding bones, is familiar with exporting and has a good understanding of base UE4.
Tutorial 1 - UE4 - DLC Project creation and folder structure
Scenarios can be included as part of a route or locomotive project/add-on, this requires the scenario to be created as part of the route or locomotive content and not as a separate project.
Alternatively scenarios can be created as their own add-on content, to do this the project would need to be created with the steps below.
Note: Follow **either** the instructions for creating a plugin in the editor or the instructions to manually create a new plugin. **You do not need to follow both sets of instructions as they achieve the same result.
In editor project/plugin creation
Firstly open the TSW Editor, you will then need to click on Edit, followed by Plugins. After clicking Plugins a new window will open.
[Tutorial 1 - Image 1]
Within the new window you should click on the New Plugin button in the bottom right corner. Another new window should open.
[Tutorial 1 - Image 2]
The New Plugin window is where the details for your new DLC plugin should be entered, the Content Only option should also be selected as the template. Once the information has been input, you should click the Create Plugin button in the bottom right corner.
[Tutorial 1 - Image 3]
The New Plugin window will close and you will then have a new and empty content folder for your Project/Plugin in the Content Browser.
[Tutorial 1 - Image 4]
Manual project/plugin creation
1. Navigate to the TSW Editor installation directory.
2. From the installation directory click through to the following file path: “TS2Prototype\TS2Prototype\Plugins\DLC\”.
3. Within the DLC folder, create a new folder and name it something relevant to the DLC (for example New Scenarios).
4. Within the new DLC folder (in this case called New Scenarios), create a new folder called “Content” and in addition create a new text document.
5. Change the file extension of the new text document from .txt to .uplugin and change the name to something relevant to the DLC (such as NewScenarios.uplugin).
6. Right click NewScenarios.uplugin and edit the document.
7. Copy the below text and paste it into the .uplugin file.
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "KolnAachen Route Gameplay",
"Description": "KolnAachen Route Gameplay",
"Category": "Dovetail.Content",
"CreatedBy": "Dovetail Games",
"CreatedByURL": "http://www.dovetailgames.com",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
"Installed": false,
}
8. Change the highlighted sections (FriendlyName and Description) to relevant naming (such as New Scenarios/New Scenarios DLC).
9. After the changes have been made, save the .uplugin file and close it.
10. Launch the editor (TS2Prototype\Engine\Binaries\Win64\UE4Editor.exe).
11. Once open, ensure that the newly created DLC has been included as a plugin by clicking Edit at the top of the screen.
12. Click Plugins and on the left panel find the category specified in the .uplugin file (by default Dovetail.Content).
13. Find the DLC content in the list and make sure the Enabled box is ticked.
Folder structure
If you’re creating scenarios as part of a route or locomotive project or creating them as a separate project, the folder structure within the Scenarios folder is the same.
To keep things organised in UE4, there needs to be the following hierarchy within the Scenarios folder (the example below is part of a locomotive add-on):
[Tutorial 1 - Image 5]
These new folders should be created within the UE4 Content Browser.
Tutorial 2 - UE4 - Scenario files creation
This tutorial covers the creation of all the basic/necessary files needed for scenarios.
Firstly before creating any of the below files you should create a folder for a specific scenario, for example a folder named WSR_Sc01 for the first scenario on West Somerset Railway.
Common scenario files
These are files referenced by other scenario files and in the scenario definition data asset for each scenario, this will be covered later however these files need to be created first. These common files, the Objective Composer and Scenario Manager, should be created in a folder called Common within the Scenario content folder.
[Tutorial 2 - Image 1]
Within the Common folder, Right Mouse Click in the content browser and create a new Blueprint Class. Once you click this a new window should appear.
From the new window you should search and select ObjectiveComposerBP. Name it something relevant for the set of scenarios (for example ObjectiveComposer_WSR).
[Tutorial 2 - Image 2]
You will need to repeat the steps above but this time in the blueprint window search for and select ScenarioManagerBP. Again, name it something relevant for the set of scenarios (for example ScenarioManager_WSR).
[Tutorial 2 - Image 3]
After creating both common files you should open the ObjectiveComposerBP file you created and change the Scenario Manager Actor Class to the ScenarioManagerBP file you created.
[Tutorial 2 - Image 4]
After changing this, Compile and Save the file.
Scenario Timetable
Within a Scenario folder, Right Mouse Click in the content browser and under Miscellaneous select Route Timetable.
[Tutorial 2 - Image 5]
Once the timetable file is created you should name it something relevant to the scenario, for example WSR_Sc01_Timetable.
Scenario Objectives
Within a Scenario folder, Right Mouse Click in the content browser and create a new Blueprint Class. Once you click this a new window should appear.
[Tutorial 2 - Image 6]
In the new window you should search for and select the common ScenarioManagerBP created earlier (in this example we called it ScenarioManager_WSR). Once created name it something relevant to the scenario such as WSR_Sc01_Objectives.
[Tutorial 2 - Image 7]
Scenario Definition
Within a Scenario folder, Right Mouse Click in the content browser and under Miscellaneous select Data Asset. After clicking this a new window should open.
[Tutorial 2 - Image 8]
In the new window you should search for and select Scenario Definition. Once created name it something relevant to the scenario such as WSR_Sc01_Definition.
[Tutorial 2 - Image 9]
Content Manifest
Within the top level/root folder for the content, Right Mouse Click in the content browser and under Miscellaneous select Data Asset. After clicking this a new window should open.
[Tutorial 2 – Image 10]
In the new window you should search for and select Content Manifest. Once created name it ContentManifest.
[Tutorial 2 – Image 11]
Open the Content Manifest file. It may be possible to fill in the relevant information, any files that aren’t currently created can be added at a later date in the definition. Don’t forget to update this file as the required files are created. See the image below for a full/complete example of the Content Manifest file for a route (a scenario pack would only include defined scenarios).
[Tutorial 2 – Image 12]
Tutorial 3 - UE4 - Formation creation and setup
Creating a formation
Firstly, Formations should be created in an appropriate folder. They should be in the root content folder for whichever type of add-on/project is being created.
Once a Formations folder has been created, Right Click in within the Formations folder and under Miscellaneous select Data Asset. After clicking this a new window should open.
In the Data Asset window, search and select TrainFormation. Once created name it something relevant such as WSR_Sc01_PlayerFormation.
[Tutorial 3 - Image 1]
Formation setup
Open the formation data asset just created. This file simply defines a list of rail vehicles that are in a formation using their Rail Vehicle Definitions. You will want to click the + symbol to add an array element and then select the RVD you want to use within the Train Entry properties.
An example of a complete formation can be seen below.
[Tutorial 3 - Image 2]
You will need to create an individual formation data asset for each rail vehicle you are going to use or place on the track.
Tutorial 4 - UE4 - Scenario timetable setup
Timetable details setup
Open your scenario timetable and click Timetable Defaults from the top navigation bar.
[Tutorial 4 - Image 1]
The within the Timetable defaults you should select the route definition data asset which your scenarios are being created for. For example if the scenarios are for West Somerset Railway you would select WestSomersetDefinition. You can also change the time of day.
[Tutorial 4 - Image 2]
Note: If you’re not seeing any Route Definition data assets in the Route field drop down menu you may need to tick Show Cross Plugin Content. This can be ticked from the View Options menu in the bottom right corner of the Route field drop down menu
[Tutorial 4 - Image 3]
Timetable formations and services
You will need to add at least one formation and service to the timetable, this should be the player service for a scenario. You can add more if you want AI trains stationary or moving along the route during the scenario.
To add a formation or service click Add New and select either option.
[Tutorial 4 - Image 4]
Once created, feel free to change the name to something more recognisable. You should then select the formation and set the Train Entry to a Formation for the player service, after doing this the Rail Vehicles section in the details tab should be filled.
[Tutorial 4 - Image 5]
At this point you can also pick a spawn location for the formation. To do this simply click Pick Location in the details tab and then click a point on the track in a route to select that as the spawn point. If done successfully you will see a box with the formation name next to it on the track ribbon.
[Tutorial 4 - Image 6]
You should also add a new entry for the player service (and any other services that are going to be running in the scenario). An example of a service’s details can be seen in the below image.
[Tutorial 4 - Image 7]
Tutorial 5 - UE4 - Scenario timetable graph
Route Map
Before adding any node to your Timetable graph you may want to open the route map so you have an overview of the route and clearly see instructions as you add them into the timetable graph.
Firstly you will need to have the appropriate route open for the scenario you’re creating, then click on Window in the main UE4 window, hover over TSW Tools and then click on Route Map. After doing this a seperate window showing the route map will be opened.
[Tutorial 5 - Image 1]
Timetable graph
The timetable graph is a series of instructions which describes what a service is doing/where it is going. This is used for both player controlled trains and AI. The graph itself works in the same way as normal blueprints but with a much shorter list of instructions that can be used. The full list of instructions can be seen below.
[Tutorial 5 - Image 2]
To add an instruction right click in the graph area and then select an instruction from the list. You will then need to link the instructions into a series in the same way as with blueprints, the same colour connects to the same colour. An example of a timetable from a scenario from WSR can be seen below.
[Tutorial 5 - Image 3]
Example of a timetable with a series of stop at and load/unload passenger instructions.
[Tutorial 5 - Image 4]
An example use of the pink dependency links. These lines are used to dictate whether a service needs to get past a certain instruction before another service can progress. In the example the “Stop at Woodside Platform 2B” instruction cannot be completed until “Go via New York Penn” has been completed.
Similarly the “Stop at Jamaica Platform 2” can’t happen until “Stop at Jamaica” has been completed. This is useful for when you want an AI service to be moving in sight of the player, or if the player service is occupying the track which the AI service needs to use.
[Tutorial 5 - Image 5]
An example of the details for a Stop At instruction can be seen below.
[Tutorial 5 - Image 6]
An example of the details for a Couple instruction can be seen below.
[Tutorial 5 - Image 7]
An example of the details for a Load and unload instruction can be seen below.
[Tutorial 5 - Image 8]
Within Timetable Defaults a Route Definition will need to be referenced for the route the timetable is intended for.
[Tutorial 5 - Image 9]
Service mode timetable
If you’re creating a route this will require a service mode timetable, this is a requirement for all routes. Service mode is a single timetable of the entire day for the route with all formations/rail vehicles and time at which they’ll arrive and pick up passengers or cargo. Because it is for the entire day they can get quite complex depending on how busy the route is in real life however it is the same concept as that covered above.
Below is a small portion of the Long Island Rail Road service mode timetable, it is recommended you look over a service mode timetable in the editor if possible as it is difficult to show its’ entirety in an image.
[Tutorial 5 - Image 10]
Simulate timetable
After creating the service mode timetable, you will need to simulate the timetable. If you don’ do this TSW will not know where the trains are at any given point in time.
You should navigate to the root TSW Editor folder (which contains Engine, FeaturePacks, TS2Prototype), then right click and create a new text document. The text document then needs to be renamed to "SimulateTimetable.bat", it’s especially important that the filetype is changed from .txt to .bat. Open the .bat files using notepad or similar and add the following text:
> “cd E:\dev\TSW\TS2Prototype\Engine\Binaries\Win64
UE4Editor TS2Prototype -run=SimulateTimetable Timetable=/Wuppertal_Route_Gameplay/Timetable/WPH_Timetable”
The elements of the batch file you should edit are the following:
* The disk location – This is the section after “cd”, it is the install location of the TSW Editor on your hard drive with path to the UE4Editor executable.
* Timetable – The path to your service mode timetable uasset file. The example above is using files placed within “TS2Prototype\Plugins\DLC”, and it omits the “Content” folder from the file path.
Now double click to run the bat file, depending on how many services there are, it can be 1-2 hours for a simulation to complete. Once complete, look at the appropriate log file (TS2Prototype\Saved\Logs) and see whether it says all services completed - if it did then you'll be able to use it fully. If not, you'll need to use the log file and tools to figure out how and fix it.
Tutorial 6 - UE4 - Scenario definition setup
Scenario definition setup
The scenario definition is the same as other definition data assets (such as the RVD and route definition). It is a list of general properties for a scenario, the relevant information should be entered in the fields. Tooltips are available by hovering over the name, as shown in the image below.
[Tutorial 6 - Image 1]
An example of a full/complete scenario definition can be seen below.
[Tutorial 6 - Image 2]
[Tutorial 6 - Image 3]
Once you have created and setup your Scenario Definition, Scenario Objectives and Timetable you have a complete scenario. Your timetable is the scenarios’ set of instructions for the player, and therefore is the bulk of how a scenario will operate. If you want to test your scenario and timetable you can now play it in the editor (Tutorial 12 - UE4 - Playing a scenario in the editor).
Tutorial 7 - UE4 - Scenario help tips
Creating the scenario help tips file
Help tips are pointers for the player that can be triggered from the Scenario Objectives blueprint, it is optional whether or not you choose to use help tips. The help tips file should be created on a per scenario basis.
Within a scenario folder, Right Click within the folder and under Miscellaneous select Data Table. After clicking this a new window should open.
[Tutorial 7 - Image 1]
In the new window, click the drop down menu and select Objective Help Tip Data. Once created name it something relevant such as WSR_Sc01_HelpTips.
Help tip setup
Open the help tip data table just created. In the Row Editor click the + symbol to create a new row in the data table.
[Tutorial 7 - Image 2]
Once the blank new row has been created you will need to fill in the information within the empty fields and add images in the image fields (there are many core UI assets that can be used, these are located at Content > Core > Assets > HUD > Widgets > Tooltips > Assets). An example of a completed entry can be seen below.
[Tutorial 7 - Image 3]
To use/display the help tip you need to use the Show Help Tip node with a reference to the Row Name within the Scenario Objectives blueprint. We will cover this in the next tutorial.
Tutorial 8 - UE4 - Scenario objectives class defaults setup
Note: The Scenario Objectives modifications are not necessary outlined in the next few tutorials are not required to make a functioning scenario. The blueprint additions outline additional functionality such as player help tips, dialogue, and objective markers.
Scenario objectives class defaults
The class default details need to be set on a per scenario basis. These details are accessed by clicking on the Class Defaults button at the top of the blueprint editor. After clicking this button the information will be present in the details panel.
[Tutorial 8 - Image 1]
The below image shows a complete example of the class defaults setup.
[Tutorial 8 - Image 2]
The Objectives properties are Actor Transform Reference Struct variables. This is a reference to a point in the world which is used along with Flow Add Action with Marker References in the Event Graph to instruct a player to move to a specific location. **Note: this is only present because of variables being set to this category**.
General Setup
- Formation Name - This can be named anything relevant to the scenario, however information should always be entered here.
- Snap to ribbon location - Snaps position of the scenario manager actor to the formation ribbon location, this should be left unticked.
- Rail Vehicle ID - GUID for the player rail vehicle being used for the scenario, this is found in the formations details within scenario timetable.
[Tutorial 8 - Image 3]
- Reference Model Actor - The RVM of the rail vehicle being used in the scenario and in the player formation within the scenario timetable.
- Reference View Actor - The RVV of the rail vehicle being used in the scenario and in the player formation within the scenario timetable.
- Help Tip Data Table - The help tip data table reference that has been created for the scenario.
- Failure Notification Data Table - This should be left as the reference to the core file.
- Use Stop at Markers - This should be left ticked as default.
The Voice over properties are generally not used as all audio is triggered via Flow Actions in the Event Graph. Feel free to add audio here to see whether you want to use it.
The Cinematics properties are used for scenario introduction cinematics, scenario outro cinematics and scenario failure cinematics. Generally only an introduction camera is used, and mainly only used for tutorial scenarios. If you’re adding a cinematic camera into your scenario you will need to create a Camera Anim (https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Framework/Camera/Animations/) within your scenario folder.
[Tutorial 8 - Image 4]
Loading Text
- Show Loading Text - This should be ticked if you are using loading text.
- Can Continue After Outro - Set this to true if the player should be able to continue playing after the outro cinematic.
- Intro Loading Screen Text - The custom text that will be shown on the initial loading screen at the start of the scenario.
- Intro Loading Screen Time - Time in seconds that the loading screen will be shown at the start of the scenario.
Tutorial 9 - UE4 - Scenario objectives components
Scenario objectives components
Each Flow Action in the Event Graph will need to have an associated Objective Action component. These are added by clicking Add Component, searching for Objective and then selecting the desired Objective Action.
[Tutorial 9 - Image 1]
Objective Action Wait setup
Used as a period of time to wait for something to complete, such as playing audio/dialogue or an engine starting, before continuing.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 2]
[Tutorial 9 - Image 3]
Objective Action Move To setup
Used to instruct the player to go to a specific location.
Example details and Event Graph usage, this example uses and Actor Transform Reference Struct variable for a point in the route. Any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 4]
[Tutorial 9 - Image 5]
Objective Action Seat setup
Used to instruct the player to use a certain seat in the of a chosen locomotive, normally an Engineer Seat.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 6]
[Tutorial 9 - Image 7]
Objective Action Lever setup
Used to check for a specific output value of a lever.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 8]
[Tutorial 9 - Image 9]
Objective Action Button setup
Used to check for whether a button has been pressed.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 10]
[Tutorial 9 - Image 11]
Objective Action Junction setup
Used to instruct the player to change the junction from one position to another.
Example details and Event Graph usage, this example uses and Actor Transform Reference Struct variable for a point in the route. Any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 12]
Objective Action Fuel Connector setup
Used to check whether the fuel nozzle of a fuel station is connected to the rail vehicle’s fuel tank.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 13]
[Tutorial 9 - Image 14]
Objective Action Cargo Fuel setup
Used to check a rail vehicle’s fuel tank fill level.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 15]
[Tutorial 9 - Image 16]
Objective Action Speed setup
Used to check for a specific rail vehicle speed.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 17]
[Tutorial 9 - Image 18]
Objective Action Enter Exit setup
Used to check whether the player has entered or exited a specific rail vehicle.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example.
[Tutorial 9 - Image 19]
[Tutorial 9 - Image 20]
Objective Action Simugraph setup
Used to check for the value for a specific component within a rail vehicle’s simugraph.
Example details and Event Graph usage, any properties in the details panel that are not shown are unused in the example. In the example KQ Charge Brakes 1 is an Objective Action Button check.
[Tutorial 9 - Image 21]
[Tutorial 9 - Image 22]
Tutorial 10 - UE4 - Scenario objectives event graph
Scenario objectives event graph
Flow Add Action
Used to trigger something that isn’t an objective, such as playing audio outside of an objective or setting a timer to count. If the objective references a Network Marker or Ribbon Location directly, use this flow.
Example Event Graph usage of Flow Add Action. In the example HB Scenario Brief is an Objective Action Wait component. Add Type is set to At End, the graph will continue once the wait action has finished.
[Tutorial 10 - Image 1]
Another example showing Flow Add Action being using with and Objective Action Lever component (HB Master Key On) to check the lever is in the desired position.
[Tutorial 10 - Image 2]
Flow Add Action with Marker References
Used for an objective that references an Actor Component in the route/world. These are added to the Variables tab of the scenario. These markers reside in the World Outliner List, found in the 3D World viewer window.
To link this marker to the objective:
1. In the Event Graph, left click and drag the mouse off the Actor Transform Reference node.
2. From the menu that appears, select Make Array.
3. From the Array that has been generated, left click and drag the mouse off the Node.
4. From the menu that appears, select Promote to Variable.
5. This will create an Actor Transform Variable.
6. Click Compile, in the Event Graph.
7. Select the Actor Transform Variable.
8. In the Details tab on the right hand side, left click the Pick Actor button.
9. In the 3D world viewer, left click on the Marker (the mouse changes to a pipet icon). **Note: You will need to drag an Objective marker into the world as part of the scenario scenery before selecting it.**
Example Event Graph usage of Flow Add Action with Marker References. In the example HB Disembark is an Objective Action Move To component. Actor Transform Reference uses an Actor Transform Reference variable.
[Tutorial 10 - Image 3]
Flow Group Add Master Action/Sub Action
Used for a series of actions that are all expected to be completed either in sequence or in any order (concurrently). This node includes and option for completing once actions completes the group of actions (such as entering or exiting the train from any rail vehicle included in the formation).
Example Event Graph usage of Flow Group Add Master Action/Sub Action. In the example Objective Action components are either button or lever checks. The Group Type is set to Sequential, this is because it is the shutdown sequence for the rail vehicle and each step should only be completed after the previous is finished.
[Tutorial 10 - Image 4]
The example below is also using Flow Group Add Master Action/Sub Action with Enter/Exit Objective Actions. In this example the Group Type is set to Concurrent with Can Complete Group set to True for each node. This is because it doesn’t matter which rail vehicle the player exits from, exiting from any rail vehicle will complete the group and move on to the next Flow Action.
[Tutorial 10 - Image 5]
Show Help Tip node
Help tips can be shown using the Show Help Tip node in order to show the information within the data table on the player’s screen. Generally the only information that needs to be changed is Help Tip Name which should be be the Row Name for the information you’re looking to show on screen.
[Tutorial 10 - Image 6]
Scenario Event Graph example
Below are example images showing a full blueprint scenario objectives event graph for a simplistic scenario. A few things to note, before progressing to any Objective Action nodes the Service Name and Instruction Index are checked with a Branch node to ensure we’re at the correct stage of the timetable.
[Tutorial 10 - Image 7]
In the below image you can see the blueprint uses a sequence so the “Then 0” branch has to be completed before the “Then 1” branch is initiated. It also checks whether the Instruction Index equals a certain number before continuing (in other words the player is at the correct instruction within the timetable). The number entered into this node can be found from the timetable, for example if we want to instruct the player to do something at “12. Stop at Washford” we would enter 11 because the Instruction Index starts at 0.
[Tutorial 10 - Image 8]
[Tutorial 10 - Image 9]
Tutorial 11 - UE4 - Scenario scenery tiles
Scenarios can include scenery which is not shown in the default route, this can be achieved by using the Scenario Scenery Tool which creates Scenario Scenery Tiles for a specific route and scenario.
The Scenario Scenery Tool is easily accessed, click Window and then click on Scenario Scenery Tool. This will open a new window.
[Tutorial 11 - Image 1]
Once the new window is open you should select the scenario definition you’re going to be adding scenery for. After the scenario definition has been selected and is show in the drop down field, tick the checkbox next to Enable scenery edit mode globally.
[Tutorial 11 - Image 2]
Note: You will have to keep this window open whilst placing any scenario scenery, it is best to minimise the window and then close it after you have placed the scenery
Any scenery placed with the Scenario Scenery Tool will on load and be visible when the scenario is played, or only visible in the editor/World Outliner when the scenario definition is loaded and enabled in the tool. This is mainly useful for placing Objective Markers and unique Player Start.
[Tutorial 11 - Image 3]
Note: After placing a player start for your scenario you will need to pick it as the player start to use within the Scenario Definition file.
Tutorial 12 - UE4 - Playing a scenario in the editor
Playing a scenario in the editor
Firstly, you should ensure all the correct settings/file are assigned within the Scenario Definition file. This include the Timetable, Player Start, Player Only Service and Scenario Manager Actor Class.
It is actually quite simple to play/test your scenario in the editor, you should find the Scenario Definition for the scenario you want to play. Right click on the definition and click Set as Play in Editor Scenario.
[Tutorial 12 - Image 1]
Once the scenario is set you should see the spawn locations for the formations being used in the scenario (represented by blue boxes on the track). You should then ensure the play in editor settings are correct, you can see these settings in the below image.
[Tutorial 12 - Image 2]
After you’ve checked the settings, simply click the Play button to play the scenario. If you no longer want the scenario to play when you click the Play button you can clear it using the Clear option.
Note: You will need to have the route that the scenario/timetable is for in order to play it in the editor. You will see a message if you have the incorrect route loaded.
You can use the same process to test a Service Mode timetable by first creating the service mode timetable. Then right clicking on the timetable and clicking on Set as Play in Editor timetable. You can use the same Play in Editor settings for testing the timetable.
[Tutorial 12 - Image 3]
Tutorial 13 - UE4 - Dialogue audio
Importing audio and creating a sound cue
If you’re including dialogue in a scenario you will need to record the audio as .wav and then import it into the TSW Editor. After importing the file you’ll have a Sound Wave file, you should then right click that file and then click Create Cue.
[Tutorial 13 - Image 1]
You can now reference the created Sound Cue file in the scenario.
Reference dialogue Sound Wave and Sound Cue settings.
Sound Wave
Example Sound Wave settings.
[Tutorial 13 - Image 2]
Sound Cue
Example Sound Cue settings.
[Tutorial 13 – Image 3]
Tutorial 14 - UE4 – Calculating Scoring Thresholds
Scenario Timetable scores
- Open the scenario timetable file.
- Click the "Automate" drop down button on the Toolbar. Note: You’ll need to have the Scenario Definition you’re building the score for set as Play In Editor.
[Tutorial 14 – Image 1]
- Click "Estimate Service Scores".
- Select the Player Service Node (Red).
- In the Details Panel, scroll down to the Score Thresholds properties.
[Tutorial 14 – Image 2]
- Note the Bronze, Silver and Gold values. This is automatically 90% of the possible scoring achievable from the tasks.
Scenario Objectives blueprint scores
- Open the Scenario Objectives file.
- For any objective that appropriate qualifies as a Successful Departure, Successful Progress* or Successful Shutdown, in the objective properties, scroll to the XP section:
- Tick "Does this action award XP?".
- XP Awarded on Completion should be set to "250".
- XP Award Description should be "Successful Departure", "Successful Progress", "Successful Shutdown". This will ensure the experience is in line with DTG products.
[Tutorial 14 – Image 3]
- Once all XP scoring has been implemented, calculate the total XP achievable from all these objectives.
Scenario Definition scores
- Add together the Scenario Objectives blueprint score value to each of the Bronze, Silver and Gold values from the Timetable.
- Add these total values to the Scenario Definition Score Threshold fields.
[Tutorial 14 – Image 4]
Tutorial 15 - UE4 – Cooking content to a PAK file
Note: This process may be added directly into the editor with a future update
Batch file creation
For the current iteration of this process you will need to create and edit a .bat file in order to cook content and test it within the packaged version of TSW on Steam.
In the install folder for the TSW Editor - the same folder that the following is in:
[Tutorial 15 – Image 1]
Within the same folder as above you should right click, then create a new text document. The text document then needs to be renamed to "cook.bat", it’s especially important that the filetype is changed from .txt to .bat. Open the .bat files using notepad or similar and add the following text:
> Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=TS2Prototype -cook -stage -pak -targetplatform=win64 -clientconfig=Development -stagingdirectory=D:\temp\tsw-staging -basedonreleaseversion=1.0 -DLCIncludeEngineContent -dlcName=TestScenarios,DLC,TestScenarios
The elements of the batch file you should edit are the following:
* Staging Directory - Creates a temporary folder in your directory of choice, it's used in the build process and also the final PAK is deposited there.
* DLC name - The first entry in the -dlcName parameter will be the generated name of the Pak file, and should ideally be different from any of your plugin names. The second entry is the location and plugin name you’re cooking.
Now run the bat file, wait a bit and when it's done go to your staging folder, navigate down the folder structure and you should find your PAK file if it was successful. If not, look in the log file (Engine\Programs\AutomationTool\Saved\Logs) to try and find out why. After this process is complete, and you have a pak, you’re free to place it in the appropriate location within the folder of the Steam version of TSW.
Summary
After following this series of tutorials, you should now have a good idea of all the elements that go together to make a scenario. Scenarios can of course be expanded beyond what has been covered here; it is recommended you look over the scenarios included in the TSW Editor download for examples of other features or more complicated timetables.