12. Data Tables - dylogaming/Dialogue-Component GitHub Wiki

Sample CSV here

1. Overview

Step Image
You can make dialogues in a spreadsheet and import them in.











Here I've added the NPC_DataTable actor and we can see that there are no branches.

Step Image
If we open up the DT_Dialogue Data Table asset, we can see a sample dialogue.

It is currently linked to a CSV file which allows for easy updating.

To import, ensure a data table asset is loaded and press the "Import" button. When it's complete, you'll see the branch # update.

Step Image
Pressing the "Import" button with a file path specified will: 1. Update the data table and, 2. populate the Dialogue Component with the respective branches.

If no file path is specified, it will simply populate with the existing Data Table and not update it.

You can export the data table asset as a CSV by right-clicking and selecting Export, and then work on it with an external program like Excel.


🟩 Only branches with the "START" column filled will populate.

🟧 For choices, copy the "START" branch and name the "Speaker" 'Choice' followed by a number for each choice.

Branch 3 has 4 rows, and after the first, speaker names become choices.

Each column represents a property of the branch/choice.

🟪 For booleans, type "t" to set them to true.

🟨 For audio/animations, add the asset name, and the system will find it in the Content Browser.

You can space out your rows for better organization as empty rows will be skipped!

image

Conditions must be formatted like below:

(("Energy", 1),("Money", 5))

If you're ever unsure, you can open the data table asset in Unreal and update properties there, then export and you'll see how things should be formatted.

⚠️ **GitHub.com Fallback** ⚠️