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
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. But here’s hoping UE5 will do better.
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.