edited October 2022 in ORK Support
In ORK 2, is there a way to set up the battle system to use the initiative system I usually hear called "alternative activations", where the different teams/factions take turns activating units until they've activated all units?

For Example: say there are 2 teams, player and enemy, and each team has 6 combatants. At the start of the first round the player gets to choose 1 unit to activate and take their turn, then the enemy will activate 1 unit, then the player can choose another to activate from among those who have not yet been activated this turn, then the enemy will activate 1 unit that hasn't activated this round, back and forth until all 12 combatants have been activated, then it goes back to "top of round", any top of round events fire, and all units become available to activate again and you go back through the process. Very similar to phased activation where you pick which units your going to do in what order until you've moved all your units, then the other guy does the same, except you do only one unit at a time and alternate.

For other examples: the initiative system in the miniatures game "Bolt Action" uses a slightly randomized variant of this where instead of strictly going back and forth, dice are drawn from a bag to see who gets to move a unit next.
Post edited by Whatexists on
  • You'd need to handle that in your turn calculation formula. Allies are calculated before enemies, and you can e.g. check which one it currently calculated via the Is Player node in the formula.

    That should allow you to set up something that alternates between them, e.g. using global variables for counters, adding 2 for each combatant and restarting for the enemy group ... or something like that.
    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!
  • What about letting the player select which character they want to control?
  • That'll not be possible in turn based battles - phase battles have that feature, but they have each faction select/use actions together, not alternating between factions.
    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 October 2022
    A) In a turn based battle with Turned Based Mode "Active", how does the game decide between two different combatants with the same initiative score? Does Player vs. Enemy matter? Is it random?

    B) If I use a Turn Based battle system with the "Active" turn based mode, is there a built in Game Round? e.g. could I have an event fire at "top of the round" and have initiative order only recalculate during "top of the round"? Have persistent effects last until a certain number of "Top of the round"s have happened. Etc.
    Post edited by Whatexists on
  • A) There's an optional secondary check available to compare a 2nd value between them.
    Otherwise, they'll remain at the positions they where first added to the order, i.e. player/ally first, enemies 2nd.

    B) Both Classic and Active modes have an overall battle turn that increases when each combatant finished selecting and using their actions. Only Multi Turns works differently, increasing the battle turn after each combatant.

    There's no overall turn start/end event available in ORK 2, though. Only the per-combatant events. ORK 3 has such a functionality, allowing you to use schematics (the new event system) at the start and end of an overall battle turn, independent from the combatants.
    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!
  • A) thanks!

    B) Okay, so battle turn increases only after all combatants have taken their turn, instead of after each turn. So things that depend on battle turn (such as durations set to a number of turns) will be essentially based on game rounds, even if I can't set events to fire at the "top of round"?

    C) In an Active mode turn based system, how often is the initiative formula used?
    e.g. is it used at the start of combat to determine a turn order, but then not called again ever?
    e.g. is it used at the start of each battle turn to recalculate initiative order? (thus changes to the combatant status' that the formula uses won't change their place in the turn order until all combatants have had their turns and the next battle turn starts?)
    i.e. would setting up a very simple initiative system of each combatant having an initiative status of between 1 to 10 and they go from highest to lowest until each combatant has had 1 turn, then they restart at the top. And where if a character gains a status that alters their initiative status it doesn't take effect until the next turn. Would that be as simple as setting the formula to essentially be "Reset value to 0, then add Initiative Status."?
  • Small correction to the battle turns - the battle turn increases when every combatant had it's turn that is able to. If the current turn no longer has any combatants available that can perform a turn, a new battle turn starts.

    B) Well ... no - the effect turn durations are based on the combatant's individual turns, i.e. if the combatant's turn increases, so will the duration decrease.

    So, most turn mechanics are based on the combatant's individual turn, the battle turn is just an overall number you can display in HUDs :)
    While it's more or less the same, the combatant turn usually changes when they start selecting actions in a turn, unless you're using the Auto Start Turn option to start all of them at the start of a new battle turn.

    C) Works the same in Classic and Active modes - the turn order is calculated at the start of each new battle turn. The calculation happens once for each combatant.
    In Multi Turns, the turn order is calculated after each combatant finished it's turn (after resetting the combatant's turn value to 0) - each combatant's calculation outcome is added to it's turn value and the next combatant with the highest turn value is used to select actions.
    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 October 2022
    B) Okay, so, using a couple examples:
    b.1. Combatant A uses an ability that grants themselves a Status Effect that lasts 3 turns. This will take effect immediately (assuming they can still take actions on their turn), and stick around for Combatant A's following three turns? Or take effect immediately, and be stick around for the following 2 turns?
    b.2. Combatant A uses an ability that grants Combatant B a status effect that lasts 3 turns. This effect will be present on Combatant B for the next 3 of Combatant B's turns? Or until Combatant A has had another 3 turns?
    b.3. Combatant A uses an ability that places a temporary grid event on the grid that lasts 3 turns. The temporary grid event will count down it's duration when Combatant A's turn increases?

    C) Okay. So. Here's my understanding, just to make sure I'm getting this right. (for active mode)

    At start of Battle Turn 1 initiative is calculated via the initiative formula for each combatant. Then the system goes through the combatants giving them turns one at a time in an order that is either highest to lowest or lowest to highest, giving each combatant one turn, until it can't find any more active combatants who haven't had a turn yet.
    Then initiative is recalculated, creating a new turn order, and then the stem goes back through the turns again.

    is that correct? if so, when the initiative is recalculated is it additive with the previous results of the previous round? (that is, if the formula will return a value of 5 for Combatant A, will their initiative value be 5 turn 1, then 10 turn 2, then 15 turn 3, etc? Or would it remain 5 each turn? If I wanted it to remain 5 each turn should I start the formula with a node that sets it to 0 before adding relevant statuses?)
    Post edited by Whatexists on
  • B1) Depends on if you're using Turn Start or Turn End for the duration. Turn start will reduce it at the start of the combatant's turn, so it'll have 3 turns left - turn end at the end, i.e. it'll already reduce after this turn ends. That's why there's an option to give the user an additional turn for Turn End durations.
    Effects are active immediately when they are applied (e.g. via Calculate node for the ability/item changes).

    B2) Turns are counted on the target, i.e. the combatant the effect is added to. So, combatant B's 3 turns.

    B3) Grid cell events don't target a combatant, i.e. they're based on the overall battle turn.

    C) That's correct.
    The calculation is new each turn, i.e. the previous values are not part of the new turn order. Though, if you want to use it, the Turn Value node in the formula still holds the previous turn's value while calculating the new value.
    Otherwise, each new turn order is new and not based on the previous turn. Only any status changes that have an impact on the calculation would change it, e.g. agility boosting effects (if such a status value is used).
    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!
  • b3. does that essentially mean at the start of a new overall battle turn when the initiative is calculated / or the end when it can no longer find combatants who have not had a turn yet? Or is that determined another way?
  • B3) That doesn't matter - the end of a turn is the start of a new turn, so that happens at the same time. For temporary grid cell events that just counts down their 'alive' counter by one each turn, removing them when the turns are up.
    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.