Custom character creation scene

Hey guys,

I’ve been trying to find a way to do this, but the deeper I go the more confused it’s getting. So I thought I try here. So as the title says I want to learn how to make a custom character creation scene in unity.
To start with tho, I just want to be able to chose between a human male or human female. When I’ve chosen one of the two and create the character, the chosen model should spawn in game and saved as the player model for when you restart the game.

Eventually tho I would like to add hairstyles, haircolour, skincolour and different faces.

Someone told me to make a list for each type and then use serialization or playerpref to save that. Someone else told me to use classes and someone else told me to use scriptableobject. And then one more told me I should start with a default rig so that the different gameobjects can be switched out on the default rig so you keep the animations the same for each. Also you could appearently use that to make the body taller or wider and the different gameobjects like hairstyles would be assigned to a bone and would still get applied to the same spot.

But for now I just want to switch between male and female, after that I would like to switch hairstyles out and maybe skin colour. I already downloaded the default male and default female model from mixamo.

Anyone here who can help me on the right path? :slight_smile:

This is a brilliant approach. What you propose is a MASSIVE undertaking, so simplifying it to just two characters initially will get you up and going quickly.

Check out a few tutorials on the process. You’ll be recording the player’s choice in some kind of longer-lived GameManager type construct and then acting on it later when you go spawn during play.

You can even make it ultra-simple: tap A to choose one or tap B to choose the other, put both male/female in your selector scene, and save the result somewhere. DONE with version 1.0.

Meanwhile, keep this in mind for these things:

These things (inventory, shop systems, character customization, dialog tree systems, crafting, etc) are fairly tricky hairy beasts, definitely deep in advanced coding territory.

Inventory code never lives “all by itself.” All inventory code is EXTREMELY tightly bound to prefabs and/or assets used to display and present and control the inventory. Problems and solutions must consider both code and assets as well as scene / prefab setup and connectivity.

Inventories / shop systems / character selectors all contain elements of:

  • a database of items that you may possibly possess / equip
  • a database of the items that you actually possess / equip currently
  • perhaps another database of your “storage” area at home base?
  • persistence of this information to storage between game runs
  • presentation of the inventory to the user (may have to scale and grow, overlay parts, clothing, etc)
  • interaction with items in the inventory or on the character or in the home base storage area
  • interaction with the world to get items in and out
  • dependence on asset definition (images, etc.) for presentation

Just the design choices of such a system can have a lot of complicating confounding issues, such as:

  • can you have multiple items? Is there a limit?
  • if there is an item limit, what is it? Total count? Weight? Size? Something else?
  • are those items shown individually or do they stack?
  • are coins / gems stacked but other stuff isn’t stacked?
  • do items have detailed data shown (durability, rarity, damage, etc.)?
  • can users combine items to make new items? How? Limits? Results? Messages of success/failure?
  • can users substantially modify items with other things like spells, gems, sockets, etc.?
  • does a worn-out item (shovel) become something else (like a stick) when the item wears out fully?
  • etc.

Your best bet is probably to write down exactly what you want feature-wise. It may be useful to get very familiar with an existing game so you have an actual example of each feature in action.

Once you have decided a baseline design, fully work through two or three different inventory tutorials on Youtube, perhaps even for the game example you have chosen above.

Breaking down a large problem such as inventory:

https://discussions.unity.com/t/826141/4

If you want to see most of the steps involved, make a “micro inventory” in your game, something whereby the player can have (or not have) a single item, and display that item in the UI, and let the user select that item and do things with it (take, drop, use, wear, eat, sell, buy, etc.).

Everything you learn doing that “micro inventory” of one item will apply when you have any larger more complex inventory, and it will give you a feel for what you are dealing with.

Breaking down large problems in general:

https://discussions.unity.com/t/908126/3

The moment you put an inventory system into place is also a fantastic time to consider your data lifetime and persistence. Create a load/save game and put the inventory data store into that load/save data area and begin loading/saving the game state every time you run / stop the game. Doing this early in the development cycle will make things much easier later on.

2 Likes

Kurt is obviously sugar coating this… I’m pretty good with Blender, playing with bones(also in Unity), weight painting, and even creating (user or AI) manipulation of bones(scales/positions/rotations) versus their surroundings once the model is in Unity.

And I even dabbled with making a proper character creation setup… once… and I’m never doing it again… I’ll wait until I get rich, and can afford a proper team to handle all that nonsense. :sunglasses:

But don’t let me deter you, if you really want to do it, by all means start hammering away at researching all you can on every aspect of it. As it’s best to focus on what you’re interested in!