edited December 2020 in ORK Support
I) 'm trying to implement a system like Darkest Dungeons single line position ordered combat where if I have a spell that attacks position 2 it will hit both position 2 and 3. Or if the user decides to hit 3 then both position 3 and 4 get hit.

Something like:

Combat positions: [1 2 3 4] -> spell target position 2 -> [1 Hit Hit 4]
Combat positions: [1 2 3 4] -> spell target position 3 -> [1 2 Hit Hit]

I've managed to do something close by making the ability affect range requirement have status positon2 and position3 and a large affect range. This allows the user to pick between position 2 and 3 to hit but ends up hitting both 2 and 3. Does Ork provide a way to select position 3 and hit 3 and 4?


2) I've noticed the ORK editor gets slow when modifying my combatants. Is there a way to mitigate this?
Post edited by foxx on
  • 1) Hm, I think the easiest way would be using Combatant Triggers. You can add combatant trigger components (and colliders set up as triggers) on your combatants to get combatants that are 1, 2, 3 positions in front or behind by placing them accordingly.
    The affect range would in that your example use the combatant that's in trigger 1 position behind them.

    2) That's simply due to the large amount of settings available for combatants. The best way to work around that is to collapse foldouts, e.g. using the Close button in the upper right of the editor.
    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 December 2020
    Sorry, I'm confused how to get the positions behind or in front. From what I can see, the Combatant triggers setting in affect range settings only looks for a tag? Is this something I'd have to do in an event?

    Also, do combatant triggers work on affect area / enemy affect area? The tooltip reads it will use the casters triggers
    Post edited by foxx on
  • Combatant Triggers are components you add on your combatants (usually as a child object with a trigger/collider to define their area). They keep track of combatants currently within their trigger, making them available for move AI, battle AI and targeting.

    Via the tag of the combatant triggers you can define from which one you get 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!
  • edited December 2020
    Ok cool, I got that working. Thanks!

    My only hang up now is the the fact that I can't have both:

    Target ability on combatants with Status effect: Position 2 or 3

    and

    Affect area 1 position behind original target using combatant triggers.

    When I remove the status effect requirement it works perfectly but then I don't get to control who I can initially target. Is there any way to ignore the initial status requirement for affect area?

    Edit: Nvm it actually didn't work like I expected lol. So from what I understood, Combatant triggers would have 1 for each spot (1back, 2 back.... 1 forward, 2 forward...).

    For instance, 1 collider/combatant trigger for 1 spot back and one for 1 spot forward per combatant. However, a spell that should only hit the main target and 1 forward (say position 2 with a 0 index)

    pos0 pos1 pos2 pos 3
    [x hit hit x]

    ends up doing

    [hit hit hit x]

    because the "1 back" combatant trigger of position 0 is within position 1... which makes the combatant trigger see combatant 0 as a target as well?
    Post edited by foxx on
  • Hm, yeah ... the combatant triggers use the combatants within their triggers/colliders, i.e. if pos0 combatant reaches into pos1 trigger, it'll also be used.

    Have you considered using a battle grid for this? I think it'd be better suited for these position mechanics.
    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!
  • I hadn't. I'll give it a whirl though. Thanks :)
  • edited December 2020
    Right now I'm keeping track of each character's position in a separate list to do knockback effects and pull forward effects.

    I was originally doing this because I wasn't using the grid system. The separate list also allowed me to provide users a way to modify their character place outside combat.

    I've added a grid (9 column 1 row) grid that looks like this:

    [player player player player empty baddie baddie baddie baddie]

    1) Is there an easy way to do knockbacks / pull forwards using the grid system (pull someone x positions in a direction and push the other combatants back / forward 1)? This would eliminate my need to keep track of this externally.

    2) Is there a way to allow users to modify positions outside of combat?

    2) How would I modify the the grid by script if I wanted? For instance, if I wanted to keep my external list and simply change the grid to match.
    Post edited by foxx on
  • edited December 2020
    1) Yes, that's possible.
    The easiest way is probably first using a Store Grid Cells to get the cell (e.g. in front of the combatant via battle range templates) and a Swap Grid Cell Combatants node so change the combatants on the cells.
    You can do the movement animation between them as you usually would.

    2) You could do that via the battle group's order, using the cell deployment options to put a defined member index on the cell. The battle group's order can be changed using a Group menu screen (Sort action).

    3) That's pretty easy, you just need to set the cell (BattleGridCellComponent that's attached to each individual cell's game object) you want a combatant to be placed on:
    combatant.Grid.Cell = cell;
    And probably also change the combatant's position to be on the cell, depending on how you want to handle that. This code just sets the cell the combatant is registered on, which impacts the (grid) ranges, etc., the physical location is the normal transform position of the game object and doesn't really impact the grid mechanics.
    Post edited by gamingislove on
    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.