If anyone is new but has experience with spreadsheets, a struct is basically like the columns in a spreadsheet. Each spreadsheet column has a certain type, like date, text, number, currency. The struct also has types, like actor, soundbase, text, boolean, float and tons of others. An Enum is like a data validation list, where you can create a list of options and then reference that list in various places. The Data table is like the spreadsheet table itself, which itself can be updated from a .csv file provided you set it up right. It took me a while to understand it all, but now that I do I can scale things accordingly.
You have forgotten people who come here are new to this and you are just talking far to fast and people do not understand they need to see some visual working examples so people can get what you are talking about .Think back to when you first started you would not understand this at all. Real world examples are the key to a good teacher.
Thanks for the tutorial! I'm a bit confused about the proper way to update values that are stored in the data table. For example, in your weapon list, you've put in a "current ammo" variable that ostensibly you'd want to be able to update at runtime as you deplete or pick up more ammo. The problem is that data tables cannot be updated at runtime. They're read only. So a data table is great for storing static info like stats on an enemy that will never change, but do you know the best way to organize info that will need to be changed dynamically at runtime? Thanks in advance.
So Data tables are great to store base values. For example you would use the base values for everytime you spawn a new weapon into the world. After that you would update the struct variable with its new values and never use the data table again hope that helps a bit
The single thing I‘m still looking for: How to create a structure in the first place? You should‘ve started the video there, because if I rightlick in the content window there is no „structure“ to create
Instead of making a tutorial on "what you would do.." can you make a video on actually... doing it. The tutorial Information started off great, but halfway through this video it became a lesson in using your imagination.
These are purely informational and doesnt properly put anything into practise. The tutorial series i have done/are doing put everything in the information tutorials into practise 👍
Really helpful. Worth taking your time and playing with this, you can get it to work in multiple was within the Gameplay of the unreal editor from a .csv file. Still looking for solution to write to the csv file. But work great to get me started.
Structures made for my character are not updating in the animation graph? What is going on? They fire as positive on print strings, but on the animation graph, they are not registering.
Structures are a bit weird with passing information. When you have set a value lets say a boolean have you set the Structure again? As you need to almost update both in a way. The best method is using a Set Member node when working in structures
When breaking a struct is it ok to create variables to use in the function or is that unnecessary overhead? In other words how to keep the blueprint clean without a ton of wires running from the break?
If your trying to set individual variables within your strut you can use a set member node which will allow you to pick just one variable to amend and will keep all other variables as they were
It was a ok tutorial. Just don’t get why you’re explaining as if it were creature while showing a example for a weapon. Just a hypothetical explanation instead of showing the difference between the two.
if I have 700-800 sprites, would it be wise to use a data table for a 2D tile map spawner? I want to spawn my 2D tile maps via an Excel doc, with just two rows of data, a sprite name which will be a number, and another number 0 or 1 if a collision needs to be set. I can not set a sprite via a name/string in the set sprite node, so I was thinking I could just make a data table with the sprite set in it, but I wonder how the performance would be with 700-800 entries in it.
You shouldnt have any issues. I personally would use a data table as you can use nodes like get data table row that will allow you to grab what you need fast
So this is a very annoying bug one i have experienced a few times. There is no easily fix but what i do find helps is if i add an extra row to the structure then compile then delete that Row it seems to fix it up but theres no guarantees its just what worked for me
When you "Get Data Table Row", how would you look through multiple Data Tables at the same time? I have one for Swords, one for Axes, one for Potions, etc... There are too many items to put on one Data Table. I tried using a "Select" node off of the "Get Data Table Row" node to list multiple Data Tables, but it is not registering the different Data Tables on it. Please Help
@@ue5bpguru538 I do not mean to be a pain. I know some stuff but I am still a newbie. I just went and tried a switch node, but I tried pulling off of every spot on it and nowhere could I choose any Data Tables. It gave me the option for my Enums but I do not know how to use it to select multiple Data Tables. I am trying to make an inventory system but I need it to search every Data Table I have. Or, could one Data Table handle thousands of items? I appreciate your help.
Never mind. I used a Composite Data Table and added all of my different data tables into it. Since none of the row names were the same, nothing overwrote any of the others.
Wait. So you made a Struct with Row Handle Name = Name name? Because how else could we Break a Struct to get Row name 9:21> to feed to Get Data Table > Row name? But Struct Row Handle names are restrictive - no spaces. So if we want an in game name of "Big Rifle" - then our Struct needs 2 Name variables? First, Name variable is exact name of Row Handle (to call). And 2nd Name var is AKA game name that we can put spaces? 2) And can you actually show how to implement a Struct var in an enemy BP, then how to Load Struct a struct Template > push them to EnemyBP's Struct. And how to update the Struct values of Health after enemy got hit? [Im new to using Structs to Get/Set multi values in game. I was using DT to Set static values when game starts. But I need a way to load/save dynamic values related to the DT template. E.g. Big enemy has 100 base health, Texture2 - loaded from DT. But after he is hit, I need to save the enemy's health, last Location to a Struct, correct? Because UE4.27 cant save Data Tables. And I wouldnt want to overwrite the DT values (actual Disk asset) that spawn new enemies at full stats. I just want to save the changes > use Struct (variable) that is in a SaveGame asset, correct? But I dont understand why you put the Struct var first > to DT, instead of load DT (base values), then feed to Struct > have code that updates Struct values, and save this Var in SaveGame?]
This topic should be one of the very first things people learn. Such a useful tool.
Gret explanation of struct!!!! and datatables!!!
If anyone is new but has experience with spreadsheets, a struct is basically like the columns in a spreadsheet. Each spreadsheet column has a certain type, like date, text, number, currency. The struct also has types, like actor, soundbase, text, boolean, float and tons of others.
An Enum is like a data validation list, where you can create a list of options and then reference that list in various places. The Data table is like the spreadsheet table itself, which itself can be updated from a .csv file provided you set it up right. It took me a while to understand it all, but now that I do I can scale things accordingly.
Thanks that was a helpful comparison :-)😊
You have forgotten people who come here are new to this and you are just talking far to fast and people do not understand they need to see some visual working examples so people can get what you are talking about .Think back to when you first started you would not understand this at all. Real world examples are the key to a good teacher.
Thanks for the tutorial! I'm a bit confused about the proper way to update values that are stored in the data table. For example, in your weapon list, you've put in a "current ammo" variable that ostensibly you'd want to be able to update at runtime as you deplete or pick up more ammo. The problem is that data tables cannot be updated at runtime. They're read only. So a data table is great for storing static info like stats on an enemy that will never change, but do you know the best way to organize info that will need to be changed dynamically at runtime? Thanks in advance.
So Data tables are great to store base values. For example you would use the base values for everytime you spawn a new weapon into the world. After that you would update the struct variable with its new values and never use the data table again hope that helps a bit
bro your educational videos lately are nuts! Keep it up! I could swear it helps alot of young game devs alot!
Thats amazing to hear thank you so much i will definitely keep this series going for a while 😊
@@ue5bpguru538 I 2nd this, just found your channel, and it's already immensely helpful! Much thx
@@IspyrGameDev amazing stuff! Glad your finding it useful 😁
The single thing I‘m still looking for: How to create a structure in the first place? You should‘ve started the video there, because if I rightlick in the content window there is no „structure“ to create
@@BanXxX69 right click go to down to the create advanced asset click on blueprints and the very bottom there is a structure option 😊
@@ue5bpguru538 Wow thanks!! Lol xD
Also thanks because other than that it‘s a very good guide and I will definitely watch the other videos :-)🙏🏼😄❤️
Instead of making a tutorial on "what you would do.." can you make a video on actually... doing it.
The tutorial Information started off great, but halfway through this video it became a lesson in using your imagination.
These are purely informational and doesnt properly put anything into practise. The tutorial series i have done/are doing put everything in the information tutorials into practise 👍
Really helpful. Worth taking your time and playing with this, you can get it to work in multiple was within the Gameplay of the unreal editor from a .csv file. Still looking for solution to write to the csv file. But work great to get me started.
Structures made for my character are not updating in the animation graph? What is going on? They fire as positive on print strings, but on the animation graph, they are not registering.
Structures are a bit weird with passing information. When you have set a value lets say a boolean have you set the Structure again? As you need to almost update both in a way.
The best method is using a Set Member node when working in structures
@@ue5bpguru538 I will try this when I get home THANK YOU
When breaking a struct is it ok to create variables to use in the function or is that unnecessary overhead? In other words how to keep the blueprint clean without a ton of wires running from the break?
If your trying to set individual variables within your strut you can use a set member node which will allow you to pick just one variable to amend and will keep all other variables as they were
It was a ok tutorial. Just don’t get why you’re explaining as if it were creature while showing a example for a weapon. Just a hypothetical explanation instead of showing the difference between the two.
yes bad teaching was hoping to see some real world examples time to move on this was a waste of time
if I have 700-800 sprites, would it be wise to use a data table for a 2D tile map spawner? I want to spawn my 2D tile maps via an Excel doc, with just two rows of data, a sprite name which will be a number, and another number 0 or 1 if a collision needs to be set. I can not set a sprite via a name/string in the set sprite node, so I was thinking I could just make a data table with the sprite set in it, but I wonder how the performance would be with 700-800 entries in it.
You shouldnt have any issues. I personally would use a data table as you can use nodes like get data table row that will allow you to grab what you need fast
Awesome video! Great explanation with clear examples that are relatable and relevant. CHeers!
Glad it was helpful!
What about the edit struct crash or error of "unknown struct" bug in UE5?
So this is a very annoying bug one i have experienced a few times. There is no easily fix but what i do find helps is if i add an extra row to the structure then compile then delete that Row it seems to fix it up but theres no guarantees its just what worked for me
When you "Get Data Table Row", how would you look through multiple Data Tables at the same time? I have one for Swords, one for Axes, one for Potions, etc... There are too many items to put on one Data Table. I tried using a "Select" node off of the "Get Data Table Row" node to list multiple Data Tables, but it is not registering the different Data Tables on it. Please Help
So potentially i would use a switch to differentiate between the needed data tables
@@ue5bpguru538 I do not mean to be a pain. I know some stuff but I am still a newbie. I just went and tried a switch node, but I tried pulling off of every spot on it and nowhere could I choose any Data Tables. It gave me the option for my Enums but I do not know how to use it to select multiple Data Tables. I am trying to make an inventory system but I need it to search every Data Table I have. Or, could one Data Table handle thousands of items? I appreciate your help.
Never mind. I used a Composite Data Table and added all of my different data tables into it. Since none of the row names were the same, nothing overwrote any of the others.
Wait. So you made a Struct with Row Handle Name = Name name? Because how else could we Break a Struct to get Row name 9:21> to feed to Get Data Table > Row name?
But Struct Row Handle names are restrictive - no spaces. So if we want an in game name of "Big Rifle" - then our Struct needs 2 Name variables?
First, Name variable is exact name of Row Handle (to call).
And 2nd Name var is AKA game name that we can put spaces?
2) And can you actually show how to implement a Struct var in an enemy BP, then how to Load Struct a struct Template > push them to EnemyBP's Struct. And how to update the Struct values of Health after enemy got hit?
[Im new to using Structs to Get/Set multi values in game. I was using DT to Set static values when game starts. But I need a way to load/save dynamic values related to the DT template.
E.g. Big enemy has 100 base health, Texture2 - loaded from DT. But after he is hit, I need to save the enemy's health, last Location to a Struct, correct? Because UE4.27 cant save Data Tables.
And I wouldnt want to overwrite the DT values (actual Disk asset) that spawn new enemies at full stats. I just want to save the changes > use Struct (variable) that is in a SaveGame asset, correct?
But I dont understand why you put the Struct var first > to DT, instead of load DT (base values), then feed to Struct > have code that updates Struct values, and save this Var in SaveGame?]
Thanks very useful.
Glad it was helpful!
Great vid
uploading this in 4k did not help-
I mean its more informational that practical. What were you needing help with?
@@ue5bpguru538just meant that uploading it in a high quality didn't improve the recording quality ^^
this video is so imposibly silent
👨🦯