UE4 Graphics Setting Menu + SAVE and LOAD Settings.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to another video and in today's video we are going to talk about how to change graphic settings in unreal engine 4 and also how to save them in the memory so each time we launch the game the same settings get ran so i have this panel over here which will allow me to change some of the settings so we can change these i'm going to leave a link down in the description to an unreal engine page where you can see more in-depth more console commands which could be used to change the graphics settings this is a very brief overview of how to change the main settings but there is a lot more that can be configured and you can go more in depth with these settings so the first thing that i should probably show you is i have something already created beforehand what i have is a widget which will contain all of the settings panels and also in the third person character i've set up a very basic system that on keyboard key p with a flip-flop i create the widget and i remove the widget this is a very basic system probably if you watched my previous videos you are already very familiar with this because this is something i've created many many times before so this part isn't really important as long as you know how to create widgets and you have your own system of creating widgets use that one this is just to display and remove the widget and nothing else will be done in the third person character and inside of the widget itself what i have over here is all the settings that i'm going to be changing you could go more in depth with this uh these are just very basic settings that the unreal engine team has created so they're they are kind of like presets so by changing one of these settings it's changing quite a lot of properties you could go way more in depth to it i'm going to leave a link down in the description box for you guys to read the article about scalability settings and in that link over there you will find all the commands that i'm using for this video and also there is going to be a bunch of more if you want to go more in-depth with configurations also one more disclaimer that i should probably mention is that not all of these settings will use the cinematic one cinematic properties because not all of these preset values uh go up to five configurable states sort of say some of them only have four so i'm gonna create these same settings for epic and cinematic for some of these there isn't going to be a difference when changing between one another so once we got that out of the way what we need first is i'm gonna create a new enum so i'm going to right click and i'm going to go to the blueprints enumeration and i'm going to call this e graph fix graph fix settings and we're going to use this one i usually use the string types you already probably noticed i don't use enums a lot but enums are better we need five entries over here so click on the new entry uh enums are better because they remove the possibility for human typo errors so this is going to give us like a drop down list where we can select one of the options instead of typing them in manually so we're going to have a low setting we're going to have a medium setting we also will have a high setting so high then there was the epic so epic and also we have the c name at tick cinematic there we go we can save this and that's all that we need to do in here just create these preset values then let's go back to our ui settings and actually start working on this so let's go to the graph and as you can see well make sure all of you have all of these are buttons and uh make sure that you give them proper names in my case i have like the uh distance low medium high epic i have the anti alliancing a a low medium high and etc so you can see i have a bunch of buttons and we're gonna need all of them so the first thing that we need to do is set the colors for the property so that we know which is the active one so let's create a new function and let's call this change button colors and for this one we're gonna need quite a few inputs so the first input is going to be let's call this new setting and this is going to use our e graphics settings enumeration that we just created previously so this one over here um and then also we need five buttons so we have the low button so the low settings button and the type is just simply a button to know the type you can just simply select any of the buttons and you can see that the variable type is a button and that is exactly what we need over here so now the next thing would be adding a bunch more so we have the medium button then we have the again the high button then we obviously need the epic button and the last one is going to be the cnamatic button there we go so we have all of those set over here then from the new setting from the enumeration we can do a switch on e-graphics settings and this instantly creates as a switch and gives us all the possible outputs now what we want to do is change the colors for the background of the buttons so let's drag from one of the buttons so let's begin with the low one so i'm going to set the background color and let's connect the execution from low over here and i'm going to set my color to be just simply red so that's going to be the active button and then i'm just going to copy this node once more and i'm going to change the background color to be black and that's going to be an inactive inactive button then for the target for the second one we need to plug in all the other ones so in the low one this is going to be the active one and now we need to plug in all of these over here you can't do a reroute because if we let's say we do a reroute you can see it disconnects all of them so you can't use a reroute you must connect all of them directly if you want to have this exact setup otherwise you need a bunch of these nodes and the last thing that we need to do is we simply need to return and we need a single output so let's create a new parameter for the output and this is going to be the out setting and this one again needs to be our e graphic graphics settings there we go and then from the graph this output can be connected to the new setting from the input and that's basically all now let's copy these set background nodes four more times because we have five options so we need uh 10 nodes in total so let's copy those like so there we go we have that and now what we want to do is simply connect the execution so the medium goes over here then we have the high epic and cinematic and the outputs all go into the out in the return node like so and now we need to connect the color background color for the first button so we have the medium button over here then we have the high button then we have the epic button and we have the cinematic button now for the second notes we want to do exactly the same thing as we did up here but well this is the medium setting so that means we want to connect this to all the buttons except for the medium button so we need the low high epic and cinematic then the next one is the high setting so it's going to be low medium epic cinematic then we need the low medium high and cinematic and for the last one we need the low medium high and epic there we go so we've done everything that we need for this function this basically just changes the background color of the buttons so we can go back to the graph and let's actually start doing something with the changing the properties so let's first let's begin from the top so what you can do is actually select one of the buttons like so and once you go to the graph it's instantly selected over here as well so we need the graphic slow on clicked event there we go we have one of those and here what we simply want to do is run our change button colors function like so for the local graphic button low we need the new setting obviously needs to be low and we need to plug in all of the buttons that we have for the graphic settings so we have the graphic low there we go we have the graphic medium graphic high and we have the graphic epic and we have the graphic cinematic there we go i'm going to move these out a little bit because well you're going to see that in a second we will reuse these exact get nodes now i don't want to launch the settings right away as soon as we click the button i want them to be ran once we click accept changes so what i need to do is store some information we are changing the graphics settings through a node called execute console command actually let me first show you how it works uh if we could go to the game and press play by default if you press the console key which is left from keyboard key one and down from the escape button so if we click that you can see we have this line up here and we can type in something like r dot screen person percentage and let's say we change this to like 25 and hit enter you can instantly see the quality is very very low because this cuts the resolution scale in uh in quarter so only 25 but by default it is 100 and we essentially are going to be doing exactly that running console commands and we can run those using the uh node called execute console command i don't know any other different nodes that would run change the graphics settings all i know is the console commands so we can use those and i haven't actually seen anybody use different ones if you know the nodes let me know in the comment section down below but that's that's the way i approach this now what we want to do instead of running these console commands right away we want to store those in the memory and launch them once we click accept settings so i'm going to add a new variable and i'm gonna call this graphic command and this needs to be a string type because console commands require a string and also i'm gonna group this in a category and i'm gonna call this command there we go so now this gives me a drop down and now that means that well at the end of this we can plug this in there we go and we can type in our command so we have the r screen percentage 25. so if you need these commands go to the description box i'm going to leave all of them in there so you can copy the text from there and paste those inside of here so you can use exactly the same settings as i do but well probably you want to experiment with these a little bit i didn't give this too much thought i just simply typed in some values that i thought would be good for the the scaling that i'm using right here now the next thing that we also need is we need to store the preset name as well so the enum itself as well so i'm going to create another variable and i'm going to call this graphic current graphic current and the type needs to be our e graphic e graphics settings and i'm going to give this a category and i'm going to call this enum the category is not important that's just so that i can uh arrange these in a better order so i have these drop downs and then once we change the background color we can then set current graphics current and then we can plug that into the out settings and this is going to store the enum values so this should look something like this and now here comes the very boring part what we want to do is we want to launch the on click events for every single one of these buttons so this is very time consuming so let's go ahead and let's select the medium graphic high graphic epic graphic and cinematic graphics so we have all the on click events and then what we want to do is simply copy let's copy the same notes a few more times so we have this guy right here there we go and we need a couple of more so we have three four and five the arrangement doesn't really matter that much as of right now we're gonna still need to adjust this and what we can do is reuse these get nodes so we can plug those in so we have the low button medium high epic cinematic same goes for the next note so we have the low medium high epic cinematic and we are continuing to do the same thing until we have plugged all of these buttons in now the next thing that we want to do is plug in all of our on click events so we have the high on click we have the epic on click almost there there we go and the cinematic on click there we go now we need to change the new setting enum value so we have the low then we have the medium we have the high then we have the epic and we have the cinematic values and the last thing that we need to change is the console command itself because well over here we are setting the screen percentage to be 25 now for the medium settings we need to change the last two digits from 25 let's say we change this to be like 50 then let's have something like 75 on the epic let's have something like 90 perhaps and at the end let's have this at 100. these are probably not the best values so you might have to experiment with these but we'll i'm gonna use these as of right now so now these things are getting stored and everything should be just fine so i'm gonna comment this and i'm gonna call this graphics settings there we go so now we need to do this exact same thing a bunch more times so what i will do is let's go to the next one we have the shadow one so again on click events low medium high epic and cinematic so we have all of those let's bring those over here and then what i will simply do is just copy all of this exact same thing except for the execution node the event nodes themselves paste that in over here there we go and now let's reconnect our buttons so we have this button right here and select that one connect this one connect this one connect this one and the last one and now what we want to change is first and foremost we want to change the buttons themselves so now what we can do is here we are still using the graphic buttons but we want to use the shadow buttons so let's drag the shadow button on top of this one and as you can see as soon as i hover over it it says change node to read shadow low and once you plug that in it changes instantly this to be the shadow low instead of graphic low so this gives us a little this makes us waste less time to change these nodes because we are already done with this and we don't really need to change anything with these nodes because everything is just fine we have the low medium high epic cinematic as long as we have plugged in the correct on click events in there but what we do need to change are these two nodes right here so what we want to do is duplicate our graphics command first and this is going to be the shadow command and also we want to duplicate the graphic current to be the shadow current there we go so we've duplicated those and what we can simply do is the same thing we did just with the buttons let's drag from our shadow current and we can change node to write shadow current there we go so we do that for all of these enums we're changing them to the shadow ones and we also want to do the same thing for the string values so we have the graphics command now would be the shadow command there we go let's do that real quick and then we will change the console command now for the shadow command the command was see let's make sure it saved this correctly it was s g dot shadow quality and by default it's going to be zero this means there are no shadows in the game but you can read all of that in the link down in the description box which will bring you to unreal engines documentation page so now let's copy this one and paste it over here for the medium settings we're going to use shadow quality 1 then for the high settings we're going to use shadow quality 2 and for the last two we're going to use shadow quality 3 because that's that's the only command that's available available at least in documentation they they're saying it's that way i haven't tested with shadow quality for but i don't think there is one because these are like preset values that change many things in the shadow settings not just not just one thing but they are changing many things and you can read all of that in that link down below so that's basically it and we need to redo the same thing many many times i'm not going to waste your time and i'm just going to skip simply skip to the part where i already have done the exact same thing and we're going to talk about the commands that i've used so i've added settings for all of the buttons that i have as of right now we have a few more variables we i added the command variables for and alliancing distance textures effects and post processing and same goes for the enums we have the enums for those ones as well everything is exactly the same what i noticed that i did was i swapped these things around but it doesn't really matter in which order we set those and so i have the on click events for all the buttons i've changed all the buttons over here change the commands and now let's talk about the commands real quick so for the anti-aliasing the command would be r post process a a quality and i have zero one two four and six um there are quite a few possibilities to be used with this one so that's a head room for some experimenting and then for the post processing we have the command sg post process quality 0 1 2 3 and 3 again that's the maximum so the last two are using exactly the same command now for the view of distance scale we have our view of distance scale 0.2 we have the point five point eight and one and if for this one to work properly you need to set the max draw distance or cool distancing for your uh specific meshes and then this basically changes the scale so let's say you have like uh it's a ridiculously small number but let's say you have like a thousand units uh for the cool distancing so the one setting is gonna use the thousand but like point five is only going to use 500 so that's how i think this one works then for the texture quality it is sg texture quality zero one two three and three again and for the last one for the effects we have the sg effect quality zero one two three and three again so this is going to change the button colors essentially all of this what we have done over here and it's gonna store the console command and the current setting that we have selected now we need to actually save these things and to save those we need to create a thing called game save so let's go back to our content browser and let's right click let's create a new blueprint class and let's look for save game let's select that one so i'm going to call this save game settings let's open this up and so open full blueprint and here we need a bunch of variables now we need exactly the same variables basically so we want to have the graphics command which is a string type and whoops string and i'm going to give this a category again so this is the commands then let's duplicate this one and this is our whoops i want to copy the word command and this is the shadow the shadow command then we need the aaa command we need the bp so post processing then we have the texture we have the distance and we have the effect command so i have seven yes seven that is and now we need the enums so we have the graphic enum or the graphic it's called this graphic setting i'm going to call that one graphic setting then we need to change the type to be the e graphic settings and this has a we'll give this an enum category then we again want to have these oh my god i can't type shadow setting then we have the anti-alliancing setting post processing setting we have the texture setting we have the distance setting and we have the effect setting now we also want to uh add a couple of functions in this save game so let's create a new function and let's call this set settings set settings and for this one we need a bunch of inputs so what i'm going to do is drag in all of these nodes right here so i'm going to set the graphics i'm going to set the shadow and i'm going to move this like so and then we want to do the same thing for the enum so we want to have the this enum right here then we're going to have the shadow one on the line sync process texture and the effects setting there we go and then we can just simply drag for em from every single one of these so let's drag from this one and you can see it says add pin to node and that is as simple as it gets so this is way quicker than simply adding these by clicking add new entry for the input and we're going to do the same thing for the enums so we're going to drag from those there we go and we have plugged all of them in and now once we run this event we can then store this information so we're going to use this to save the settings and we also want to use something to load the settings so i'm going to create two more functions and i'm going to call this return command and we need an output for this one so let's return so let's run the add return node and what i simply want to do so we're going to return commands so i'm going to drag from the graphics get that and plug that in and let's get all of these now we can plug all of those in so add pin to node add pin to node and this is way quicker than adding the inputs one by one so we have this one set up now we want to do exactly the same thing for our enums so again new function and let's call this return enums and again can i select all of those no i can't so we need one by one again so we have all of those then again we can return add return node and connect all of these here so that it creates us an output and like i mentioned previously we're going to use this to load our settings so that's going to be it for the save save game blueprint we are setting the values and we are retrieving the values so this means we can go back to our ui settings and over here now let's look for our apply changes button so i have my button over here so i'm going to select it over here so that in the graph it is already selected then we need an on click event and let's start working on the on click event so over here what we want to do is first we want to create save game object we're creating a save game object let's select the class and the class in my case is the save game settings so this blueprint right here that we just created and then from the return value we want to so what we called it we called it set settings so from the return value we want to set the settings and then we need to populate all of these inputs so we can drag in our graphics we can drag in our shadow sync process texture command command [Music] on the alliancing on the alliance and why it doesn't work and the online current oh this is a byte setting oh this is interesting i've messed this up by copying so let me change this real quick so now by changing the type i need to you can see i need to reconnect these ones as well so make sure you do if you have the same issue as i do so i changed all of mine now we can go back to this one and now we can plug in the anti alliancing post processing and we can continue there we go so we've done that then we can drag again from our return value and we can save game to a slot to save this information to save everything in our save game note and then for the slot name um we can decide what kind of name we want to use i'm going to use the graphic settings and then once we've done that we want to load game save from slot and we want to use exactly the same slot name so graphic settings paste that in into the slot name then from the return value we can cast to our save game settings and then from our game settings we can return commands so let's return the commands and then we want to run the execute console command and we want to execute one for every single one of our settings so we have seven of those so i have six and the seventh one then let's connect the execution pins like so there we go so we have one execution for each so that all of these get ran and then we can just simply plug in all of our settings so we have the graphics command shadow on the alliancing post process texture distance and effect there we go so we've added all of those and now this is going to allow us to change the graphics settings now that this works let's make sure that our buttons get colored correctly once we create our widget so i'm gonna right click this one and i'm gonna run the event construct so there's the begin play event for the widget and once we have that we first wanna check does game does save game exist and we want to copy our slot name so graphic settings let's plug that in and then we want to check if to see if it actually exists because this is going to return us the information does the slot exist and if it's true then we can load game from a slot using the graphic settings slot again and then we again want to cast to our save game settings and here we want to return the enums and then over here what we want to do is run our change button colors so let's run this there we go and so for the new setting we can use the graphic setting we're going to change the graphics setting first and then we need all the buttons so i'm just going to copy buttons from over here so we have the graphic blow up until cinematic and let's plug all of those in so low medium high epic cinematic ones there we go we have all of those and now we want to do exactly the same thing for all of our buttons so i'm just going to copy this connect the execution connect the new string to the shadow settings and replace these with the shadow low medium high and epic so i'm gonna do a cut in the edit and i'm gonna be back once i've done this for all of these settings so there we go i've set up everything i need to set up so this is all good so now technically if we would give this another try you can see all the settings are at cinematic by default and once we change those they change accordingly to what they should be now we need to make sure that every time we launch the game the same settings get ran so what we want to do is go to the blueprints and open our level blueprint and this part is going to be quite simple because over here all we want to do is right click and do a event begin play and on beginplay we want to do something something similar we already done so we want to check if does save game exists then i'm just going to copy the this slot name over here then we're going to do an if branch check to see if that save slot exists and if it does then we can go to our ui settings and copy the load load from slot cast and return commands and execute console commands so we can paste that in same way we did for the apply settings and that is basically all we need to do so if i was a little quick on this one pause the video have a look so we can now compile and save this and now if we press play let's change the settings all to be at low settings apply close the game press play again and you can see we are still in the low settings even if we restart the uh restart the project it's gonna still stay in the same settings one more thing that you might be interested in is how to delete these save games because let's say you you make a mistake or something and the wrong setting gets saved and you can't go back anymore so i'm going to show you how to do that so what you want to do is go to your project folder where you have your project so mine is called some settings and here we have the saved folder which contains a lot of things so maybe if you mess up also the uh the layout of your project or something with the shortcuts you click the wrong thing and something's not the way it was before you can always delete the whole folder but then remember that the layout is going to change and all the things that you have changed uh are going to change back to the default values so all you want to do is simply delete your save games here you can see here is my graphic settings save you can just delete the save itself or simply delete the whole folder and that is going to basically be it for today's video as of right now this project is not going to be available for download because i want to expand on this project i want to also add the sound settings because that's something that got requested as well so i'm going to add the sound settings and then this project is going to be available for to download to everybody on my website uh so make sure you wait for the next video and then i will have the download link available to you guys so like always thank you for watching uh make sure to join my discord to give me some more suggestions on future tutorials support me on patreon subscribe to my channel and i see you in the next episode
Info
Channel: It's Me Bro
Views: 23,886
Rating: undefined out of 5
Keywords: unreal, engine, graphics, setting, menu, save, load
Id: gJ1v6ChkgHQ
Channel Id: undefined
Length: 32min 3sec (1923 seconds)
Published: Tue Oct 06 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.