Search Unity

How to generate meshes/materials/textures for a RPG Armor/Weapon/Loot system?

Discussion in 'Game Design' started by wheee09, Mar 29, 2019.

  1. wheee09

    wheee09

    Joined:
    May 21, 2018
    Posts:
    68
    Hi all,

    As this question touches upon a multitude of subjects, I figured this was the best spot to ask it.

    I'm currently working on a Armor/Weapon system for a tactical RPG game and wanted to see what my options are before going too deep in the rabbit hole.

    The main driving requirement here is that I wish to create random Loot Generator that can produce countless permutations of fun things like armor and weapons. That in itself is rather easy, but my question now is how do I generate the corresponding meshes/materials/textures in a similar fashion? More importantly, being able to create a manageable number of meshes while handling all of the permutations.

    Here's a more concrete example:

    Take a piece of armor that has the following attributes:
    <Set/Armor class> <Material> <Body part>

    e.g.:
    Orc Scout - Leather - Chest
    Inquistor - Steel - Helm
    Cain's Destiny - Trollhide - Boots​

    The Loot Generator can randomize the 3 above attributes within certain configurable parameters to allow for rules and exceptions and generate a random item. There are other attributes, like quality/rarity but they don't change the appearances (other than perhaps color to represent the usual common/magical/legendary/ classes) so we can ignore those for now.

    Now that means:
    1. If you follow Diablo 3's standards, you have 8 body parts - head, gloves, shoulders, bracers, chest, belt, legs, boots.
    2. The number of materials is going to be high - eg. steel, mithril, dragonscale, leather, silk, etc.
    3. The number of Set/Armor class will be higher.

    My question is therefore: is it possible that the number of meshes that need to be created is roughly (# of sets) * (# of body parts)? This would imply that we would be able to create textures that represent the materials (steel, mithril, etc) and be able to apply them almost "universally" on the set/body party meshes.

    I'm trying to avoid the scenario of having thousands of permutations of items and therefore thousands of permutations of models.

    EDIT: I should also add that these meshes will be for both the inventory screen and on the character(humanoid) model itself which means it needs to animate as well.

    Am I going down the right path?

    Thanks.
     
    Last edited: Mar 29, 2019
  2. Volcanicus

    Volcanicus

    Joined:
    Jan 6, 2018
    Posts:
    169
    I recommend you check Dragon Age inquisition's random loot because they use roughly the same meshes with addons that are enabled/disabled and the textures/materials change with the material used.
    I also recommend that you use this generic method for generic drops but use unique meshes for unique or epic items. I still remember in WoW vanilla how some of the greatest gear for raiding in MC looked like generic crud.

    In any case, the rough number should be as you mentioned. I am not sure what you mean by:
    "I'm trying to avoid the scenario of having thousands of permutations of items and therefore thousands of permutations of models."

    Isn't this the whole point?
     
  3. wheee09

    wheee09

    Joined:
    May 21, 2018
    Posts:
    68
    Sorry, my statement was a bit ambiguous. What I meant was while I want thousands of permutations of items, I don't want to have to pay someone to create thousands of files aka meshes - at one file per permutation.

    Your suggestion of having addons that are enabled/disabled sounds like a great idea. I'll look into that!

    Yeah, I read an article about how things looked rather crummy in WoW due to their approach.

    Thanks for your suggestions, appreciate it!
     
  4. Volcanicus

    Volcanicus

    Joined:
    Jan 6, 2018
    Posts:
    169
    If you want to create them separate of your game, get an excel spreadsheet, write in 1 sheet all the various names and singletons and in another just create all the permutations.
    Then, in your game, make it read from that file and have a couple of IF statements. You can either make it randomly find a range on your excel spreadsheet and then associate the strings with stats or materials or meshes and so on.

    That's what I would do. You don't have to pay anyone to make this. It should take at the most maybe 2-3 hours of coding and 5 mins of excel.

    This also avoids having thousand of files and just generate it on the fly. This also allows you to play around with the meshes and addons to add extra effects (enchantment?) later on without having to hard-code it.
     
  5. wheee09

    wheee09

    Joined:
    May 21, 2018
    Posts:
    68
    Oh, I actually make use of a (sqlite) database and tables to take care of the loot generation and ultimately specifying the right addressable asset (mesh/texture/material) to use.

    But I'm a hardcore developer, not a 3D modeller or artist, so I need someone to create the meshes/texture/materials so that they can be composed together to handle the permutations. I'm just using store bought assets as placeholders for now but I wanted to make sure the whole idea was sound before proceeding deeper.