Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. 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

[ON SALE - 50% OFF!] Emerald AI 2.4.1 - 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,394
    Hey everyone!

    This update fixes most of the bugs reported as well as fixing the issue with the Emerald AI Editor and Linux OS. Support for location based damage is coming soon.

    2.4.1.1
    General


    • Fixed an issue with the Emerald AI editor not being displayed correctly with computers that use Linux
    • Improved the way Emerald AI's Editor width is calculated so they editor scales more evenly and looks better (this goes for all operating systems).
    • Upgraded the minimum version Emerald AI uses to Unity 2018.3 as Unity automatically upgrading the project sometimes caused issues.
    • Moved all Terrain Layers to proper folders so _TerrainAutoUpgrade isn't present upon importing.
    • Renamed all Terrain Layers.
    • Added Animator Culling Mode to the Emerald AI editor to control an AI's Animator's culling mode from within the Emerald AI editor. By default, this setting is set to Always Animate as Cull Update Transforms typically causes an issue with AI who die off-screen making them freeze in T-pose, when using animation deaths.
    New API
    Added SetPlayerRelation to Emerald AI's API to change an AI's relation with the player during runtime.
    • Added ChangeOffsensiveAbilityObject to Emerald AI's API to change the ability object of the specified index within an AI's Offensive Abilities List.
    • Added ChangeSupportAbilityObject to Emerald AI's API to change the ability object of the specified index within an AI's Support Abilities List.
    • Added ChangeSummoningAbilityObject to Emerald AI's API to change the ability object of the specified index within an AI's Summoning Abilities List.
    • Added GetDistanceFromTarget to Emerald AI's API that returns the current distance between the AI and their current target.
    • Added ReturnToDefaultState to Emerald AI's API that sets an AI back to its wandering Default State.
    Fixes

    • Fixed an issue with the Emerald AI editor not being displayed correctly with computers that use Linux.
    • Fixed a bug with Companion and Aggressive AI that would sometimes freeze if they were in combat and their target was destroyed or null.
    • Fixed a bug that would cause an AI to sometimes freeze in T-pose. The typical cause of this issue was when an AI's Animator was set to Cull Update Transforms and an AI would die off-screen.
    • Fixed a bug with the UpdateAIMeleeDamage function within the EmeraldAIEventsManager script.
    • Fixed a bug with the ReachedDestinationEvent that made it sometimes not trigger reliably.
    • Fixed a bug with an AI's projectiles that wouldn't set the projectiles collider radius properly with the first shot.
    • Fixed a bug that didn't allow AI who returned to their starting position, after exceeding the user set distance, to return correctly.
    • Fixed an issue that happened with the Playable Demo scene when updating from certain versions of Unity.
     
    Last edited: Dec 11, 2020
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,394
    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.
  3. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    298
    @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.
  4. 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?
     
  5. 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.
     
  6. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    461
    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?
     
  7. BHS

    BHS

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

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,394
    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.
     
  9. mattis89

    mattis89

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

    Deckard_89

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

    Drannach

    Joined:
    Apr 6, 2014
    Posts:
    24
    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.
  12. Hewhoisseth

    Hewhoisseth

    Joined:
    Aug 9, 2013
    Posts:
    1
    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?
     
  13. idibil

    idibil

    Joined:
    Oct 10, 2015
    Posts:
    9
    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?
     
  14. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,167
    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?
     
  15. idibil

    idibil

    Joined:
    Oct 10, 2015
    Posts:
    9
    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.
  16. 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.
     
  17. Bioman75

    Bioman75

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

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    67
    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
  19. Felinsky

    Felinsky

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

    ninetailschris

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

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    131
    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
     
  22. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    28
    @BHS tutorial for ranged ai using mixamo pro longbow archery pack would be great because i face issue with ai aim too
     
  23. 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.
     
  24. papazingo81

    papazingo81

    Joined:
    Jun 2, 2019
    Posts:
    11
    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
     
  25. SickaGamer

    SickaGamer

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

    khushalkhan

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

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    402
    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
  28. 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.
     
  29. kenlem

    kenlem

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

    Ben2390

    Joined:
    Sep 6, 2014
    Posts:
    8
    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.
     
  31. SinDeSiecle

    SinDeSiecle

    Joined:
    Sep 30, 2017
    Posts:
    66
    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?
     
  32. Ben2390

    Ben2390

    Joined:
    Sep 6, 2014
    Posts:
    8
    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
  33. Kennth

    Kennth

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

    sturmburg

    Joined:
    Jul 16, 2012
    Posts:
    6
    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.
     
  35. Bioman75

    Bioman75

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

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,625
    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.
     
  37. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,125
  38. Ben2390

    Ben2390

    Joined:
    Sep 6, 2014
    Posts:
    8
    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?
     
  39. 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
     
  40. sturmburg

    sturmburg

    Joined:
    Jul 16, 2012
    Posts:
    6
    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.
     
  41. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,625
    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.
     
  42. sturmburg

    sturmburg

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

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,625
    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.
     
  44. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    58
    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 ?
     
  45. Bioman75

    Bioman75

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

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,394
    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
     
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,394
    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
     
  48. BHS

    BHS

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

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,394
    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.
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,394
    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.
     
    Felinsky likes this.
unityunity