Search Unity

[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. collins777c

    collins777c

    Joined:
    Apr 6, 2016
    Posts:
    3
    It would be nice to have the choice. For me, it's okay if you can stun lock the enemy since the player would have to deal with multiply enemies simultaneously. With the animation only playing sometimes, it feels off instead of intentional.

    Another nice alternative would be if you could implement an option for knockback, that way the enemy would have the chance to recover before you could move in for another attack.
     
  2. TJQ

    TJQ

    Joined:
    Jun 16, 2013
    Posts:
    33
    does anyone else have issues with their ai sometimes being up in the air? still moving correctly but their bodies will be up in the air and when they attack or you attack them they instantly appear on the ground again like they are supposed to? this happens randomly and for not reason that i can find. any help appreciated. thanks!
     
  3. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Try the following:
    • Turn on the Debugging Tools to make sure there are not obstructions and that the AI is functioning correctly: https://github.com/Black-Horizon-St...-AI's-Debug-Tools#enabling-an-ais-debug-tools
    • Ensure your AI is using the Humanoid Animation Type.
    • Increase the AI's Angle to Fire (located under AI's Settings>Damage Settings>Combat)
    • Decrease the AI's Combat Turning Angle (located under AI's Settings>Movement>Turn Settings)
     
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Alright, I can certainly look into this for a future update.
     
    Pixelith likes this.
  5. Pixelith

    Pixelith

    Joined:
    Jun 24, 2014
    Posts:
    577
    I would also appreciate built in knockback and stun-locks. I wanted to use Emerald for my Dynasty Warriors clone but it's been a little difficult to build these features in myself since I'm not too familiar Emerald AI to begin with.

    If another person recommending helps push features up the list :)
     
  6. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @BHS Since sound detection isn't out yet, will straifing be place into this update as well?
     
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    It sounds like either you are missing animations or that the animations you applied are not compatible with the model.
     
  8. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Sure thing :)

    I have stuns planned, which may make it into the Sound Detection update.
     
    iChuy and Pixelith like this.
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    No, strafing will be the next update.

    The Sound Detection system is modular so it took a little longer than expected, but I'm wrapping things up and I'm hoping to have it released soon.
     
    Last edited: Jul 12, 2022
    julianr, Pixelith and Willbkool_FPCS like this.
  10. startfromzero

    startfromzero

    Joined:
    Aug 28, 2021
    Posts:
    23
    @BHS How to make the newborn enemy AI chase the player without seeing him?
     
  11. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
  12. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Any chance you can combine stats & strafing in the next update?
     
  13. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Hi, really awesome package. How do I get the examples to work with URP? I'm on 2021.3 LTS URP. Tried upgrading using unity's built-in to URP within unity and it works for other assets but not this one.

    All of the shaders that belong to EmeraldAI in the custom folder didn't get converted.

    Cheers
     

    Attached Files:

    Last edited: Jul 22, 2022
  14. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    Only the Unity Standard shader is converted automatically. all the rest, you have to replace yourself. With URP, you can use Shadergraph, so you can create shaders without shader programming.
     
  15. FreddyNewton

    FreddyNewton

    Joined:
    Oct 23, 2018
    Posts:
    6
    Hey i get all the time a NullRefException - does somebody know why upload_2022-8-2_19-47-51.png
     
  16. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    It looks like you're missing the AI Main Renderer for the optimization feature. This should have been automatically assigned when setting up your AI though the Emerald AI Setup Manager. To fix it, go to AI's Settings>Optimization and assign your AI's main Skinned Mesh Renderer or set the Disable When Off-Screen setting to No to disable this feature.
     
  17. netaliev97

    netaliev97

    Joined:
    Jan 5, 2020
    Posts:
    8
    Good time of the day, tell me how to reduce the sound of an enemy shot
     
  18. bluemanD

    bluemanD

    Joined:
    Dec 10, 2017
    Posts:
    3
    Quick question. How would you check to see if a game object, like the player, is currently in an AI's line of sight?
     
  19. ZenWayne

    ZenWayne

    Joined:
    May 8, 2020
    Posts:
    18
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    You should be able to so do through the enemy's Ability Object.
     
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    The line of sight is only used for combat. Once a target is within the AI's line of sight and it has been seen, it will become the AI's current target. Are you asking how to check if a target is within the AI's line of sight and is currently obstructed?
     
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
  23. bluemanD

    bluemanD

    Joined:
    Dec 10, 2017
    Posts:
    3
    Yes that is what I meant. Sorry I wasn't very clear. I'm trying to make a hiding system and want to check if the AI can see the player when the player hides.
     
  24. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    No worries.

    If the AI has already seen the target, but it is currently obstructed, then you just check the TargetObstructed variable within the EmeraldAISystem of that AI.
     
    bluemanD likes this.
  25. BHS

    BHS

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

    Emerald AI's Sound Detection update (v3.2) is now live!

    The Sound Detector is an external component that gives AI the ability to hear unseen targets. When player targets enter an AI's Detection Radius, their movement and velocity are tracked to simulate noise levels. If a player is moving fast enough, it will increase an AI's Threat Amount which will trigger a list of modular user set reactions. Users can also add Attract Modifiers to object that make noise to trigger additional reactions.

    Modular Reaction Object
    68747470733a2f2f692e696d6775722e636f6d2f6c6659466656362e706e67.png

    Attract Modifier
    68747470733a2f2f692e696d6775722e636f6d2f4f4f416d3277742e706e67.png

    This video shows AI that can detect noises the player makes from movement and other collision based objects like the arrows, stones, and traps (as shown in the video). All of an AI's reactions are from a modular system that can be customized by the user through Reaction Objects. The purpose of this demo is to showcase Emerald AI's sound detection features in a game-like environment with an implemented character controller (This demo uses the (STP) Survival Template PRO asset).



    3.2 Release Notes
    • Added Sound Detection features. For a detailed break down of this, see the Sound Detector Section of the Emerald AI Wiki.
    • Added 4 new example scenes. Three that showcase the new Sound Detection features and one that shows the improvements made to close waypoint movement.
    • Added a custom solution for movement turning instead of relying on the Unity NavMesh agent's angularSpeed. The default values are slightly faster than the previous default values, but this custom solution allows for much quicker and reliable. For those who need it, the values can be increased even higher to closely follow paths and waypoints.
    • Added a simple top down character controller for further demonstrating player and AI interaction.
    • Fixed a bug that didn't properly remove a target from the AI's Line of Sight targets list if it wasn't within the AI's detection radius.
    • Fixed a bug that didn't allow an AI's Debug Tool current target line to draw properly when using the Ranged Weapon Type.
    • Fixed a bug that didn't allow AI using Location Based Damage to reset properly after being killed and reused.
    • Fixed a bug that didn't create a droppable weapon, when an AI died, more than once.
    • Fixed a bug that left an AI's holstered weapon disabled when an AI was reset.
    • Improved the way AI follow waypoints allowing them to better follow their paths and points. This improvement can be seen even more by increasing the movement turn speeds values.
    • Improved the EmeraldAIPlayerDamage so the create the combat text position comes from the Target Position Modifier position instead of the base of the player's transform, given that there is a Target Position Modifier attached.
    • Renamed MovingTurningSpeedNonCombat to MovingTurnSpeedNonCombat.
    • Renamed MovingTurningSpeedCombat to MovingTurnSpeedCombat.
    • Note: If you want the Reaction Object examples without importing all the demo files, you can just import the Emerald AI>Demo>Demo Source>Example Reactions folder.
     
    Last edited: Aug 12, 2022
  26. bluemanD

    bluemanD

    Joined:
    Dec 10, 2017
    Posts:
    3
    Thank you so much!!! I went and tested it and that is exactly what I was looking for!
     
    Last edited: Aug 8, 2022
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    You’re welcome, happy to hear it worked.
     
    bluemanD likes this.
  28. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Awesome work on this. Much needed - thanks!
     
  29. nicew

    nicew

    Joined:
    Sep 6, 2014
    Posts:
    5
    Hi any update on this?. or can you at least at a tutorial or just a general guideline?. Thanks!
     
  30. adifrank

    adifrank

    Joined:
    Dec 11, 2017
    Posts:
    26
    @BHS Can you make option on waypoints so that on certain waypoints AI can perform certain action?
     
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I’ll look into this sometime this week for you.
     
    ImminentWaffle, shyamarama and nicew like this.
  32. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Would a UnityEvent that’s invoked with each waypoint arrival be helpful? I could add this to the Events tab with the next update.
     
    bluemanD likes this.
  33. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @BHS Any luck with Strafing and Stats?
     
  34. bholland

    bholland

    Joined:
    Mar 24, 2017
    Posts:
    28
    @BHS Great asset. I'm running into an issue with multiple ranged npc. If I create an npc and make a prefab out of him, then place multiple of them in the scene, only one will shoot at me, the other will point but never fire. Any idea why this is happening?

    If I'm using a melee npc then they will all attack at the same time without the need to assign different animation controllers.

    I know there are not coliders in the way, I've duplicated it on a plan.
     
    Last edited: Aug 27, 2022
  35. netaliev97

    netaliev97

    Joined:
    Jan 5, 2020
    Posts:
    8
    1)Good day, how can I make sound control NPC,Enemy through AudioMixer
    2)I have a 2.5D game, how can I make Enemy move along one axis Z
    3)how to make it so that when a bullet hits a player, the blood effect works, it does not turn on for other objects
     
  36. adifrank

    adifrank

    Joined:
    Dec 11, 2017
    Posts:
    26
    Yeah that would be very helpful.
     
  37. ImminentWaffle

    ImminentWaffle

    Joined:
    Oct 19, 2013
    Posts:
    7
    Did you ever hear anything back on this?
     
    iChuy likes this.
  38. JanDawid

    JanDawid

    Joined:
    Jul 7, 2014
    Posts:
    283
    Adding Waypoints on the Waypoint Editor doesn't create any in the scene. It adds some entries to a list on the Emerald AI System component, but there are no links to any in-scene objs. I had a look at the code for the Editor script and it doesn't look like it actually even creates any physical objects.
     
  39. nicew

    nicew

    Joined:
    Sep 6, 2014
    Posts:
    5
    No
     
  40. ImminentWaffle

    ImminentWaffle

    Joined:
    Oct 19, 2013
    Posts:
    7
    Any new news on this? Thanks!
     
  41. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    222
    @BHS Projectiles have a "High Quality Collisions" option that turns on Continuous Collision Detection, but this doesn't work because the projectiles use Trigger colliders and Trigger colliders never use CCD.
     
  42. the_unity_saga

    the_unity_saga

    Joined:
    Sep 17, 2016
    Posts:
    268
    hello

    how would we use this with Crux to make persistently spawned animals that I can save and load?

    what API should I look at to edit or what scripts to extend?
     
  43. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Hello

    I tried to use "Emerald Event Component.Stop Movement()" but the npc still continue the movement.
    what can be happening? (is a root motion animation) the code enter the funtion and disable "EmeraldComponent.m_NavMeshAgent.isStopped"

    Thanks

    Claudo
     
  44. Waqas123

    Waqas123

    Joined:
    Jul 21, 2017
    Posts:
    2
    Hello
    I am using it with Invector 3rd person controller. I have set a damage amount in vObjectDamage script of invector which is attached to player. But when i hit an AI the amount deducts from the emerald AI is not the same. How do i damage the AI from vobjectDamages's damage value. Thanks
     
  45. AGaming

    AGaming

    Joined:
    Dec 26, 2013
    Posts:
    103
    Bought and very disappointed. If you are using AI for a shooter. This is not what you are looking for. They don't maneuver. Do not try to get around or hide behind cover. They, like robots, stand at one point and fire, as they consider this place to be the player's direct line of sight.
     
    ImminentWaffle likes this.
  46. AGaming

    AGaming

    Joined:
    Dec 26, 2013
    Posts:
    103
    How to make the AI notify its faction that the enemy is nearby. Since even if there are two AIs nearby and I hit one of them, the second one does not react in any way. And continues to stand on.
     
  47. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    302
    Need some idea's i seem to have a EAI target issue since 3.2,,
    If the player attacks the EAI unit first, then EAI will target the "weapon" not the player.
    If i let the EAI detect and attack the player, it works as it should.

    Yes, i did check layers and confirmed the weapon is NOT on a "detectable" layer, and the player is.

    I need some advice on how to troubleshoot this issue? or if anyone has an idea, the only enemy for the EAI in this project will be the player, nothing else i am wondering if i can force it to always "only" target the player.

    Screenshot: (red boxes represent player, greenish represent weapon.) upload_2022-10-5_23-0-28.png

    Video showing the issue:


    Any help or suggestions would be appriciated, Thanks.
     
  48. AsoraX

    AsoraX

    Joined:
    May 3, 2017
    Posts:
    22

    Dose anyone know, if theres a solution for this?
     
  49. GamePowerNetwork

    GamePowerNetwork

    Joined:
    Sep 23, 2012
    Posts:
    257
    How can I fully turn off the Emerald AI UI system. Currently if I turn combat text off... UI is still being added to the scene and using resources.
     
  50. WoodsFiend

    WoodsFiend

    Joined:
    Oct 2, 2017
    Posts:
    10
    Free script to use if anyone is interested in a solution to integrate A* Pathfinding with Emerald AI. I find the pathing speed is way faster, over 100 units path across a huge map will move almost instantly with very little optimization.

    It requires some minor changes to Emerald AI system:
    - Changing the m_NavMeshAgent type in EmeraldAISystem.cs to AstarNavMeshAgent
    - Changing the GetComponent() for m_NavMeshAgent in EmeraldAIInitializer.cs to AstarNavMeshAgent
    - Modify the calls and handling the result of CalculatePath() to support astar path results. Should just be 2 scripts that need changes: EmeraldAIDetection.cs, EmeraldAISystem.cs

    Then just drag and drop the script on your existing emerald units with NavAgents, bake astar nav mesh and it is good to go. Hopes this helps someone, maybe the dev can integrate with conditionals :)
     

    Attached Files:

    Zaddo likes this.