🗨️Custom Dialog

To use dialog (with sounds or text to speech) you need to use a MSFS devmode project. This project will contain the sound files (if you have them) and some files generated by the missionhub.

1

Set up the Mission Package

Follow the instructions in Mission Package.

2

Define the dialog in the mission hub

Now, you can go into the Mission Hub Scenario Editor.

Just place the Custom Dialog objects as you would any other mission hub object. You can give each Custom Dialog object a:

  • Dialog Text (used for subtitles and text-to-speech)

  • Dialog Sound File (name of the sound file without extension).

To use text-to-speech, only define the Dialog Text and not the Dialog Sound File.

3

Add Custom Script

To make sure the dialog will load during the mission, add a Custom Script object to your mission.

For the Script Path, set the path to your compiled dialog script:

Missions\[CompanyName]\[MissionName]\customDialog.spb

4

Generate the dialog files

After you've placed your Custom Dialog objects, you need to generate the needed dialog files. Go to the advanced mission settings tab by selecting the Advanced tab on the top-left of the screen.

For Dialog Package Name, you need to fill in the package name of your devmode project.

Then, press the Generate Dialog Files button.

5

Paste the generated files in the devmode project

To find the generated dialog files, go to the location of the scenario files (see Sharing and Installing Missions).

From the SavedScenarioFiles folder, go one level up to its parent folder.

In the parent folder, open the CustomFiles folder.

You will find two files:

  • customDialog.xml (Msfs mission script file that contains the dialog logic)

  • customDialog.loc (Localization file that contains the subtitles and links to the sound files)

You need to paste them in these folders inside your devmode project:

  • customDialog.xml → PackageSources/Dialog/

  • customDialog.loc → PackageSources/Localization/

6

Add your sound files (optional)

If you have sound files, add them to the PackageSources/Dialog/Sound/en-US/ folder.

7

Build the project

Build the devmode project.

If you build the project in-sim, the files will automatically be loaded after the build is finished.

If you use the fspackagetool, you need to copy the built package to the community folder.

8

Load your custom dialog script in the mission

In the Mission Hub, open your mission again,

Add a Custom Script object to your mission.

For the Script Path, set the path to your compiled dialog script:

Missions\CompanyName\MissionName\customDialog.spb

9

Distribution

You can distribute your dialog package by itself, but it would be more logical to distribute it as part of a Mission Package.

Last updated