Create character customization variables for Game Save.

Dude…you’re over complicating this process. The enum is supposed to make your life easier not harder. You are “hard coding” enum values. You are supposed to “select” one and let it do the work. See this link.

ENUMS are new to me. Something is missing or I made the wrong Blueprint flow.
No matter what clothing button I press, only the “Head” appears. Cause “Head” is the first member in the ENUM Selection. (None of the other body parts display when I press their button)
I’m guessing, some variable needs to be plugged into the “Selection” so I can see any head selection combined with any chest selection, combined with any leg selection.

The only way I been able to get the buttons to display the correct selection is a blueprint flow like Post #16.

O’ Jeeze, I was missing the Enum Vaiable. Now I can see the head combined with the torso and legs.

There you go!! You also don’t need all those cast nodes. Your player ref variable is already of the type “third person”. Just delete ALL the cast nodes and hook up the functions directly to the “Player Ref”.

Hmmm?

  1. How do I verify the 0.sav file from Save Game actually saved the clothing selected for the Character?
  2. Why doesn’t my character assemble and load when I go from Level 1 to Level 2? When level 2 loads, there is no character, just an invisible collision object.

Below are screen grabs describing how I set up the Save Game, Game Instance, Save Game Function, Load Game Function, and Load/Assemble character function.

So, looking at all this again I realized something…I have NO CLUE what you are trying to do anymore. Your setup looks much better yes. I can follow the save/load logic well. My problem is, I am giving you a solution using an ENUM to a problem that I don’t fully understand. Please describe in words exactly what this “clothing” widget is supposed to be doing. You have a bunch of confusing names (head, head block, head skinny, tshirt, long sleeve etc). I can’t figure out what the widget with buttons is supposed to be doing. How do you have an “invisible” mesh ever? Aren’t you just putting clothes on a mesh? I am super confused. Do you have a video of what this is supposed to look like? Are there pics of the UI? The buttons? How it all works? None of this makes sense. So all my explanations about enums isn’t helping because I don’t fully understand the logic/mechanic you are going for and you don’t really understand how enums work. Soooo, we keep going back and forth. Let’s try this from the beginning. I need pics, screen shots, videos etc of what this is supposed to look like, an example from somewhere works too. And please explain in words what the system is supposed to do.

Sure thing, like most character customization systems, there is an array of buttons for head styles, an array of buttons for the shirt styles, and array of buttons for the pants styles. There will be hats, glasses, hair, backpacks, and other categories.

Click on the appropriate button to see the clothing you want displayed on the character.

The clothing items are child components of the Third Person Character that I will be turning on. The clothing visibility is turned off as a default state. I will turn on the visibility to display the clothing at runtime.

When the player is happy with the clothing choices, all the clothing items will be saved in one variable. Hopefully, that one variable can be stored in Game Save, some kind of STRUCT, or an ENUM. There can be many outfits stored, so maybe I can store the different outfits in a closet.

The game can be turned off, but when the game starts back up, the player can go into his closet to choose the same outfit or a new outfit.

The character will be going between levels, so maybe the clothing can be stored in Game Save or a scene manager.

There will be a sub set of buttons for Morph targets.
There will be a subset of buttons to change the textures on any piece of clothing.

I’m starting with an array of 3 temp heads, 3 temp torsos, and 3 temp legs.
Head
Head Block
Head Skinny
Torso Skin
Shirt
Tshirt
Legs Skin
Pants
Shorts

Currently, the buttons are displaying the correct clothing at runtime. And hopefully the outfit selected at runtime is being stored in the “EnumClothingProps” variable seen in Post #23

