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
    I'm still working on the new clouds for UniStorm. I'm hoping to have them finished by the end of the month. :)
     
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, there's even a setting within the Emerald AI Editor when spawning with Crux. This will automatically adjust the population amounts when you kill Emerald AI agents. Crux shouldn't spawn on areas with no terrains/mesh so everything should work fine if you are streaming terrains.
     
    mattis89 likes this.
  3. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    What version of Emerald AI are you using? Version 2.2 doesn't use Override Controllers so maybe that's the issue. Did you remove the previous version of Emerald AI before updating to the new version?
     
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey everyone,

    There have been many request for switchable Weapon Types (the ability to switch between ranged and melee combat). With Emerald AI version 2.2.2, this will be possible. This will allow an AI to switch weapon types based on distance, health level, or randomly based on customizable odds. Animations and attack distances, for both ranged and melee, can be customized from within the editor. This of course is completely optional and users who do want to have this option enabled, don't have to worry about seeing the additional options. They only become visible when Enable Both Weapon Types is enabled which is located under AI's Settings>Combat>Combat Actions.

    NewAnimations.png



    Also, I've made an integration tutorial for Final IK. This allows an AI's feet and legs to align properly with the angle and slope of the terrain using inverse kinematics while blending with their animations. More tutorials are coming soon.

     
    Last edited: Apr 9, 2019
    Weblox, RonnyDance and p_hergott like this.
  5. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Weird. I thought I had the latest version. I will remove and do an update and see how that helps.
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    There have been Asset Store issues with assets not updating correctly. Maybe that's what's happening. Version 2.2 also requires a version of Unity 2017 or higher.
     
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I have 2017.1 so that shouldn't be a problem. I'll let you know how it goes.
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I removed EmeraldAI from my project. I also removed it from the local store cache. This forced me to re-download the asset from the store. I did that and imported again. I don't see the falling through the floor issue, but this time I am testing with a different project and different enemy prefabs so maybe that's why. However, this freshly downloaded version still creates an override controller. How can that be?
     
  9. Troast

    Troast

    Joined:
    Mar 5, 2017
    Posts:
    11
    I have problems with my ranged A.I. Have CreateEmeraldProjectile events, and made time to transition 0. Also, there is no obstruction layers set so it has no reason to not detect player. In fact, when getting withing detection distance, the A.I will target the user, and move closer to within attack range. Once reach this range, it stays stuck in "combat idle" pose doing nothing.
     
  10. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Im very happy to hear this!! :)
     
  11. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    315
    @magique 2.2 is the only version I've ever used and I still see the sinking into floor thing in 2018.3. Maybe it's something to do with having the mirrored turning animations? Not sure.
    Also, I can pass through the creature as though it has no collision at all, even though it has that box collider. This is using with Opsive's TPC version 2 by the way.
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I didn't use the Mirror option so that's probably not it. I'm currently testing with Invector controller so I can't speak to the collision issue.
     
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @BHS Do you have ideas on why a clean download still uses the override controller? I don't want to continue with this version if something is wrong with it.
     
  14. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    @BHS Please verify that 2.2 does NOT use an override controller. If that is the case, I may have an anomalous version as well.
     
  15. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Please enable all of the Debug Log Options located at the bottom of the Docs tab to see which object is being targeted or obstructed. This may give me a better idea as to what's happening.
     
  16. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    Bandicam helps :)
     
  17. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Can you please provide a screenshot? I would recommend using version 1 of the Asset Store to download and import Emerald AI, if you haven't already done so. There's not much I can do on my end. The old version isn't even on the Asset Store server-side. I removed it for this exact reason so I have no idea how it's still downloading the old version.
     
  18. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    @magique record yourself downloading it, installing it and how the override controller is being rendered.
     
  19. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Is there something specific you want a screenshot of that will show which version it is?

    You mean download from the old store?
     
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Updated: Alright, so an Animator Controller and an Override Controller both have a file type of .overridecontroller, but they are both different components within Unity. This may be what's causing some of the confusion. If your Animator Controller looks like it does in the second screenshot, you are using the correct version of Emerald AI.

    To ensure we are the same page, this is an Override Controller. Emerald AI should not be using this.
    AnimatorOverrideControllerNewClips.png

    The only animator Emerald AI should be using is an Animator Controller like below. Animations are directly assigned to this while in the editor and do not use an Override Controller. An Override Controller was used with version 2.1 and prior.
    GeneratedAnimatorController.png
     
    Last edited: Apr 10, 2019
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, the old Asset Store.

    The current version's Animation tab should look like this:
    CurrentAnimationTab.png
     
  22. Troast

    Troast

    Joined:
    Mar 5, 2017
    Posts:
    11
    I put debug on, have no problems with detection or obstruction. I copied this A.I from another working ranged character but I think something is wrong with either my projectile or the transform of the point where the projectile originates because the original works. Difference exists in the model mesh and colliders, projectile object and transform to shoot from and head transform for raycasts, all other settings are the same. On review though, those are some significant parts that are altered from the basis npc I used.
    I'll change those around a bit more and see if I can get it working.
     
  23. Troast

    Troast

    Joined:
    Mar 5, 2017
    Posts:
    11
    I have had these errors a number of times, thought nothing of it because things seem to work anyway. But heres what I get, when I pressed update projectile to try another one instead:

    Assertion failed on expression: '!go.TestHideFlag(Object::kNotEditable)'
    UnityEngine.GameObject:AddComponent()
    EmeraldAI.Utility.EmeraldAIEditor:OnInspectorGUI() (at Assets/Emerald AI/Scripts/Editor/EmeraldAIEditor.cs:1499)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  24. Troast

    Troast

    Joined:
    Mar 5, 2017
    Posts:
    11
    As usual, fix unity bugs by unplugging and turning back on again (closing and restarting Unity)
     
  25. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, so it was just a mix up. It says it's an override controller, but it's definitely not the old style override controller as seen in your screenshot. So all should be good as far as that is concerned.
     
  26. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    is there is any way to make the AI cant see the player for example if the player throw smoke grenade or in dust storm ??!!
     
  27. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Change the players layer while in the triggered area? Or tag, or set vision distance to like 1 or something on npc?
     
  28. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414

    Haha is it too early to get a timeframe for 2.2.2?
     
  29. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    @BHS I see there will be Final IK intergration, I have allready implementented the grounder IK solution, but theres alot more cool stuff that need to be intergrated, like puppetmaster death scenarios (when AI dies the physics takes over) and if theres an explosion the AI flies back of the impact.. And other stuff in the puppetmaster package like, AI trips, if it rum into an object it falls , and that kind of stuff... Basically Emerald AI need to pause all movement descisions and waypoint creation to have the puppetmaster take over and then when the AI gets back up it continues what it was ment doing.. you feel me? I get back to you when I have something cool going on maybe you could help with the final steps :)
     
  30. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    133
    Hi.

    Are there any way to change "Follower Tag"?
    I want to change the status that follow or unfollow.

    I tried the code below, but I don't know how to use it and got error.
    CurrentEmeraldSystem.UpdateTargetTags("Ally","Enemy",null,null,null,null);
    http://www.blackhorizonstudios.com/docs/emerald-script-reference/functions/updatetargettags/

    using EmeraldAI;
    using EmeraldAI.Utility;

    CurrentEmeraldSystem.UpdateTargetTags("Player","untagged",null,null,null,null);

    (Does it need "null"?)
     
  31. AaronVictoria

    AaronVictoria

    Joined:
    Aug 21, 2010
    Posts:
    176
    Just thought I share a suggestion with you here. When using the stop and start functions for AI behavior, please consider adding a special Turn-To-Face method for AI behavior. I've been working a coding contract on a project that uses EmeraldAI, and I had to do a rather lengthy and evasive behavior to override the default animation behavior being triggered by turning the character to face the player after stopping an AI. I had the team change the animator controller's flow initially so that I didn't have to include such a lengthy method of avoidance, but they found that it broke the animation functionality of the tool afterwards.

    Currently upon rotating the character's root object, the EmeraldAI system starts to fallback through various transitions since it fails to reach the idle state as expected. It either falls into a transition for rotate left or rotate right if the AI is stopped during its walk cycle and rotated before it can reach the idle trigger. Note that as long as AI root is not rotated after the abrupt stop, the trigger will signal the transition to idle, but the AI won't be facing the player. To work around this, I dynamically add an override controller to the animator that plays a rotation animations while leaving the AI facing their actual forward vector. So the player is seeing a faked rotation of the AI through animations.

    Just something to consider adding since editing the animator controller isn't the best method for maintaining continuity with the tool.
     
    mattis89 likes this.
  32. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Have found a way to get rid of all my Animation Event problems with some animations using this Animation converter https://assetstore.unity.com/packages/tools/animation/animation-converter-107688 . Converted the problematic anims to legacy and then back to generic. Now all Animation Events working fine.
     
  33. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Mad_Mark wrote:

    4) When the AI who has a melee attack only, launches an attack and the player moves away, the damage event is called, even though the player is out of range. He still receives damage. Looks odd. I could compensate for this I guess by speeding up the animation. Is there another way around this?

    Having the same problem using RFPS. My player runs some meters away and get still attacked until the the attack animation ends.

    And another problem: My Zombie AI is spawning a medikit after death through an event. This works fine, but the medikit is disappearing after some seconds. How can i change this ?
     
    Last edited: Apr 14, 2019
  34. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    315
    @unicat Does the medikit disappear at the same time your zombie is destroyed? It may be being spawned as a child of the zombie and so is being removed along with it. We also could do with an option for dead Emerald creatures to never disappear.
     
  35. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    No, the zombie doesn`t remove, only the medikit.
     
  36. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    If you copied the Emerald AI component from another AI, this would most likely be why you're having issues because it's referencing a different transform for the AI's head and the previous AI's ranged transform. If you need a way to copy an AI's component from one AI to another, given that they have the same animations and rigging, I have a tool that can do this. If you're interested, let me know and I'll PM you it.
     
  37. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'm hoping to have it submitted by the end of them month. :)
     
  38. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey there,

    That API is outdated. If you want to update the follower tag, just get a reference to the AI's Emerald AI component and change it with something like this:
    GetComponent<EmeraldAI.EmeraldAISystem>().FollowTag = "unfollow";
     
    combatsheep likes this.
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey there,

    Thanks for the suggestion and information regarding this. I can certainly improve this and add a function that will rotate towards a designated target. To clarify, this is during non-combat interaction, correct?
     
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Great to hear you found a solution and that everything is working correctly.
     
  41. AaronVictoria

    AaronVictoria

    Joined:
    Aug 21, 2010
    Posts:
    176
    @BHS give me a few minutes, I'll revert to my original solution and get you a video.
     
  42. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I have a fix for this ranged detection issue with version 2.2.2.

    This is most likely Emerald AI's object pooling. When creating an object with the built-in functions, they use object pooling which means they get disabled after about 3 seconds by default. For a temporary fix, add a EmeraldAIProjectileTimeout script to your medkit and set the timeout seconds to something really high so it doesn't disappear. I can add a non-object pool function with the 2.2.2 update.
     
  43. AaronVictoria

    AaronVictoria

    Joined:
    Aug 21, 2010
    Posts:
    176
    @BHS there you go:



    This is turning the absolute root while in motion. You can see it falls into the rotate state in the video.
     
  44. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    When will 2.3 be done? :)
     
  45. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Great, thanks.
     
  46. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    133
    Hi, BHS.
    Thank you!
    I'll try it.
     
  47. ThePaceMaker

    ThePaceMaker

    Joined:
    Dec 18, 2016
    Posts:
    7
    Hey guys, tried messaging you and emailing you but no reply?
    I Have used Emerald many times and never had any issues really, absolutely love it!!. Im currently using invector integration all tutorials worked fine and I am on unity 2018 3.8. I have an issue upon using the setup manager where after I click setup AI at the end of the process I am getting prefab instances error, top of the code Is below, ive messaged you the full error, if you could possibly assist It would be appreciated.

    ArgumentException: UnpackPrefabInstance must be called with a Prefab instance.
    UnityEditor.PrefabUtility.UnpackPrefabInstance (UnityEngine.GameObject instanceRoot, UnityEditor.PrefabUnpackMode unpackMode, UnityEditor.InteractionMode action) (at C:/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:1531)
    EmeraldAI.Utility.EmeraldAISetupManager.OnGUI () (at Assets/Emerald AI/Scripts/Editor/EmeraldAISetupManager.cs:155)
     
  48. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Hi, my zombie ai sometimes looses his tag(from Flesh to Untagged) and layer(from NPCs to Default) in playmode. The most time it is, if he is fighting with another ai. Is this an emerald or unity issue ? Thanks.
     
  49. Dionysos1111

    Dionysos1111

    Joined:
    Feb 14, 2016
    Posts:
    39
    Hi,

    Is there en event to play PlayRunAttackSound()
    I would like to play another sound when the runattack is used then the normal attack sounds.
    Would also be nice if you can choose which sounds goes with which attack animation.
     
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for providing a video. I will look into a solution to resolve this.
     
    AaronVictoria likes this.