Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    Yes, my apologies for the confusion.

    If your AI does not have multiple levels of detail on their LOD Group, you don't need to enable the Has Multiple LODs setting. The AI's renderer will still be culled by the LOD Group and will still be disabled properly when the cull level has been reached, even when not using the Has Multiple LODs setting.
     
  2. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    A little script that I made for one of my escort quests that spawns waves of Emerald AI NPCs
     
    dsilverthorn likes this.
  3. StudioIncorrect

    StudioIncorrect

    Joined:
    Aug 10, 2015
    Posts:
    3

    Thanks BHS! I had not looked into the transition itself, and indeed the exit time was still enabled. Thanks again!
     
  4. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    507
    Do emerald ai have the ability to crouch, take cover etc?
     
  5. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
  6. marketxu

    marketxu

    Joined:
    Oct 30, 2012
    Posts:
    7
    how can i make headshot in emerald?
     
  7. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    The location damage script
     
  8. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    when changing my confidence level through said code on api, if i change it to coward and have the enemy faction as enemy my coward wont run away ?
     
  9. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    1
    @BHS Companion AI is not working (not getting or damaging other AI even in demos).

    There are some bugs as well, in the detection tab if you choose the line of sight and first detected in the next option. AI failed to give damage to the invector controller.
     
    Last edited: Apr 20, 2021
  10. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    @BHS any idea what the next update is? Also there have been a lot of legit folks saying you aren't getting back with them? Are you abandoning your asset. You haven't been as active as you once were.
     
  11. felixsg

    felixsg

    Joined:
    Jul 5, 2018
    Posts:
    9
    I already buy and I like to know if posible update the outline and the other shaders for use with URP
    thanks
     
  12. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    181
    Does anyone know how to reset an AI after death? I created a makeshift pooling system spawning agent but after they get turned off then on again, they seem to not do anything?
     
  13. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    EventsManager.ResetAI();
     
  14. Roger_Odonnell

    Roger_Odonnell

    Joined:
    Sep 6, 2020
    Posts:
    3

    Is there a way just to make a passive animal ai without needing to put in combat animas and all
     
  15. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    181
    Do I send that message to the AI? I tried doing that and it basically did nothing. Is this described in the manual somewhere I tried looking and I found nothing
     
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,136
    @BHS hi! People over here using UCC have big issues with AI detecting and chasing but not attacking, something is obstructing the AI raycast.. the capsule collider wich handle damage and keeping the character grounded and gravity is tag : Player Layer: Character as it should. Have tried many different things..won't work.. also the rest of the character is on a layer that the AI is ignoring... Still don't work... And it finds the target , wich is the capsule collider, but also complains that it obstruct the sight... Please , have a look at this!
     
  17. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
  18. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    747
    Is there an issue with combat events? Neither On Start Combat Event () nor On Attack Event () seem to be firing. It is very clear that the AI is in Combat and Attacking.
     
  19. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    @BHS is there a way to pause the AI from attacking for a specific amount of time and then resume? Also is there a way to substitute via code an attack? For example, instead of doing offensive ability 1 do specific Scriptable Object... aka ABC Combat asset stuff. I know you must be busy, but you should really integrate this product and make it an asap item. You will sell a ton more if people could use it with Emerald.
     
    Last edited: Apr 24, 2021
  20. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,136
    use the event on kill target to cleartarget and wander
     
  21. rivanavur

    rivanavur

    Joined:
    Jun 21, 2020
    Posts:
    3
    how can i make the ai being idle in the middle of combat? (kinda injured so we can attack them freely)
     
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,864
    For anyone interested, I've updated my Opsive integration to include Emerald AI's new location based damage system. I've also consolidated all versions into a single script and now have the integration in a Unity package. You can download the package from my website:

    http://box5641.temp.domains/~magiquep/unity-assets/
     
    Bioman75 likes this.
  23. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    69
    Uh so I updated from the prior version of Emerald AI to the most recent one and now my ai does this. The AI just spawns face down in the ground and freaks out when agro. There are no errors with Emerald AI so I'm not sure what went wrong. Whats weird is that the demo ai doesn't do this.



    Edit: I actually am getting an error its:

    Code (CSharp):
    1. UnassignedReferenceException: The variable AIBoxCollider of EmeraldAISystem has not been assigned.
    2. You probably need to assign the AIBoxCollider variable of the EmeraldAISystem script in the inspector.
    3. UnityEngine.BoxCollider.set_size (UnityEngine.Vector3 value) (at <9b956647017d4dc1b8d3d25eef012467>:0)
    4. EmeraldAI.LocationBasedDamage.Awake () (at Assets/Emerald AI/Scripts/Components/LocationBasedDamage.cs:41)
     
    Last edited: Apr 26, 2021
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,864
    A built in way would be to call UpdateAIAttackSpeed on the EmeraldAIEventsManager component and set the min and max to the highest possible value. That gives you 8 seconds to play with. If you need more than that, you can make a few small modifications to the EmeraldAICombatManager as follows:

    Add the following code at the top of the class:

    Code (CSharp):
    1. static bool _paused = false;
    2.  
    3. public static void Pause(bool value = true)
    4. {
    5.   _paused = value;
    6. }
    Then in GenerateMeleeAttack, GenerateMeleeRunAttack, GenerateOffensiveAbility, GenerateSupportAbility, and GenerateSummoningAbility add the following code at the top of the function:

    Code (CSharp):
    1. if (_paused) return;
    When you want to pause the AI from attacking, call EmeraldAICombatManager.Pause();

    When you want to Unpause the AI, call EmeraldAICombatManager.Pause(false);

    Unless you want to handle some of them differently then you'll have to do more work. I haven't tested this myself yet, but I believe it should work. I would ask @BHS to provide this sort of pausing capability in a future version as well.
     
  25. Pho3niX90

    Pho3niX90

    Joined:
    Mar 26, 2014
    Posts:
    10
    Was the herd/pack featured removed? Cannot seem to find it
     
  26. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    Thanks for the bug report. I will look into this.
     
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    I just released an update last month. I'm not abandoning any of my assets and I have plans for more features including strafing, AI stats, and adding back in the breeding system. Devs can't take a break without people thinking we're abandoning our assets :)
     
    Felinsky likes this.
  28. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    I'm working on simplifying this so the combat options will be hidden if users just want a basic passive AI.
     
  29. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    I would be more than happy to make an official UCC integration guide, but the UCC developers have refused to respond to me several times (maybe they're just busy). If they want to reach out to me, I would be more than happy to make an official guide on the Emerald AI Wiki.

    If a collider is obstructing the AI's line of sight, you need to add the layer to the Obstruction Ignore Layers.

    ObsturctionIgnoreLayers.png
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    I just tested both events and they are working on my end. Are you using the most recent version of Emerald AI? What are you trying to do with these events? Have you tried a simple test such as a Debug.Log message to the Unity Console?
     
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,864
    As I reported on Discord, this obstruction ignore layers is not working as advertised. If you set to Nothing then everything is blocking because you are inverting the mask in your raycast check. You currently have to set to Everything to get no obstructions.
     
    mattis89 likes this.
  32. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    52
    is emerald AI compatible with mirror?
     
  33. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,136
    That one is fixed but you have to set it to everything.... Crux should btw not spawn the emerald AI inside the crux parent object.. makes it not fire on death events etc. And UCC damage not working if the ai is inside a gameobject...same thing if you use puppet master, it dosent get the colliders ..
     
  34. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,136
    If AI are in a parent object it wont work, neither damage.
     
  35. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,136
    Using location based damage
     
  36. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    405
    @BHS Just a thought. Maybe you could create a Discord server so the community can help each other out, talk out solutions, etc. It's just a little more responsive. This asset has a big following and to see everyone interact on Discord would be great.
     
  37. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    It ls already there https://discord.gg/UNmmyNBU. Will @BHS doesn't answer there.
     
  38. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    747
    Here is What I was doing: I rigged a deer stag with Emerald 2-4-1-1 in a project of Unity 2018.4.25f1. I attached a new GO to each antler and added a trigger collider, and a damage dealer script from Stats Cog. The Stag AI has always performed correctly and still does today. I wanted to use Emerald Events to switch the trigger colliders on and off. Using On Attack () event or On Start Combat () event to turn them on. The first thing I noticed is that on play the trigger colliders were deactivated. OK, I paused and manually switched them on. However, On Attack () and On Start Combat events were not firing, nor were the damage dealers working. In contrast On Take Damage () event does work. I tested and verified the events with Audio Source.PlayOneShot. Then I considered whether the Cog components were causing a conflict. So, I deactivated them. No change. Then I deparented them from the stag, completely. No change. Now the stag only contains the original Emerald setup. Still, On Attack () and On Start Combat () do not fire my one shot audio test, but On Take Damage () works fine. I would really like to use the Cog damage dealers and the Emerald events. Can you help?
     
    Last edited: Apr 29, 2021
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    This looks like this is related to a couple of bugs. I'll get right on fixing these.

    In previous versions, Emerald AI applied a Rigidbody component to AI. Remove this Rigidbody component from your AI as it's no longer needed.

    To fix the error, open up the LocationBasedDamage script and change the line:
    Code (CSharp):
    1. private void Awake()
    To:
    Code (CSharp):
    1. private void Start()
     
    Bioman75 likes this.
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    Thanks, I'll get the description updated.
     
    SickaGamer likes this.
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    It doesn't have built-in support, but I have had other users integrate Emerald AI with Mirror themselves. So, it is possible.
     
  42. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    I'll look into the issue with Crux. I have plans to add support for Puppet Master soon.
     
    mattis89 likes this.
  43. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    How do you make an AI stop in the middle of a combat. I want to hook the AI into the ABC Combat ability. The asset owners email is: DiceLockStudio@gmail.com
     
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    I have a bug fix update I'm working on and I'll get this fixed as well.
     
    mattis89 likes this.
  45. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    @BHS So what is next on your update docket :)
     
  46. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,136
    Thank you!!
     
  47. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    747
    Nudge for advice on my post above, from yesterday.
     
  48. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,073
    I can't wait to see what Will is going to get done. He said that he was on a bit of a break for a while and will start up regular updates like the old Emerald used to do! Plus Honor AI is going to start catching up ;)
     
  49. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    Bioman75 and SickaGamer like this.
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,410
    I plan on adding strafing with the next major update. I'm trying to focus on one major feature at a time, which will allow quicker updates. After that, most likely some type of stats system for the AI to use.
     
    SickaGamer likes this.
unityunity