Hi,

Fair warning I'm still doing the basic game tutorial to get my bearings, so I might be jumping the gun on my question :)

So here is what my goal is:

1. Players will create a party of 4 characters. For example, Warrior, Rogue, Archer, Mage.
2. Each character will have 4 selectable skins (just different materials).
3. Each character can be chosen up to 4 times.

First question, what would be the best means of having this? Just create a combatant for each character type and then have events that add multiples of that combatant to the party when chosen? Will this cause any problems?

Second question, what would be the best means of having various skins for the characters to choose? Would I need to create a bunch of combatants each with a prefab for a different material to keep them separate? (I guess this one mainly depends on the answer to the first).

Thanks!
  • Hmmm so I just tested this in my game.

    I had two of the same character. If you're wondering, they are counted as two different instances. They don't share an HP pool as far as I'm aware or an equipment pool, so there's no issues there. I removed a weapon from one, the other still had the weapon.

    What you can do is make a variable that counts the amount of each character in the team.

    So, event, choose Warrior.
    then choose skin
    warriorCount -> add 1
    skinXWarrior = true;
    a good logic would be if skinXWarrior = true then it is no longer selectable

    Hope that makes sense.

    As opposed to various skins, you can write a quick script to change the texture if you want.

    Don't know the C# equivalent but I do have a js mock up.

    var selectedSkin : Texture2D; //texture of other skin
    var material : Material; // material on combatant

    function start(){
    material.mainTexture = selectedSkin; //changing to selectedskin
    }
  • I had two of the same character. If you're wondering, they are counted as two different instances. They don't share an HP pool as far as I'm aware or an equipment pool, so there's no issues there. I removed a weapon from one, the other still had the weapon.
    That was the main thing I was worried about, but sounds like it won't be an issue at all.

    For the skins that sounds about what I was hoping to do, but based on how the multiple combatants worked I wasn't sure if it would be feasible.

    I appreciate you taking the time to check it out, sounds like it'll work perfectly. Thanks!
  • A combatant is just a combatant - i.e. you can have the same combatant as often in your player group as you want :)

    As for the skins - either set them up as separate combatants, or use the Conditional Prefab settings of a combatant. E.g. the selected skin could be stored as an Object variable on the combatant (using the correct prefab based on a variable condition).

    I'd recommend finishing the game tutorials without doing custom stuff if this is your first dive into ORK :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2019
    Hmm.. That reminds me of a question I wanted to ask as I'm soon getting to that part myself.
    Is each instance of the same ID combatant saved separately or only one instance is saved?
    For example if same ID Combatant is spawned into two groups, and let's say each instance has stats, custom save data and object variables saved, when the game is loaded and combatant instances respawned, each one will load with their unique instance? or how that is handled?

    So far didn't have to worry about it as I had unique combatant ID/entries. But as they grow it makes sense to have archetype combatants in ORK and give them unique elements when spawned.
    Post edited by hellwalker on
  • Each instance of a combatant is a separate entity with their own stats and data. While combatants with the same ID share their settings, they're still separate and work independently of one another.

    So, yeah - could have 4 combatants with the same combatant ID in your group and they're still treated separately and saved separately :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.