Your question is well beyond the scope of Unreal Engine. It touches subjects of implementation of large data-driven backends.
From UE4 side, you can do it two ways:
- Keep the data in the game. Contrary to what you said, you don’t have to bother too much about clients changing data on their side. I assume, that with this kind of project, you will be the one running the servers anyway, via your backend infrastructure. Because in UE4 multiplayer model server is authoritative about the state of the game, it fully controls what data is used, and since you’ll control the dedicated servers (unless hacked) clients will have to accept the data your servers servrs. If you let the players run their own servers (listen server) you probably won’t count these matches to the global ranking, so you won’t bother about these games using cheats.
- Get the data from external source. When your game starts, UE can query some server endpoint for current stats of entities in the game. What backend you use is irrelevant. Expose it properly through some API consumable from UE (REST is fine) and get it on server start. It’s also quite sensible approach as long as your API responses timely.
Would it be better to have two separate databases? One for reading gameplay data like I have above and another reading/writing user information (stats, rank, items, etc.)
If I were to design this kind of system I’d keep these databases separate. Entity statistics database is almost exclusively read-only (how often you’ll change stats of units vs. how often the db will be queried by the servers starting up), so they have quite different usage scenarios.
Should I setup a nodejs server with a nosql database like mongodb to be the master of this data? And then build a REST API on top of that for reading this data?
<personal rant> No, please don’t. Spare the world another javascript backend server with “where’s my data” databse backend. </personal rant>