Download

Data tables one big one or many small ones?

Im working on an inventory system and currently i have it set up so that there is a “master” data table driving the main variables which all items share (name, max stack size, texture 2d, static mesh etc) and has an enum in it which sends the blue print to one of five “sub-data tables” which hold details specific to the item type (so DT_equipment has weight, armour, various resistances etc and DT_weapons has damage, range, hit chance etc)

It works alright but it did occur to me that if i just put everything within the master data table it would reduce the complexity of the blue print by a considerable amount and i could just leave the irrelevant sections empty. It would be a massive datatable but i would have thought that even a massive one would be still fairly small in comparison to other things im working on.

So just thought i’d ask here which route others go down. one big datatable with lots of empty slots, or many smaller datatables.

I would go with whatever helped you develop. The optimisation comes later.:slight_smile:

me personally make one data table for items, 1 data table for player info like login info, one data table for characters and link them using an account id. and one data table that contains their inventory items, i would not try to make 1 big data table as if you make many many queries to it it could slow performance.

In proper OOP, you would create individual objects when needed. There are design patterns and paradigms that you should follow when programming.
Learn inheritance.
That’s when you create a parents class, say a ball, and create child classes to add on to that ball object, i.e. basketball, baseball, football.
This way, ANY changes to the parent will reverberate through the children.

Also, by having smaller individual classes has the advantage of simplicity, scalability and readability which are all needed in programming in general.

But won’t any changes of the parent also wipe out any changes in attached children and keep on resetting the children back to their parent default settings? Or Unless there’s a flag to ignore the parent if you want your child to have a different set of settings than what the parent has or just detatch it from the parent.???

BTW, can someone tell me how I can save bulk data, I have over 1,600 game values that I need the game to save and also to remember them when I go through all the different world maps. What system do we use?, if we use a data struct, to put all the values in, then too many values put in data structs only slow the engine all done when entering them in. I need my game to remember over a thousand values.

I would like to know how to set it up…

.

First question, is that you make the parent class with general info, like a ball is round. The basketball child class with have that it’s big and orange, but don’t overwrite the fact that it’s round.

For the second question, have you ever heard of an array or list? Save all the values you need to an array(all at once) or list(if you need to iterate over time), then take that value, iterate(foreach loop) to your saving component.

I ended up with multiple DTs one for parent then others for children, unfortunately i encountered some… issues and eventually gave up and just put all the data tables in the master item class. Like Jezcentral says, optimisation can come later :slight_smile:

There are over 80 PAGES of game data values to save… It’s not under 50 values.
The Blueprints can only handle so many array pin entries before you start running out of graph space… And it also slows the editor response all down the longer that
array pin list gets…

This method of storing the save values as a bunch of set nodes within in the blueprint itself (the game instance) I think, only works for just the small save systems
that contain just a small amount of variables to store. But for a game that has got over 1600 variables to save, (over 80 pages of data). To hold that in memory, it
can’t be put all into the blueprints as set statements because it would just slow the engine all down because there would be far too many nodes. So that’s not going to work because I don’t just have 50 values to set, and as for the Array Element List, the engine slows down when you get those lists long. . So the data has to be piped in through an array somehow. but I don’t know how to set a bulk save data system up…

Why don’t you split the data up into smaller chunks. There is no logical reason to keep the data large when it can be smaller.

Because I have got over 100 Different Worlds and Systems to try to keep track of. Each world will need about 200 or so variables at least to store up because of all the different storyline events that are also going on in those different worlds. As its a RPG with Dialog.

issue with Dialogue Code.

NORMAL BEHAVIOR: When I step into the dialog trigger, the texts pop up, and the player is disabled from moving around
while the dialogue text plays out on the screen, and it will play through the dialog then after it ends that it shuts down the window and return you back again into the game to move. BUT if you don’t want to play all of it then if you click on End Dialog button to close window
and return back to the game.

WHAT THE ENGINE IS DOING… It exits the window but after exiting it dosen’t exit the Timer Delay Loop that responsible to keep
the player all frozen until the dialog has finished playing. So when you shut the window down. the player remains stuck for several
minutes in the loop before the controls are activated again to allow him to move.

How do I fix this?

I need to know how to disrupt the timer loop so i can get control back of the player again when shutting down the window.