Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

[RELEASED] Emerald AI 2.4.2 - The Ultimate Universal AAA Quality AI Solution

Discussion in 'Assets and Asset Store' started by BHS, Jun 26, 2015.

  1. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    Thanks alot ! But I will make a own simple one :) Only move to the next object and waves of zombies type of quests in my game..
     
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,435
    Hey there!

    What exactly is happening in the video? Is your AI able to successfully attack your player?

    If you are using a custom health system, you need to make sure it's added to Emerald AI. The guide would be similar to what's done in this integration guide (step 6), but with your own health script: https://docs.google.com/document/d/...uHce2BVLM3QTq5axg/edit#heading=h.29qyg517h920


    The blood effect's position can be adjusted from within the Emerald AI editor. It's right under the Hit Effect slot and it's called Hit Effect Position, which is a Vector3. So, if your blood effect is too low, adjust the position on the Y axis. Try a setting of Hit Effect Position (0, 1, 0).
     
  3. ivolga-indi

    ivolga-indi

    Joined:
    May 18, 2017
    Posts:
    22
    NPC misses and inflicts damage very rarely, probably 1 time out of 10 hits.
     
  4. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    thank you , yes I saw it later on.... what about this >>> Also, hit sound ? .. How can I prevent a monster from keep attacking a dead pleayer? Doing coop with opsive tpc. Hows the update coming?
     
  5. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    hello! @BHS

    I have a question:

    1. Where in the Emerald AI script can I find something like " When player is dead , stop attack"...
    so I can add my own get stuff from opsive..
     
  6. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    749
    I have an attack issue. I have a wolf set to attack a rabbit. Apparently the layers are correct, because the wolf will run down the rabbit. But the wolf will not attack. What should I check. The documentation is a little thin on combat, despite the helpful comments within the inspector.
     
    Last edited: Jul 21, 2018
  7. bholland

    bholland

    Joined:
    Mar 24, 2017
    Posts:
    22
    First of all. Great asset. it is pretty strait forward and well documented. I'm building an VR game on 2018.1.5f1 and while Emerald will let me set up the animations, the AI will not attack the player, no matter what I do. Any idea's or what specific information would you need from me?
     
  8. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    I have .FBX animations which my emerald AI set up is not letting me select. I have the AI object prefab set for the AI object.
    I have tried changing my rigging from legacy to generic and no luck. Any one have an idea on what I am doing wrong?
     
  9. bholland

    bholland

    Joined:
    Mar 24, 2017
    Posts:
    22
    I've done some more expirementing and I've narrowed it down to the line of sight for the AI. All settings being equal when I have the enemy AI set to trigger it will attack, with line of sight it will walk right up to me and move on.
     
  10. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,864
    Maybe the raycast for line of sight is ignoring the player's layer. Might the player collider be set to IgnoreRaycast?
     
  11. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    98
    I try to integrate Emerald AI with Invector Shooter using this
    https://docs.google.com/document/d/...uHce2BVLM3QTq5axg/edit#heading=h.29qyg517h920
    But the new version of Emerald AI don't have layers(step 3), now it has Factions.
    When I work with Emerald 2.0 it works perfectly, but now with Emerald 2.1.1.1 I don't know how to integrate Invector Shooter with Emerald AI.
    How I can config enemies with factions in Invector integration?
     
  12. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    Can anyone tell me what animation format to use since .fbx does not seem to work for me even with switching between legacy and generic.
     
  13. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    I should work, I use fbx. Thats not a problem. just drag them there..
     
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    @BHS Please support your asset, if you are busy with updates so sorry for nagging :)
     
  15. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    Was the breeding demo removed from the asset pack on the newer versions?
     
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    yes, no breeding yet
     
  17. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    Using Unity 2017.3.1 with only Emarld AI, Cux, and Animal pack deluxe:
    https://www.assetstore.unity3d.com/en/#!/content/99702
    When I try to set up the AI with the setup manager it will not let me select any of the animations. I have this problem in my creature packs and can only select the animations that came with Emerald. I am sure it is somethine simple/stupid I am doing or not doing. Anyone have any thoughts?


    So if I right click on the .fbx and click creat then animation it saves it in the .anim extstention and I can use it!!

    Well I can use it but the are blank. Will get back to it tomorrow.
     
    Last edited: Jul 20, 2018
  18. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    I have like no idea.. You should use the animation clip itself and not the fbx really... Click on the Idle deer or whatever like fold it out and look for the clip.
     
    crimsonmortis likes this.
  19. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    THANK YOU SO MUCH!!! like I said it was something simple or stupid!! I can now add my animals and creatures and have them properly animated!!!! Next step is getting everything tagged and on the right layers. Will also have to modify a couple of scripts to get damage going properly but I saw a step by step on that (I am using the RFPS character).

    WOW getting the detection and being able to damage each other went pretty well!! At first could only damage AI with a arrow but that was due to me messing up the script. All working now need to fine tune animations and add some sound for them!! Love it
     
    Last edited: Jul 20, 2018
  20. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    Awesome you got it sorted out =) Are you making a hunting game?
     
  21. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    Mostly tinkering around. Working on two separate games right now when I hit a dead end on the one I switch over till I get past the "writers block (coders block?)". One is a basic survival and the other your the monster hatching from an egg in the beginning and as you grow/gain exp you unlock new attacks and skills.
     
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,435
    This could be related to your AI's Attack Distance and it may be too close. Try increasing the distance so your AI has more distance to attack.

    It could also be your AI's target's Box Collider isn't properly sized so that your attacker is seeing its target as obstructed. Ensure that your Box Colliders are properly positioned around your AI.


    Proper Opsive Third Person Controller support won't come until the release of version 2.0 as this is what the Opsive developers recommended. If you need your AI to stop attacking after the player has died, you will need to add an if statement to the DamagePlayer() function. If the Opsive health is at or below 0, call the ClearTargets() function followed by the SearchForTarget() function, if needed. This will allow your AI that have the player targeted to clear it as a target. The SearchForTarget will allow them to search for targets one more time before returning to their wandering state.


    Layers still work the same, but use a proper Layer Mask pulldown instead. Simply add the same layers from the tutorial to the Layer Mask pulldown.

    Factions are explained here: https://docs.google.com/document/d/...2njM7Jx9pYlqgbtM8/edit#heading=h.asmf5b22etw8


    My apologies :) I've been hard at work on updates.


    Breeding will return with the next update. It's being rewritten like the other portions of Emerald AI were.
     
  23. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    Allright sounds cool! Theres alot of survival games xD
     
  24. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145

    Thanks for replying :) yes I guess your busy with updates, do you know any date?
     
  25. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    749
    You did not respond to my post #2161 above. I have had no difficulty with other features, so I imagine I am overlooking something elementary.
     
  26. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,435
    You're welcome and no date yet :)


    My apologies.

    Try checking your AI's Target's Box Collider. Make sure it properly fits the AI and that it is close or touching the ground. If an AI's Box Collider isn't properly positioned, it could make an AI unable to properly detect said AI.
     
  27. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    179
    Hello sir. I got a question from "Invector TPS" and their suggestions to ask in this forum.

    Your asset can fully support "Third Person Shooting " gameplay style, right? I mean like tom clancy's ghost recon wildlands or Mass Effect 3. Can your asset build this kind of IA?
     
    Last edited: Jul 23, 2018
  28. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    272
    Hi @BHS

    I'm trying to setup some ranged Combat in RFPSP & Emerald with Kriptos Magic Effects Pack, like you did on the Emerald Video. However I am struggeling on how to setup the FX , as Kriptos Prefabs appearently expect a target assigned to them. Right now the particles dont even go to the players or enemy AI factions's direction.

    Can you please make a Tuto/Video on how to setup Kriptos FX Packages with Emerald AI? Thnx a lot.
     
    Last edited: Jul 25, 2018
    mattis89 and magique like this.
  29. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,092
    BHS,

    How do I get the NPCs to despawn after death and spawn 90 seconds later? Is that using Crux and if so, can you provide an example?
     

    Attached Files:

    Last edited: Jul 24, 2018
  30. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,246
    Really enjoying Emerald AI so far, using it with UFPS, works awesome. Only 2 problems I can't figure out so far,
    1) if I stand absolutely still sometimes so does the AI until I move (rare)
    2) the enemy appear to be able to hit me even when I have jumped up on a platform above, as if there is no Y check.

    And finally, when they hit me id like to show the damage arrow in ufps which shows where you got hit from. This involves sending the transform over from where you got hit, is there a convenient variable in Emerald_AI.cs I can use for this? So I dont have to adjust the code.

    Amazing work, I just love it when an AI package works... which is rare :)
     
    nellecter likes this.
  31. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    Yea the packagr works, buut its not ready to use with AAA games... So far RPG and Topshootera it can handle.. Because I think the movement is unsmooth and not so much options to make the AI life like.. Like theres no dodge roll or jump to the side, or random parameters to make the AI suddenly side step or something.. but I know there will be. Waiting really much for the update.
     
  32. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,246
    Yes it looks actually like damage is dealt by the animation maybe, or the start of it, I get hit even when my enemy begins his swing, and can be hit when im jumping way above him. Probably there is a way to put a collider on the sword and have that trigger the damage, if that doesnt exist yet I really hope they do something to sort this. Not having the actual hit happen when a real hit happens really kind of ruins this package. But Im still having fun fighting my enemy, just got to remember not to jump or climb :)

    So this is kind of a feature request, save me Emerald author save me :)
     
    mattis89 likes this.
  33. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    yes!
     
  34. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    272
    I just started to use Emerald again, but it seems you can set the damage timing in the Animation / Combat Section of the Emerald Editor. The Attack Delay lets you fine tune the timing to apply the actual DMG in Combination with the Attack Speed Setting. Also set the Attack Distance / Too Close distance, those values are shared for all of the models different attacks. Adjusting the size of the models colliders to match the dimensions might help with the climb/jump issue.

    Having the option to use colliders on models that carry weapons is still a request I suppose.
     
    Last edited: Jul 25, 2018
  35. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,246
    Thank you, that could cure a lot of my timing issues for sure. We still definitely need "real" collisions id say, it is really spinning me out when i get hit and im not really hit and vice versa. I am actually really happy with this package so far apart from that. I will be using it with others like ICE, each have their strengths. But almost none of them get the hit stuff perfect. Makes you wonder how AAAs do all this without things like unity.
     
  36. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,145
    AAA titles use things such as , damn I dont remember the name of the plugin but IK something..
     
  37. UDN_449900de-7c34-4a67-83eb-fa8501bf0413

    UDN_449900de-7c34-4a67-83eb-fa8501bf0413

    Joined:
    Jun 16, 2017
    Posts:
    17
    hey :D i know that the asset Ultimate Survival has been removed from the asset store, but i could really use if you made an intergration :D i have been trying to implant it for like 3 days now and i just cant make it work :D
     
  38. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    297
    Well,

    Been so long a darn update would be a blessing...

    There's hope yet!
     
    mattis89 likes this.
  39. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    107
    In 2018.2 there is this problem:

    after inserting the damage code as in your tutorial I have these errors:
    .....Emerald_AI.cs(2985,59): error CS0246: The type or namespace name `Invector' could not be found. Are you missing an assembly reference?

    > I moved it in Addons, restart, then back in the root and did your tutorial and it dissapeared <<

    -----
    Also 2018.2 official + Invector gives some problems to Emerald (I just tested in a new blank project Emerald AI and it works as it should be):

    So, in Invector I tested many scenes of emerald and they do not work correctly. For example in
    I should have this behaviour "Press the 1 key to spawn a Companion AI. After you have done so, move around and watch the AI follow you around. If you go near the skeleton in the distane, your AI will attack it."
    What I have it is a player who is slightly dragged up in the air and a companion doing nothing.

    >> I made it work (for now).
    For anyone who might encounter similar behaviour: Set you companion to enemy tag and layer + add yo the player another layer: enemy.
     
    Last edited: Jul 30, 2018
  40. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    272
    Any hints appreciated. ;)
     
    Last edited: Jul 31, 2018
  41. ChillyMcChill

    ChillyMcChill

    Joined:
    Nov 17, 2016
    Posts:
    57
    I am using VR weapon interactor with emerald. The asset gives me an option to change the damage method name for the bullets. I set it to Damage but I get this error when shooting emerald agents
     

    Attached Files:

    • asd.PNG
      asd.PNG
      File size:
      50.2 KB
      Views:
      479
  42. taralees

    taralees

    Joined:
    Aug 29, 2014
    Posts:
    40
    I have a Question For you ,, How to drop a Game Object when the AI dies ?

    Thanks
     
  43. taralees

    taralees

    Joined:
    Aug 29, 2014
    Posts:
    40
    Move Video's Tutorials ...
    Remember a Picture is worth a Thousand words and a Video is worth More then a Million

    Thanks so much
     
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,864
    Use the Emerald Event system. On AI's Settings there is and Events button. Click there and add an event. Attach a script to your AI with a function to call for the Death event. Here is an example script where I drop a prefab using PoolBoss when an AI dies.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using DarkTonic.CoreGameKit;
    5.  
    6. public class AIEvents : MonoBehaviour
    7. {
    8.     [SerializeField]
    9.     private Transform _deathSpawn; // prefab to spawn on death
    10.  
    11.     private Emerald_AI _emeraldAI;
    12.  
    13.     private void Awake()
    14.     {
    15.         _emeraldAI = GetComponent<Emerald_AI>();
    16.     } // Awake();
    17.  
    18.     public void OnDeath()
    19.     {
    20.         GameMaster.Instance.RemoveTarget(_emeraldAI);
    21.         _emeraldAI.ResetAI();
    22.  
    23.         if (_deathSpawn)
    24.         {
    25.             PoolBoss.Spawn(_deathSpawn, this.gameObject.transform.position, this.gameObject.transform.rotation, null);
    26.             PoolBoss.Despawn(this.gameObject.transform);
    27.         } // if
    28.     } // OnDeath()
    29. } // class AIEvents()
    30.  
    In the Ai's Event that I added, I point to the OnDeath() function in my script.
     
    BHS, zKici and Weblox like this.
  45. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    107
    Can anyone help with some hints what to script to make Emerald AI work with Adventure Creator, please ?
    Any help would be appreciated!
     
  46. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    297
    what exactly is not working?

    they work independently of one another, if you want them to kill enemy/player you have to use Emeralds script and put some custom coding there.
     
  47. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    107
    I tried get help here: https://adventurecreator.org/forum/discussion/7638/integration-with-emerald-ai#latest
    I am advised to request E AI info to make it work.
    I revise here:
    I set the enemy and my companion as NPC with Custom animation and motion control manual.
    I put them both as tag enemy and on layer Navmesh I have these behaviours:
    - my companion and the enemy fight eachother and they take dmg both !!
    - the enemy is following me but does not do any attack on me

    - I have this error in the console:
    ""CalculatePolygonPath" can only be called on an active agent that has been placed on a NavMesh.
    UnityEngine.AI.NavMeshAgent:CalculatePath(Vector3, NavMeshPath)
    Emerald_AI:Initialize() (at Assets/Emerald AI 2.0/Scripts/System/Emerald_AI.cs:620)
    Emerald_AI:Start() (at Assets/Emerald AI 2.0/Scripts/System/Emerald_AI.cs:577)
     
  48. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,435
    Emerald AI has the integration tutorial found here: https://docs.google.com/document/d/1QGSEdc2-6bks22KIelYlBw_601uHce2BVLM3QTq5axg/edit#

    It allows Emerald AI agents to damage the Invector player and player damage Emerald AI agents. Emerald AI's ranged combat is setup through the Emerald AI editor. There is also a limit to how fast an AI can fire. So, yes, Emerald AI can work with shooting games, with the limitations I've listed.


    Yes! I can certainly make a tutorial. I actually meant to do this awhile back. Integrated support was actually supposed to built-in, but the developer and I never ended up making it happen.

    When I get the chance, I will make a tutorial. If you would like to attempt it yourself, all you have to do is disable all of the scripts that control the direction/movement of the Kriptos FX effects. Since, Emerald AI's projectiles are calculated by its own projectile motion, having Kriptos FX's effects controlled by the Kriptos FX scripts causes issues.



    I'm not sure if I will end up doing an integration tutorial for Ultimate Survival as that asset is no longer supported. It would lead to issues with each Unity update. If I still have the asset, which I think I do, I will look into it to see how difficult it would be to put together a brief guide.


    I agree! A tutorial is still planned and now that UniStorm's 3.0 update is finished, Emerald AI will get its update. This update will bring quite a few improvements with the addition of AI schedules that will work off of UniStorm's time.


    Emerald AI's damage function requires 2 parameters to properly be called. A damage amount and a target type. So if you would like to damage an AI, you would do:
    Code (CSharp):
    1. YourEmeraldAIReference.Damage(DamageAmount,Emerald_AI.TargetType.Player);
    Does your VR interactor allow 2 parameters or only 1?


    I agree! I will be doing a tutorial series for Emerald AI. This will cover all sorts of cool things you can do with Emerald AI.
     
    Weblox likes this.
  49. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,435
    I have not tested Adventure Creator myself, but it sounds like you need to bake NavMesh for your scene. A tutorial can be found here: https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html
     
  50. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    107
    Last edited: Aug 2, 2018
unityunity