DataTable as a variable on a BP

I’m programming a dialogue-based game, where dialogues take a big part in the gameplay.
How I’ve got to construct the dialogues (not exactly my choice so I’ve got to keep it like this) is:
I have the NPC’s Blueprint wich has a dataTable variable (instance editable):

The dataTable comes from an imported .csv from GoogleDocs:

So every NPC that I put in the editor has a different .csv file with it’s dialogues for the whole game
The problem I’m facing is that I can’t acces the values inside the dataTable, this is the further I could get:

I guess I could now go and trim the string I get… but I highly doubt this is the way to go to do this, I just can’t find the solution anywhere.

Thanks in advance for every tip/sloution.

When you use a data table variable it wont get the values because your using, well, a variable. Its dynamic. You have to select the data table you want manually in the GetDataTableRow or column nodes. If you want each npc to have a different data table then you can use an enum as your variable to decide between which data tables you want to use.

This will work for now, but I will warn that having a separate table for every NPC is not ideal. Ideally you will have the data for every NPC stored in the same table, or split across a few tables.

1 Like