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. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    155
    NEW TEST RESULTS:
    New scene, re-downloaded Emerald, import.
    Added My deer and wolf.. same thing, Wolf DOES NOT attack the deer. Best of friends..

    TEST 2
    Deleted Deer, added EXACT copy of wolf (same prefab) But then changed copy2 to prey.
    I notice that If the PreyDeer is set to Cowardly, it works. It will flee, will be caught, and then die.
    However if the Prey Deer is set to Defensive, it does nothing when attacked, takes no damage, does not flee, or does not fight.
    What is the expected functionality of Defensive. I was expecting it to first flee, then (after cool down) be caught by Predator, and attempt to fight, presumable losing and dying.

    To be clear:
    WolfPredator is TAGGED as Predator
    Behavior Tab
    Behavior Type = Hostile
    Predator or Prey = Predator
    Predator Size = Large
    Prey Size = Large
    Tag Options
    Prey Tag = Huntable
    Player Tag = Player


    WolfPrey is TAGGED as Huntable
    Behavior Tab
    Behavior Type = Defensive
    Predator or Prey = Prey
    Predator Size = Large
    Prey Size = Large
    Tag Options
    Predator Tag = Predator
    Player Tag = Player

    If the above is set, I get this error when the predator reaches the Prey (after a short delay, assuming that its when death should be triggered)
    UnassignedReferenceException: The variable currentAttackAnimationClip of Emerald_Animal_AI has not been assigned.
    You probably need to assign the currentAttackAnimationClip variable of the Emerald_Animal_AI script in the inspector.
    Emerald_Animal_AI.AttackWhileStationary () (at Assets/Emerald AI/Scripts/Emerald AI/Emerald_Animal_AI.cs:2457)
    Emerald_Animal_AI.MainSystem () (at Assets/Emerald AI/Scripts/Emerald AI/Emerald_Animal_AI.cs:1615)
    Emerald_Animal_AI.Update () (at Assets/Emerald AI/Scripts/Emerald AI/Emerald_Animal_AI.cs:1762)

    But this works:
    WolfPrey is TAGGED as Huntable
    Behavior Tab
    Behavior Type = Cowardly
    Prey Size = Large
    Tag Options
    Predator Tag = Predator
    Player Tag = Player
     
    Last edited: Nov 18, 2016
  2. BHS

    BHS

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

    It sounds like you need to add your deer's attack animations to the Animation Options. These will also need to be on your AI's animation component. You also need to have your wolf set to Predator.

    Emerald will be changing the way this is all handled with our new update. We will be posting more about it below. The new system will use multi-tags and eliminates the confusing with predator, prey, large, small, etc. This way, AI will only attack what's in their tag list.
     
  3. BHS

    BHS

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

    Emerald 1.3 is looking great! We had planned on submitting the 1.3 update on the 17th but ran a little short of that deadline. (We do have good news though) This was due to the massive amount of work that needed to be done to implement Mecanim and having to rewrite most of the system. The good news is that it shouldn't take too long and it's only a minor delay. We will be submitting Emerald this Tuesday. We understand everyone has been patiently awaiting this update, but it will be worth the wait.

    We also have added in a few extra highly desired features for the 1.3 update. One of these new features is multi-tag support, which had to happen because of all the code rewriting. This will allow AI to have an endless amount of tags to choose from when picking targets. Emerald will now use Emerald Tags. Emerald Tags are special tags used with the Emerald system that each AI has that aren't dependent on Unity's tags. This is to improve flexibility and customization so your AI can use any Unity Tag. (For a visual, see the picture below.) The predator and prey, as well as the prey and predator size, has been removed. This portion of Emerald was confusing and lead to a lot complications. Emerald is still a dynamic animal AI system, it has just been simplified using multi-tags. The tags can be as detailed or as broad as you need. You can categorize animals or have an animal only hunt certain animals.

    For the 1.3 update, we have also added custom functions for making an AI flee and attack. These function handle everything. All that's needed is passing the target gameobject. This makes it possible to make AI flee or attack from ranged attacks from the player. These functions also handle all herd/pack functionality so AI that are in herds will also flee or help fight their attacker.

    The target detection/hunting system system has been completely rewritten. It is now faster, consistent, and utilizes Emerald's new multi-tag system. It takes in account an AI's distance to pick the nearest target or attacker. AI will now reliably stop when attacking and no longer run into their target.

    We have made too many improvements to post everything that has been done with this update. We rewrote a lot of the code, made major improvements, increased performance, fixed bugs, trimmed down a lot of code, added tons of new features, redid the Editor, and more. We are looking forward to this release and we're sure everyone will like what it brings.

    FleeTags.png
    TargetTags.png
     
    Last edited: Nov 20, 2016
    ftejada, 99thmonkey and julianr like this.
  4. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    Do you support AI for NPCs, not combat?


    For example, something like npc that acts according to schedule in town
     
  5. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Nice work! Looking forward to this release. Especially the tag system!
     
    BHS and 99thmonkey like this.
  6. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    155
    Thanks, weirdly there was nowhere for me to add an attack animation on the deer, so yes I had forgotten that, But there WAS one on the wolf... huh?
    I deleted the deers script and re-added it, and still no slot for adding an attack anim (yes deer as set to predator and hostile)
    So I literally copied the component from the wolf and changed the animation. Still no luck, wasnt acting defensive when attacked by the wolf however..

    OK But Ill wait til new update now.
     
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, these AI are Passive AI. With the 1.3 update, we have made their destination waypoint public for easy scripting of location based schedules.


    Strange, the attack animations should become available if the AI is marked as predator. With the new update, a lot of functionality is handled with the aggression level. This makes the setup process much easier.
     
    julianr likes this.
  8. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Hello. I see that on the Player Weapon C# Script, the maximum range is 10. What about for long range weapons? Can range be set to a higher number?
     
  9. BHS

    BHS

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

    It can, but it would require editing the PlayerWeaponEditor script.

    1) Open the PlayerWeaponEditor script.
    2) Find the line:
    Code (CSharp):
    1. self.attackDistance = EditorGUILayout.Slider ("Attack Distance", self.attackDistance, 0, 10);
    3) Increase the value where the 10 is to increase the max distance.

    Emerald 1.3 will bring the ability to damage AI with ranged attacks with 1 function call.
     
    julianr likes this.
  10. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Thank you so much. This is great that this can be changed and long-range weapons can be added. Emerald 1.3 will make it even easier.
     
  11. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    I want to know more about NPC AI.

    Can I change the schedule dynamically?

    I want to change the character's schedule if the situation changes.

    I want to be able to change the reaction
     
  12. gg_tk

    gg_tk

    Joined:
    Sep 27, 2013
    Posts:
    4
    Hey BHS :)

    Your tool looks very promising, and we are considering to buy it for a game!
    But before, we have to check that it meets our needs.

    We will have a "Life editor" where the player can create its own "voxel-animals" by assembling "body members" (think of a mix between Spore and Minecraft). So, we will not use Mecanim, but our own homemade animation / model system (in other words, an animal is a set of cubes + some rules to animate them for walking, fighting, eating, etc).

    The question is: is it possible to script the AIs to call our custom animation functions? For example, the pre-made AI is walking, can I call a custom function to tell our system "hey bro', I'm walking, please animate me"?

    Generally speaking, how much are Emerald's AIs scriptable / customizable?

    Best regards ;)
    Jeremy
     
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    It is possible, through script, to change an AI's destination. This can be any event you need. You would just move the AI's startPosition to where you'd like it to go.



    Hey Jeremy!

    There are public functions for each animation. However, these public functions are tied to Mecanim. There is an option for non-animated AI. You could modify Emerald using the non-animated portions for the system. Emerald does use a customized Editor so you would need to add your changes to it.
     
  14. BHS

    BHS

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

    The long awaited Emerald 1.3 update has been submitted!

    Here's a video of the new and improved combat mecanims using Emerald 1.3. We will have more videos to come showing off the various improvements made such as fleeing, target detection and hunting, ranged damage support, and more. A dynamic wildlife system is still a top prioity for Emerald AI.




    System Improvements and New Features

    • Mecanim Support – Mecanim animations are now usable with Emerald. Legacy animations will still be supported. This is handled with a drop down menu to select whether you'd like to use Mecanim or Legacy. We have added a new automatic setup system for the Emerald Editor that automatically creates an Animator Controller, creates all needed states and parameters, and assigns it to the selected AI model. (Users will need to manually assign their animations using the Animator)
    • Multi-Tag Support - This will allow AI to have an endless amount of tags to choose from when picking targets. Emerald will now use Emerald Tags. Emerald Tags are special tags used with the Emerald system that each AI has that aren't dependent on Unity's tags. This is to improve flexibility and customization so your AI can use any Unity Tag. The predator and prey, as well as the prey and predator size, has been removed. This portion of Emerald was confusing and lead to a lot complications. Emerald is still a dynamic animal AI system, as well as other types of AI, it has just been simplified using multi-tags. The tags can be as detailed or as broad as you need. You can categorize animals or have an animal only hunt certain animals.
    • Target Detection Improvements - The target detection/hunting system has been completely rewritten. It is now faster, consistent, and utilizes Emerald's new multi-tag system. It takes in account an AI's distance to pick the nearest target or attacker. AI will now reliably stop when attacking and no longer run into their target.
    • Flee Algorithm Improvements - Fleeing AI now use a more sophisticated and realistic fleeing control. AI's fleeing movement is less linear and will now generate waypoints allowing them to veer left, right, and straight.
    • Auto Calculate Attack - This system automatically calculates the optimal time to trigger an AI's attack damage call according to an AI's current attack animation. This allows AI's attack damage to match when their animation reaches their target.
    • Ranged Damage Support - We have added custom functions for making an AI flee and attack. These function handle everything. All that's needed is passing the target gameobject. This makes it possible to make AI flee or attack from ranged attacks from the player. These functions also handle all herd/pack functionality so AI that are in herds will also flee or help fight their attacker. This makes it easy to damage AI using 3rd party systems such as RFPS and UFPS.
    • No More Dependent Scripts - We have added SendMessage calls instead of calling the script function by name. This will allow users to not have to rely on Emerald’s external scripts and instead use their own. Calls for both damage and health will be supported allowing users to easily integrate other 3rd party assets such as UFPS and RFPS. Note: SendMessage only supports 1 parameter unless sending the parameter as an array. We will be making tutorials for UFPS and RFPS integration.
    • Simplified Editor and Functionality - We have redone portions the Emerald Editor and simplified setup. The previous predator, prey, and size options have been removed. This lead to some confusion and complicated setting up. Emerald now uses the Multi-tag system (explained above) for AI to pick their targets. This allows far greater control and allows users to better customize the animal's/AI's attack, hunt, and flee targets.
    • Attack Animation Speed Calculator - Minimum and Maximum Attack Speed are now automatically adjusted with the current attack animation to ensure the animations never overlap, repeat, or skip.
    • Code Cleanup and Rewrite - A lot of Emerald's code has been rewritten, improved, and cleaned up.
    • Animation Check - Animation Check checks all needed animations in Start. If any animations that were intended to be used are missing, or not properly applied, Emerald will disable animations and debug log the missing animations. This allows users to be given information as to why their setup or animations weren't successful while still being able to test their scene.
    • Customizable Turn Speed - Turn Speed control has been added to the Emerald Editor. There is one for both Walk and Run.
    • Improved Herd/Pack and Grazing Movement - Herd and packs now move more realistically both with fleeing and grazing. AI will now wonder within a customizable radius of their alpha.

    Sounds
    • Added impacts sounds. Impact sounds are the sounds that play when your AI is taking damage
    • Added injured sounds (used to be get hit sounds)
    • Impact, Injured, Attack, and Animal Sounds no longer have a cap. The Editor will allow as many as needed.
    • Added an option to remove an individual sound anywhere with its list.
    • Added 3 AudioComponents to Emerald AI. This helps fix the issue of sounds being cut or not playing. This would happen if too many sounds were playing simultaneously. Adding 3 more AudioComponents allows all sounds to reliably play

    Animations
    • New option in the Emerald Editor that allows you to choose either the Legacy or Mecanim animation systems.
    • New automatic setup system for the Emerald Editor that automatically creates an Animator Controller, creates all needed states and parameters, and assigns it to the selected AI model. (Users will need to manually assign their animations using the Animator)
    • New Edit Animator Controller button that opens up the Animator Window for editing the Animator Controller on the selected model.
    • Added Idle Speed animation speed control to editor
    • Added Idle combat animation speed control to editor
    • Added Attack animation speed control to editor

    Bug Fixes
    • Fixed issue that didn't allow users to edit an AI during runtime
    • Fixed attack calculations triggering outside of attack radius
    • Fixed attack animations glitching or replaying
    • Fixed attack speed not working properly. Attack speed calculations have been rewritten and now take in animation length to ensure a full and proper play.
    • Fixed Run Animation. It will now smoothly play and blend with run animation
    • When creating an AI using Windows>Emerald AI>Create New AI, the component order is now rearranged so the Emerald Editor is on top. This makes it far easier to edit AI and fixes the issue with it sometimes being created near the bottom of the inspector. However, the order after creation can be freely edited.
    • Fixed issue that resulted in AI sometimes running into their targets. AI will now consistently stop when within their stopping range.
    • Fixed issue that caused AI to turn too sharply resulting in AI appearing to run in place. Movements and turning now flow with their run animation.
    • Fixed warning messages regarding the particle effects
     
  15. gg_tk

    gg_tk

    Joined:
    Sep 27, 2013
    Posts:
    4
    Ok, so we can do it :)
    Thanks for your answer!
     
  16. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Great! You're welcome!
     
  17. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    Thanks for the answer.

    There are a few more questions.

    Can I add behavior?

    Can I change the behavior during the game?

    I would like NPC to show various actions according to the game situation.
     
  18. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Best update yet, congrats on the 1.3 release! Looking forward to using this.
     
    99thmonkey likes this.
  19. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    I hope it's easy to integrate with a spawning system (like Core Game Kit by Dark Tonic).
     
  20. SteveKouts

    SteveKouts

    Joined:
    Aug 23, 2012
    Posts:
    79
    Excellent update! Everything I was wanting, christmas came early :D
     
  21. Marito_22

    Marito_22

    Joined:
    Jan 13, 2016
    Posts:
    18
    The asset looks great and the update even better so I'm thinking of buying it for my project.

    I'd like to ask you some questions using my read-only english :rolleyes::
    1. I'm creating an escape type game. So I'm looking for an AI Terminator like what means I'd need behaviours such as patrolling through different waypoints and if he/she hears or sees the player then starts chasing you, etc. Do you think your asset would work out of the box? Should I modify your code or create my own code and plug it in some way to your code?
    2. Another question is about the NPCs animations. Can you list them? And, would it be possible to add to your animator other behaviours/animations different from the one you list?
    3. Do the NPC and third person controller use a simple collider (e.g. capsule) or a compound collider?
    4. Let's say my Terminator has a melee. So he/she attacks you and boom you are dead. But for the weapon, to detect the collision against the player controller, it works based on animations or you have to create your own collider for the mesh?
    Sorry for some silly question but I'm still learning and trying to make every penny count.

    Thanks a lot!
     
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    There are currently 4 behaviors:
    Cowardly - Flees when encounters flee tags.
    Defensive - Doesn't attack unless attacked first.
    Hostile - Attacks when encounters attack tags.
    Passive - Doesn't attack or flee, even if hit.

    You can change the behavior during the game using a custom script.

    What do you mean by various actions?


    Thanks guys! We're looking forward to see what everyone thinks of the new update.


    Emerald has been tested with spawning and it works, as long as there is baked NavMesh in the area where it's been spawned.


    1) AI can wander in a given radius. This radius can be adjusted to be as big or as small as needed, up to 500 units which is huge. Detection is handled by trigger detection so as soon as a player enters their trigger radius, they will begin to look for the player.

    2) With our newest version that has been submitted, we support Mecanim. Emerald will automatically create and setup an Animator Controller. This handles all states and parameters. All you have to do is assign your motions/animations to the states. The animations are Idle, Walk, Run, Idle Combat, Attack 1-3, Run Attack, Hit, and Graze 1-3.

    3) Yes, the AI use Box Colliders.

    4) If I understood correctly, hit/damage detection can be called with any custom script. All that's needed is the person the attacked to be sent as the parameter. Emerald will then assign this object to be the current target. The damage detection is handled via timing of animations and sent when the timer has reached the AI's attack time. This can be automatically calculated to send a damage call at the optimal time of an AI's current animation. The time can also be set manually to get precise timing.
     
    julianr likes this.
  23. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    hi,

    i am thinking to buy an ai package that works with Realistic FPS, so

    - will Emerald AI be 100% integrated with RFPS?When are you going to publish the new update?And tutorials with RFPS?

    - Does the system manage the npc(ai) population so if for example if hunt a rabbit it spawns another rabbit may be some time later in a random or speficic location so it always there are animals to hunt?

    Thanks
     
    Last edited: Nov 26, 2016
  24. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Is this released yet? I have been waiting for this update.
     
  25. lukamas233

    lukamas233

    Joined:
    Jan 6, 2015
    Posts:
    29
    I am excited too, is there any chance I can have two predator or hostile ai creatures fight eachother, in emerald animal ai.
     
  26. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Hey guys. We were waiting on the update at the start of the year that said you guys would include support for Non Nav Mesh movement. Then I remember you guys saying it was still coming but fell to the wayside because it wasn't as important. Was this feature ever added or is your asset still limited by having to use Nav Mesh for AI? Thanks!
     
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    1) The update has been submitted and is awaiting approval. Due to the way RFPS handles collisions and layers, some additional code is required to get things working. We will be providing a full tutorial on how to do so on our wiki site. It's relatively easy and shouldn't take more than a couple minutes. However, RFPS is 100% compatible. The RFPS player can even block AI's attacks as well as attack them with RPFS ranged and melee weapons.

    2) There is no population manager. However, one can easily be added with a custom script. We could also possibly add one in the future.


    Hey there!

    We're still waiting for it to be approved. We will be sure to let everyone know when it's been accepted.


    Yes, AI can fight each other both as packs and individually. AI will continue to pick targets after their current one has died until there are no other targets left in their attack radius.


    Hey there!

    We haven't had a chance to implement non-NavMesh support. However, this is an important feature we still want to implement. This update required rewriting most of Emerald. This will make it easier for adding new features and functionality in the future. non-NavMesh support is planned for the next major update.
     
  28. BHS

    BHS

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

    Here's another video demonstrating the power of Emerald AI.

    This video shows an AI created with Emerald using the RFPS system to fight it. RFPS implementation is simple and only takes a few minutes. A tutorial will be provided through the Emerald Wiki Site.

    The AI health bar system shown, as well as the health bar UI, is included with the Emerald 1.3 update. This health bar system shows the currently targeted AI's current health and name.

     
    julianr likes this.
  29. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Looks cool! I hope it works just as good with UFPS.
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks!

    It should work just as good. UFPS is actually easier to implement because you can call its damage player function straight from the Emerald Editor. We will be releasing tutorials for setting up both UFPS and RFPS with Emerald on the wiki within the next couple of days.
     
  31. BHS

    BHS

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

    Emerald 1.3 update has been accepted and is now live!

    Get it here: https://www.assetstore.unity3d.com/en/#!/content/40199

    Note: We are in the process of updating the Emerald documentation and Emerald Wiki site to reflect the changes made with the 1.3 update. These changes should be finished by tomorrow. If you have any questions with setting up, or the new functionality with Emerald 1.3, you can post them here.

    We will also be releasing Emerald AI tutorials and tutorial videos over the next couple of days. These tutorials will cover things like advanced Emerald functionality, RFPS and UFPS implementation, AI schedules, and more.

    We hope everyone enjoys the new features and improvements.

    In case you missed it, here are the release notes for Emerald 1.3.

    System Improvements and New Features

    • Mecanim Support – Mecanim animations are now usable with Emerald. Legacy animations will still be supported. This is handled with a drop down menu to select whether you'd like to use Mecanim or Legacy. We have added a new automatic setup system for the Emerald Editor that automatically creates an Animator Controller, creates all needed states and parameters, and assigns it to the selected AI model. (Users will need to manually assign their animations using the Animator)
    • Multi-Tag Support - This will allow AI to have an endless amount of tags to choose from when picking targets. Emerald will now use Emerald Tags. Emerald Tags are special tags used with the Emerald system that each AI has that aren't dependent on Unity's tags. This is to improve flexibility and customization so your AI can use any Unity Tag. The predator and prey, as well as the prey and predator size, has been removed. This portion of Emerald was confusing and lead to a lot complications. Emerald is still a dynamic animal AI system, as well as other types of AI, it has just been simplified using multi-tags. The tags can be as detailed or as broad as you need. You can categorize animals or have an animal only hunt certain animals.
    • Target Detection Improvements - The target detection/hunting system has been completely rewritten. It is now faster, consistent, and utilizes Emerald's new multi-tag system. It takes in account an AI's distance to pick the nearest target or attacker. AI will now reliably stop when attacking and no longer run into their target.
    • Flee Algorithm Improvements - Fleeing AI now use a more sophisticated and realistic fleeing control. AI's fleeing movement is less linear and will now generate waypoints allowing them to veer left, right, and straight.
    • Auto Calculate Attack - This system automatically calculates the optimal time to trigger an AI's attack damage call according to an AI's current attack animation. This allows AI's attack damage to match when their animation reaches their target.
    • Ranged Damage Support - We have added custom functions for making an AI flee and attack. These function handle everything. All that's needed is passing the target gameobject. This makes it possible to make AI flee or attack from ranged attacks from the player. These functions also handle all herd/pack functionality so AI that are in herds will also flee or help fight their attacker. This makes it easy to damage AI using 3rd party systems such as RFPS and UFPS.
    • No More Dependent Scripts - We have added SendMessage calls instead of calling the script function by name. This will allow users to not have to rely on Emerald’s external scripts and instead use their own. Calls for both damage and health will be supported allowing users to easily integrate other 3rd party assets such as UFPS and RFPS. Note: SendMessage only supports 1 parameter unless sending the parameter as an array. We will be making tutorials for UFPS and RFPS integration.
    • Simplified Editor and Functionality - We have redone portions the Emerald Editor and simplified setup. The previous predator, prey, and size options have been removed. This lead to some confusion and complicated setting up. Emerald now uses the Multi-tag system (explained above) for AI to pick their targets. This allows far greater control and allows users to better customize the animal's/AI's attack, hunt, and flee targets.
    • Attack Animation Speed Calculator - Minimum and Maximum Attack Speed are now automatically adjusted with the current attack animation to ensure the animations never overlap, repeat, or skip.
    • Code Cleanup and Rewrite - A lot of Emerald's code has been rewritten, improved, and cleaned up.
    • Animation Check - Animation Check checks all needed animations in Start. If any animations that were intended to be used are missing, or not properly applied, Emerald will disable animations and debug log the missing animations. This allows users to be given information as to why their setup or animations weren't successful while still being able to test their scene.
    • Customizable Turn Speed - Turn Speed control has been added to the Emerald Editor. There is one for both Walk and Run.
    • Improved Herd/Pack and Grazing Movement - Herd and packs now move more realistically both with fleeing and grazing. AI will now wonder within a customizable radius of their alpha.
    • AI Health Bar Example - A new demo scene and example system have been added that demonstrates the new AI health bar system included with Emerald. This health bar system shows an AI's current health and name.

    Sounds
    • Added impacts sounds. Impact sounds are the sounds that play when your AI is taking damage
    • Added injured sounds (used to be get hit sounds)
    • Impact, Injured, Attack, and Animal Sounds no longer have a cap. The Editor will allow as many as needed.
    • Added an option to remove an individual sound anywhere with its list.
    • Added 3 AudioComponents to Emerald AI. This helps fix the issue of sounds being cut or not playing. This would happen if too many sounds were playing simultaneously. Adding 3 more AudioComponents allows all sounds to reliably play

    Animations
    • New option in the Emerald Editor that allows you to choose either the Legacy or Mecanim animation systems.
    • New automatic setup system for the Emerald Editor that automatically creates an Animator Controller, creates all needed states and parameters, and assigns it to the selected AI model. (Users will need to manually assign their animations using the Animator)
    • New Edit Animator Controller button that opens up the Animator Window for editing the Animator Controller on the selected model.
    • Added Idle Speed animation speed control to editor
    • Added Idle combat animation speed control to editor
    • Added Attack animation speed control to editor

    Bug Fixes
    • Fixed issue that didn't allow users to edit an AI during runtime
    • Fixed attack calculations triggering outside of attack radius
    • Fixed attack animations glitching or replaying
    • Fixed attack speed not working properly. Attack speed calculations have been rewritten and now take in animation length to ensure a full and proper play.
    • Fixed Run Animation. It will now smoothly play and blend with run animation
    • When creating an AI using Windows>Emerald AI>Create New AI, the component order is now rearranged so the Emerald Editor is on top. This makes it far easier to edit AI and fixes the issue with it sometimes being created near the bottom of the inspector. However, the order after creation can be freely edited.
    • Fixed issue that resulted in AI sometimes running into their targets. AI will now consistently stop when within their stopping range.
    • Fixed issue that caused AI to turn too sharply resulting in AI appearing to run in place. Movements and turning now flow with their run animation.
    • Fixed warning messages regarding the particle effects
     
    Last edited: Dec 1, 2016
    Stormy102 likes this.
  32. BHS

    BHS

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

    All of the Emerald Documentation (but the Breeding Options) has been updated to reflect the 1.3 update. This includes tons of helpful information as well as some quick guides for setting up Mecanim and the new Multi-Tag system. More detailed tutorials and tutorial videos are currently being worked on.

    Documentation
    Setting Up Mecanim with Emerald
    Setting Up Multi-Tags
     
    Stormy102 and julianr like this.
  33. Killersan

    Killersan

    Joined:
    May 27, 2014
    Posts:
    76
    I have a problem with mecanim feature.
    Sometimes it's bouncing between Graze 1 and Walk animations. Character is mostly playing walk animation, but it's not changing his position, so walking in same spot.

    Can You explain me a bit more when Graze animation is triggering and what does this Graze mean ?
    Is it wounded animation or something ?

    The other thing is that my character while fighting, between attacks is trying to run more closely to the enemy, while enemy is not fleeing, do You have any clues what can cause that ?
     
  34. BHS

    BHS

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

    Strange, I'll see if I can find out what's going on. We tested a few different models that used Mecanim without any issues. I would try disabling Apply Root Animation to see if this fixes your problem. Some animations don't work right when Apply Root Animation is enabled.

    Graze animations play when an AI is in Wander Mode. An AI will randomly pick a waypoint within their wander radius and move to it with the walk animation. Once they reach their waypoint, they will randomly play a graze animation. Once their Graze Seconds are reached, they will generate a new waypoint and repeat the process.

    Can you please further explain the setup of your AI such as its behavior, radius distances, and other settings? What models are you using for your AI? Are you receiving any error messages in the Console?
     
  35. Killersan

    Killersan

    Joined:
    May 27, 2014
    Posts:
    76
    Thank You for fast reply.
    Behavior options:
    AI Type: NPC
    NPC Behavior Type: Hostile

    Range options:
    Stopping Distance: 2-5 (checked 2,3 and 5 with same results)
    Chase Seconds: 60
    Attack Trigger Radius: 15
    Max Chase Distance: 50
    Cool Down Seconds: 25
    Wander Range: 30
    Wait Length Min: 2
    Wait Length Max: 6

    I'm using UMA models generated to prefabs, all animations are working fine, but it seems that algorithm is trying to move character closer to the enemy, while it shouldn't and second thing while wandering it's constantly running 1/3 of walking animation and 1/10 of Graze 1 animation while character is in same place and it's switching it in animation controller so it's not related to animations or models. I created animation controller by clicking create button in the animation tab.
    Hopefully it will help You to track down the problem.
     
  36. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    You're welcome.

    I just tested the same setup with two models that use Mecanim from two different artists and I cannot recreate your problem. It may be something with the models' animations, rigging, or position.

    What you can try is this:

    Find your model source, go to the Animation tab, and check these three checkboxes (You can also try a combination of the tree depending on what's off with your animations). You can also try this with individual animations if the option is available. What this does is attempts to better center your model's animations to the model's center. If the animations are off and not properly centered with your model, it can through off the AI's position calculations. This is not an Emerald issue, but more of an animation issue.

    MecanimAnimationPositionAdjustments.png
     
  37. princealbert

    princealbert

    Joined:
    Oct 4, 2016
    Posts:
    1
    I really need help setting up this asset, there is no guide or video tutorial for setting up with mecanim im really lost and frustrated on my own please help someone contact me at albertpolk15@gmail.com
     
  38. BHS

    BHS

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

    In case you missed it, we have very detailed documentation for Emerald AI here: http://emerald-animal-ai.wikia.com/wiki/Documentation

    We will be posting a detailed tutorial for setting up sometime tomorrow on the Emerald Wiki Site. You can also find a brief tutorial for setting up Mecanim on the documentation portion of the site here: http://emerald-animal-ai.wikia.com/wiki/Documentation#Setting_Up_with_Mecanim
     
    Last edited: Dec 4, 2016
  39. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    157
    Still waiting on theses tutorials for RFPS and Ufps
     
    Nateply and txarly like this.
  40. BHS

    BHS

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

    The UFPS and RFPS tutorials are nearly finished and will be on the Wiki site today. We will let everyone here know when both tutorials are finished.
     
    Last edited: Dec 5, 2016
    thenamesace and txarly like this.
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Last edited: Dec 6, 2016
    thenamesace likes this.
  42. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    157
    txarly likes this.
  43. TheXWolf

    TheXWolf

    Joined:
    Dec 13, 2013
    Posts:
    85
    It's great to see you're adding compat with other systems. Does Emerald have any kind of runtime pathing or does it only use navmesh? Can it work with a world without a navmesh?
     
  44. BHS

    BHS

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

    Emerald doesn't currently have pathfinding support and scenes need to be baked with Unity's NavMesh. However, Unity 5.6 will introduce runtime NavMesh build giving Emerald AI the ability to have pathfinding capabilities. This would allow AI to be useable with endless trerrains without the need for NavMesh baking. So, Emerald will have pathfinding support when Unity 5.6 is officially released.
     
    Last edited: Dec 7, 2016
  45. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    For the UFPS Tutorial code edit -
    I suggest you change
    GameObject.Find("AdvancedPlayer")

    To
    m_source.gameObject
     
  46. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for the suggestion. I've update the Emerald UFPS Tutorial.
     
    99thmonkey likes this.
  47. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Awesome! so much better than a GameObject.Find() call :) Thanks for the great AI package! I look forward to trying it out with a spawning system (like Pool Boss or Core Game Kit or ...).
     
  48. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    Hi,

    Congratulations, nice tool for ai.The integration with RFPS works well, but i have a question

    - Is there a way to work with range attacks? i have tested and melle attacks work well, but testing with rfps robot npc that shoots a gun, it doesn´t shoot, just come close to the player and hit as a melee weapon.

    - I would like to suggest, may be for a next update, to work with angles or another radius so if the player is next to an enemy from the back he can get closer , and
    - it would be nice to have the option that when an npc flees or attacks it can not get out from the zone or radius from its originally placed spot.

    I will continue testing but at the moment i am very happy with this tool.
     
  49. IvanAF

    IvanAF

    Joined:
    Jan 23, 2015
    Posts:
    15
    Hi

    Thanks for the RFPS Tutorial :D works very good, but the grenades havent effect.

    How can i make it work?

    another question

    Currently I can only take life to npc if I shoot on the box collider located at the feet of the npc (the one created with emerald), but if I put another in the head of the npc (in the bone of the head), this has no effect (I added tag and layer and it does not work, only blood particles). The npc only dies if it is fired on the box collider of emerald, but this only is fixed in a single position and causes strange effects

    Sorry for my english

    Thanks again

    Regards
     
    Last edited: Dec 7, 2016
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Great to hear you're happy with Emerald.

    1) Ranged attacks aren't yet support, but will be with the next update of Emerald. What you can do is increase the Stopping Distance and play the shooting animation.

    2) Field of view detection is something that is planned within the next couple of updates for Emerald.

    3) If an AI has Returns to Start enabled, the AI will return to its starting position once it is out of Attack Mode. We can add an option in the next update to keep an AI from going out of its starting range.


    Getting grenades to work should be the same setup as the WeaponBehavior and ArrowObject scripts. We can add implementing RFPS's grenades to the RFPS tutorial when we get the chance.

    The box collider is supposed to be adjust to fit the shape of your AI's model. With the next update, this process will be automatic, but for now, you need to manually adjust it.
     
    IvanAF likes this.