Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Emerald AI 3.2 (New Sound Detection) - 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,760
    Have you tried changing the Obstruction Action to Move Closer? This should allow the AI to keep moving closer until there is no longer an obstruction so this situation is avoided entirely. You may also need to increase the colliders of the AI because their line of sight may not be detecting the obstruction.

    ObstructionAction.png
     
    septN likes this.
  2. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    315
    @BHS Would be great to be able to call an event to make a character always walk - even when in combat. Then allow them to run again through another event (I'm trying to make a boss fight).
     
    julianr likes this.
  3. Yasser-Jaffal

    Yasser-Jaffal

    Joined:
    May 23, 2013
    Posts:
    8
    Hi there,
    I am having an issue when initializing AI
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. EmeraldAI.Utility.EmeraldAIInitializer.SetupOptimizationSettings () (at Assets/Emerald AI/Scripts/Components/EmeraldAIInitializer.cs:141)
    3. EmeraldAI.Utility.EmeraldAIInitializer.Initialize () (at Assets/Emerald AI/Scripts/Components/EmeraldAIInitializer.cs:19)
    4. EmeraldAI.EmeraldAISystem.Awake () (at Assets/Emerald AI/Scripts/System/EmeraldAISystem.cs:884)
    5.  
    I was able to set up a single character successfully, but is happened with the second one; even both characters were created following the same steps. Looks like GetComponentInChildren<VisibilityCheck>() returns null after adding the VisibilityCheck component. Any advice?
     
  4. Yasser-Jaffal

    Yasser-Jaffal

    Joined:
    May 23, 2013
    Posts:
    8
    OK I found the cause. Animation profiles tend to break things if animations are replaced after being applied. Also finishing animation controller and animation set up before other steps seems to help avoiding such issues.
     
  5. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    2.4.1.1 was released and in the store. How does one upgrade?
    I would have thought that since I am running 2.4.1 the download button in Package Manager would light up, allowing me to update the codebase. Instead I see the import button lit up. Something smells fishy. I wonder if it's because I install new releases to a new project, then copy the EmeraldAI directory into my old project?

    Is that a bad practice?
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'll look into adding something like this.
     
    Drannach, julianr and Deckard_89 like this.
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    The minimum version of this update is 2018.3.8. I had to do this because Unity would break the projects if updating from 2017 or pre 2018.3.
     
  8. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I really looked forward to The location damage and able to damage The Child ragdoll. Also theres no KillAI()
     
  9. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    315
    In the Emerald Event Manager there is KillAI () event
     
  10. Drannach

    Drannach

    Joined:
    Apr 6, 2014
    Posts:
    25
    Just for completeness there's a KillAI() method, that you can call for example when the health reach 0. there's no event like that.
    On the other hand there's an OnDeathEvent() if you want to hook up there and add some custom code
     
    Deckard_89 likes this.
  11. Hewhoisseth

    Hewhoisseth

    Joined:
    Aug 9, 2013
    Posts:
    5
    I'm having an issue that the AI doesn't respond to the "combat hit" when running, So if a monster is running at me and I'm shooting it, it has no effect. Is there a way to have a stagger, where if running they actually take a step back and do the hit animation, or at very least just the hit animation. It just makes weapons feel underwhelming when the AI just runs at you with no effect. Am I missing something?
     
  12. idibil

    idibil

    Joined:
    Oct 10, 2015
    Posts:
    24
    I have applied Emerald AI for a companion who follows the player through a few tunnels. The problem arises when the player enters a room and needs to leave later. If the companion stays at the door, the player cannot leave. Does Emerald AI have any mechanics to make the companion move backward or apart when the player collides with it?
     
  13. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    What about a trigger in the door way to detect if the AI is there, then access the Emerald API to move the companion to a specific waypoint or gameObject?
     
  14. idibil

    idibil

    Joined:
    Oct 10, 2015
    Posts:
    24
    Thank you, but the scene has a lot of doors. Surely I will add a dialog option where the player "invites" to the Companion to move back, but I thought that maybe Emerald AI had some way easy to detect when the player is closed to the Companion and do this auto.
     
    julianr likes this.
  15. XVB75

    XVB75

    Joined:
    Sep 12, 2020
    Posts:
    11
    Is there a comprehensive tutorial for creating a flying creature? I see a lot of comments from both developers and users in this forum but no complete guide in the documentation for this.

    Goal: small bird without attack. Walking on ground, take off, flying, landing.
     
  16. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    Is there an eta for when location damage will be available? A couple of weeks, months?
     
  17. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    I have a few problems:
    1. When i'm using root motion movement type my attacks rarely connect. The attacks work fine in Nav Mesh Driven.

    2. I have an animation that plays when the ai first spawns in where they dig out of the ground. The animation just hides my ai and then they spring out of the ground.

    3. If my ai start getting really close to eachother they teleport into the ground.

    4. Im getting this error:
    EmeraldAI.EmeraldAISystem.Update () (at Assets/Core/Emerald AI/Scripts/System/EmeraldAISystem.cs:1070)
     
    Last edited: Dec 18, 2020
  18. Tretiak

    Tretiak

    Joined:
    Jan 22, 2018
    Posts:
    49
    Hi, is it possible to extend AI with custom actions ? Like do something, play some animation.. for example open doors
     
  19. ninetailschris

    ninetailschris

    Joined:
    Mar 24, 2017
    Posts:
    4
    Survival Engine Integration ?
     
    Thorgrem likes this.
  20. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi there!
    Long time user here. I do have a question: Is there any way to make the AI's react to an explosion WITH the ragdoll?
    I would like to simulate an explosion and therefore to kill the ai and make them bein pushed away by it.

    Thank you in advance!
    Dom
     
  21. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    @BHS tutorial for ranged ai using mixamo pro longbow archery pack would be great because i face issue with ai aim too
     
  22. Muffinsnightmare

    Muffinsnightmare

    Joined:
    Aug 13, 2018
    Posts:
    1
    I want to set up an AI that does not use any of the combat features (I make animals living on a farm), but I have to jump through so many hoops so far because I can not just ignore all the combat setttings, even though I don't want to use them. Is there an easy way to do this? Is this even possible with this asset? It said in the description that you can make pet and animal AIs with this as well, but so far, I feel like that only includes the RPG definition of those words, not the simulation genre one.
     
  23. papazingo81

    papazingo81

    Joined:
    Jun 2, 2019
    Posts:
    14
    Hi, loving the Asset by the way. However i have a question. What the best way to spawn in a Ai? Im only asking because when I instantiate them in manually i keep getting this error:

    NullReferenceException: Object reference not set to an instance of an object
    EmeraldAI.Utility.VisibilityCheck.OnWillRenderObject () (at Assets/Emerald AI/Scripts/Components/VisibilityCheck.cs:30)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    I have added a Main renderer. Its fine if they are already in the scene on start but as soon as add one in i get the error.

    Any1 else had this? Thanks
     
  24. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    @BHS when is the next major update coming out?
     
  25. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    Has anyone used emerald ai with timeline during game play for cinematics?
     
  26. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    486
    Just started using this asset and had a few questions for anyone:
    1. How do I know what version I'm actually using? Asset Store says 2.0 but here we say we are up to 2.4.1
    2. How do I apply damage to my character? My FPS character/character controller.
    3. Is there a way to apply damage per body part? You know, head vs. arm.
    4. Why a box collider? How come the AI does not use a capsule collider?
    5. Where does one set the Hit Transform? I can see where to set the Vector3 offset of the Hit Transform but where do I set the actual transform?

    Turns out I have another question. Sorry about all this.

    6. The only way I can get an AI to stop attacking the Player is to Destroy the gameObject. How do I play my Player's death animation and keep the AI from attacking?

    Thanks
     
    Last edited: Dec 29, 2020
  27. jaiverma

    jaiverma

    Joined:
    Nov 8, 2013
    Posts:
    11
    I am having a few issues with the plugin. Please help.

    1. I am trying to make the AI drop its weapon on death and have specified the droppable prefab which has a rigidbody and collider. But the script is not disabling the weapon in hand or instantiating the droppable weapon on death.

    2. I have equip/unequip functionality working but there is an issue with the animation. Since the equip animation has a standing pose, it looks weird when the AI starts running towards you but the legs wont move. Only the upper body plays out the equip animation. I tried to use animation mask but doesn't help. I need assistance with this.

    3. When the AI is fleeing, if I chase it, sometimes it stops at the end of the map and just gets stuck for some reason. Should it not plot another point on the map and flee towards it. Why does it get stuck. Its only when i change my position to its either side, it reacts again.
     
  28. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I'm using Master Audio for my audio system. Is there a way to integrate it with Emerald AI?
     
  29. Ben2390

    Ben2390

    Joined:
    Sep 6, 2014
    Posts:
    11
    1. I think if you find it in the package manager it will tell you.
    3. They are working on that by the looks of things.
    6. You could change the player tag ondeath/when your player reach 0 health. I'm guessing by your question 6 that you've solved 2.
     
  30. Wawwaa

    Wawwaa

    Joined:
    Sep 30, 2017
    Posts:
    165
    Hi, I am thinking to buy the asset. I wanted to learn one thing before that. In my game I don't have a plane terrain. My terrain is spherical. Is the asset suitable to use in such a design?
     
  31. Ben2390

    Ben2390

    Joined:
    Sep 6, 2014
    Posts:
    11
    Great work guys... I like the asset, I can see a lot has gone into this! It's also nice to see this asset is continually worked on.

    It would be nice to see some sort of road map or feature list of what's coming up/planned.

    As far as the current features are concerned these following points will make the asset even more attractive for me (maybe others too):

    1. I'd like an option for the ability value to be set from the AI component itself (like melee damage). This way different ai and the same AI of different level can use the same ability but pass a different value. Also I adjust the AI level based on certain criteria when they are instantiated. The health and melee attack ratings are then adjusted accordingly. If the Ability values was a part of the AI I could also adjust the values based on the enemy level.

    2. It would be useful to have an option for a min and max values for Offensive Abilities as well (again like melee damage) so there is some variance - this set from the AI as per 1 would be most useful.

    3. My last point would be some sort of resistance system. At the moment I can have 2 AI, one that looks heavily amoured and the other not but both receive the same amount of damage from an attack. It would be more realistic for attacks to have some of mitigation factor based on the targets resistance. This could be taken further long term with adding attributes to abilities and the resistance system.

    My apologies if there is already a way of achieving any of this. I've implemented 3 myself for attacks to the player and will do the same for attacks on AI along with points 1 & 2. It would just be useful for these to be built in.

    Thanks again for the asset anyway!!
     
    Last edited: Jan 1, 2021
  32. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    When will this be integrated with Opsive Ultimate Character Controllers ???
    I think that question was asked 2 years ago ?
     
  33. sturmburg

    sturmburg

    Joined:
    Jul 16, 2012
    Posts:
    7
    Having a Problem with Ranged Attack. Melee attack works correctly, but after going through tutorial on ranged attack AI still won't do it. Here is what I set:

    AI Settings -> Damage Settings -> Weapon Type (Set to Ranged)
    AI Settings -> Damage Settings -> Abilities (Created Ability and Set Ability Animation)
    Animations -> Ranged Attack Animations (2 attack animations clips set)

    Any ideas on what's missing or what I'm doing wrong.

    thanks in advance.
     
  34. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    It kinda is if you go to the Opsive fourms there is an integration guide. I have both integrated.
     
    Kennth likes this.
  35. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I'm having the same issue.

    I got Melee working then added in Ranged. At one point, I had both working but didn't commit my changes like I should have. I tweaked some other setting and Ranged no longer works no matter what. I started over from scratch twice and couldn't get melee and ranged to work again. I must be missing something.

    I'd so love to use this asset in my latest project but I must be missing something. I have spent time with the documentation so I'm not just clicking random things.
     
  36. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
  37. Ben2390

    Ben2390

    Joined:
    Sep 6, 2014
    Posts:
    11
    I have some of mine set to both attack methods and they are working for me. I can't remember if there was but there maybe some ranged AI in the playable demo scene. You could load it up and if there is - check if they are working then compare differences against yours if they are?
     
  38. mowli

    mowli

    Joined:
    Jan 3, 2016
    Posts:
    2
    Hi Guys.
    I've been using the emerald system now for 2 days and unfortunately can't find a setting. I need the option to get the player take damage if they run into spikes. Unfortunately I haven't found anything yet. Hope you can help me
     
  39. sturmburg

    sturmburg

    Joined:
    Jul 16, 2012
    Posts:
    7
    Think I found a temporary solution for this. I am using Emerald AI with VR Interaction Framework. The prefab VR rig i was using in my scene did have a Capsule Collider on it. Apparently AI ranged combat attacks looks for this. I also set the Capsule Collider isTrigger to true. Now the AI will track and fire at me and I take damage.
     
  40. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I'm using VR Interaction Framework also. I rig is based on the one provided with updates so I'll give your fix a try tonight. Fingers crossed.
     
  41. sturmburg

    sturmburg

    Joined:
    Jul 16, 2012
    Posts:
    7
    FYI, I added the Capsule Collider component to the PlayerController object on the XR Rig Advanced prefab.
     
  42. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Thanks. I thought I had a capsule collider on there already but I'll check.

    Would be nice to solve this. Emerald seems pretty well done and it would let me focus on other parts of my game.
     
  43. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    I did a search for your name there in Opsive fourms , and could not find ?
    Is there a page with clear instructions that say how to set this up ?
    I can't find it if it is there, sorry.. please give a link or page number even ?

    @BHS Why can you not do an integration instructions please on your wiki or in package ?
     
  44. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    I'm not the one who posted it, go to the integrations section on the forums.
     
    Kennth likes this.
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    This is currently by design. I will add an option to allow AI to be damaged while moving with one of the next updates. You could try to use an emote animation to see if it can give you a similar effect: https://github.com/Black-Horizon-Studios/Emerald-AI/wiki/Emerald-AI-API#playemoteanimation
     
  46. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    All you really have to do is set an AI's Base Offset greater than 0. This controls the height the AI will be above the ground allowing them to hover. Emerald AI doesn't support actual flying AI as all AI rely on the generated NavMesh for their movement and pathfinding.

    NavMeshBaseOffset.png
     
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'm going to try and have the location based damage update finished by the end of this month.
     
    julianr likes this.
  48. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    1) This typically has to do with an AI's attack motions steering the AI to far left or right offsetting their calculated damage angle. Increase this value and it should work correctly. You may also need to correct the animations' Root Transform Rotation as explained here: https://docs.unity3d.com/Manual/RootMotion.html

    MaxDamageAngle.png

    2) It sounds like the animation is not playing correctly. How are you triggering this animation? This is how I do it the included Forest Golem AI. The emote animation will need to be set within the AI's Emote animation list and it will need to use the Emote ID.

    PlaySpawningAnimation.png

    3 & 4) If an AI ever teleports into the ground, it usually means they are missing an animation somewhere. This is most likely why you are getting an error message. I'm also not sure if this due to you moving Emerald AI folder to a different place other than Assets/
     
    Bioman75 likes this.
  49. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, look at the AI Gather example scene and the EmeraldAINeedsSystem script. All this was created just using Emerald AI and its API. This example has an AI generate waypoints to "food" objects. Then play an animation upon arrival. Similar code can be used for going to doors and opening them.
     
    Tretiak likes this.
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'm working on it. I have Survival Engine and will be creating an integration guide soon.