C#/sql developer new to UE4 trying to understand how UE4 handles creating, managing, saving and loading large volumes of Data

Hi, I’m an experienced c#/sql developer looking to understand how you would create, manage, save and load large volumes of data in UE4.

I understand that there means with BPs for saving your game but I can’t seem to figure out how that would apply to the specific game scenario I’m thinking about.

For our example, consider an RTS game similar to Age of Empires but with a much heavier focus on resource management. Instead of a mining action updating a global float or int value that represents your total gold, imagine having dedicated buildings to store specific resources and a supply chain system to move resources between buildings and locations based on demand.

First off, the nature of an RTS game means there could be any number of spawned units anywhere on the map doing who knows what. Does UE4 has some means of tracking and saving this? Maybe something where it tracks the unit type, location and custom attributes instead of the actual unit object. And this data could then be saved and when loaded you could run it through a BP that would “respawn” all the of the previous units based on the saved unit type, location and attribute data? Or would the SaveGame node do all this automatically? I’ve seen a lot of tutorials on this SaveGame, but it’s always about saving a specific character. How would you use this in an RTS where the units are dynamic?

And as for the resources, with the resources stored in specific buildings and with a supply chain system that would spawn “transport” units to transfer resources between buildings as needed, how would you track this kind of data for saving and loading?

Example: If your Warehouse building contains 100 pcs of Gold and your Factory requires 10 pcs to produce the queued up units, the factory would send a requisition request to the warehouse for 10 pcs of gold. The warehouse would spawn a “transport” unit that would contain 10 pcs of gold. The transport unit once arriving at the factory would de-spawn and the factory’s gold level would increase by 10 pcs while the warehouse’s would be at 90 pcs.

At first when I learned about DataTables in UE4 I assumed I could use them like I would in a c# WinForms application. Create a DataTable object from a struct that would essentially store the type, location and custom attributes of all spawned units/buildings. Then have each unit constantly update this DataTable with its location, amount of health or amount of resources it’s transporting. And when saving the game, save DataTable to a file and when loading read the save data file back into my DataTable and essentially “respawn” everything back to where it was along with it’s previous health/resources.

But to my understanding now DataTables are read only at runtime, so can I create struct arrays and add/remove/update the array’s collection at runtime, save and load the array from file for this purpose? Although in c# you’d use lists instead of arrays if you need to add, update and remove from their collection. Is there a List equivalent in UE4 BP?

As the title says, I’m new to UE4 and while I know c# very well I’m still new to c++ and I’m really loving visual scripting with BPs. If I have to learn c++ to handle this kind of data management then so be it, but I would love to be able to do this via BPs.