What Are Structures & Data Tables - Beginners Informational Guide To Unreal Engine 5

Поділитися
Вставка
  • Опубліковано 26 лют 2023
  • Today were talking about Structures & Data Tables and how they can be useful for you when making video games.
    If you enjoyed this episode please consider subscribing. If you want a tutorial created let me know what you need to know in the comments.
    We Also Now have a discord for anyone who needs help! And to start building a community of developers.
    / discord
    This series is a purely informational series and is designed to help beginner game developers understand Unreal Engine 5 and the tools you have at your disposal
    What Are Structures & Data Tables - Beginners Informational Guide To Unreal Engine 5
    #UnrealEngine #Developer #UE5.1 #UE5

КОМЕНТАРІ • 35

  • @LimitedPerfection
    @LimitedPerfection 5 місяців тому +4

    This topic should be one of the very first things people learn. Such a useful tool.

  • @dreambadger
    @dreambadger 11 місяців тому +6

    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.

  • @therondoshow
    @therondoshow Місяць тому +1

    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.

    • @ue5bpguru538
      @ue5bpguru538  Місяць тому +2

      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

  • @garretthoward8376
    @garretthoward8376 10 місяців тому +1

    Awesome video! Great explanation with clear examples that are relatable and relevant. CHeers!

  • @Floriantamm93
    @Floriantamm93 Рік тому +1

    bro your educational videos lately are nuts! Keep it up! I could swear it helps alot of young game devs alot!

    • @ue5bpguru538
      @ue5bpguru538  Рік тому +2

      Thats amazing to hear thank you so much i will definitely keep this series going for a while 😊

    • @IspyrGameDev
      @IspyrGameDev Рік тому +1

      @@ue5bpguru538 I 2nd this, just found your channel, and it's already immensely helpful! Much thx

    • @ue5bpguru538
      @ue5bpguru538  Рік тому +1

      @@IspyrGameDev amazing stuff! Glad your finding it useful 😁

  • @FPChris
    @FPChris 8 місяців тому +1

    Thanks very useful.

  • @Memeseco
    @Memeseco 7 місяців тому

    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.

  • @DomensionStudios
    @DomensionStudios 2 місяці тому +1

    Great vid

  • @Lexxer73
    @Lexxer73 Рік тому +1

    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?

    • @ue5bpguru538
      @ue5bpguru538  Рік тому +3

      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

  • @Frazer213
    @Frazer213 Рік тому +1

    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.

    • @ue5bpguru538
      @ue5bpguru538  Рік тому +1

      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

  • @mahkhardy8588
    @mahkhardy8588 11 місяців тому +1

    What about the edit struct crash or error of "unknown struct" bug in UE5?

    • @ue5bpguru538
      @ue5bpguru538  11 місяців тому +2

      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

  • @GatlingHawk
    @GatlingHawk 9 місяців тому +2

    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.

    • @ue5bpguru538
      @ue5bpguru538  9 місяців тому +1

      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

    • @GatlingHawk
      @GatlingHawk 9 місяців тому

      @@ue5bpguru538 I will try this when I get home THANK YOU

  • @JW-dp1bs
    @JW-dp1bs Рік тому +1

    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
      @ue5bpguru538  Рік тому +2

      So potentially i would use a switch to differentiate between the needed data tables

    • @JW-dp1bs
      @JW-dp1bs Рік тому +1

      @@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.

    • @JW-dp1bs
      @JW-dp1bs Рік тому +1

      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.

  • @kenalpha3
    @kenalpha3 Рік тому

    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?]

  • @TheTruthIsGonnaHurt
    @TheTruthIsGonnaHurt 9 місяців тому +2

    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.

    • @ue5bpguru538
      @ue5bpguru538  9 місяців тому +1

      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 👍

  • @etogaki
    @etogaki 5 місяців тому +3

    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.

  • @visiochannel2
    @visiochannel2 Місяць тому

    👨‍🦯

  • @oxlynz7328
    @oxlynz7328 3 місяці тому +1

    uploading this in 4k did not help-

    • @ue5bpguru538
      @ue5bpguru538  3 місяці тому +1

      I mean its more informational that practical. What were you needing help with?

    • @oxlynz7328
      @oxlynz7328 3 місяці тому

      @@ue5bpguru538just meant that uploading it in a high quality didn't improve the recording quality ^^