UE5 Player Stats Component Guide - Part 7: Tips and Tricks to Organizing

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back to the stat component series now if you have watched all the previous videos you know that we've added a lot of functions we've added a lot of features but the main thing is as it's expanding it's actually quite difficult for anyone else to read uh so what I'm going to be doing in this video is I'm going to be just addressing all of this showing you all the features how it can help clean this up I know in a previous video I mentioned I was going to go do comments I'm actually going to be doing some in this video I'm not going to go over every single widget and everything that we possibly have created and add descriptions but I'm going to show you how you can go about doing that I'm going to be adding some of them in this video so you will be able to see that and then uh in the next video I'll have essentially like everything written down if you are curious on like everything that I possibly comment and do pretty much uh you can join the Discord ask questions I'm more than happy to do that uh I'm not going to go over every single thing because I'm not going to make like a three-hour video of just going through commentating everything and then um doing all that fun stuff so yeah let's get into it all right so one of the things that I want to show you first is right now we have all of our Blueprints and if we go into our Stat system we'll notice that yeah we've added in some folders so that does organize but one of the things is if you actually hover on top of this uh you just get to see the name and we can actually add a description here so if we actually opened up our Stat system if we went into class settings if we were to expand this little what you can do is you can actually control the blueprints display name that's being shown uh as well as the description so those are the two things I'm going to kind of Focus right now you do have the ability to like add categories so if you ever want to search for categories you'd be able to do that uh but what we'll do for here is just to show you we're going to just change this to stats system and then for the description uh let's just say um a component that um let's see um yeah let's go with component that adds stat values to a character blueprint and manages all C calculations related uh manage all calculations let's get rid of this and andage all calculation and communicates with UI now that's just a description and then now that we've compiled let's go ahead and just save this here and we'll give it a moment to do all of it it's thinking and we go over here now we can hover on top and we'll see that our description shows there now one thing is you'll notice that the name is still the same so what exactly is the display name uh so this display name could be either what's showing up in the world what's available here or as well as for in a component if we actually went into our character if we hit add we can then typee Stat system and that appears so it no longer appears as AC Stat system it's Stat system so if we went over here and just called this Bob Mah I was thinking of Bob Marley I don't know why oh wait let's make sure to hit compile bobar shows up here which is in fact our Stat system obviously not going to change that to the name we'll compile leave it there but that lets you know that you can add some descriptions to your blueprints so remember go to class settings and then add in display name a description you can also go into adding a category and you can also go into adding namespaces as well but we're just going to highlight on those two uh I'm actually going to delete this Mage thing for cleanup purposes go back to our Stat system go into our save game slot we'll go into class settings we're going to do the same thing it's uh save game slot or let's go with um Stat system save game slot it's kind of a long name let's go with uh change that to save game slot [Music] save game object that stores stats from the Stat system and compile save close that out and then now we'll be able to see our description there so you can do the same thing with all of the widgets you could literally go into every single one go into graph class settings and do the exact same thing so this is just button base default button base for all buttons and then if we went into designer oh actually it doesn't appear here button base oh because I don't think you can add it to your own thing sorry let's go into this button base shows up there so like that you can rename it so you're not seeing the cui pop up or the wbp appear you'll be able to just see the name makes it a lot cleaner and easier you don't have to see those everywhere so just remember you go into there display name description very important stuff for that next thing is I want to show you for the same thing with our functions so if we were to go to our attribute check we'll notice here and then from here we actually get to enter in a description so our attribute check function is let's see it basically allows the ability to check through all of the maps so a nice description could be let's [Music] see uh let's see checks the attribute type um we could just say like searches for a specific attribute and returns a float variable of the value so we'll also be able to do that and then if we were to ever do an attribute check you can actually hover on top of it or if you did attribute check you can hover on top of it and it says it searches for a specific attribute and returns a float variable of the value so like that we'd be able to easily do that and then we can also do this where we add a comment and we'll say let's see this function checks which map which attribute type map to [Music] use pulls the float variable from the correct map you can give whatever Direction you want this allows us so that as the developer when we're opening up the function we'll be able to see what exactly this is doing you can even break this down further as in you're like okay so we're switching between a list of attributes and then we're selecting the specific map that relates to whatever we're using based on that enup so if you were ever to go around you'd be able to be like okay that's what this does and then go through and we can do the same thing for this we could even go with doing that and we'll see check which map we can even check see copy that go in here paste and then can I expand this a little J impuls the see instead of the and check what map to use adds the new value to the correct attribute map and then from here we could even do further comments by doing this let's press C again when the correct map is found We'll add the value to that map so when we show up here it's like okay we're checking for the correct attribute and then from here we check that the map is found and then we add that value to the map and then we return the value as well and then we can hover on top and we'll notice there oh we didn't add one for the description so the description of adding would be let's see see adds value to the correct uh to the selected attribute type you can name it whatever you want so we'd be able to easily organize this so that if we ever hover on top we add value and then we could literally just copy and paste this and change it to subtracts Value I think the correct thing is of the selected attribute type let's close out all of these think we have some explanations here but let's see I think we could probably break down these ones even further if we wanted to if we wanted to like really organize this we could move this down move this over we could do like press comment and then from here we can be like search data table based upon row name level underscore and we could go through there then we can go here comment again let's actually fix all of these move that over and move down comment there as well we'll do this from this comment we'll say set new Max XP based upon data table oh we got to add and update attributes available update all stats then check player gained more than one level so you can add different types of subcriptions now for this we leveled up so therefore uh we should heal automatically and then we'll check did we in fact gain another level and then that way we can run through all of this again so this kind of helps keep your blueprints a lot cleaner uh you'll be able to add a bunch of comments throughout here so that you can tell anybody as well as yourself what exactly is happening here so that way if you ever go back to here you don't have to like look at the notes and feel like okay wait what does this function do and then open up this and then you're like okay what does this do and then you open up that and like that you're going through all of this spiraling around and I'm clicking through all of this and now I have opened up like seven different things uh all circling around to like basically the same stuff so yeah that's super helpful stuff I'm going to actually go through and I'm going to do a lot of cleaning up on myself um if anybody wants videos on me going through doing exactly that I can absolutely post that uh as well but I figured just a little heads up on showing you how you can add in descriptions to everything would be super super helpful as well as just organizing all of your blueprints is very key especially for myself CU I noticed in my last video when I was going through all the functions it was starting to get a little difficult to remember where exactly I need to go and where exactly I want to find that information and then uh the last thing I want to cover is that you can actually do the same thing for your variables you can actually add in a description to your variables as well uh so once this autosave and again in a moment but essentially for the variables you could do the exact same thing you start adding in a description uh so for example this is our data asset um let's see data asset used to set starting stats and which stats you gain her level and then if we hover on top of here we get the exact same description hover on top and then I think it's like Control Alt you can hover on top of more but essentially that is all of the cleanup that you can do I'm going to go through and do that there's actually a lot of functions here as well that I want to fix there's also a current issue because right now uh we are setting the max Health uh but the current health is actually never being set as well as um not scaling correctly so there's a lot of things that we'll need to do with fixing those as well uh but I'll be covering that in another video when I go over health bars next
Info
Channel: MrButier
Views: 80
Rating: undefined out of 5
Keywords: ue, unreal, unreal tutorial, unreal engine, make a game, game engine, stats, ue5, tutorial, playerstats, rpg, game dev, ue5 tutorial, indie game devlog, unreal engine 5, unreal 5, game design, indie game development
Id: KdXaiSGB4wM
Channel Id: undefined
Length: 16min 52sec (1012 seconds)
Published: Mon Apr 29 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.