Search Unity

  1. We want you to join us at GDC this year! Take a peek at all of the events we will be hosting during the week of GDC.
    Dismiss Notice
  2. Tell us about your experience here and you’ll get early access to the 2018 Game Studios report + more goodies.
    Dismiss Notice
  3. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  5. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice

[RELEASED] 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. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    3
    Do you know when that you will have 2.1 out form public consumption?
     
  2. Demonoid74

    Demonoid74

    Joined:
    Jan 20, 2017
    Posts:
    11
    Hey thanks , that was the problem , was trying to test on an aggressive AI...
    Definitely looking forward to an option to have AI avoid certain tags . That will definitely help out with some ideas I was messing with
     
    uberwiggett likes this.
  3. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Hey there!

    Yes, AI can navigate through stairs and different floors. These all must be baked with Unity's NavMesh system. As for locked doors, this could be handled with NavMesh Obstacle (https://docs.unity3d.com/Manual/class-NavMeshObstacle.html). When the door is locked, the NavMesh obstacle is active, when the door is unlocked, the NavMesh obstacle can be disabled.


    Are you receiving any errors? Also, how far away are you shooting your AI from? If it's not within the AI's detection distance, it won't react to the target. You would need to define that manually by using the SetTarget(TargetToAttack) function. I don't have your VR system so I don't know exactly what defines a successful attack.


    Thanks for the suggestion!


    An AI will not play its hit animation if it's in the middle of an attack animation. This is to stop an AI from being unable to attack if it's constantly being hit. This can be fixed by giving your AI more Attack Speed so that there is a brief pause before the next attack. A Min Attack Speed value of 1 and Max Attack Speed value of 2 should work fine.



    I don't give out release dates because I can't say for sure how long it will take. However, it is currently being worked on. It shouldn't be more than a month or so, but I can't guarantee that.




    You're welcome!
     
  4. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,844
    I hope you'll bring that option to next release :)
    I prefer getting a whole plugin features than having to change it each release with my own custom code.
     
    BHS likes this.
  5. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    252
    News about ootii you still work on it?
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Gregorik and Salja like this.
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    I finished the ootii tutorial right after you asked about it. :)
     
  8. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Great to hear those are working.

    The developer said the WeaponCore script should handle all of the damage calculations excluding the arrow damage. Is the Spellcasting Motion Pack not working? If not, I'll contact the developer and get it figured out as soon as possible.
     
  10. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
    Hey it may be me but following your instructions, I got Melee working and arrow damage, but spells just bounce off the character.

    In addition, if the AI dies whilst the spell is in effect (I had an AOE defense spell up while I killed it in Melee), it interrupts the spellcasting so that the spell never completes.

    Now.. having said that.. I have a number of changes and will try it on a blank test project, but for now I am not getting any effect from spells on the character and my ootii setup is basic.

    I wont be able to setup a basic test till maybe tomorrow or day after, but currently, the spell casting damages an ootii NPC but not an Emerald one.

    M
     
    Last edited: Feb 6, 2018
  11. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    252
    Yeah i talk with tim the spell damage is different damage i think he forgot to tell you ;) but thank you for this hard work im sure the spell damage you becone to work
     
  12. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    530
    Hello! Any new updates? Im still designing my creatures so Im just checkin in to see what bugs have been fixed :) peace yall!
     
  13. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    530
    If you want to see my progress check out astralstormgames on instagram :) thanks!
     
  14. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
    OK did a test this morning..

    Added Emerald AI as per the instructions with a player in the Spellcasting Demo. The Player Character had all three packs installed.. Sword, Archery and Spellcasting.

    The Spellcasting demo has three NPC "Targets" in it.. all 3 targets get hit by the spell and take damage and also take damage from sword and bow.

    Added the footman.. footman takes damage from sword and from arrows, but not from spells.

    Theres a link missing somewhere.

    I tried adding the ootii basic attributes to the Footman as per the delivered NPC with tag NPC and health of 100 but still no effect.

    M
     
  15. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    252
    The NPC need a Actor Core for working Basic Attributes but you dont need Emerald Handel the Damage self i try to write a small script later what is easier to use and with working spells
     
  16. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    252
    i create a own damage adapter for ootii so the changes into the WeaponCore and ArrowCore is not more needed.
    You need to add the script to your EmeraldAI creature thats all and make the changes in the Emerald_Ai.cs i dont have tested speels yet but maybe is works without changes i think is much cleaner if we not need to add something to the WeaponCore and ArrowCore

    Edit: Spells working fine with my script

     

    Attached Files:

    BHS and moria15 like this.
  17. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
    Freakin' awesome.. yep works with ALL motion packs and still take damage from the Emerald AI :)

    As you said.. you must remove the changes to WeaponCore and ArrowCore or you double the damage per hit :)

    TY :)

    M
     
    Salja likes this.
  18. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    252
    I think the fighting is a bit boring, it has to be somehow more dynamic
     
  19. neodotca

    neodotca

    Joined:
    Feb 20, 2016
    Posts:
    57
    How to prevent "Emerald AI enemies" to pass through doors? My player is followed by an enemy, i expect that the enemy will also trigger the door, but instead, he passes through the door, enemy and door have colliders. How to fix that? thanks!
     
  20. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
    Is there a setting to delete the model on death, either with fade or instantly?

    M
     
  21. uberwiggett

    uberwiggett

    Joined:
    Jun 26, 2015
    Posts:
    22
    Neodotca, the enemies will travel around on the navmesh, you'll need to make your doors as navmesh obstacles and use a dynamic navmesh to update it when the door is open etc. Because the navmesh covers everywhere it doesn't know the door is closed.
     
    BHS likes this.
  22. neodotca

    neodotca

    Joined:
    Feb 20, 2016
    Posts:
    57
    Thank you!
     
  23. neodotca

    neodotca

    Joined:
    Feb 20, 2016
    Posts:
    57
    Ive been testing with Emerald "ranged" combat mode and i'm getting very mixed results, would it be possible to add a screenshot with default settings to the tutorial of GKC?
     
  24. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,844
    What do you mean ?
     
  25. neodotca

    neodotca

    Joined:
    Feb 20, 2016
    Posts:
    57
    What is the "Player Offset Y position" for GKC?
    I tried 2 different soldier models, use weapon for "Ranged Attack Transform", 1 soldier was shooting from the floor and the other from far left. I get bad results no matter what value I try. If someone Tested "Ranged Attack"with GKC, please give some feedback!
     
  26. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,844
    Actually Emerald uses "Player Y position offset" value to fire projectiles.
    This is very approximate and more aimed at hack n slash games with very distant game camera.

    For your solider character you would need an empty new child object for the ranged weapon to get precise projectiles starting position. You could do it if you are experienced or ask this new option to be included in the plugin.
     
    BHS likes this.
  27. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    459
    I performed steps 1-7 of the Invector Integration, with the line of sight footman in the Invector Shooter-Melee no inventory scene. The footman does not attempt to attack my character. Invector character is in Player layer with Player tag. Footman is Enemy tag and layer with detection tags settings Unity tag Enemy and layer one set to Enemy.

    Tutorial Step 8 states that the AI should be able to damage the Invector Player, but the Ai does not attack.
    Thoughts?

    The footman walks in place some and stands for a while, that's all.
     
    Last edited: Feb 8, 2018
  28. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Awesome! Thanks for figuring this out. If you don't mind, I'd like to add this to the Motion Controller tutorial as it would really simplify things for other users.


    Improved fighting mechanics will come in a feature update. I'm almost finished with the 2.0.3 update, which will have some much needed improvements. After that, I will start on the 2.1 update that will add the breeding and herd mechanics. Lastly, the 2.2 update will have the improved combat mechanics.



    Not currently. I'm going to try and add this with the 2.0.3 update, if I have the time. If not, it will be added with the following update along with ragdoll deaths.
     
    moria15 likes this.
  29. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    252
    sure you can add to the tut im glad what i can help :D
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Thanks! :)


    You added the necessary additions to the scripts it said to edit? If an AI is not detecting a player, and you have setup your layers and tags correctly, that would be the cause. Are you using the newest version of Emerald AI?
     
  31. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,844
    Hi @BHS
    Do you plan to add the ranged AI be able to strafe when it's possible to 2.0.3 or 2.1 ?

    I mean that option :
    Also ranged AI that starts chasing the player when get stuck and waiting behind other AI , should be able after some delay to wander again within their wander radius.

    Strafe and wander are very needed when ranged AI is stuck behind other AI after some time unable to do anything.
     
    Last edited: Feb 9, 2018
    mattis89 likes this.
  32. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    113
    Hello.

    I just bought the asset. I am using ooties motion controller (with its packs) i have correctly set up the package, however, I was wondering if you could tell me how I can manipulate/add extra behavior to my AI's such as drawing weapons and create formations etc.

    I would be really helpful if you could provide some help on these issues.

    Other than that I enjoy the asset and I look forward to using it together with Unistorm as well ;)
     
  33. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    459
    My tags and layers were set up correctly and the Footman not moving had nothing to do with the Invector scripts. The issue was that nowhere in the Emerald Invector Tutorial is their mention of the Navmesh requirement. I think your tutorial skipped this step. You may take it for granted, because, ( and forgive me if i am incorrect ), Emerald relies on Unity Navmesh to function. The other three ai assets I own do not require Navmesh, so when I attempted the Emerald Invector Integration, it did not occur to me to create one.

    With the navmesh added to the Invector scene, yes, the Footman walks and attacks, and since I successfully performed steps 1-7, my vCharacter is now taking damage from the pesky Footman. I do not like using the Unity Navmesh, but considering that you made the effort to create an integration with Invector TPC, (a real time saver that I prize highly), I will learn Unity Navemesh and continue evaluating Emerald in our demo.
     
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Hey there,

    Great to hear!

    Drawing weapon animation isn't an available feature yet. However, it is something I would like to be added with a future update. Formations also aren't a feature as that is more for RTS games. You can can control an AI's destination by using SetDestination (Vector3 AIDestination) so you could have this set to your mouse's position. Formations would have to be handled with additional coding.


    My apologies for the confusion! If you had no Nav Mesh, it should have thrown an error. I'll be sure to add this to the integration tutorials.
     
    wood333 likes this.
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Hey everyone!

    Emerald AI version 2.0.3 is nearly finished. This update focuses on improving the way Emerald AI's Factions and Layers are handled, as well as a couple of needed improvements. Please keep in mind that the new faction system will continue to be expanded. This is the first step for the breeding and herds system. The new faction system should make things more user friendly and less confusing.

    Emerald AI 2.0.3 should be submitted within the next couple of days. Feedback regarding the changes would be appreciated. :)

    2.0.3 Release Notes
    • Redesigned faction system that allows users to define custom factions using the Emerald AI Faction Manager. This is done to eliminate the confusion with Unity tags and AI Tags as well as make defining AI factions more user friendly.
      • The Faction Manager allows users to create global factions that all AI will have access to. These factions can define what faction your AI belongs to and the relations to those factions.
      • Factions are defined using a custom enum system that dynamically expands depending on the global faction list.
      • The opposing faction list has been changed to the Faction Relations. The Faction Relations supports up to 5 factions.
      • A relations system has been added that allows users to define the relation of each defined faction within the AI's Faction Relations list.
    • Added proper LayerMask enums to the layer portions of the Emerald AI Editor. These layerMasks will also work with Multi-Object Editing and will display all Unity default layers as well as user created layers.
      • Added an Ignore LayerMask to the Obstruction Detection feature. This allows users to define layers that need to be ignored for a successful attack to be calculated. This is to helps the ranged combat system ignore player objects that may be blocking the player.
      • Added a LayerMask to the detection layers, which was previously typed out using strings. Layers that are
      • checked using this LayerMask will be detectable targets, if they have the appropriate Unity tag and faction.
    • Added an AI Title to the AI's Settings>Stats section. This allows AI the ability to display a title using the Emerald's built-in UI system.
      • Added an option to use or not to use the title feature located at UI Settings>Name Text Settings. Display AI Name and Display AI Title must be enabled in order to use this feature.
    • Added a script that automatically adds the #if EMERALD_AI_PRESENT custom define. This will allow Emerald integration to be expanded to other 3rd party systems. The custom define allows Emerald specific code to only be compiled if the Emerald define is detected. This allows other 3rd party developers to add Emerald integration code to their systems/tools which means users won't have to do it manually. This is largely dependent on the 3rd party developers who want to add integrated support. Integrated support for UniStorm schedules, GKC, Love/Hate, Quest Machine, and other systems is coming soon.
    • Added a bug report button to the Emerald Docs section of the Emerald Editor. This button will take you to a Google Form allowing you to provide information about possible bugs you may have found. This bug report form is the best way for bugs to be reported so they can be fixed sooner.
      • The bug report form also allows users to send feature suggestions as well as suggestions for improvement.
    • Added Idle sounds for AI to play sounds while idling.
      • Added a min and max seconds that controls how often an idle sound is played. This amount is randomized based off of the min and max.
    • Added a min and max value to control how often an AI will switch their idling animation. This amount is randomized based off of the min and max.
    • Added a new setting that controls how far an AI's Detection Radius is expanded if an AI receives damage and there is no detected target. This is to prevent players from dealing damage and not having the AI be able to detect the damage dealer.
    • Moved Recycle AI option to Optimization Settings.
    • Improved example scenes
      • New Skeleton and spider models to better demonstrate Emerald AI and its capabilities. These models fit the style of the Emerald AI example scenes better as well as giving users much higher quality models to use while starting out.
      • New particle effect for dealing damage. This new particle effect fits the style of the Emerald example scenes better.
      • New sound effects for spiders and skeletons.
      • New impact sound effects.


    Screenshots
    Faction Manager.gif
    New Effects and Model.gif
    FactionManager.png
    FactionRelations.png
     
  36. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    459
    After completing the Invector TPC tutorial, I find that melee works both ways, but Invector range attacks do not damage the Emerald ai Footman.

    Further, the Integration can not tell the difference between a block and aiming. If I aim a range weapon at the Footman, and keep my finger down on the aim button, aiming constantly and blasting away, then the Footman thinks he is blocked (same input key for block and aim, after all) and The Footman is unable to damage the Invector Player.
     
    Last edited: Feb 11, 2018
  37. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
    Happy re the idle sounds and faction improvements.. sad remove on death didn't make it yet :)

    M
     
  38. uberwiggett

    uberwiggett

    Joined:
    Jun 26, 2015
    Posts:
    22
    Wow those updates sound pretty neat! I like what you've done with the faction system, it actually saves me a lot of hassle with a jumble of layers and tags when I can use them for other things. Really happy with keeping it inside the AI scripts. One thing I'd like to see in the future (if it's not already there and I've missed it) is an expansion of the animator, currently the turn around animation only allows for one speed, which is fine when my AI are walking around, but when they run to chase me they often switch to the turn animation which is walk speed. If i set it to a running animation, they run to turn around then walk slowly while wandering. It's very jarring to watch :) my current solution is to just set them to always run, but there's plenty more room for adding to the controller, and with integration to love/hate and quest machine I'd love to see a more open ended animator that allows you to call states so AI can play emote animations, react to specific quest/story events or use heal potions etc.

    @wood333 Invector's own AI utilise the navmesh, the player does not, but really any AI system requires the navmesh agent to control the areas where it can send AI. Without it the AI will usually just turn in circles on the spot and not be able to chase anyone, as I have used Invector's AI before I already had navmeshes so I must have done it by default without thinking. The block/aim thing is interesting, I haven't tried that out yet but it might be quite the issue unless you can remap the key inputs :eek:
     
    Last edited: Feb 11, 2018
  39. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
    Pre version 2 there was a drop loot demo... is there still a drop loot option on death or will that come with removal on death?

    M
     
  40. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    530
    Hello guys! Looking forward to use Emerald with my upcoming creature, I recieved a kinect v2 today so motioncapture animations is going to bring alot to this creature :) Im still making ALOT of details. The gum, skin surface, veins, more mouth details around teeth.. and so on :) Please gimme your opinion.

    BladeCreature-front.jpg
     
  41. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    113

    Thank you for your response, however, I was looking for a way to tap into your system and extend it in order to create move behaviors. Is it possible to tap into the events when an AI changes state (from passive to attacking the player or another AI) etc?

    Currently, the only thing I can see in your API documentation is how to set variables but not read them?
     
  42. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,844
    @BHS
    Awesome update, Emerald is getting better each time :)
     
    Last edited: Feb 11, 2018
    BHS, Neviah and mattis89 like this.
  43. Demonoid74

    Demonoid74

    Joined:
    Jan 20, 2017
    Posts:
    11
    Looking forward to the update and definitely the ranged and faction improvements!
     
    BHS and zenGarden like this.
  44. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    930
    Looking forward to the update and future updates - thanks for all the work you've done on this amazing revamp of Emerald AI.
     
    BHS, wood333, mattis89 and 1 other person like this.
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,135
    Ranged attacks should be working. Did you edit the vProjectileControl script as stated in the Invector tutorial? I will look to see if there is a better way to implement blocking.


    Layers and tags are still needed to differentiate AI from other objects. This is done for performance reasons. If it wasn't done, AI searching for targets would be searching through 100's of objects rather than just a small amount. I will be improving the turning speed setting so it can be adjusted better with the next update. I have plans to implement a state that users can apply any animation to. I have tested this a little while back, but didn't have the time to fully implement it.


    The loot system from v1 wasn't a true loot system. I would like to add some sort of loot system, but I also don't want to stray too far away from Emerald AI being convoluted. It would most likely be some sort of system that users can add various custom items that the loot system could generate on death. The player could then pick up these items and add it to their inventory. I'd like to make it flexible enough that it could easily be integrated with 3rd party inventory systems.



    Hey there!

    Very cool. I'm not much of a 3d modeler, but I think it's a great start. :)



    Reading an AI's behavior can be done with the following for passive or aggressive. What other variables would you like to read?

    Code (CSharp):
    1. EmeraldSystem.BehaviorRef == CurrentBehavior.Passive
    2. EmeraldSystem.BehaviorRef == CurrentBehavior.Aggressive

    Thanks!



    Great to hear you're looking forward to the update!



    You're welcome! :)
     
    julianr and mattis89 like this.
  46. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    930
    That would be great. Just a gameObject counter, so you can add as many as you wanted, or just one gameObject that can have a script attached to drop random gameObject items (prefabs) defined for your own inventory, or specified gameObject items.
     
  47. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    371
    For me, a simple exit on death would be fine. Maybee a pretty much empty script that you could then plug into for the bits you wanted to add.. perhaps even just an event manager with an ondeath option would do it :), which is pretty much what I do now I guess :)

    M
     
    Last edited: Feb 12, 2018
  48. partizan

    partizan

    Joined:
    Apr 12, 2014
    Posts:
    2
    For the 2.2 update it would be nice if you could add the possibility to push/knock back an enemy when hit with an special attack or when on death. But then some in air animations is needed for that for example if the enemy would be pushed of a clip. That would be awesome
     
  49. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    930
    As what partizan has said, but would it be possible to have multiple hit/knock/back animations based on how many hit points the AI has taken within a scope based on the AI overall health? So for example you could have 1 - 5 HP, just a stumble, 6 - 20 HP - Kneels down in pain, 21- 50 HP falls over and gets up again, 51-99 HP falls over and takes longer to get up - anything over 99 plays the death animation.

    Alternatively a switch between standard single hit animation or hit box animations, so you could tie in the animations to individual hit boxes -head shot or sucker punch - goes to instant Death animation, left arm impact (holds arm in pain animation), same for right arm, and legs/feet (limping animation) - Main body impact holds chest in pain. This would not be aimed at Humanoid characters, just generic hit animations for each hit box where the impact was taken. This might be better.. its a trade off between the two.
     
    Last edited: Feb 13, 2018
  50. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    240
    I'm excited about the Quest Machine integration in particular: if it could work together with Emerald, that should enable some awesome AI capabilities.