Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[50% OFF!] Emerald AI 2.0 - AAA Quality AI with Built-in UI, Ranged Combat, Waypoints, and more!

Discussion in 'Assets and Asset Store' started by BHS, Jun 26, 2015.

  1. Alexandus

    Alexandus

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

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    502
    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 SickaGamer like this.
  3. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    142
    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.
     
  4. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    502
    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.
  5. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    142
    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?
     
  6. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Its a Secret
     
    Pandur1982 likes this.
  7. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    502
    Due all respect, I just wanted to help and let you know my current information about Multiplayer support, thats why I posted "as I am aware of". That has nothing to do with trolling or what so ever. I am a happy customer of Emerald AI and have nothing against you or the question regarding multiplayer / Photon integration. On contrary I would like to know the answer as well...
    So sorry if I offended you that wasn't my intention. Ofc the asset creator or other users can and should answer your question from their side and correct my post if its wrong, misleading etc.

    Best regards
    Ronny
     
    Last edited: Dec 4, 2018
    Mojo-Game-Studio and Pandur1982 like this.
  8. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    60
    When atacking 1, 2 or 3 is chosen? Randomly or driven by some rules?

    Ant another question, I have done the integration with invector and everything works fine, I can recieve damage and apply damage to the IA.
    BUT..... even when the Emerald NPC's are always following the player (I have the tags and layers ok) most of the times the Emerald NPC doesn't launch any atack to the invector player. Is chasing him correctly but only launches an attack let's say 1 of every 20 times. Some IAs even never attack to the player (They follow him ok).
    What can be the reason? It's driving me crazy with lots of hours testing.
     
  9. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Make sure you use the setup wizard and the layers correctly. I had encountered that problem but I also fixed it by reading carefully the integration manual. If you want your AI to attack faster just out 0 in min and max attack speed and in min and max chase
     
  10. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    60
    Thanks, solved. Finally it was a child layer inside the player that had the layer "player" also, where all must be default to avoid conflicts... :)
     
  11. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    60
    Is it possible to add custom sounds on specific times on the animators clips also on the "attacks" animations? (As in footsteps ) ? I mean to have better control and fine tunning than start playing the sound on the start's clip...
    Thanks,
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,203
    I thought his response was an honest attempt to help you. Yours is an annoying and incredibly rude response.
     
  13. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    60
    Delay timing on the animations for applying damage is measured in:
    1.seconds or
    2.% or
    3. frame ?

    Thanks,
     
  14. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    498
    Hey bro take a look at this video, it's pretty easy and powerful to add events on your animations

     
    radiantboy likes this.
  15. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    I can't remember exactly, but I thought you could fix it with applying a NavMesh Obstacle to your player. I can't remember whether or not it was using carve or not, but this should work.


    Switchable melee and ranged combat, based on distance or health, will be coming with the 2.3 update.


    It should be sometime this month.


    I haven't worked out exactly how schedules will be handled. UniStorm integration is easy because I'm the developer of it. I'm not sure how Enviro's time of day events are handled, but when I'm ready to start 2.3, I will look into it further.

    I am taking full advantage of Unity's Animation Events. I have already added an "General Sounds" list that can be customized for each AI. This sound list allows users to add sound clips along with an ID so they can be called with an Animation Event and using its int parameter. This can be used wherever needed.

    Attack sounds will also be called using Animation Events that will be random. Animation Events are best for this so they are always triggered consistently.

    I've also added a new "Item List" for each AI that allows them to enable and disable items. This can be useful for quests, enabling and disabling weapons or other usable items, and even having an AI interact with objects such as removing an item from a plant so an AI can farm. I have a demo video of all this coming within the next couple of days.

    Emerald AI already has support for both Dialogue System and Quest Machine. I will make sure version 2.2 is supported before it's released.


    I will look into network support after 2.2 is released. It's tricky because Photon isn't built-in to Unity like Unet was. Depending on how difficult it is, maybe I could make a tutorial for it.


    They are played in order of 1, 2, and 3. With 2.2, you will have the option to play randomly or in order.


    This was happening because you AI saw the player as obstructed. If you need to ignore a layer, you can use the AI's Obstruction Detection Layers. If there's anything in front of the player that's not on the Detection Layers, the AI will consider its target obstructed so it needs to be ignored.



    Yes, footstep Animation Events can currently be used. You just have to enable the option in the Sounds Option. See the tutorial here to add footstep sounds through Animation Events: https://docs.google.com/document/d/...s2njM7Jx9pYlqgbtM8/edit#heading=h.aisc1wq6w60

    Other custom sounds and attack sounds for Animation Events will come with version 2.2.


    The attack delay is measured in seconds. So, if you set your delay to 0.5, it will not trigger damage or a projectile for a half a second even though the animation is playing.

    With version 2.2, attacks will be triggered with Animation Events so you can trigger an attack at the exact frame that's needed regardless of the animation's speed.
     
    RonnyDance likes this.
  16. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    60
    Once 2.2 is ready, updating from actual version do you keep all the AI params or do you have to start from scratc for every NPC? Thanks,
     
  17. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    Yeah I was wondering this as well. Do we have to rebuild the AI controller and everything from scratch or will the update just be seamless plug and play?
     
  18. UnityCSharpNoob

    UnityCSharpNoob

    Joined:
    Jul 29, 2016
    Posts:
    1
    Would be nice to see the release of 2.2 soon. Still waiting!
     
    erichey likes this.
  19. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    60
    Hi @BHS ,

    I am having an issue with a character and an npc collider, whereby the player ends up on top of the ai head.

    I've narrowed it down to the rigidbody and navmesh agent - I also found that when using a rigidbody and nashmesh agent, you must have the option Is Kinematic on, otherwise a race condition occurs, that information is in the unity documentation. (this does not work though with Emerald ai ).

    So, I have a few questions.

    1) When setting up Emerald AI v2 with a brand new ai prefab, the setup creates the box collider, rigid body and navmesh agent on its own - but your setup does not tick the Is Kinematic option..\are you guys aware of this ? and that you have to have this on ?

    2) Even if I tick the option Is Kinematic for emerald ai v2 ai's it does not work - I tested and it works on another ai asset i have, its just it does not work with emerald ai v2 - player character ends up on top of ai model head due to colliders having a race condition - is there away around this ?

    Its a show stopper for sure, your hitting an NPC AI, and suddenly your on top of its head. lol I dont know why the Is Kinematic option fails to work for emerald ai.

    Regards

    Carme
     
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    I tried my hardest to keep the variables the same and most things should be able to transfer over. However, I didn't want to limit myself so somethings where changed and renamed. Most animations will need to be reassigned as well as generating a new Animator Controller. The good news is that there are now about 50 animations total that can be used for each AI.

    The Damage function will not need to be updated as I added optional parameters. However, if users want to utilize the new features, such as ragdoll deaths, you will want to update the Damage function. I will provide update information on the documentation when version 2.2 is released.


    Animator Controllers will need to be regenerated and animations will need to be reapplied. There are now about 50 animations total that can be used on each AI.


    I'm working as quickly as I can. I'm rigorously testing version 2.2 for a flawless release. The improvement between version 2.1 and 2.2 is significant. A lot of the system was rewritten and improved.


    You can also try adding a NavMesh Obstacle to your AI.

    1) IsKinematic is set to true on Start with the Emerald_AI script. This is done just in case a users sets it to false while in the editor.

    2) Try adding a NavMesh Obstacle to your AI as I've suggested. It should stop the AI from being able to be on top of your player. I can't remember if you're supposed to have Carved set to true or not. Also, make sure your AI's box collider isn't too large and the stopping distances isn't set too small. These can both cause this issue to happen.
     
    hoodoo, SickaGamer and llJIMBOBll like this.
  21. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    498
    @Carmexx

    I found having carve on and carve only stationary off makes the ai try to walk around you, but if you have carve only stationary on the ai will walk into you.
     
  22. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    934
    Hello @BHS

    Im using this in a VR project and Im using Final IK & Puppetmaster to fight pedestrians in my neighbourhood... The question is that Im only using Emerald for navigation and love/hate intergration.. But the death should be handled with emerald, where to send that functions?
     
  23. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    60
    How to make both AI's feet snap to the terrain and not one of them like flying when walking on a slope terrain? Thanks
     
  24. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    60
    thanks @BHS, I'll try adding a navmesh obstacle to the player, (I tried it once but did not like the way the player can now push ai around) - but yes is should not end up on ai's head due to collider collision.

    and thanks @llJIMBOBll I'l check carve options.
     
  25. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    782
    I'm not sure if i've just noticed or its just started to happen but all my animal AI are sliding at the end of the walk animation. It seems Emerald carries on moving them after the animation stops. Any idea what is causing this and what can be done to fix it @BHS ? Thanks Andy
     
  26. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    934
    use final ik
     
  27. C_p_H

    C_p_H

    Joined:
    Nov 24, 2014
    Posts:
    121
    Final IK or Moveen.
    :cool:
     
  28. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    215
    @BHS Is there a recommended way to debug an AI?

    I've found that some of my AIs move as expected (wander type dynamic) and attack the player, while others don't. They stay in the same place, stuck on their idle animation. As far as I can see I've set the exact same settings on all the NPCs, just some work while others don't.

    Any obvious gotchas, or anything I could do to find out why some aren't working/moving?
     
  29. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Use navmesh if they aremt moving or add a nav mesh agent component to the ones that doesn't move. Make sure you also has a nav mesh baked into the scene
     
  30. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    215
    @cheesee09 Thanks but navmesh is baked and all AI have navmeshagent components. They all do. Just some move around and work correctly while others don't.
     
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    Custom death functionality can be added by utilizing the OnDeath event located under AI's Settings>Events. This allows you to call any custom function when an AI dies.


    This can happen if your AI's NavMesh Radius is too large or if the AI's Stopping Distance is too small.


    I can't think of anything that would be causing this. I don't believe I have ever encountered this issue. The only thing I can think of is that the AI's Stopping Distance is too large or their NavMesh Radius is too large. Also, make sure your Wander Radius isn't set too low. Maybe the AI isn't generating waypoints far enough out to move to them.
     
  32. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    215
    @BHS I'm really struggling with this, and it's doing my head in. Been on it for hours. Sometimes the setup works, sometimes it doesn't. I've tried duplicating a working AI and changing the Animation Controller with a new Override Controller (and new animation clips) and that never seems to work. I've redone the same GameObject a number of times and sometimes it works and sometimes it doesn't.

    Settings like Stopping Distance, NavMeshRadius, Wander radius are all identical to all NPCs and within sensible values.

    The one thing I do know is that when it works, the AI's Animation Controller (the mechanim tree) starts with the Idle1 bool parameter set to true (ticked), then from there the parameter values change to animate the AI. With the broken AIs, the initial Idle1 parameter never gets ticked - it's never gets set to true.

    Is there any way of debugging why the initial setting of this state is broken?
     
  33. Alexandus

    Alexandus

    Joined:
    Sep 5, 2012
    Posts:
    8
    Does the update fix the issue where there's no audio cooldown for the get-hit sound an AI can make? Second question, how generic are melee / ranged attacks in 2.2? I've implemented some basic spellcaster enemies through ranged attacks plus other script components but I'm curious how much that sort of thing is supported natively in 2.2 (either through allowing script invocations as cast attack actions, or other means).

    Thanks for your hard work on the asset, it's amazing!
     
  34. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    934
    Okay thats good. But I really was wondering how to send custom damage to emerald component to kill the AI?
     
  35. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    60
    Hi @mattis89

    Set the health in Emerald, I set100; really does not matter to what as long as you call enough damage to go past its max life.

    EmeraldAIScript.Damage(101, Emerald_AI.TargetType.AI);
     
    mattis89 likes this.
  36. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    142
    Off topic go troll elsewhere
     
  37. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    142
    Thanks very much for your direct and very helpful reply - this sort of interaction is what makes the Unity community great!
     
  38. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    142
    lol totally
    Has anyone successfully integrated photon into Emerald 2.0 - if you did - how did you do it?
     
  39. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    142
    Has anyone successfully integrated photon into Emerald 2.0 - if you did - how did you do it?
     
  40. Carmexx

    Carmexx

    Joined:
    Jul 29, 2014
    Posts:
    60
    No idea on photon server.

    Pun was easy enough, just do what you normally would, add a photon view, transform & animation view, config the views as to your liking - InstantiateSceneObject on prefab. You already know the Emerald product has no networking inbuilt, so you need to use your own custom damage/health+bars (or whatever you need to network on your game) scripts; that are networked via rpc's or .stream.SendNext / stream.ReceiveNext to sync params across clients.

    (Essentially your using emerald to move AI and run animations, shame but heres hoping to full network support in the near future).
     
    BryanO likes this.
  41. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    719
    Does anyone know how to make the warning samples work ? Also I would like to add an event when the character sees me, do I need to code that myself? If so anyone got any hints as to where.. Seems a shame to hack up every asset I get (especially when new version comes out) but also seems to be the best way to really customise them.
     
  42. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    I think that is coming in either 2.2 or 2.3? @BHS can answer that better.
     
  43. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    62
    I'm having an issue with the AI using ranged not being able to damage the UFPS player. I have followed the tutorial and changed the Y offset but that didn't work.
     
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    Are you using the Emerald Setup Manager? Also, if you are duplicating AI, you will need to clear the Animator Controller and create a new one. What may be happening is, the Emerald system may be referencing the previous Animator Controller instead of the new one. I have redone and fixed all of this with version 2.2, but I will look into this for you to see if that's what's happening.


    A secondary Audio Source is added with 2.2 that automatically detects whether or not the primary Audio Source is playing. If the primary is playing, it will use the secondary to ensure all sounds are reliably playing.



    With version 2.2, I have an entire script dedicated to events that are able to be called both programmatically and through Animation Events, with Warning Sounds being one of them. I have also added a Unity Event for OnWarning, as well as an OnFlee, OnAttack, and OnStartCombat.


    Did you make sure you unchecked "Has Collision Trigger" as mentioned in part 6? This is usually why the AI cannot see the UFPS player. Also, ensure that your tags are correct.
     
    radiantboy likes this.
  45. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    62
    @BHS , I have unchecked the "Has Collision Trigger". The default skeleton melee AI is working and can damage the UFPS player. I created a new AI that uses ranged attack and they are firing at the UFPS and the projectile is going to the UFPS player's feet.
     
  46. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    719
    Oh great!!! How do I find these methods? I see nothing in the docs for OnWarning.

    EDIT: DOH! not out yet, whens it coming? :)))) Any other goodies.. Actually ive been playing today this is best AI ive had so far I think..

    PS. yes ive been tapping into animation events, what a godsend they are, I guess they can do virtually everything I need in some way

    edit: the warning sounds did work in this release though right? just wondering why I cant hear them
     
    Last edited: Dec 10, 2018
  47. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    719
    Can you verify that the "bullets" actually hit you? If so I think I can help with the code to do damage.

    Ive just got back to emerald (I use UFPS "classic") and decided it would be better for me to simply put a collider inside "items" that hit me like swords/bullets, then I can add whatever I want to the script. Hopefully you are using colliders etc and if so you can try this:

    Code (CSharp):
    1. void OnTriggerEnter  (Collider other)
    2.     {
    3.         if (other.tag=="Player")
    4.         {
    5.             Debug.Log("PLAYER HIT.");
    6.  
    7.             if (other != null && other.GetComponent<vp_DamageTransfer>()){
    8.                     other.GetComponent<vp_DamageTransfer>().Damage(15);
    9.                     Debug.Log("damage sent "+15+" TO "+other.name);
    10.                     return;
    11.         }
    12.         else
    13.         {
    14.             Debug.Log("couldnt damage player! CurrentTarget:"+other);
    15.             if (other!=null)
    16.             {
    17.                 Debug.Log("CurrentTarget is "+other.name+" does it have a damage handler???????");
    18.             }
    19.         }
    20.     }
     
  48. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    719
    Maybe you can print out their target name (to see what it thinks its going for?), perhaps you could make the target be something like the FPSCamera or the head bone, I think I have this issue somewhere in my game if you use the whole player object sometimes it goes for the bottom of it for some reason.
     
  49. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    62
    Where am I putting this at? in the OnTriggerEnter function in Emerald_AI.cs?

    EDIT: Also I have found something out that if I move really close to the ranged AI the damage will happen to the UFPS player. So I'm not sure if it's a collision problem or what.
     
    Last edited: Dec 11, 2018
  50. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    @BHS When you come out with 2.2, will the documentation be updated to reflect the new features? It would be nice to have an update tutorial along with the upgrade!