Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[50% OFF] 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. ImminentWaffle

    ImminentWaffle

    Joined:
    Oct 19, 2013
    Posts:
    7
    No light detection like that in this asset. There was some sound detection added some time ago. Might be able to use that as an example of how to do light detection? Probably wait until the next major release, which involved a major refactoring to make adding your own behaviors easier; supposed to be out by end of month.
     
  2. GameRevenant

    GameRevenant

    Joined:
    Sep 7, 2018
    Posts:
    2
    Thanks so much! Good point - if sound detection was just implemented, light is probably somewhere on the backlog. I'll see what I can hack together for the time being with the hope of implementing a better system later.
     
    ImminentWaffle likes this.
  3. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    HI! Emerald ai integration survival template pro. mi help do not item droped to dead animals..
     
  4. Stigym

    Stigym

    Joined:
    Mar 31, 2022
    Posts:
    7
    meanwhile I sent you the project file, I hope it's just a single setting to change. Thanks again
     
  5. salientpl

    salientpl

    Joined:
    Apr 21, 2023
    Posts:
    2
    I have a problem and would appreciate help. I'm using Emerald AI and I want to set up a trap for the player. The idea is pretty simple - I want to start an animation (let's say a brick falling down) and I'd like to create some Animation Events in this animation that would refer to Emerald AI to provide damage (decrease health) to the player. So something like a melee weapon, but without all the things related to AI. Did anyone tried this or has a script that works and you just add it to your object, add animation events, how much health it takes from the player and voila? ;)
     
  6. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    HI! how to set up AI to damage and destroy building structure?
     
  7. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    27
    @BHS will emerald 2023 going to have multi threading support for ai using (job system and burst)??
     
    unity_0JCf0BEYAnGSnw likes this.
  8. Loki18000

    Loki18000

    Joined:
    Apr 1, 2015
    Posts:
    75
    Hello,
    I'm having an issue with the AI. I have the AI set to Cautious, Coward and wander type set to Dynamic but when they come in contact with an enemy they just stand still and not move. They're supposed to flee but don't seem to want too.

    They can move around the level fine so there is no issue with the Nav. Not sure what could be causing it.

    Odd, I took another look at an Example Scene and I came back to my scene and it is now working.

    Thank you.
     
  9. netaliev97

    netaliev97

    Joined:
    Jan 5, 2020
    Posts:
    8
    Has anyone encountered such a problem, AI does not cause damage to each other in long-range attacks, I thought that this was only in my project. Looked at the demo range scenes the same situation. Version 3.2.1 tell me how to fix it. In melee combat, everything is fine.But I noticed that when an AI takes damage and defends itself, it can damage another Ai
    ----------------------------------------
    I solved this problem, you need to specify the same names for all AI in the tag and layer
     
    Last edited: Aug 12, 2023
  10. Destystar

    Destystar

    Joined:
    Jul 4, 2021
    Posts:
    4
    Hello,
    I have encountered a problem with the AI. The AI doesn't do damage to the player if the player damaged the AI before it detected it. They do damage to the player regularly as in if it they detected the player first. Any help would be appreciated.
     
  11. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    Hellow guys.. please emerald ai 3.0 drop items on enemi dead?
     
  12. Acreates

    Acreates

    Joined:
    Dec 12, 2016
    Posts:
    41
    Hello from the future. I have this same issue right now using HQFPS. It worked fine with Unity's default controller. However the HQFPS controller looks set up properly. There's a hitbox and everything, it's 2meters tall. But the AI aims at the feet. Any help would be appreciated.
     
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    If the target is your player, it sounds like you need to add a Target Position Modifier component to it: https://github.com/Black-Horizon-St...n-Modifier#using-the-target-position-modifier

    If your target is another AI, ensure that your tags and factions are set up correctly . Also, make sure the faction is set to Enemy.
     
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    No, but it’s something I can look into after Emerald AI 2023 is released.
     
    timerace likes this.
  15. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    Does your player have a Target Position Modifier on it?
     
  16. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    27
    Will you release the update this month?
     
    Ravl likes this.
  17. Tang-Bo

    Tang-Bo

    Joined:
    Oct 24, 2015
    Posts:
    4
    I've also been waiting for the new Emerald AI, when exactly will it be released
     
    Ravl and nordegraph like this.
  18. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    I'm working hard on getting it done as soon as possible. I'm just adding the last few included abilities and then finishing up a few other features. It shouldn't be longer than one or two more weeks. I can assure everyone it will be well worth the wait :)
     
    SickaGamer, julianr, timerace and 3 others like this.
  19. ganzsergi

    ganzsergi

    Joined:
    Mar 27, 2022
    Posts:
    13
    @BHS

    Hello!

    Thank you very much for your work, the more I study Emerald AI, the more I am surprised. Especially how beautifully the Emerald AI code is written, which allows it to be slightly modified to suit my needs.
    Three questions:
    1) - in the manual, the magic support section, it says that this branch of magic will be further developed in the future. I hope so, a simple mass heal is sorely lacking. The branch seems to be very deprived in terms of features.

    2) - about more animations. I really want more than one blocking animation, will there be improvements in this direction?

    3) - I did not find it in the script, can you tell me - how to make animation for AI when it
    taking damage permanently. Now it is produced randomly.
     
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    The new version will be even easier to modify with custom behaviors, combat actions, and abilities.

    1) Yes, the new version will have 10 categories of abilities that you can further modify through modules to suit your needs (grenades, aerial projectiles, healing, ground projectiles, AOEs, summoning, teleporting, and more are all possible). A group healing ability will be provided as well. Users can also customize abilities by coding their own by creating scripts that derive from the EmeraldAbilityObject class.

    2) The new version allows for a blocking idle and blocking impact animation for each weapon type. I have also expanded the attack animation cap to 12 for each weapon type, which is doubled from the current version of 6. Are you wanting more block impact animations or block idle animations?

    3) The new version will store the index of the current hit animation and play them in order so you won't have hit animations sometimes repeating (like they do currently). It will also allow you to control the minimum time needed to play another hit animation so you don't have too many playing within a very short amount of time. Lastly, you will be able to customize which states will allow a hit animation to trigger.
     
    Last edited: Aug 27, 2023
    Revelation_Jeff likes this.
  21. ganzsergi

    ganzsergi

    Joined:
    Mar 27, 2022
    Posts:
    13
    @BHS
    Thanks for the answer.

    About (1) - this is great news. I'm looking forward to the update.
    Regarding (2) - I mean it's about idle blocking. For example, I use it as a dodge for AI. Different types of this type of animation, played in random, would give visual dynamics to the battle.

    And another question, already in terms of performance. What would you advise to increase FPS for Emerald AI.
    For example, if there are 20-26 Emerald AI agents on the Scene, the FPS is about 90-100. If there are about 150 agents on the Scene, the FPS is already close to 18-23. In doing so, I use very low-poly character models, without environments.
    Ideally, for my needs, there should be about 800-900 agents working at the same time in the huge Scene (example 1000 x 1000 meters).

    What can advise that would at least slightly increase productivity? Perhaps there are third-party Assets that can help with this? Or is it a feature of the system and nothing can be done about it?
     
    Last edited: Aug 25, 2023
  22. unity_0JCf0BEYAnGSnw

    unity_0JCf0BEYAnGSnw

    Joined:
    Feb 7, 2020
    Posts:
    10
    Hi there!
    I have a couple of small questions!

    1) If I understand correctly, the modular system provides more opportunities for maneuvering. That is, I will be able to disable IK and integrate other assets, for example:
    * Legs Animator
    * Leaning Animator

    Also, will there be full integration with Puppet Master and Final IK?

    2) Another point, will there be any perks for VR? I would like to see integration with Hurricane VR. That is, to be able to create something similar to Blade and Sorcery or HELLSPLIT Arena.
    Thank you!
     
    Ronnocshanks likes this.
  23. PixelAmp

    PixelAmp

    Joined:
    Feb 25, 2013
    Posts:
    11
    Hello!

    So far I am really enjoying how Emerald is integrated into Unity. But I am running into an issue when going through the Creating a New AI documentation. Everything looks good... no errors, but when I start the project, the AI that I added to a simple plane with a baked nav mesh is nowhere to be seen.

    Any ideas as to what might be causing that?

    TIA!
     
  24. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    141
    @BHS Also, please make the shooting abilities/animations maskable so that the shoot function/abilities can be done WHILE moving, instead of requiring a AI to be in range, stop and shoot. Targets now can't even backup and shoot which is a bit silly That's one of my requests =P
     
  25. Ategian

    Ategian

    Joined:
    Mar 15, 2015
    Posts:
    4
    Hello, i found a little bug where the AI loses its current attacker when damaged by a DoT Ability.
    Its because in EmeraldAISystem.Damage there is no "null check" on line ~2277.
    i changed it to:
    Code (CSharp):
    1. if (AggroActionRef == AggroAction.LastAttacker && AttackerTransform != CurrentTarget && AttackerTransform != null)
    and now it works. Please add it to the next update.
    Have a nice day
     
  26. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,267
    Any updates on the release?!
     
    Ravl likes this.
  27. Tang-Bo

    Tang-Bo

    Joined:
    Oct 24, 2015
    Posts:
    4
    It's already September, any progress on the new version so far?
     
    Ravl likes this.
  28. BHS

    BHS

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

    The update is going well and I apologize that I'm a little behind schedule. I want the release of this new version to go well and without issues. I'm doing this by prioritizing quality and bug fixes over releasing this earlier then I feel like it's where it needs to be. With that being said, I am at the last stage of finalizing everything. I'm also simultaneously working on the new Wiki, which is on an entirely new website so there's a lot to do with that as well. Since my previous ETAs are often wrong, I will just say it's going to be released "soon", which will at most be a few more weeks.

    While most of this status update focuses on abilities, the overall improvements made apply to animal AI was well. Many features have been improved to allow AI to move much better and better transition between states. The animator controller has been completely redone and improved. I also plan on adding the breeding system back with a future update as an optional component.

    Modular Abilities
    Emerald AI's new ability system is modular and allows users to modify various modules to help create many different kinds of abilities, spells, attacks, and more. There will be 10 included ability categories with more coming with future updates (not all are covered with this status update and shooter AI abilities like grenades and bullets will also be included). All users have to do is supply their own particle effects and Emerald AI will handle everything else through its ability editors. Tooltips within the ability editors will explain every setting. Users can also program their own abilities by either using some of the included modules or by creating their own entirely. My goal for all this is to allow users to create complex boss and combat AI as well as simple animal AI (and everything in between) and only using the components they need.

    *AI are simplified in these examples to showcase the abilities. See my post here for a simple example on AI utilizing block, strafe, and dodge.

    Melee Abilities allow AI to deal close range damage and work with the optional Weapon Collisions component.


    Weapon Collisions are used through Animation Events for setting when a Weapon Collision should be active. A weapon's collider is adjustable through a box collide on the weapon object. This can also be used for attacks like an AI hitting their targets with their bodies or a charge attack.


    General Projectile Abilities are projectiles that have many uses and settings. These can range from straight shooting projectiles to a whole circle of homing projectiles.


    Ground Projectile Abilities are projectiles that travel along the ground and can even traverse over angled terrain and objects. The angles and layers for this are customizable. There's also a kill angle to give more control over where the projectiles can go.


    Aerial Projectile Abilities are projectiles that spawn from above the caster or a target. A single projectile can be used or it can be used to create a barrage of projectiles.




    Arrow Projectile Abilities are simply just projectiles that move towards the AI's current target with the option to stick into the bones that were hit.

    Area of Effect Abilities that affect multiple targets within an area.


    Teleporting Abilities allow AI to teleport randomly within a target's area. The length the AI takes to reappear can also be customized as well as many effect and delay options.


    Ability combinations are possible through an AI's EmeraldAttackEvent animation event. The below gif shows an example of projectile> projectile>teleport>AOE all using a single animation clip.
     
    Last edited: Sep 9, 2023
  29. iChuy

    iChuy

    Joined:
    Aug 26, 2017
    Posts:
    6
    Wow, amazing
     
    Last edited: Sep 9, 2023
  30. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    175
    Is there any progress on ai strafing around the target? Without that ai look dumb standing at one place, also not trying to save itself from attack. In modular abilities system could be easy for us to add that ourselves.
     
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    Yes, strafing is already implemented. The AI in the status update were simplified to focus on showcasing the abilities (I'm also limited with the gif sizes). AI can strafe, dodge in 3 directions (dash or sidestep as well depending on the supplied animations), block, recoil, and more. AI are capable of functioning more souls-like (if that's something you're interested in), but it just depends on the animations used. I will be covering how to create souls-like AI (as well as boss-like AI) with tutorials after release.

    I can only do gifs at the moment, but here's a quick example of AI utilizing these features:
    Strafing Grainy.gif

    Here's the strafe action object. At the moment, it's limited to strafing within the AI's attack distance, but I may add another action that allows the distance to be customizable.
    StrafeAction.png
     
    Last edited: Sep 9, 2023
  32. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,267
    Thanks for keeping us informed! Can't wait to see it in action. Will this change the integrations such as RFPS, Invector ect...
     
  33. unity_0JCf0BEYAnGSnw

    unity_0JCf0BEYAnGSnw

    Joined:
    Feb 7, 2020
    Posts:
    10


    Hi again! Can you answer this question?
    • Dynamic Block
    • Reaction to Hit (Integration with Puppet Master)
    • Stopping animation upon collision (for example, the sword hit the collider - reaction)
    In other words, more of the physical stuff that is now commonly used in creating AI for VR.

    And will there be civilian AI? Where you can set up a schedule of actions and so on
     
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    Yes, it will change integrations, but for the better. All that’s needed is two interfaces; IDamageable and ICombat. These allow Emerald AI to communicate with any character controller without relying on a specific script. I will be supplying all the integration scripts I can. However, some of them may have to come after the initial release as my focus is getting the new version released.
     
    julianr, iChuy and SickaGamer like this.
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    1) Yes, the Emerald IK component is completely optional and doesn’t even have to be on an AI. You should be able to integrate other assets in its place.

    2) Yes, there’s an included dynamic blocking that allows AI to detect a target’s attacks and attempt to block them. Emerald’s IK system allows you to add any bones you want. So a shield or weapon can be used to better aim towards their current target. However, if you are using your own IK system, you would need to implement it yourself.

    3) Yes, I have plans for Final IK and PuppetMaster after the release of the new version. However, I also have plans to add foot and legs IK to the Emerald IK component with a future update.

    4) Yes, I have plans to add a schedule system with customizable schedule actions, done through an optional component, with a future update.
     
    MorpheusXI and julianr like this.
  36. DatmosPro

    DatmosPro

    Joined:
    Dec 25, 2018
    Posts:
    3
    Hi, i'm having a problem. I have two creatures attacking each other, but they are not hurting each other. Never die, and does not appear any damage text. Y checked every single option comparing with the Patrolling Scene example, and is like in this example, but my creatures does not hurt each other. Any idea?
     
  37. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    Hey there. Did you create EmeraldAttackEvents for your AI’s attack animations?
     
  38. ganzsergi

    ganzsergi

    Joined:
    Mar 27, 2022
    Posts:
    13
    Wow! Honestly, now your AI is more similar to the AI from Dragon Dogma. (in my opinion the best combat AI at this moment in games).

    Question about optimization - will there be any new improvements or can you tell me how to fit a large number of AI on one stage? Perhaps there are third-party assets? (without turning off the AI itself if it is out of the camera's field of view)
     
  39. amindler

    amindler

    Joined:
    May 21, 2010
    Posts:
    19
    Hi! I'm having an odd problem where I can't get the health bars to show up. It won't let me select UI Layer other than default for some reason and the health bars don't show up. For some reason if I try and select any other UI Layer, it just doesn't work. Any idea what I could be missing here? Thanks
     
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    Great to hear you're liking the direction of the new Emerald AI version.

    How many AI do you plan on having on screen at a time? One way things can be optimized further is to use Unity's Job System and Burst to allow for multithreading support. However, I'm not sure how complicated this will be to integrate as it requires refactoring code. I know of a few users who have done this in the past.
     
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    I think there may be a bug with certain versions of Unity. What version of Unity are you using?

    Try the following:

    Within the EmeraldAIEditor script, find the line:
    Code (CSharp):
    1. var layersSelectionUI = EditorGUILayout.MaskField("UI Layers", LayerMaskToField(UILayerMaskProp.intValue), InternalEditorUtility.layers);
    Change this entire sections from (you can just comment this out or remove it):
    Code (CSharp):
    1. EditorGUI.BeginChangeCheck();
    2. var layersSelectionUI = EditorGUILayout.MaskField("UI Layers", LayerMaskToField(UILayerMaskProp.intValue), InternalEditorUtility.layers);
    3. CustomHelpLabelField("The UI Layers controls what layers this AI will detect to enable the their UI, if the object also has the appropriate UI Tag. This is typically used for players.", false);
    4. if (EditorGUI.EndChangeCheck())
    5. {
    6.    Undo.RecordObject(self, "Layers changed");
    7.    UILayerMaskProp.intValue = FieldToLayerMask(layersSelectionUI);
    8. }
    To:
    Code (CSharp):
    1. EditorGUILayout.PropertyField(UILayerMaskProp, new GUIContent("UI Layers"));
    2. CustomHelpLabelField("The UI Layers controls what layers this AI will detect to enable the their UI, if the object also has the appropriate UI Tag. This is typically used for players.", false);
    Be sure to save the changes when you’re done.
     
  42. ganzsergi

    ganzsergi

    Joined:
    Mar 27, 2022
    Posts:
    13
    @BHS 400-500 AI in one Scene. About Unity's Job System and Burst is interesting point to start. Thanks :)
     
  43. Realgar

    Realgar

    Joined:
    Sep 30, 2012
    Posts:
    52
    Hi, I use Emerald 3 with STP, and I have a small problem, in the editor I see the Health Bar UI of my AI correctly always facing the camera, but in the build, the UI Health Bar is not facing the camera, it stay above the AI and rotates with him (and also it doesn't decrease when the bear have dammage) ! It must be a tag or layer problem, or a camera problem but I don't understand which one ! I hope I have set correctly the right tags and layer (Camera Tag : MainCamera, UI Tag : Player UI Layers : Character). The fact that it works in the editor and not in the build doesn't make things easier ! Perhaps The asset take a camera in the editor but it's not the same in the build... Thank you very much if you have any ideas ! I just tried without success what you said to Amindler with EmeraldAIEditor.cs...
     
    Last edited: Sep 14, 2023
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    That sounds like a strange issue. I own STP so I’ll look into this to see if I can recreate your issue and find a solution.

    You mentioned you tried the above code replacement and it didn’t work? We’re you having the same issue as amindler where you can’t properly select the UI layer?
     
  45. Realgar

    Realgar

    Joined:
    Sep 30, 2012
    Posts:
    52
    Thank you if you can help me ! No, I don't think I have the same problem, but since I don't understand and I can't find it, I'm trying everything I find on the same theme ! It's not great, I know !
     
  46. Realgar

    Realgar

    Joined:
    Sep 30, 2012
    Posts:
    52
    In fact it's just my bear (protofactor) whose healthbar does not work in the build. The Grenadier demo with Emerald works in the editor AND in the build. However when I look at the hierarchy, I have a GO with the Emerald scripts, in which there is the mesh and the skeleton, like the Grenadier... I don't understand why the healtbar doesn't work in the build. I just tried another animal from Protofactor, and I have the same issue with the lion... Incredible. Perhaps an order in the hierarchy problem ?
     
    Last edited: Sep 17, 2023
  47. amindler

    amindler

    Joined:
    May 21, 2010
    Posts:
    19
    This worked! Thanks! I'm using Unity 2022.3.4f1
     
  48. Realgar

    Realgar

    Joined:
    Sep 30, 2012
    Posts:
    52
    I confirm that I only have the problem with Protofactor animals (Bear, lion,...) Has anyone already had the problem? It's as if for these models, the UI cannot be separated from the mesh transformation
     
  49. chucsmith26

    chucsmith26

    Joined:
    Feb 5, 2020
    Posts:
    1
    Hello. I am having a problem with the ui layer option for displaying the health bar and what not. I cant change it. Doesnt matter what i put it will always go back to its original. So my ai will go to nothing but the emerald prefabs will go back to water.
     
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,758
    That is strange. The internal canvas should only be added one transform level down. Can you post a screenshot of the hierarchy? Do you happen to have your Emerald AI System set up on the actual model?