0

How to do a item system like in WoW

Every item has its own appearance. Whenever you change your equipments your character appearance changes. I'd like to learn how and how can i use it on my unity project?

17th Jul 2017, 10:52 PM
Aintgot Anyname
Aintgot Anyname - avatar
3 ответов
+ 4
Hm.. Depends on what you have. Colors would be different types of textures, for example a bronze helm and a silver helm. That would use the same model, easy to change by modifying the texture type. When it comes to something like a bronze helm and a silver crown (Different models) you may have to do a little swapping. You could have an empty object to keep track of where the model goes on the player. Instantiate the crown, delete the helm and place the crown in the correct position. You must make sure your models are to a proper scale in order to do this efficiently. Rotation too. You only ever need to do this when the equipped items are changed, and when the character is loaded into the game. I never really played wow though.
18th Jul 2017, 12:30 AM
Rrestoring faith
Rrestoring faith - avatar
+ 9
I've never played WoW, but I have tried making an app with an inventory system. If it's anything like what I tried, it might look kind of like this (keep in mind I know jack about gamedev): - A base abstract class for all items: Name, Description, BuyPrice, SellPrice, ImageURL/ModelURL - A subclass for items with quantities (consumables, materials, etc.) that adds Quantity and Max/Cap per inventory slot. - A subclass for items you can only get one of that adds HasObtained. - Subclasses for Equipables. Armor may have various stats, IsEquipped, and ArmorType (where it's worn). Pets or summons will have their Stats and load in their AI files. Weapons may have classes like ranged (with associated ammo), magic, physical, etc. All of them may have booleans for what races or classes, etc. can wear, use, or own the item. They may also have a minimum level to use. A player would have lists as their inventory(s), made up of objects of these classes. If inventory is expandable, slots may have a state for being locked. The player model could check for what items you're wearing or using, and load and scale them. It would update when changes are made to the player's equips. Keep in mind, this is kind of my best guess, so there's probably better ways to do this, and stuff I missed. :P
18th Jul 2017, 1:23 AM
Tamra
Tamra - avatar
+ 1
Rrestoring faith , that was the answer i was seeking. Thanks and also to Tamra aswell
18th Jul 2017, 6:08 AM
Aintgot Anyname
Aintgot Anyname - avatar