I want to add a character editor to the game. Does anyone know examples or tutorials. Are there any ready-made solutions? I will be grateful for any tips.
Thousands on Youtube.
Plenty in the Unity Asset Store
I have two more or less in the asset store, but I don’t like them. One of them is 90 dollars. There are some examples of putting on clothes on YouTube, but that’s not it. I plan to create an editor with blendshapes and everything possible. But I was hoping to see at least some decent examples of implementation.
You should try your hand at the tutorial and ask yourself what parts would be necessary to make it a “decent example of implementation.”
You’ll soon find that inventory systems and character selections are some of the hardest most insanely-open-ended thing you can even begin to imagine in computer games.
Here’s my standard blurb of notes, as pretty much 100% of the below applies to both inventories and character customization systems:
These things (inventory, shop systems, character customization, dialog tree systems, crafting, ability unlock systems, tech trees, etc) are fairly tricky hairy beasts, definitely deep in advanced coding territory.
The following applies to ALL types of code listed above, but for simplicity I will call it “inventory.”
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.
If you contemplate late-delivery of content (product expansion packs, DLC, etc.), all of that has to be folded into the data source architecture from the beginning.
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.
There is no such thing.
Because this kind of thing is not clearly defined. Could be a 2d character, with three changeable body parts (legs, torso, head). Could be a character editor like in Fallout where you can edit ever facial and body detail. Could be an editor that let’s you customize clothing and accessories a character is wearing, like Sims. Could even be an RPG stats character editor that let’s you pick skills, traits, zodiac sign, background story and assign STR, INT, WIS attribute values.
thank you for your answers. I plan to create something like a fallout system. I’m planning to create a model with morphs in blender. But I can’t find any implementation examples. I would like to know how this is done in high-level projects. What approach is used? For example, do you use one model for both a male character and a female one, or 2 different models? Before I start, I would like to get some knowledge about how to do this.
You’re getting caught up in the details.
Use two prefabs, then it doesn’t matter: you load the prefab.
Otherwise, hide it all in one prefab and use a blendshape.
Either way, nothing about the outer editor changes. You just have a button to toggle male / female in the data model and then all the view controllers observe it and either swap out the prefab, or else toggle the blendshape animation or whatever.
Thanks for answers. While I was making the character, I realized that the blendshape system was not suitable for me, since I would not be able to change the character in the future. I remembered that I read somewhere about customization (morphing a character using bones or additional bones, I don’t remember exactly.) Please suggest some tutorials or at least something on this topic. I would be grateful for any tips.