I get that ORK's battle system is designed to favor using a grid, but are their ways to simulate a grid's features using distance and location checks? I've used formula's to do things like limiting the distance a combatant can move in a single turn and changing where they stop between a target and themselves, and I've also assigned them several empty game objects, with collision detection and event interactions, to act as secondary radii helping out with this, but I can't seem to find any nodes to instruct their pathfinding to avoid obstacles, or to move around at a certain angle and flank if "XY&Z" are true, rather than always charging forward in a straight line and bumping into anything along the way or, for that matter, even to check for obstructions between themselves and a potential target. Are any of those possible at the moment?
  • ORK's battle system isn't really designed to favor grids - that's actually a 'rather' new addition to the system :)

    Since you posted this in Makinom support, is this for ORK or Makinom?
    I'm not sure I really understand what you're trying to do ... are you trying to use grid features in a non-grid battle, or are you using battle grids?
    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!
  • "Since you posted this in Makinom support, is this for ORK or Makinom?
    I'm not sure I really understand what you're trying to do ... are you trying to use grid features in a non-grid battle, or are you using battle grids?"

    I meant to post in ORK support, although perhaps Makinom would would offer a better solution. Essentially, what I'm hoping to do is create a series of contingent movement patterns and event subroutines based on spacial checks. Some basic examples would be...

    -Have an attacking combatant check the space between a target and themselves prior to moving or launching a ranged attack, to see if there are any obstructions; have them check whether an obstruction is part of the terrain or another combatant, and whether said combatant is an ally or an enemy; have them check for obstructions around their own immediate vicinity and that of the target, and again check whether these obstructions are part of the the terrain, or a combatant. I want to then be able to report these finding back to my event and possibly adjust the path taken to the target. If there are obstructions between a ranged attacker and their target I would like to calculate a chance for hitting or bypassing each one, or perhaps even cancel the attack without ending the turn if an obstruction cannot be bypassed, such as in the case of a solid wall. I would also like to adjust things, like the hit or miss chances, based on the status and positioning of other combatants that surround both an attacker and their target.

    -For AI target selection, I'd like to check for which other allied combatants might have selected a potential target as their own, and whether they are engaging said target at long or close range as well as their current proximity. I would also like to check the position of enemy targets in front of a preferred target, like a ranged attack or magic user, and have them decide whether to attempt flanking or possibly select a different target if the route is too obstructed.
  • Checking for obstructions is already possible by using the line of sight options in your use ranges (e.g. using a battle range template) - both grid- and non-grid battle ranges have options for that.

    You can also get custom paths during battle events (in grid battles) by using a Store Grid Cells node using the Path store cells setting. That'd create a path like the grid move action. Afterwards, you can use a Set Grid Path node to set that stored cells as the action's grid path and use your regular grid move battle events to perform the movement.

    Battle AIs have various target options, e.g. the Use Last Targets node can also use the targets from allies and enemies.
    I'd also recommend checking out the Get Weighted Group node, which might allow you to determine if there are too many enemies clustered together, etc.
    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!
  • Maybe my issues stem from the way I'm handling movement, as a battle event using the 'Change Position' node rather than a movement AI. I actually need several events to run prior to moving so that I can set certain variables for things like user weapon/weapon hand, target weapon, a stealth attempt check (if a combatant is behind their target) etc. What's the method, then, for calling a movement AI as part of a battle event; not checking it, or referencing it to change something but actually using it to move a combatant instead of relying on the basic 'Change Position' node?
  • Well, the Move AI isn't working on grids, so moving on the grid is only possible through battle events similar to the example grid move events.
    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!
  • "Well, the Move AI isn't working on grids, so moving on the grid is only possible through battle events similar to the example grid move events."

    I'm not using a grid. My combat setup is active time/turn-based and off-grid. Maybe it will help for me to better explain my setup:

    -I'm using one ability as the default attack regardless of equipment, and using its battle animations to run through a series of events that handle everything from weapon selection to hit chance, and so on.

    -The first set of steps gathers preliminary User/Target positional data and converts it to variables. Orientation is checked first, then the distance between the two combatants is converted into string and float variables. A series of checks is then run to determine whether the preliminary "Range" is either 'Close,' 'Extended', 'Long', 'Very Long' or 'Ranged'. This particular string variable will be crucial during a later event to determine whether an attacker is required to move before attacking.

    -Step 2 is weapon selection. My combatants have an "Equipped Weapon" statistic to help in determining what equipment part should be selected as the User's weapon. In cases where two weapons are equipped, it runs through an extra selection check to determine which would be best to use. Then it creates another set of local variables detailing the selected weapon.

    -Step 3 checks for whatever weapons a target has equipped, along with their size class. Every weapon has a variable defining its maximum range for attacking, which is translated to a set of defined distances to check in a later "Movement event". Basically, I need to check whether the target has a weapon equipped that outclasses the user's in terms of its attack range, and whether this weapon presents a threat that the user would need to bypass before proceeding to their own attacking range. If the target has something like a tipped polearm with either an Extended, Long or Very-Long attack range, and the user is attacking with a Close ranged weapon, then the user will have to either succeed in a weighted chance attempt or be forced to stop at the edge of the target's attacking radius. The final stage of this events creates new variables for defining ranges, including the ultimate 'Stopping Range'.

    -Step 4 is movement. Assuming that the User isn't attacking with a ranged weapon (which is checked at the start), they will run through a series of checks to determine what distance they will next be required to move. This is necessary because ORK does not allow setting the 'Stop Distance' inside the 'Change Position' node to a formula, so I have to define it based on the instructions given by a predefined string variable (Close, Extended, Long, Very Long). Its a bit sloppy but I've managed to get it working, or at least in a straight line, anyway. An additional complication at this stage, however, is that every combatant has a limited range of movement per turn based on their Stat's, so I can't just tell them to close the distance and wait for the node to conclude before proceeding to the next. My current solution to this problem is to run a continuous loop checking every .001 seconds whether their current distance from a defined point of origin exceeds the maximum, and stops the movement if it does. this is not a full-proof solution, and can in fact be a tad glitchy, but it works well enough currently to allow troubleshooting the rest of my events.

    While these four initial steps currently work in allowing the rest of my attack and damage events to conclude, it hardly makes for interesting tactical play just clicking on a target and and having your combatants run toward them in a straight line, heedless of anything else around them or in the way. I'll also need methods for determining what the enemy combatants surrounding, and en-route to, targets are equipped with, and whether they might interfere with, or perhaps halt a user's trajectory. For instance, if both the user and target are equipped with close ranged weapons, but another hostile combatant positioned directly next to, or before the target has a longer ranged spear, I need to somehow detect that combatant and factor them into my calculations.
  • Is using NavMesh an option for you?
    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!
  • "Is using NavMesh an option for you?"

    Yes, NavMesh is my current setup. What's your idea there?

    Incidentally, another thing I'd like to mention is that I've gone ahead and attached a series of cylinder shaped game objects to all combatants (Similar to the attached 'Head' object) helping to indicate their individual radii for attacking and defending ranges. They're set to scale based on a formula, but I'm not using them currently because of the way scaling seems to be dependent on the original size of the highest component to which an object is attached. It would be ideal if I could set them to scale out 'X' and 'Z' from an initial "size" of 1 rather than a "scale" of 1. Is that possible in Unity?
  • Hm, I had a similar idea like that, using Nav Mesh Obstacle components for the attack radius, but I'm not sure if this'd work out. They'd pretty much block ally and enemy alike ...

    Without writing a completely custom system, you could try using Makinom, which offers a lot more Nav Mesh nodes to maybe allow such a system.
    The idea would be to run a schematic/machine in a loop until the target is reached, checking the distances to enemies and adjusting the target position of the NavMesh agent accordingly. Might be a bit complex, though ...
    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 assign special event triggers to each radius component set to run when a combatant entered the space of its collider. I don't know if it would work, running a separate event against a currently running battle event, but I was thinking there might be some way to check whether a combatant was inside one of these radii as part of their own event and perhaps then branch into yet another separate event before proceeding. I've also thought about using this idea for things like detection via custom sight, hearing and noise radii both in and out of combat, but I'd need to first be certain of how the Stat numbers would cause the radii to scale in Unity space.
  • Hm, that'd just move parts of the logic to the triggers - both ways would be possible.

    Check out the Combatant Trigger component and event nodes, they allow you to put tagged triggers on combatants and have the event system check if a combatant is within triggers, etc.
    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!
  • "Hm, that'd just move parts of the logic to the triggers - both ways would be possible.

    Check out the Combatant Trigger component and event nodes, they allow you to put tagged triggers on combatants and have the event system check if a combatant is within triggers, etc."

    So, what happens if one event intervenes to cancel part of an ongoing event? Could it interfere with certain variables being created, or stop the event entirely? I want to be sure that I'm only interfering with the movement portion of my event(s), and that after the movement stops the event will continue running and proceed to the next node in the chain.
  • Movement nodes that move a game object over time/speed and wait for the move to finish will continue the event when another event also moves the same game object over time/speed.

    E.g.:
    - event A moves object 1 for 10 seconds
    - 2 seconds in, event B also moves object 1
    - event A continues, no longer waiting for the 10 second move

    However, this is only in the latest version (2.25.2), as there was previously a bug that pretty much blocked an event (A in the example) in such a case.
    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!
  • Have you tried Set Navmesh target? I've been messing with an active turn based combat system. does this video look at all like what you need or no?

    Shadowcaste
  • @gamingislove

    "Movement nodes that move a game object over time/speed and wait for the move to finish will continue the event when another event also moves the same game object over time/speed.

    E.g.:
    - event A moves object 1 for 10 seconds
    - 2 seconds in, event B also moves object 1
    - event A continues, no longer waiting for the 10 second move

    However, this is only in the latest version (2.25.2), as there was previously a bug that pretty much blocked an event (A in the example) in such a case."


    Unfortunately, I can't set the movement node to 'Wait'. I need to intervene and stop the movement if the distance traveled exceeds the maximum allowed to a combatant based on their move speed which is set by a formula, or if they fail to get past any sort of defensive barrier, like a spear pointed at their face. I also need to log that distance for the final status value change calculations to alter things like stamina consumption and time-bar penalty.

    I don't suppose local variables will transfer between overlapping events not directly linked to one another.
Sign In or Register to comment.