Search Unity

Eliot AI - NEXT GENERATION of AI tools [NOW RELEASED]

Discussion in 'Assets and Asset Store' started by eliot-ai, Oct 18, 2018.

?

What would be the best thing to add to Eliot next?

  1. New type of Nodes based on machine learning

    37 vote(s)
    27.8%
  2. Eliot Hub - place to share your Eliot Behaviours and Skills

    29 vote(s)
    21.8%
  3. Copypasting parts of Behaviours

    5 vote(s)
    3.8%
  4. Embedded UI system for displaying Agent's stats

    11 vote(s)
    8.3%
  5. Support of 2D Sprite-based worlds

    11 vote(s)
    8.3%
  6. Groups and formations of Agents with a single goal

    28 vote(s)
    21.1%
  7. Agent's stats system that can affect the power and other settings of the Skills

    12 vote(s)
    9.0%
  1. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @witcher101,

    At the moment using Eliot for these kinds of games would require a considerable amount of additional work.
    I am definitely planning to include support for those kinds of games in the future.
     
  2. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Hi how can i make my dragon fly?
     
  3. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    It depends strongly on how exactly you want it to work. Ideally you would need another pathfinding engine that operates in 3d space without projecting on a 2d plane. Then you could use it API from a custom Eliot MotionEngine .
     
  4. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    78
    I was planning to buy the Eliot AI framework on my next payday.But just checked it today that after 1.2 prices are bumped up to 50USD.I guess i have missed the early version discount :(

    Please in future do post if you are planning for price jump so that people can plan accordingly.
     
  5. TonyV125

    TonyV125

    Joined:
    Oct 7, 2016
    Posts:
    2
    I recently purchased Eliot AI and just started going through the tutorials. I love how it offers a way to setup the most common elements for AI very quickly. I've used a few other well respected AI and behavior tree assets and this looks like it will be so much faster to implement.

    I've upgraded to the latest version that should support A* Pathfinding Project Pro (which I also own), but I can't figure out how to get Eliot AI to recognize a graph created in A* Pathfinding Project Pro, and should it be a specific type of graph (e.g. Grid Graph, Recast Graph)?

    Any tips would be greatly appreciated.

    Thanks!
     
  6. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Sorry for the inconvenience it caused to you. You are right, I will notify about similar event the next time.
     
  7. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Just specify the Motion Engine in the Motion section of the Unit Factory to be A Star when creating a new Agent. Or you can specify that in the Inspector for the existing Agents in the Motion settings.

    No additional configuration is required.
     
    Last edited: Nov 28, 2018
    Mark_01 likes this.
  8. TonyV125

    TonyV125

    Joined:
    Oct 7, 2016
    Posts:
    2
    Outstanding! Thanks for the quick reply! Everything works beautifully.

    I can see this asset becoming the most popular of all AI assets in the asset store. I wish you great success, and I will be writing a very positive review once I get through all of the features.
     
    Mark_01, ScourgeGames and eliot-ai like this.
  9. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    62
    Hi, does this support any networking, I'd be interested in photon pun support?
     
  10. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @Carmexx,
    At the moment Eliot is not natively integrated with any networking system, but it should not be hard to implement.
    If you tell client what animation should agent play, where in space is the agent located and what particles are instantiated by skills, you should be able to recreate around 100% of what is going on on the server side.
     
    Mark_01 likes this.
  11. Craig_Green

    Craig_Green

    Joined:
    Oct 31, 2013
    Posts:
    4
    Really enjoying your simplified approach to AI design. I'm working on a method to iterate through multiple melee attack types and noticed what I believe is a defect in the StandardGeneralConditionInterface.SkillReadyToUse method. The current implementation is passing back the instance of the current skill being used although the method itself is returning a boolean:

    public bool SkillReadyToUse() { return _agent.CurrentSkill; }

    It would be more meaningful to validate if the skill was idling or not:

    public bool SkillReadyToUse() { return (_agent.CurrentSkill.State == SkillState.Idling); }
     
  12. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @Craig_Green,
    Thank you for the question. For a human, the second version of that method is of course more readable, but for a program it is the same because we can just check if the Agent's current Skill exists or not. Agent will not be able to use the skill until it is in the Idle state anyway. And if you want to check if the state is Idling, then you would have to do it this way:
    public bool SkillReadyToUse() { return _agent.CurrentSkill && (_agent.CurrentSkill.State == SkillState.Idling); }
    to avoid the possibility of the null reference exception.
    Cheers
     
  13. mdookie4

    mdookie4

    Joined:
    Jun 15, 2017
    Posts:
    8
    Hi Eliot!
    I had the same problem due to using AStar pathfinding, and I used your above suggestion to get around the issue for both RVOController and RVOSimulator. However, since I created these cs files inside Environment folder, I am not sure how important are these files and what are they used for? (Sorry I just got started on Eliot, so perhaps there are some reading that I missed)

    Appreciate if you can sound me out advice, thank you!
    Vincent
     
  14. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @mdookie4,
    I believe that it is totally fine, the Unity's VCS should avoid new files on update. If you have added some code to already existing files, that might be lost upon an update. But separate files should be fine.
     
  15. Craig_Green

    Craig_Green

    Joined:
    Oct 31, 2013
    Posts:
    4
    That makes sense when you want to check if a skill is configured for the character. I think I was thrown off by the name of the method as it seemed to fit my need so well. In my case I know there are three melee skills associated. Each one doing more damage than the last one but the stronger the melee attack the longer the cool down for it. So I want to make sure that the most damaging and longest to cool down skill is used first and then fill in the attacks with the lesser attacks until it is ready again.

    My strategy was to activate but not execute each skill in the order described above and then check to see if it is ready to be used. If the SkillReadyToUse only returns if a skill has been attached to a character the it does not really fill my need as it will always return true and the other skills will never be evaluated. Do you have suggestions on how to best iterate through the skills to get the same type of behavior I am looking for? Thanks for the help!
     
  16. mdookie4

    mdookie4

    Joined:
    Jun 15, 2017
    Posts:
    8
    Thank you for the reply!
    Another noobie question, since I'm working on a top-down 2D project, I notice when i tried to use place waypoints, and click on the scene editor, i cannot see anything happening (as in a manual waypoint actually getting created)
    Is there something that I missed or did wrongly? I'm using Astar Path btw,
    Thanks!
    <Update> I realized it's because waypoints group does not recognize box collider 2D and can only set manual way points on normal box collider.
     
    Last edited: Dec 17, 2018
    eliot-ai likes this.
  17. mdookie4

    mdookie4

    Joined:
    Jun 15, 2017
    Posts:
    8
    Hi Eilot,
    For the behavior, here's what i intend to implement;
    1) if agent can see its target, move towards target
    2) however, if at any time, agent is being aimed at or attacked by an enemy, it should retaliate
    I see from the tutorials that we only mentioned attack, run away, or heal ally, but did not mention about identification of target types. Is there a way to customize the observer or invoker methods to include recognition of different targets?
    Thank you!
     
  18. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    475
    Is i t possible to control the gravity of AI. Lets say i wana juggle Enemy in air and do combos on him while hes in Air. Something like DMC enemies. Is it possible with this??
     
  19. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    @Craig_Green, I believe you can achieve this by simply connecting the element from which you want to go to the skills with the Skills in the order in which you want them to be evaluated for execution. Also change the SkillReadyToUse method to the one described above:
    public bool SkillReadyToUse() { return _agent.CurrentSkill && (_agent.CurrentSkill.State == SkillState.Idling); }

    Hope this helps, cheers
     
  20. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    1)
    upload_2018-12-17_18-15-7.png
    This is approximately what you want your Behaviour (or part of it) to look like.

    2) Create a new class that extends one of the following classes: MotionActionInterface, InventoryActionInterface, ResourcesConditionInterface, PerceptionConditionInterface, MotionConditionInterface, InventoryConditionInterface, GeneralConditionInterface. The methods in that classes, that are marked by an [IncludeInBehaviour] attribute, will be accessible from the Behaviour Editor under the corresponding category.
     
    Mark_01 likes this.
  21. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    I believe that DMC-ish stuff can be achieved by animation. Regarding the gravity, that is a responsibility of a pathfinding engine that you choose. As far as I know, A Star pathfinding can work with physics, unlike Unity's NavMesh.
     
  22. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    20
    Hi
    I just purchased the asset. I created an agent but it won't animate. The only animation that plays is the idle on entry. Do i need to set up my own animator Controller to match the parameters in the agent inspector?

    Ok, all good i made my own animator controller...issue know is the when the Ai shoots me i don't lose health even though i have ticked the correct box. I cant even see the recast in the editor.
     
    Last edited: Dec 19, 2018
  23. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @BigGameCompany,

    You are right, you need to create the Animator Controller and Eliot will tweak it's parameters at runtime.
     
  24. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    20
    Thanks what about the players health not reducing when the ai shoots me...do i need to get into the code?
     
  25. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    @BigGameCompany I presume that your Agents attack the player with Skills. If so, you just need to set the "On Apply Message To Target" field to the name of the method (that is a part of a class attached to the player) that handles the damage. a random value between "Min Power" and "Max Power" will be passed as a parameter
     
  26. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    20
    Yes excellent stuff - this asset is amazing.

    One more question. I have 2 death animations one for when shot and another for when blown up by a grenade.

    How can I add more than one?
     
  27. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    20
    Sorry I'm not much of a coder....you mean in that field type public void TakeDamage()?

    That is the name of the method / class on the Health Script attached to the player (target).

    I cannot get damage to the player nor the enemy AI agent...is this covered in the tutorials in depth? please help...here is my script attached to the player...

    public event Action<float> OnHealthPctChanged = delegate {};//for health bar




    private void OnEnable()
    {
    currentHealth = maxHealth;

    }

    public void TakeDamage(int damageAmount)
    {
    currentHealth -= damageAmount;//when gets shot health decreases by one


    float currentHealthPct = (float)currentHealth / (float)maxHealth;//for healthbar
    OnHealthPctChanged(currentHealthPct);//calls the event defined above


    if (currentHealth <= 0)
    {

    anim = transform.Find("Character").GetComponent<Animator>();

    anim.SetTrigger("Die");

    Component enemy = GetComponent<Enemy>();//turns off enemy script during die animation

    if (enemy != null)
    {
    GetComponent<Enemy>().enabled=false;//turns off enemy script during die animation

    }
     
    Last edited: Dec 20, 2018
  28. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    20
    Maybe the raycast is not hitting my player....is there anyway we can see the agents raycast?
     
  29. imump

    imump

    Joined:
    Jul 3, 2011
    Posts:
    51
  30. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Thanks :)
    To assist you in implementing this I would need to know how you pass the information from shots/explosions to the Agent. Essentially what you want to do is pass to more information along with the damage amount to the Agent. Based on that information you can then choose between the ragdolls. And to add more references to ragdoll options, modify the existing reference field to be a list of GameObjects instead of a single GameObject.
     
  31. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Exactly, the "TakeDamage" void is the right one. If you've set the "On Apply Message To Target" field to "TakeDamage" and it still does not work, then the problem is in the colliders. I can provide the further guidance if you send me the screenshots of your player setup at runtime.
     
  32. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @imump,
    That is a lovely idea. Actually I have been planning to add a similar feature to Eliot, but these guys seem to figure out all the necessary things already :). Thank you for mentioning this asset!
     
    Mark_01 likes this.
  33. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    20
    ok i have inserted TakeDamage into the target field and run the game...i get this error " Failed to call Function TakeDamage of Class Health"...

    Further inspection reveals " calling function TakeDamage with no parameters but it requires 1"
    can you help with this error?

    I think my colliders are fine as when the AI agent gets shot the TakeDamage animation plays...i just don't lose health when i am shot and he doesn't lose health when he is shot...
     
    Last edited: Dec 20, 2018
  34. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    This should help:
    1) Find the Skill class in the AgentComponents folder
    2) find the INTERNAL_ApplyEffectNonAgent method
    3) you got to see the following code in that method (apart from other code):
    if (_onApplyMessageToTarget == "Damage" || _onApplyMessageToTarget == "Heal")
    {
    var hitPower = UnityEngine.Random.Range(_minPower, _maxPower + 1);
    target.SendMessage(_onApplyMessageToTarget, hitPower, SendMessageOptions.DontRequireReceiver);
    }
    4) Add a new condition there that would account for that method as well. That code now should look like this:
    if (_onApplyMessageToTarget == "Damage" || _onApplyMessageToTarget == "Heal" || _onApplyMessageToTarget == "TakeDamage")
    {
    var hitPower = UnityEngine.Random.Range(_minPower, _maxPower + 1);
    target.SendMessage(_onApplyMessageToTarget, hitPower, SendMessageOptions.DontRequireReceiver);
    }

    This will make sure that the method gets a parameter passed.
     
  35. Sisay

    Sisay

    Joined:
    Dec 6, 2012
    Posts:
    7
    Have you thought about using ecs to increase performance?
     
  36. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    I am going to choose between 3 options:
    - ECS
    - putting the backend to a c++ dll
    - combination of the two first options
    I need to do some testing to decide.
    At the moment I cannot tell when exactly is it going to be implemented, but this is planned as a part of deepening the abstraction level of the system and making it compatible with multiple engines.
     
    Mark_01 likes this.
  37. Cassos

    Cassos

    Joined:
    May 20, 2018
    Posts:
    14
    Great. Exactly what i was looking for. Can create complex individual ai for my characters depending on their personalities. Like the drunken guy at first attacks you but then run away after the first hit. ^^
    Lots of great ideas and very nice made visual scripting!

    Continue and you will make a hell lot of money with this asset. :p
     
    StevenPicard, Mark_01 and eliot-ai like this.
  38. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @Cassos, Thank you so much!
     
    StevenPicard and Mark_01 like this.
  39. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    451
    I fully agree with @Cassos ... I am super hyped for the future of Eliot AI. It is an incredible asset in it's
    design.
     
    eliot-ai and StevenPicard like this.
  40. Cassos

    Cassos

    Joined:
    May 20, 2018
    Posts:
    14
    It's me again. :D
    @eliot-ai could you add an event Invoker? So we can for example open a door when the enemy is running away or use it for quests. Some more options for the Observer are required as "Die", "KilledEnemy", "gotDamaged", "gotComponent".
    I see what you are looking forward doing with the inventory of the AI but at the moment as it doesn't work or there is more no tutorial for it we need an alternative to use in the world like "IfTargetTagIs" and than a enum with the current aviable tags. Just more customizable options.
    Great asset. Love it to work with it!
     
  41. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @Cassos
    I am definitely going to make the system more generic with time and the ability to add parameters to nodes is not that far away. Eliot has already become more generic compared to the first release. These changes require a lot of concentration to be as bug free as possible, so I do not want to rush :)
     
    Mark_01 likes this.
  42. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    214
    So I know questions like this are probably annoying but...

    I've been using Behavior Designer for some time and I'm curious how this compares to it? Are trees designed in a similar manner? I'm considering utilizing Eliot for my next project and have been digging through the manual but I'm curious if you yourself know the pros and cons of each
     
  43. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @DespairBear
    I have not used the Behaviour Designer personally, but I will try to collect some comparison from the users who have used both systems if they will be so kind to share their opinion. From the feedback that I have got so far, I can tell that people generally find Eliot giving the desired result way quicker than the Behaviour Designer. I hope I can provide some technical details, but I will need some time for that, so stay tuned :)
    Cheers
     
  44. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    214
    Thank ya. Your system's ease of use looks fantastic but yeah some performance comparisons would be cool. I definitely want to use this for a project that has relatively small numbers of agents, but for one side pet project I am getting going on I need to be able to support very large number of agents (ecosystem simulation)
     
  45. Melle_

    Melle_

    Joined:
    Jul 16, 2018
    Posts:
    15
    I can't make my agent move with Mecanim and Apply root motion.
    Its a character using the behavior walk in the demo and 5 waypoints using standard asset ThirdPersonAnimatorController.
    When I uncheck apply root motion the agent goes to all waypoints.
     
  46. Melle_

    Melle_

    Joined:
    Jul 16, 2018
    Posts:
    15
    By changing Speed to Forward it works.
    But do I always need an animator with a blend tree if I want to use Mecanim?
     
  47. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    451
    I have had Behaviour Designer for years, altho I have not used BD a lot of times.. I did do the tuts on both..
    AFAIK Eliot-Ai is way better then BD.. It is just as powerful, but way more simple then BD.

    I have every confidence that Eliot Ai will win out over time as it gets more users.
    Also there is nothing preventing you from using both systems.

    This is a new asset and to be sure will get more features and update in the far future to come I am sure.
     
  48. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Great plugin.

    Some features that would make the plugin more usable for a game that is not a demo showcase with a player and some units around, but more like a big game world :

    1) Home position or start position
    For creatures to wander around some limit like Home location and some radius.
    This is useful to isolate locations or creatures groups and their zones limits,

    2) ranged units template
    Ranged units trying to stay some distance form player, able to move and choose another random position with line of sight when they get some amount of damage.

    3) Flying enemies template with melee or ranged attacks
    Flying in some zone , using simple avoidance with other aerial enemies, able to do ranged attack or get close to do melee.

    3) Define max melee attackers to player
    To keep game balance, have a specific manager to know how many melee enemies are attacking the player.
    The others will wait or wander near the player.


    4) Define spawners
    A spawner will spawn some number of creatures, it can be different type of creatures, like 8 goblins and 2 archers.
    Unspawn them when the player is far from their home location or zone location.


    5) Pooling system for spawners
    Add a pool system to spawn creatures , projectiles or anything they use.
    When not enough creatures, it increases the pool, when the player is far away from some creatures zone, the pool and it's content can be removed.
     
    recon0303 and Mark_01 like this.
  49. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @Melle_
    Yes, any Mecanim driven animation needs an Animator Controller. Eliot controls the parameters of that Animator Controller in real time, but it does not necessarily require blend trees.
     
  50. eliot-ai

    eliot-ai

    Joined:
    Oct 3, 2018
    Posts:
    139
    Hi @DespairBear
    I can't provide a comparison, but I can show the possibility of 47 fps with 370 agents in the scene on a dated laptop.
    upload_2019-1-14_19-8-52.png
    Of course, the performance depends on the kind of agents you want, but as a rule of thumb, you probably won't make a few hundreds highpoly mocap animated agents in a scene.