Yea, this is what I was afraid of. So you are basically creating everything from scratch including the “mesh” components. Like there are multiple head “shapes”, multiple torso types (shirt or no shirt etc) and same for the legs. On top of that you can say place a “hat” on any of the head types. So if you had 2 different hats and 3 different heads you could wind up with 6 total different head “styles” or 9 if you include no hat at all. And this is compounded for each additional body section you modify. On top of that you are then changing textures for the hats, shirts, pants etc creating a customizable character that could have hundreds of different variations selected by the user. Once the user is all done you wish to “save” the entire “outfit” (ie the specific selection of maybe 10-20 different custom options). Now as you can see that is A LOT of different data types you need to store. This is where the confusion comes in. My suggestion to use an “Enum” type variable is to select between multiple options of the same type not BETWEEN types. For example, there are 3 buttons, each button has a picture of a different shirt style (V-neck, t-shirt, long sleeve). Using an
“Enum” you can easily “set” the shirt type on the character. The player selects one of the shirts by clicking the appropriate button, the shirt button then on the back end sets an enum variable which you would name “Shirt Options” for example and it would have 3 types, one for each shirt style. Each button would then set the specific shirt type enum value. So clicking the “t-shirt” sets the “Shirt Option” enum variable to read “T-Shirt”. All of the shirt style buttons set the enum to their specific type and then converge on a “switch on enum” of type “Shirt Options”. This is the setup you have in #23. Great! The enum allows you to customize the shirt style easily and can be saved so that you know exactly what to set it to if you load the game up to display the exact same shirt style chosen previously by the player. Now the part that you got confused on…you can’t put a “Head” selection into the same enum. It won’t work. Because now, when the player selects a shirt style, we set the enum to “T-Shirt”. BUT if you have head values in the same enum what happens when they choose “head block”? The enum is changed to “head block”. Now when you try and load this data back, you will only display “head block” not “T-shirt” + “Head Block” because you used the SAME enum for each one. So you need a separate ENUM VARIABLE for EACH thing you are going to change in the same category. So “torso enum”, “Head enum”, “pant enum”, “torso texture enum”, head texture enum", “Pant texture enum” etc etc. Each major category and sub category will require a separate enum variable. Now once you have like 20 different enum variables to make life a little easier for saving you can create a struct that holds one of each of those enum types. So a struct with 20 enum variables within it. When the player has finalized an “outfit” you save all the enum variables values into this struct. Now you can simply pass along a single struct to save/load from instead of 20 enums. When you load, you take that struct, break it apart into the 20 enums and you must individually set each of the 20 enums in your widget or character wherever this takes place back to the values that were saved. This will then allow you to immediately display the entire “outfit” the player last created.

Great, I’ll create an ENUM for every category. The put those categories into a STURCT. Put the STRUCT into GAME SAVE. Then on load, get the STRUCT, break the STRUCT apart into ENUMS in the Third Person Character. Set the values that were saved to display the outfit.

I’m on it. Thank you. It was the single variable holding all the ENUM categories that was giving me the problem. Haha. That single variable should have been a STRUCT holding all the ENUMS.

I have an Enum for every category, and verified that the buttons display the correct clothing on the Avatar at runtime.
Now, time to learn how to use a STRUCT. So, I can put the Enum categories into a STURCT.

Learned how to use a STRUCT: See images below.

  1. Created a STRUCT with the ENUM categories for Head, Torso, and Legs.
  2. Put Struct into Save Game
  3. Put the STRUCT variable into “Game Instance” Save Game function
  4. Put the STRUCT variable into “Game Instance” Load Game function

In the next post, I need to:
In the Third Person Character, get the STRUCT, break the STRUCT apart into ENUMS. Make a function to set the values that were saved so we can see the clothes that were saved out in the previous game.

Looking MUCH better! haha Also, please get rid of all those unnecessary cast nodes…it is bothering me every time I see it :stuck_out_tongue: Just hook the player ref directly up to the function call. I promise it works the same.

I need some help loading the character clothes that was saved into the Enums. I still do not see the character loading in level 2.

  1. In Game Instance, I created a “Construct Avatar” function to load the STRUCT, break out the Enum categories, get the Third Person Character, and show the appropriate clothes based on the Enum category selection.
  2. Then, when level 2 opens, run the “Construct Avatar” function.

