Titanic you are by far the best for tutorials i went through 3 in the last few days and ended up no where so i looked u up again for a save system and sure as hell my character location saves where it should and not under the map and across it. Thanks again dude!
Thx for tutorial_!! How to save the information of each individual spawn actor of one class? For example, the text printed in the widget, which was created when this actor spawned?
Hello, thank you for the tutorial, it is explained nicely. I have a question, of course. You don't have to explain in too much detail but, how would you do it if you had to make a save game file for an RTS game. We are talking about building locations, units and all their health, status effects etc. If there is a reference to a tutorial or a document, just point the way. If not, and you are too busy to explain, just name 4-5 steps in short. I know its a VERY broad thing to talk about in a comment, but at least some guidance or where to start with would be awesome. Thank you for this tutorial one more time.
You're right it is a very broad topic and there are numerous ways you could approach it. That said here' what you could do: First off, you need a way to distinguish between which actors need to be saved and which don't. You could do this either by using actor tags, or using an actor component that you place on each actor you want to save info about. You could also add an interface to whatever class you want to save and use that for communicating info. But let's go with the tag example for now. Next, when you save the game (wherever that occurs, be it in-game or a UI) you'd want to call get all actors with tag, and then enter in the tag you want to search for (let's say "Save"). You need to have that tag added to the actor tags array on any actors you want to save. So then, you'd run the resulting array through a for each loop and then get the information you need from each of those (like locations or whatever). Now since you'll be getting a ton of variables of the same type, you need to have an Array of that type in your save game object instead of a single value. So take all the values you're getting and add them to the array in your save game, and then once the for each loop is done, save the game to slot. That's essentially what you'd want to do. You might have to do some casting to different actors to get specific variables (like health for example), or you could call and interface function on all your actors and have the function returns whatever values you need. As you can probably tell it can be pretty complex, and besides that, it can be pretty taxing on the system especially when you've got tons of variables to account for. Because of that, I would recommend implementing your save and load functionality from a menu instead of live in game. Anywho, I hope that helps you get started.
You hope it helps? This is fantastic. Thank you so much. Please allow me to ask just one more question. I know that UE doesn't offer blueprint support for deterministic lockstep networking, used in most RTS games. I don't know how to work with C++. Should I worry about that later in development, or should I start thinking on how to approach this immediately?
I'll be honest I'm not very familiar with networking so I don't know how difficult it might be to implement, but if you're a small team then I would focus on getting the RTS mechanics figured out first and then add in the networking. Again I don't know much about it so that might be the wrong advice. But those are my 2 cents
Thank you so much man. I am currently alone, learning how to do stuff efficiently, not rushing too much. I am not dragging myself into any illusions about a big game, but I honestly have 3-4 years to dedicate to whatever I intend to do. Thanks again, you are great.
A-mazing!! Can I rig this to autosave after changes are made at any time? or on close game? Its weird though, everything is saving except my xp and level
It's in the tutorial the inventory is just a bunch of variables so save them and load them the same way he saved his variables same concept. Just remember to cast to wherever you saved them most likely in the game instance if you have multiple levels. Hope this helped.
I'm trying to make a character customization UI. Since different buttons can be pushed before the player decides what torso he likes, I need to save the last button selection into Game Save. I'm hoping, I can save the "ENUM variable" of the last button selection into Game Save. How can I tell "Game Save" or "Game Instance" what torso is selected at runtime? I have screen grabs of my blueprints here: @t
Hey man, any chance you could show us how to save the variables from the day/night cycle you did? I've been trying to do it but having no luck. It's pretty straight forward when using variables from the player character but when you try to apply these to an external blueprint I have no idea. Thanks
Hello guy thank you for all videos. I have a problem in the logs I have this: SaveGameReference from function: 'SaveGame' from node: Set SavePlayerHealth in graph: SaveGame in object: FirstPersonCharacter with description: Accessed SaveGameReference Can you help me plz?
and one more, Error Blueprint Runtime Error: Attempted to assign to None from function: 'SaveGame' from node: Set SavePlayerHealth in graph: SaveGame in object: FirstPersonCharacter with description: Attempted to assign to None
time to use a 4 yo tutorial just to save 4 variables for 4 lvl high scores and maybe cry coz its an outdated tutorial and you do it a little differently now update : doesn't work
Titanic you are by far the best for tutorials i went through 3 in the last few days and ended up no where so i looked u up again for a save system and sure as hell my character location saves where it should and not under the map and across it. Thanks again dude!
Thanks for the tutorial! Wish you were still around making more.
Your video's have been a great help to myself and may others!
Thank you, I have watched a ton of saving tutorials and this is my favourite, you are a great teacher
Thanks for this tutorial! One of the best that covers saving!
Nice vid! Got me set up very quickly, thanks man.
Thanks for the video . It was really useful !
this is great - got my save game setup
6:38 this is fixed in 4.15. Now the node returns a reference of the same type as the save game class
Oh cool, good to know. Thanks for sharing
Great tutorial ! liked & subscribed :)
8:45, im getting a problem around here. "Save Game Object Reference is not compatible with Bp Save Game Object Reference"
Hi, thanks for the tutorial :-) I know it’s a old one, but do you know how to add a variable to save variants from the variant manager?
very nice tutorial
Thx for tutorial_!!
How to save the information of each individual spawn actor of one class?
For example, the text printed in the widget, which was created when this actor spawned?
Hello, thank you for the tutorial, it is explained nicely. I have a question, of course. You don't have to explain in too much detail but, how would you do it if you had to make a save game file for an RTS game. We are talking about building locations, units and all their health, status effects etc. If there is a reference to a tutorial or a document, just point the way. If not, and you are too busy to explain, just name 4-5 steps in short. I know its a VERY broad thing to talk about in a comment, but at least some guidance or where to start with would be awesome. Thank you for this tutorial one more time.
You're right it is a very broad topic and there are numerous ways you could approach it. That said here' what you could do:
First off, you need a way to distinguish between which actors need to be saved and which don't. You could do this either by using actor tags, or using an actor component that you place on each actor you want to save info about. You could also add an interface to whatever class you want to save and use that for communicating info. But let's go with the tag example for now. Next, when you save the game (wherever that occurs, be it in-game or a UI) you'd want to call get all actors with tag, and then enter in the tag you want to search for (let's say "Save"). You need to have that tag added to the actor tags array on any actors you want to save. So then, you'd run the resulting array through a for each loop and then get the information you need from each of those (like locations or whatever). Now since you'll be getting a ton of variables of the same type, you need to have an Array of that type in your save game object instead of a single value. So take all the values you're getting and add them to the array in your save game, and then once the for each loop is done, save the game to slot. That's essentially what you'd want to do. You might have to do some casting to different actors to get specific variables (like health for example), or you could call and interface function on all your actors and have the function returns whatever values you need.
As you can probably tell it can be pretty complex, and besides that, it can be pretty taxing on the system especially when you've got tons of variables to account for. Because of that, I would recommend implementing your save and load functionality from a menu instead of live in game. Anywho, I hope that helps you get started.
You hope it helps? This is fantastic. Thank you so much. Please allow me to ask just one more question. I know that UE doesn't offer blueprint support for deterministic lockstep networking, used in most RTS games. I don't know how to work with C++. Should I worry about that later in development, or should I start thinking on how to approach this immediately?
I'll be honest I'm not very familiar with networking so I don't know how difficult it might be to implement, but if you're a small team then I would focus on getting the RTS mechanics figured out first and then add in the networking. Again I don't know much about it so that might be the wrong advice. But those are my 2 cents
Thank you so much man. I am currently alone, learning how to do stuff efficiently, not rushing too much. I am not dragging myself into any illusions about a big game, but I honestly have 3-4 years to dedicate to whatever I intend to do. Thanks again, you are great.
Glad I could help.
Thanks for tutorial!! i have a small question :D can we save bool variables ? and lastes custom event things ?
Hello, how would I save a skinned mesh on a rig into Save Game? Then, load it after a new game starts?
Thank you bro
A-mazing!! Can I rig this to autosave after changes are made at any time? or on close game? Its weird though, everything is saving except my xp and level
thx bro..rlly helpful :)
It would be great that you make a tutorial for saving the inventory system. Because I haven't found it and It's very important!
It's in the tutorial the inventory is just a bunch of variables so save them and load them the same way he saved his variables same concept. Just remember to cast to wherever you saved them most likely in the game instance if you have multiple levels. Hope this helped.
What kind of change can we make loading other (next)map with loading variables?
THANK YOU
How to place the user surface as button ? and level
I'm trying to make a character customization UI. Since different buttons can be pushed before the player decides what torso he likes, I need to save the last button selection into Game Save.
I'm hoping, I can save the "ENUM variable" of the last button selection into Game Save.
How can I tell "Game Save" or "Game Instance" what torso is selected at runtime?
I have screen grabs of my blueprints here:
@t
Hey man, any chance you could show us how to save the variables from the day/night cycle you did? I've been trying to do it but having no luck. It's pretty straight forward when using variables from the player character but when you try to apply these to an external blueprint I have no idea. Thanks
Yep I plan to do that!
Awesome, look forward to it! Thanks again.
UE 5.1, still works if anyone wonders
you are a life saver
How to save data from mysql database into variables
could you do a tutorial on items picked up and enemy killed. thanks
Hello guy thank you for all videos.
I have a problem in the logs I have this:
SaveGameReference
from function: 'SaveGame' from node: Set SavePlayerHealth in graph:
SaveGame in object: FirstPersonCharacter with description: Accessed
SaveGameReference
Can you help me plz?
and one more,
Error Blueprint Runtime Error: Attempted to assign to None from function: 'SaveGame' from node: Set SavePlayerHealth in graph: SaveGame in object: FirstPersonCharacter with description: Attempted to assign to None
i fixit =)
Do you remember how you fixed it, i have been stuck with this error, and feel like i missed something small I can't figure out.
Nevermind, sorted it out, I apparently had a saved game file from before I modified to this save system, so I couldn't overwrite the old file.
How save all game?
them Twitter notifications though
time to use a 4 yo tutorial just to save 4 variables for 4 lvl high scores and maybe cry coz its an outdated tutorial and you do it a little differently now
update : doesn't work