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

    RemitPrime

    Joined:
    Apr 20, 2016
    Posts:
    23
    Any news for networking support ?
     
  2. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    what button ? what does the event do? it has no reference, it dont know what to refer to..
     
  3. Ewan-Churchill

    Ewan-Churchill

    Joined:
    Oct 10, 2018
    Posts:
    20
    i have fixed the tag and layer problem yet the players sword still does no damage to the AI nor is it registering the hit
     
  4. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Im gonna start using this soon, so I can have a look then if you havent figured it out by then... use Debug.Log alot so you see where it breaks.
     
  5. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Hi @BHS how can i make a flying dragon? How do I make the dragon to fly and at the same time lands in a certain health level and walk on the ground. There are only 1 animation for walking and running and i dont know how to make the dragon fly
     
  6. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
    Sounds like you have imported another package with mouselook.cs, have a search for mouselook.cs in your project/assets and remove the one not in the emerald AI folder, or if you want to keep the other then remove the emerald one, chances are they are the same but you could always do a diff merge beforehand to see any differences
     
  7. PlainStudios

    PlainStudios

    Joined:
    Sep 9, 2013
    Posts:
    18
    How can I add a field in the Emerald_AI inspector ? I've been trying to figure it out but it just never shows up
     
  8. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    uhm, same way the developer did.. theres probably some editor script
     
  9. PlainStudios

    PlainStudios

    Joined:
    Sep 9, 2013
    Posts:
    18
    Yeah there is an editor script but it is really confusing since I have never used one .
     
  10. MaccyDBoy

    MaccyDBoy

    Joined:
    May 25, 2017
    Posts:
    30
    Hi ! i wanted to know what may cause this beahviour ?! :


    I setuped, the AI with the tool to do so, and when he attacks, he just spinns around haha

    Also, i wanted to know if there was any way to merge the asset : BladeSmith that handles melee fighting and you AI system ?

    I can't see to understand how i could :( maybe you could point me quickly on what is cuasing to trigger damage and what line i can change on BladeSmith.

    with that, it would be flexible Game paltform !!!!



    Thanks x 1000 !
     
    Last edited: Nov 27, 2018
  11. lazyfly75

    lazyfly75

    Joined:
    Oct 5, 2018
    Posts:
    5
    mouselook.cs was indeed double. thanks for advice. but after deleting it's followed by: Assets/Crux - Procedural AI Spawner/Scripts/System/Crux.cs(285,16): error CS1061: Type `Button' does not contain a definition for `onClick' and no extension method `onClick' of type `Button' could be found. Are you missing an assembly reference?

    An other asset but same developer ;(
     
  12. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    You can add your params to emerald code and in unity right click on the inspector and choose debug bug, this way your params will show up, which you can add to then switch back to normal mode.
     
  13. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @BHS Question about the upcoming 2.2... The current controllers that we have made will automatically work with 2.2 or will they need to be recreated?
     
  14. ben_unity214

    ben_unity214

    Joined:
    May 7, 2018
    Posts:
    4
    I've got an issue with Emerald AI - I've followed the set-up in the interview and even tried it with the prefab demos and in an entirely new scene and the issue is the same - my AI appears to just run on the spot. If I set it to Companion, the further away I move, the faster it runs on the spot. I just want a simple fleeing script for some background animals in my scene (no attacks or anything) but currently can't get them to do anything. I'm getting concatenating errors in the console as shown in the attached screenshot. Has anybody encountered this issue/know how to fix it? I'm using Protofactor's Forest Animals pack. Thanks in advance.
     

    Attached Files:

  15. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
    Have you baked your navmesh? if so how are you adding them to the scene, at runtime? then you need to use <NavMeshAgent>().Warp when placing the ai
     
  16. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
    getting Assertion failed on expression: 'MecanimDataWasBuilt()' errors when setting up an animal ai with generic/legacy animations, any ideas why?
     
  17. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
    I have a lot of AI in villages that are offscreen for most of the gameplay, I have them set to not update when offscreen so no problem with performance, but when they are spawned at the start of the scene, their destinations are set (ie they go off to do some task at a specified place(transform). The problem is they never actually go to the destination they seem to stay in dynamic wandertype mode (their default mode). Is this because the ai are set not to update whilst offscreen? If so how do I overcome this?
     
  18. ben_unity214

    ben_unity214

    Joined:
    May 7, 2018
    Posts:
    4
    @Mojo-Game-Studio Hadn't baked my navmesh. Thanks. Any ideas if there's a way to limit the height my AI can roam over? For example, I have an archipelago which dips into the sea and I don't want them running underwater!
     
  19. BHS

    BHS

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

    My apologies for the delay in responding. I have been away for Thanksgiving. I'm gonna start responding to all of your posts right now. :)
     
    SickaGames1 likes this.
  20. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    MIght want to check out Crux thread as well!
     
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I haven't tested it so I can't say for sure.


    What version of Emerald AI are you using? This was an issue awhile back, but it's been fixed. You just need to replace each instance of "new AudioClip()" with "null".


    I can reach out to the developer of Game Creator and see if I can get a copy so I can add support.


    No, the 2.3 update will be a lot quicker because it isn't another rewrite.


    There have been a few users who have had this issue, but I have not been able to recreate it which makes it difficult for me to find a solution. If you're willing to try a few possible solutions, I can attempt to try a few different things that may fix it.


    An easy way to add a spawning animation, without having to code, is to do the following:

    1) Create an On Start Event
    2) Drag the selected AI object as the Event Object.
    3) Where the pulldown says No Function click it and go to Emerald_AI>PlayEmoteAnimation (int)
    4) This allows you to access the PlayEmoteAnimation through an On Start Event. The int is the Emote ID that you would like to play when your AI is created.

    See the Spawn Companion AI Example for a working example.


    A screenshot of what you need to do:
    OnStartAnimation.png



    See my post above for a tutorial on how to do a spawning animation.

    I have't tested final IK, but I can reach out to the developer to see how support can be added. I can make a tutorial for those who are interested.


    If you want life-like actions/behaviors, you may want to check out LoveHate. It has support for Emerald AI and can probably handle the action logic you are looking for. As for navigating, Emerald AI agents have the ability to dynamically wander in an area. They can't do specific actions/animations at specific locations other than their idle animations. With the 2.2 update, I will be adding support for AI to better utilize the Emote animations. I am also adding a Random Waypoint option that allows an AI to randomly move between user placed waypoints and play their Idle animations.


    Emerald AI agents can travel between destinations. While traveling to their destination, they will act according to their Behavior Type. If an AI is set to the appropriate behavior, the will fight other AI that try to attack them. Once they have killed their attackers, they will continue traveling to their destination. Schedules are coming with the 2.3 update and will allow AI to have different destination based on the time of day, using UniStorm.


    Not sure why you are having this issue. Try reimporting Curx to see if it fixes the problem. When you renamed the MouseLook script, did you rename it on both the script file name and within the script itself?


    I will look into network support after 2.2 is all finished. It's also tough with Unity transitioning from Unet to their next networking system.


    Emerald AI's example damage script has a raycast shoot from the center of the camera. Ensure that first, your tags and layers are setup correctly, and that the PlayerWeapon script is attached to your camera.


    Flying AI that transition between flying and walking are not currently possible.


    You need to add it to the Emerald_AI_Editor script. See the other field I created as an example. What exactly are you trying to add?
    Your AI's Attack Distance may be too low or the NavMesh Radius may be too high. It looks like it's trying to reach the destination, but can't. Also, try disabling Use Dynamic Movement located under AI's Settings>Combat>Combat Actions & Effects Settings.


    As for BladeSmith, if you want to damage an Emerald AI agent with it, you would need to find where it handles its damage and add something like:

    Code (CSharp):
    1. if (YourHitObject.GetComponent<Emerald_AI>() != null)
    2. {
    3.    YourHitObject.GetComponent<Emerald_AI>().Damage((int)DamageAmount, Emerald_AI.TargetType.Player);
    4. }

    What do you mean by controllers?

    I've tried to make 2.2 compatible with 2.0 the best I can. The Damage function has been expanded with optional parameters for ragdoll mechanics. All player damage now goes through an external Player Damage script that users can alter/customize instead of having to alter Emerald AI directly.



    I believe this may be a Unity bug. What version of Unity are you using? Legacy animations, that use Unity's Animation Component, are no longer supported. However, Generic animations using the Animator Component are supported.



    What are you AI's Wander Type set to? If you want an AI to travel to a destination, they need to have their Wander Type set to Destination.


    This will be possible with version 2.2. The dynamic wandering has an option to limit height and slope angle of generated waypoints.
     
    Ewan-Churchill, Ascensi and Weblox like this.
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Okay :)
     
  23. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    141

    @BHS Thanks for the nice update! Looking forward to this next release. So now animals will have a proper wander with turns for that state and an additional blend tree for their fleeing or attacking movement, this is good. I was very disappointed by the lack of this feature before so it will be nice to see.

    Also to note, be careful that head look feature. It looks a bit weird as he over turns his torso trying to hard to look and start walking. Might want to tame it down a touch =) Keep up the nice work. Looking forward to this!
     
  24. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
    I'm using setDestination() which also sets the wander type correctly, just seems that if this is set when the ai are offscreen, when they then 'go' onscreen they ignore this and act as if they are still in dynamic mode. I've checked the ai's settings in runmode when off and onscreen and both settings are correct ie, they have a destination transform set and have wandertype set to destination.

    Could this be a problem with NavMeshObstacle? Having tested a bit further, I get some strange behavior sometimes even when they are onscreen and setDestination() is called, ie occasionally they just ignore it and go to some random destination. I ask about NavMeshObstacle as this is the only thing I've setup since not seeing these errors with the AI that are onscreen when setDestination() is called.
     
  25. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    45
    I can definetly try some things out to get that bug fixed.
    Let me know.
     
  26. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    141
    @BHS In your previous AI design the Target first seen by the opposing AI will be attacked without regard to damage, even if my companion is attacking them, they'd continue to mindlessly chase me even if I had not done a touch of damage. I think the AI should change targets to the threat level of who's giving damage or most damage etc. Are you addressing this in the update as well? Just curious. Thanks for the updates!
     
    magique and Mojo-Game-Studio like this.
  27. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    when is 2.2 out ?
     
  28. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Hi @BHS will version2.2 support transition from on land to flying and vice versa?
     
  29. BHS

    BHS

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

    The head look feature is fully customizable. The look intensities of the body and head can be adjusted. The body also doesn't have to use this feature if desired. The video demonstrating this had the settings higher so it wasn't too subtle.


    If an AI is using the Dynamic Wander Type, and the destination is changed, sometimes the AI will ignore the new destination and continue to their dynamically generated destination. This happens because the coroutine that generates the dynamic destination is still running. This has been fixed with version 2.2, but this may be what's causing your issue.

    Is the NavMeshObstacle on your AI? If it is, this could also be what's causing issues.


    I will send you an updated editor script via PM to see if it fixes the problem. The editors all use similar code for calculating the header of the editor. So, if the solution works for one editor script, it will work for the rest and I can add the solution to the rest of the editor scripts.


    That is correct. With version 2.2, this has been fixed. AI will use an aggro system that allows them to switch targets depending on who is attacking the most. If the AI's target isn't dealing damage, and another target is damaging the AI, the AI will switch its target to the damage dealer.


    I was shooting for the end of November, but it will be slightly delayed. It's getting close to being finished though.


    No, but this is something I may add in a future update or as an addon. I have already made a prototype, but the mechanics are quite a bit different than Emerald as it allows dynamic flying and landing on surfaces. My focus is getting the 2.2 and 2.3 updates released then I will figure out the direction to take with it.
     
  30. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    I haven't tried it, but would fish animate and behave on the water layer if I tried to create it?
     
  31. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    141
    Great! I'm glad to hear the AI aggro system will be implemented and the head look is customizable. I'm glad to hear you continuing to develop the product and listening to feedback. Thanks for the replies! =)
     
  32. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    read it thrue
     
  33. Ewan-Churchill

    Ewan-Churchill

    Joined:
    Oct 10, 2018
    Posts:
    20
    I'd also love to know if flyers mainly dragons and wyverns are possible
     
  34. Ewan-Churchill

    Ewan-Churchill

    Joined:
    Oct 10, 2018
    Posts:
    20
    @BHS I'm trying to develop a VR sword game but cant seem to work out how to get the player to deal damage to the AI plus how to get the AI to damage the player using my custom script. any help/tips would be much appreciated
     
    Last edited: Nov 29, 2018
  35. C_p_H

    C_p_H

    Joined:
    Nov 24, 2014
    Posts:
    153
    @BHS
    This might be the stupidest suggestion you've ever read to date or the most ingenious, but I've noticed a pattern to all the user requested features throughout this forum of Emerald Ai 2 that corresponds with what ICE Creature Creator already had to offer.

    With respect to you and your time invested in E-Ai2 development would it be plausible for you to consider licensing rights (if necessary) of ICE_CC to merge its features into future E-Ai releases now that ICE_CC is deprecated?

    I mean absolutely No disrespect to you & E-Ai2 because I love the direction it's headed but I couldn't resist not sharing my thoughts after realizing E-Ai2 is blazing a trail towards being as feature rich as its former competitor but if this would provide a path to reach the future of E-Ai much sooner then it would be a godsend for all its users. E-Ai would practically own the Unity Asset Store NPC community if you were to incorporate the two products IMHO.
    http://www.icecreaturecontrol.com/docs/html/files.html
    Legal disclaimer: I'm a purchased user of Emerald AI & do not expect any credits nor form of payment for these ideas.
     
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Oh, please, no, don't do this. I owned ICE and it's method creating AI is so overly complex that it's hardly worth the effort. Just my personal opinion, but I don't want another ICE.
     
    BHS, Weblox and mattis89 like this.
  37. C_p_H

    C_p_H

    Joined:
    Nov 24, 2014
    Posts:
    153
    I'm extremely confident that BHS can implement those features into E-Ai in his own none-complex user friendly methods. This is one of the very reasons why he'd be a perfect developer for the task because he'd Emeraldlize everything that'll give us users exactly what we've been dreaming for.
     
    mattis89 likes this.
  38. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @BHS will blaze his own trail. It's going in the right direction, it will just take some time.
     
    BHS, mattis89 and magique like this.
  39. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Yeah I would like to see those two merge but in a friendly user way and ice also has flying features which I would like to see in emerald ai for my dragon boss. Can't wait to see that happen
     
  40. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    oh dear god.. no ICE should ever mix wiith Emerald...
     
    Weblox likes this.
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Kind of, they would have to stay on the same height above the surface. With 2.3, I will see if I can add some random height generation for fish type AI.


    You're welcome! :)


    Open up the Emerald_AI_Editor script and add something like the below. This adds a float to the Emerald Editor. If you wanted to add an other type of variable, see Unity's API here: https://docs.unity3d.com/ScriptReference/EditorGUILayout.html
    Code (CSharp):
    1. self.YourFloatVariable = EditorGUILayout.FloatField("Your Float Variable Name:", self.YourFloatVariable);

    I have a prototype that I made a little while back that allows dynamic flying, navigating, and landing. However, the mechanics are quite a bit different than Emerald AI, as well as the Animator Controller. After 2.3, I will continue looking into this. It may end up being an add-on that works nicely with Emerald AI.


    You need to have a script get a reference to the object that is hit by your sword/VR mechanics. This is usually done with a raycast. After you have hit the object, you would check that it contains an Emerald AI script. Lastly, you would call Emerald AI's Damage function.

    Attach this script to your main camera and make sure its tag is set to MainCamera.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class RaycastDamageEmeraldAI : MonoBehaviour {
    6.  
    7.     public int Damage = 5;
    8.     public int AttackDistance = 6;
    9.  
    10.     void Update()
    11.     {
    12.         if (Input.GetMouseButtonDown(0))
    13.         {
    14.             Ray ray = Camera.main.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0));
    15.             RaycastHit hit;
    16.  
    17.             if (Physics.Raycast(ray, out hit, AttackDistance))
    18.             {
    19.                 if (hit.collider.GetComponent<Emerald_AI>() != null)
    20.                 {
    21.                     hit.collider.GetComponent<Emerald_AI>().Damage(Damage, Emerald_AI.TargetType.Player);
    22.                 }
    23.             }
    24.         }
    25.     }
    26. }
    27.  

    Sorry, but I won't be doing this. Emerald AI is known for its simplicity. With each update I am expanding its functionality and features all while retaining an ease of use system with a low learning curve. The 2.2 update is really expanding the overall quality, adding tons of new features, and adding support for all kinds of Animation Events. It is also making the system far more customizable by utilizing multiple scripts rather than just one script. The 2.3 update will be adding customizable actions, spells, and abilities. As I continue developing Emerald AI, I'm sure you, as well as others, will like the direction it is taking.
     
    Last edited: Dec 1, 2018
  42. PlainStudios

    PlainStudios

    Joined:
    Sep 9, 2013
    Posts:
    18
    Has anybody ever fixed the issue where a UFPS player can run over Emerald AI enemies . I haven't been able to solve the problem in 3 months now . There are no guides online and I have had no luck in asking the UFPS team for a fix as they say they don't know how to fix it . Any help would really be appreciated , this bug is holding my game development back . Thanks
     
  43. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    You mean your UFOs char goes through emerald ai? Just add a capsule collider to the emerald ai or sphere collider if its big
     
  44. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    *UFPS
     
  45. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Hi @BHS does emerald ai support range and melee attacks or rule based combat? Like when the ai health goes less than 30 it will use melee attacks but when ai health is above 30 it will use range attacks
     
  46. Alexandus

    Alexandus

    Joined:
    Sep 5, 2012
    Posts:
    25
    I know such estimates are tough to ballpark but do you know the general eta for version 2.2 to arrive in?
     
  47. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Enviro Support please ;) So Emerald AI gets Time / Weather Events from Enviro also.

    Another possible feature for 2.2 - if not already added:
    Sound arrays for different animations. Like a sound array for attack animation so you can use 3 sounds and one of the sound will be played randomly when attacking.This could fit for all animations like death, talk, get Hit etc.

    Ah and yeah don't forget Dialog System for Unity / Quest Machine support ;)

    Cheers
    Ronny
     
    Last edited: Dec 4, 2018
    mattis89 and SickaGames1 like this.
  48. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Has anyone got a tutorial or video on how to network emerald ai with photon?

    I'm asking because I found a slick multiplayer kit called mfps 2 and I'd like to use this AI with it.
     
  49. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    There is not any Multiplayer support like Unet / Mirror as I am aware of. I asked the same because I want to use it with uMMORPG. Don't know if there are any Photon Tutorials.
    I think Multiplayer support will come with the 2.3 release next year.
     
    Pandur1982 likes this.
  50. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Distracting speculation. Which Is why I asked the question the way I did. But you knew that already didnt you? Please stop trolling posts and telling people about stuff you obviously cant speak to with authority. - you arn't the developer so please do us all a favor and bug off. All you are doing is high-jacking the question with your ridiculous and annoying response.

    To reiterate my question. And change the words a little to stop trolling.

    Has anyone successfully integrated photon into Emerald 2.0 - if you did - how did you do it?