• Leave On Death also removes player combatants from the group, so having that enabled in addition with the other settings should work.
    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!
  • Working on AI now, and I have a few questions on more trickier abilities. (and some basic ones :D)
    1) How do I check if user can use ability? Like all the requirements etc are met?
    2) Can I check in same way if user has enough AP to use ability?
    3) How do I select which cell enemy will target with ability that targets cells? For example AOE Grid abilities?
    4) Is it possible to check specific cells around user? for example to find if there are at least two enemies in front of user etc?
  • 1, 2) It's being done automatically. If user can use an ability and AI node says it should use it, the user will use it. If requirements aren't met, the user's won't use it. Game rules are symmetrical both for player and enemy.
  • 1+2) As JMR said, the action nodes handle that for you - if the user can use the action, it'll use it, otherwise the battle AI continues with the next node.

    3) They'll target the cell of the target that was found by the battle AI.

    4) You can do that in different ways, first you'll have to find the targets.

    The easiest way would be using an In Use Range node using Battle Range Template or Custom use range to get targets with a grid mask.

    Other ways would include using multiple nodes, e.g. first using a Check Grid Distance node to get targets within a distance and using a Check Orientation node to further filter it down to targets in front (i.e. using Check found targets and None targets).

    Afterwards both ways use a Check Target Count node to check the number of found targets.
    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 May 2019
    1-2) I'm looking to build a utility AI style system, where I first check if AI should use an ability and then assigns weights to each action. At the end it'll choose the action with maximum weight. So it would be nice to be able to filter out ability in this evaluation phase.

    3) But what if target is a cell and not specifically meant to be an occupied cell? For example I have an ability where character "Swings" weapon in front of them and damages three enemies in front. So character can choose any cell in "Cross" shape around itself and that cell + corresponding diagonal cells receive damage. Here is picture demonstration:
    image
    4) Thanks I'll try this out!
    Post edited by hellwalker on
  • 1+2) Hm, yeah ... will look into adding an additional node to only check if it'd be useable, or maybe an option in the action node to only check usability.

    3) Good question ... I'll have to test that :)
    Generally I'd say that if a combatant is in use range (i.e. on one of the cross cells), that cell would be targeted, but I'm not sure what happens otherwise, since None target actions don't require targets it shouldn't fail at least.
    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 June 2019
    Edit: I found it was battle range setting. I thought that was only for real time :D
    I have AI that finds enemies that are more than 1 square away:
    image
    But for some reason this reports failed if enemy is far. If I move within X range of the AI than this correctly finds the enemies. Is there some limit on how far AI will search the grid?
    Post edited by hellwalker on
  • Own deployment cell option on grid, when you select combatant is designed to automatically spawn that combatant when the battle starts? or is this optional?
    I first though it was just to setup personal deployment cell to unit that would place unit on a cell if that unit was added to battle, wanted to make sure if that option is possible?
  • The Combatant deployment option will spawn the defined combatant on the cell, i.e. it allows you to set up fixed combatants on a grid instead of defining them in the Battle component (or via combatant spawners).

    If you want to limit combatants that can be deployed on a cell you can use the requirement settings :)
    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 June 2019
    Awesome! I did not spot the requirements.

    I wanted to ask you advice on how to best approach one problem.
    So I want to have a system where wearing armor boost your defense stat, but armor durability decreases the boost amount when durability is lowered.

    How I did this is that I have BodyArmor, HelmArmor, ShieldArmor status values. Wearing armor gives bonuses to these; and in formulas I modify them based on item durability.
    Then I have another formula that combines all these into final Armor rating.

    This works well with abilities, I can calculate my damage formula based on armor rating and weapon/armor durability. But I have a problem when I want to check the combined armor rating in AI. (So, for example AI could use armor damaging ability if enemy armor is high.)

    Is there any built in way to check for this easily? I could not find a way to use formula values in AI.(If not NP, I can try writing custom AI Node to update status value to formula value, or run an event everytime armor is equipped that does the same. )

    Post edited by hellwalker on
  • edited June 2019
    You could use a Combined status value (i.e. a Normal type status value using the Combined Value options.

    A different solution would be using Equipment Variables instead of status values, using selected data to access them in events, formulas and battle AI :)
    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!
  • Combined status value did the trick. Thanks!
  • edited June 2019
    One more question about this. Will the combined status value get automatically updated if I change armor durability in game events? For example with armor damaging event durability? (Combined ability formula uses durability)
    Post edited by hellwalker on
  • I think so ... otherwise you can cause this manually by using a Reset Combatant Status node.
    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 June 2019
    Thanks I added it to game event and seems to work.
    #1 For combined status value, when I check for percent, what will it check % against? CurrentValue/MaxValue?
    image

    #2 the Ability Action Can use checks the AP also? Or just requirement?
    Post edited by hellwalker on
Sign In or Register to comment.