data tables should be created from the structures that define their contents, with a single click of a button.
also, I think data tables should be treated more like structs, with a separate type for each asset, instead of choosing a type within a type.
and putting the combo box on the same level as the title of the details panel section allows collapsed arrays of DataTableRows to be selectable without expanding the contents.
if a DataTableRow is not found, you could just output the default values of the struct. if someone wants to make this an error state, they could design that into the struct, by setting a default integer value to -1, or by setting a description text default value to “MissingNo.”
first one i agree, but i don’t think we need separate node for each row in each datatable for every blueprint, im not a programmer, but i dont think thats a good idea.
I think you will get an unmanageable drop down menu by the time you entered a couple of entries into your data base.
i didn’t mean a separate node for each row in each datatable, just a separate variable for each datatable struct. the drop down combo box selects the row, and in the details panel, the drop down combo box would swap out the struct elements below it to the data in the struct of the chosen row.
so to clarify, each datatable would be a variable type, which you can choose a row from a name variable or by a drop down list.
currently, you can change the struct type in the datatable, but it will break the output pins. this is useless, and cannot be done at runtime, so i think each datatable asset should be considered a separate variable type, just like every struct is a different type.
Im not sure what you mean by unmanageable. you can rearrange the variables any way you want, since they are addressed by name rather than index, and you can do this in a spread sheet or a text editor, or even in the unreal editor, so there are plenty of ways to manage the data. did you mean it would be difficult to find an entry when the list is heavily populated? that will always be a problem, but i guess they could add a search box to the top of their ComboBox widgets, because Enums have that same problem.
I have entered a feature request, UE-20885 to add a button that would create a datatable based on the current struct within the struct editor window to be taken into consideration.
if anyone missed it, this feature has beed already implemented. Wonder why official docs for DataTables doesnt mention this new workflow.
This guy saves the day by showing it on YT.
Nice catch, thanks!
My only question/need from this point would be that CSV files need to be auto imported on startup. That way any player made modifications could be pulled into the game between play sessions.
Is that currently possible, and if not can we get that feature added?
You do realize that is not what the original poster asked for. That is exactly how Datatables worked for the past couple of months.
You currently can’t create a variable and set the type to an item. For example, we have datatables for all the items in the game. When you place the item in the game world, you can just click a drop down and select the item its suppose to represent. Thats because there isn’t a variable type like what the original poster asked for.
Its sad that it hasn’t been implemented yet.
I have entities in my game that in which you click on, they’ll be added to your inventory. I use datatables to include all the info for each item including description and additional variables to make them interactive. This is all handled in an external program which then exports to CSV. Sadly, without coding, you can’t make a datatable item a variable in the engine.
I thought this would of been easier to understand because Scott include a visual example of what the was talking about.