edited February 2016 in ORK Support
Hello,
I'll try to provide simple example of what I'm trying to accomplish.

Imagine a combatant is not a single unit, but represents an a fighting squad in a strategy game, (like a stack of units in games like Heroes of Might and Magic). So one combatant could represent a squad of 100 archers.
That's relatively easy to make, I will just have status value Quantity and that would do it, but I have something a bit complicated.

Now what I want to accomplish is to have differently leveled units in a single stack.
Let's say we have archer unit that can have five levels. and we have
Archer Squad with:
{
level 1 archers quantity: 15
level 2 archers quantity: 5
level 3 archers quantity: 10
level 4 archers quantity: 0
level 5 archers quantity: 3
}
So there are a total of 43 archers in a squad, but they all have different levels and this plays a role in formulas.
For example lets say combatant has status value called Attack. it starts with 2 and is increased by 2 on each level. So level 1 archer has 2 attack, level 3 has 6, level 4 has 8 etc.

Damage would be calculated like this: (Attack value at level 1 * quantity of level 1 archers) + (Attack value at level 2 * quantity of level 2 archers) + (Attack value at level 3 * quantity of level 3 archers) + (Attack value at level 4 * quantity of level 4 archers) + (Attack value at level 5 * quantity of level 5 archers)

So in our case Damage would be (2*15)+(5*4)+(10*6)+(0*8)+(3*10) = 140

Can you suggest what is the most optimal way to approach this? I don't have a level cap yet, so it could be 10 levels or 100 levels so preferably I don't want to create status values like Level 1 quantity, Level 2 quantity etc

Any suggestions would be very welcome, thanks.

Post edited by hellwalker on
  • Hm, probably best to have a quantity status value for each level.

    Set up a formula for each quantity level, e.g. multiplying the initial value with the quantity level status value. That way you could use the initial value setting when using a formula to define the attack strength.
    Your damage formula would just add the results of the different formulas.
    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!
  • Thanks for quick response!
    Is there a way to get status value for certain level?
    Like what is combatants strength for level 5 or level 3? (so it works for any combatant and draws the number from the combatants status development curve etc.)
  • No, that's not possible - but you probably could set up a formula that has a similar effect, e.g. using the initial value as level and either using some kind of level factor or just checking the value and setting the value for that level.
    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.