Data Tables are read only, what can I use that's like it, but can be modified?

​​I’m using a Data Table in my game to store and read out the lines of dialogue that are said by characters and I put some variables in expecting I could modify them on run-time, but I’ve learnt that Data Tables are read only.

What I was expecting was something more like a database, where records can be accessed and read, but also modified and updated.
Is there anything in Unreal Blueprints that works this way that I can use?

Here’s an attached screenshot showing that, as a basic example, I want to change the “LineReadOut?” boolean variable in my data table when the line has been said.
Click image for larger version

Thanks!

Data Tables are static in BPs but there are plugins on the Marketplace that work around that and other plugins provide the api for proper databases.


In pure BPs you’d read the DT when the game starts and place the structs in an array or (better) a dictionary map. You can modify these run-time as you please and store them (and any other data defining current playthrough) in a Save Game object, which can be saved to the hard drive. You need to do this anyway.

Were you to modify a Data Table itself and start a new game… well, you’d start with modified data. Not so good.


It’s beyond me why UE4 does not provide a solid database support. :expressionless: But here’s hoping UE5 will do better.

An example, in case it sounds daunting.

  • top bit creates a map for your playthrough to use

  • bottom bit modifies the data and pushes it back into the map

When you’re ready to save, you add the map to the save game.

So if you wanted to set a specific piece of data (here, State):

Since the keys must be unique, Add replaces the struct at that key.

Thank you for the example! This is a bit daunting, but it’s what I needed to see, so thank you for taking the time. I’ll study this and see where I get to next, but this definitely gets the solve.

Cheers! <3

No problem. Study material if you want to explore maps:

Data Tables are very close to maps + a glorified interface (you wouldn’t use during gameplay anyway)