I need some help loading the character clothes that was saved into the Enums. I still do not see the character loading in level 2.

  1. In Game Instance, I created a “Construct Avatar” function to load the STRUCT, break out the Enum categories, get the Third Person Character, and show the appropriate clothes based on the Enum category selection.
    (The show clothing functions are coming from the Third Person Character BP, so I’m casting to the Third Person Character BP to grab the show clothing functions.)
  2. Then, when level 2 opens, run the “Construct Avatar” function.

What do you see? What happens in level 2? Are you saving the data properly into the struct? For structs you need to use “Set Member Element” node.

This is what I see. The Save Function is in Post #31. I have not used “Set Member Element” node, where would I put it in?

Can you zip up this project and send me a link so I can look through it? Something is off and I can’t tell even with all these screen shots. The system is so complex and interconnected and all it takes is one small thing to be off or not set properly for this whole thing to fail. You realize this is a dynamic run time modification of a player character, a save/load cycle, level transitions, enums that you’re new to as well as structs and an entire UI interface. I think it is easier if I can just look at the entire thing and go through the logic from start to finish. Screen shots for every little thing are becoming tedious unfortunately. If the project is too large or you are unwilling to share the next best thing I can say is post all associated blueprints, their functions and everything related to this to https://blueprintue.com so I can scroll around everything. Otherwise I don’t really know how to help you. This is just too complex to do with screen shots.

Sure, I can send you a Copy of the project. :slight_smile: It is really big. I can re-create it and send you a smaller version of it.

I have posted all the Blueprints. Tell me what order you would like the blueprints posted in and I can do that, too. It would be faster than re-creating a smaller version of the project. :slight_smile:

Basically the issue I am having at this point is while screen shots in isolation are cool for problems that are largely limited to one or two BPs communicating with each other, your setup is far more nested and the mechanic you are trying to implement far more complex. So for me to pinpoint why something works in one level and not another one with a system that I have been trying to help you develop from my tutorials (which are bare bones) is quite the challenge. As you can see by the numerous posts on my channel as well as here. And while we have been making progress there is always something else that needs fixing/tweaking. So while I don’t mind helping I really don’t want to be dealing with screen shots anymore because they aren’t something I can directly work with. I was helping another subscriber with a simpler system than what we are trying to do here and I had a lot of the same back and forth for things with progress being made slowly over time. I asked for project files and when I was able to look at the system this person was actually creating from our discussions I realized that while it was sort of what I was trying to explain, the implementation of my ideas was not how I imagined. So, what ended up happening is that the person was creating a functioning system “based” off my guidance but the system was not actually set up how I intended. And because of that when I made further suggestions problems arose because the logic I thought was there (and seemed to be true based on the output) really wasn’t. It wasn’t until I looked at the actual blueprint system from start to finish that I found all kinds of issues that I wouldn’t have even known to ask about because from the outside the system was “working”. You can create something that works under very specific conditions and that is what we have been creating. A system that does certain stuff at runtime, in level 1. And it works. But move it to level 2 and everything is missing…?? For me the issue is as simple as calling a function to set the player character outfit and feeding it saved data. That is assuming the logic is setup how I think it is. For whatever reason this is not working which makes me feel that there is something I am missing in how you are actually going about this that isn’t quite what I am imagining from our discussions. I understand that re-creating this system in a small project would take time, BUT i honestly feel in the long run it will save significant amounts of time. With an actual project I can walk through the logic myself and see what is really going on, fix it up and send it back and you then have a template to work from. As for the team being comfortable with screen shots, I don’t mean to be rude here but I have spent quite a bit of time helping with this and it is not like I am getting paid. At some point you either have to trust me that I am not trying to steal your project or accept the fact that I may not be able to fix the issue like this and it is something you and your team will have to figure out yourself. This is free help so you gotta meet me somewhere man. If you want to post your entire graph with all the functions from every single blueprint that uses this system or interacts with it to https://blueprintue.com be my guest. But I feel that would probably be more time consuming than just recreating a basic version of this.