Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[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. DragonTTK

    DragonTTK

    Joined:
    Jun 1, 2016
    Posts:
    29
    Hi is it possible with Emerald AI to do a turn based battle so example. I left click on NPC then i attack npc, then npc attacks me then i attack until the player or npc dies or either retreat.

    Better example (this unity project has the combat i'd like to copy)
    https://maxiecole.itch.io/hobbling-hero

    If this is possible how would i got about doing this thanks!
     
  2. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Nice! What about the fishes? Obstacle avoidance? Ragdoll death option? Hearing? Can AI's walk in houses and in mesh caves? How does the spawn system work, can I spawn enemies on time using an asset like tenkoku dynamic sky?.. Do you have a more exact release date now? Where can I find the UFPS intergration tutorial? Im considering a buy because it looks better and works more nicely than other AI engines..
     
    Last edited: Oct 9, 2017
  3. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi there! I'm excited to hear that Emerald 2.0 will support flying animals!
    That may make birds and fishes possible. But I also get some questions:
    Can I randomly change the operating height within a range of a flying animal?
    Can I let the flying animal land on ground or swim on surface of water?
    Can I use A* Pathfinding Project with Emerald(runtime updated graph, local avoidance etc)? If not for now, is there any tutorials or suggestions to make the integration?
    Can animals hear and smell other animals or player?
    Can the animal get to the last position of its target after the line of sight been blocked?
    Thank you for your time :)
     
  4. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Hello, we are considering coming back to Emerald but having some issues. I am not a coder so please be patient with me. :) My programmer is saying that we have to use special Emerald tags on all AI creatures. He believes this means that if we need to use tags on a creature for something outside of Emerald, that we cannot do this. Is this true?

    It seems very limiting to me so something we need to do before we start working on networking and more advanced features with Emerald. Also, will Emerald lock you out of using layers for things like avoiding raycasting?

    Thanks. We are also considering Crux which looks awesome.
     
    Last edited: Oct 9, 2017
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @Teila - Emerald AI does ask you to select a single Unity tag (what they call "Emerald System Tag" in the Emerald_Animal_AI inspector), but you can also define additional Emerald-specific, non-Unity tags for each creature. Since Emerald matches the Unity tag or the additional non-Unity tags, it looks like you can set the Unity tag to whatever you want.

    The layer thing is a bit trickier. It supports multiple layers, but the inspector only lets you choose one for some reason (maybe optimization?). Your programmer can fix this in Emerald_Animal_AI_Editor.cs by changing line 2436 from this:
    Code (csharp):
    1. self.EmeraldLayerMask = EditorGUILayout.LayerField("Emerald Layer", self.EmeraldLayerMask);
    to this:
    Code (csharp):
    1. self.EmeraldLayerMask = EditorGUILayout.MaskField("Emerald Layer", self.EmeraldLayerMask, UnityEditorInternal.InternalEditorUtility.layers);
    Do keep in mind, though, that the more layers you add to the mask, the harder the physics engine will need to work.

    Disclaimer: All this could change in version 2.0.
     
    julianr and Teila like this.
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929

    Hey, Tony! Thank you so much. That really helped. :)
     
  7. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    There is also an asset on the store called MultiTags. I bought it a while ago but have not used it because the need has yet to arise. I would give you the link, but the new unity asset store is like a virus to my browser and it crashes when I try to use the Asset Store.
     
    Teila likes this.
  8. BHS

    BHS

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

    That example wasn't exactly turned based. The NPC still attacked even though the player wasn't attacking. If you are going for the type of combat that game demonstrated than it should be possible. You can trigger an attack anyway you'd like, even with a click like that game did. To achieve this, you would just need to get the Emerald object to damage using something like:
    Code (CSharp):
    1.  if (Input.GetMouseButtonDown(0)){
    2.    ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    3.    if(Physics.Raycast(ray, out hit))
    4.    {
    5.       if (hit.collider.GetComponent<Emerald_Animal_AI>() != null){
    6.          hit.collider.GetComponent<Emerald_Animal_AI>().Damage(DamageAmount);  
    7.       }
    8.    }
    9. }
     
    DragonTTK likes this.
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    1) Fish are planned to be supported, but I'm note sure if they will make it in time for release.
    2) Ragdoll on death will be a feature available with the release of Emerald 2.0.
    3) Hearing is another feature that probably won't make it in time for release, but should be available shortly after.
    4) There is no spawning system included with Emerald. You may be thinking of Crux - Procedural AI Spawner, which procedurally spawns AI according to biomes and other conditions. Crux will be adding spawning support via time and weather with UniStorm.
    5) As for a release date, I'm hoping for early November. Emerald 2.0 is currently in beta.
    6) For a tutorial for integration with UFPS and the current version of Emerald, you can see the tutorial here: http://emerald-animal-ai.wikia.com/wiki/Tutorials#Implement_UFPS_with_Emerald_AI Keep in mind that the process will change with Emerald 2.0.


    Hey there!

    1) Height based flying will be added after release, but it should be possible.
    2) When the feature is added, flying AI will have the ability to land. I'm not sure if they will be able to swim as well.
    3) A* Pathfinding support could possibly be added in the future, but not anytime soon. I'm not aware of any tutorial to do so. I'm not too familiar with the asset so I can't provide any suggestions, unfortunately.
    4) With Emerald 2.0, AI will have Line of Sight, but not the ability to smell or hear. The ability to hear will come after the release of Emerald 2.0.
    5) No, not currently.


    Hey there!

    TonyLi already answered with pretty well, but to reiterate, I will also explain.

    The current version of Emerald uses its own tag system to not limit users to the tags they could use. Some systems requires specific tags to function properly, such as RFPS, which requires all NPCs to have a tag called "Flesh". This would limit you to only being able to define your AI with the "Flesh" tag.

    Emerald's tag system was designed so users wouldn't be limited to the Unity Tags they could use. The Emerald System Tag is a global Unity Tag that all Emerald AI components use, which can be anything you'd like. The non-Unity tags allow you to define each AI to specifically have their own tag such as Small, Medium, Large, Deer, Rabbit, Enemy, Ally, etc. When setting up which objects an AI can detect, you would use the non-Unity tags to so. This all allows for more customization and less restriction.

    The Emerald layer is to help with performance. When an AI is searching for its closest target, it only looks for objects with the user set Emerald layer. This layer is customizable and can be anything the user would like.
     
    AGregori, julianr and Teila like this.
  10. RAZD112

    RAZD112

    Joined:
    Aug 30, 2017
    Posts:
    70
    hey , how can i make my ai go into different levels in height ? i mean i wanna assign eagle that can fly high and when prey is in range will go down and attack it.
    same with shark, crocodile when the player is range it will move on all 3 axis how can i do it ? thanks
     
  11. DragonTTK

    DragonTTK

    Joined:
    Jun 1, 2016
    Posts:
    29
    How would i go about having it repeat attacks after initiating combat so i would left click on npc then begin attacking then would just keep attacking without needing to keep left clicking each time.
     
  12. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    Hi,
    I'm using UFPS and set my Emerald AIs to flee from the 'Player' tag...this works perfectly. I know that Emerald doesn't use the Unity tag system, so how do I make my AI flee (or avoid) other objects?

    Two specific scenarios:
    1. I want the AI to flee from a vehicle when it approaches.
    2. I want AI to avoid fires?

    I'm assuming the approach would be the same for both.

    Does anybody know how to do this?

    Thanks!
     
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    This isn't currently possible. Height based flying and swimming will come shortly after the release of Emerald 2.0.


    It's hard to say because that's more on your character controller's side. However, you could use something with InvokeReapting. Once an attack has been triggered, repeat it with InvokeReapting.

    Code (CSharp):
    1. InvokeRepeating("DamageAI", 0.1f, PlayerAttackSpeed);
    2.  
    3. void DamageAI (){
    4.    EmeraldComponent.Damage(PlayerDamage);
    5. }
     
    DragonTTK likes this.
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    Currently, Emerald only supports 1 fleeing target. Are you referring to the Emerald 2.0 beta or Emerald 1.3.5?
     
  15. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    Emerald 1.3.5

    There is an option to add multiple flee tags under the Tag Options tab. I've set Tag 1 to "Player" and it works perfectly with my UFPS player. Now, I want to add a second flee tag for a vehicle (e.g. unity tag=car) and maybe a third flee tag for campfire game object, but Emerald doesn't recognize those other tags. My question is: how do I get Emerald to flee from those other non-AI objects?

    Am I missing something obvious?

    Thanks!
     
    Last edited: Oct 12, 2017
  16. Lipefe

    Lipefe

    Joined:
    Jul 14, 2017
    Posts:
    10
    Hi BHS, I am here talking on Christian Schamara behalf from Strix Interactive and we are very happy with your asset and its improvement, there is something we noticed about the sounds, especially footsteps sounds, they are not synchronised with the animation keyframe, how can we sync them properly? I know that is possible to create a function and call it as an event on the animation window, but if you guys could do something about it in the next update it would save us lots of time. (using emerald 2.0 beta)
     
    magique likes this.
  17. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    There isn’t currently an option to flee from non-AI objects. I can possibly look into adding this feature to Emerald 2.0.


    Hey there!

    Great to hear you’re enjoying the Emerald 2.0 Beta. Currently, the footstep timing is controlled by timers. This is only temporary until a more precise method is implemented. The plan is to add an option to control footsteps specific to each animation. This will be customizable by the user through the Emerald Editor.
     
  18. Lipefe

    Lipefe

    Joined:
    Jul 14, 2017
    Posts:
    10
    Thanks for your reply BHS, awesome! We are looking forward to this and also our team uses Otti character motion controller we would like to know if you going to add a support for OTTI motion controller, we really need it because we definitely going to use your AI manager to handle most of the AI in the game.
     
  19. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Flee from non-AI would be most welcome. Especially cars or debris. A step closer to making the AI more intelligent :)
     
    Teila likes this.
  20. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    FYI: As a test, I attached an Emerald AI script to a few game objects, gave them AI tags, disabled the navmesh agent and the other AI fled from them perfectly (with some errors in the console). It was great to watch the deer run as the vehicle approached, or the boulder rolled towards them. So, all we need is a stripped down version of the AI script that only tags the non-AI objects (or something like that). :)

    Note: adding the Emerald AI script automatically adds a navmesh agent and a box collider. It also sets the rigid body to kinematic and disables gravity. So, if you try this, you'll probably want remove/disable/change those items.
     
    Last edited: Oct 14, 2017
    julianr likes this.
  21. Wolfieman

    Wolfieman

    Joined:
    Jun 5, 2017
    Posts:
    7
    I'm having some problems with this and am not really sure why as it was fine before. Maybe because I'm working on a multiplayer project now?

    Emerald AI does not recognize my players as "players." If I put in one of the player prefabs from Emerald AI, my animals react as usual. I have triple-checked that my player object is tagged as player and on the same layer but it's still not working.

    Any ideas? Thanks!
     
    Last edited: Oct 14, 2017
  22. flyncriminal

    flyncriminal

    Joined:
    Nov 1, 2014
    Posts:
    39
    make sure your ai is setting on hostile, after in tag option move to tag target and ad a tag named Player
     
  23. flyncriminal

    flyncriminal

    Joined:
    Nov 1, 2014
    Posts:
    39
    Hello all , when I create an AI this one is disabled on play ,
    but when I approach him
    animations and script reactivates
    do you have an idea of or can this come?
     
  24. Hitch42

    Hitch42

    Joined:
    May 12, 2015
    Posts:
    98
    If you do make a flee from non-AI feature, also consider making things attracted to non-AI objects as well.

    Also, would it be possible to make creatures flee and be attracted to different amounts of light? I can think of some scenarios where you'd want some creatures to gather around a light source at night, or monsters that are repelled by light.
     
    julianr likes this.
  25. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    yeah! Nice idea... breaking down walls/doors on dynamic objects, with navmesh underneath. dynamic objects as targets with health attached, so the AI go up to them, use their attacking animation to break through and proceed further, ideal if a way point is on the other side.
     
    Last edited: Oct 14, 2017
  26. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    Yeah, I recently sent BHS a PM suggesting the same idea....brilliant! :D

    I think the beauty of tagging non-AI is that it can use all the existing behavior functionality. Example: attract and repel functionality is already built into the system under the names attack and flee. Although I suppose you may just want AI to circle around the object and not attack it...which could simply be a checkbox option under the attack behavior, or a new behavior (e.g. stalk/circle/swarm).
     
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    OTTI Motion Controller support is planned. There still more that needs to be tested with the beta before that happens.


    Hey guys!

    I think these are great ideas and I'll try my best to implement some sort of system that does just that. :)

    I've done some small scale tests with a new method to detect targets using a similar technique to how Emerald previously did it. This technique detects what's a player object, an AI object, or a non-AI object. The plan is to use a separate script to define what "Emerald Tag" an object will have so the Emerald_AI script isn't required. With Emerald Agents, the script is applied automatically and it is given the tag you've set within the Emerald Editor, making the tag system just as it was with Emerald 1.3.5. However, you can also put this script on a non-AI objects and define a tag, such as Fire or Car. When Emerald is looking for tags, it checks for the lack of the Emerald_AI script, or Player Tag, which would make it a non-AI object. There wasn't time to add this to the next beta update for testing due to the amount of work needed to redo some of the tag system, but it will be coming with the following Emerald Beta update. I feel like it's rather important and the feedback seems very positive.


    Light attraction could possibly be handled from an external script. It would just require altering an AI's Starting Position based on the surrounding light intensity.


    Hey there!

    Are you using Emerald 1.3.5? I don't think there's anything in the script that disables the Emerald script. Are you receiving any errors?


    Hey there!

    Have you double checked your layers? If your player is using a separate layer, you will need to set Emerald to detect a separate layer for your player.
     
    julianr likes this.
  28. flyncriminal

    flyncriminal

    Joined:
    Nov 1, 2014
    Posts:
    39
    I dont have anny error in the console BUT i have foud.
    it is the LOD that disables the script
     
  29. gtox

    gtox

    Joined:
    Apr 23, 2013
    Posts:
    25
    This happens to me when the model has LOD groups. You have to get close enough for LOD 0 to be the active mesh in order for the behaviour to be activated. If I disable LOD groups then the behaviour is normal.
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    This is done to improve performance. You can fix it by disabling the LOD Group. With Emerald 2.0, this has been improved and it is an optional feature toggleable from the Emerald Editor.
     
  31. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    98
    I see the tutorial of how to add UFPS character to the game. I did and works for guns, but for melee weapons it not work.
    The enemies can cause damage to me, but I can´t cause damage to Emerald AI enemies using melee weapons.
    How I can damage Emerald AI agents using melee weapons?
     
    Last edited: Oct 24, 2017
  32. BHS

    BHS

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

    If I remember correctly, there’s another script that is responsible for melee damage. When I get the chance, I’ll update the documentation. Keep in mind that Emerald is currently being rewritten with version 2.0. So, there will be lots of improvements with how implementation was handled previously with UFPS.
     
  33. BHS

    BHS

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

    Great to hear! I put together a status update for you and whoever else is interested. I know it’s been awhile since there’s been a status update and I apologize for that. The beta has kept me very busy, but things with Emerald 2.0 are going great so far.

    One my favorite new additions to Emerald 2.0 is ranged combat. This isn’t quite finished so I don’t have a visual demonstration just yet, but it’s turning out quite nicely. This was one of the most requested features so I felt it was important to include it by the time version 2.0 is released. This allows AI to have ranged combat with any type of projectile from arrows for hunting to magic effects for mages. The point that the projectiles are fired from can be customized such the AI’s hand for magic or an AI’s bow for arrows. When an AI is in active combat, it can also detect obstructions in its line of sight. When this happens, AI will move closer until they can visually see their targets. The timing for triggering a projectile to fire can be set within the Emerald Editor. This allows it to perfectly match any animation.

    AI can now search for the nearest target. This allows battles to feel a lot more realistic and keeps AI evenly distributed. This is especially helpful in large battles. Companion AI will now search for the target closest to their follower offering the best chance at the follower’s survival.

    The animations have been improved to include 3 idle/graze and 3 attack animations. There are options in the Emerald Editor to either have these picked in order or randomly. Attack timings can now be perfectly calculated at the exact movement damage is sent to a target or a projectile is fired.

    Emerald’s tag system has been improved to make it not dependent on Unity tags. This is useful for systems that require specific tags to work, such as UFPS and RFPS. With Emerald’s new tag system, you just define your AI’s tag through Emerald instead of Unity. Emerald AI objects would all just use the same Unity tag, which can be anything.

    This is all just some of what’s happened since the beta. There are of course tons of other improvements and fixes that have increased the over all quality and fluidity of things. I will be posting a video of the ranged combat in action sometime in the next couple of days.

    The beta has just a few more phases until it’s finished. I can assure everyone it won’t be too much longer.
     
    Lex_Vector likes this.
  34. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi @BHS ,

    I am considering the plugin and have few questions.

    1) How ennemies move around the player when they are 20 for example.
    Does they stack behind others and slide behind other because they use navmesh and does not make any check.
    Or can they use raycast when moving or some sphere collision around the player to check if there is room to move near the player, otherwise they keep wandering or wait until there is room to move near the player ?

    2 Does the plugin supports animation event functions ?
    https://docs.unity3d.com/Manual/AnimationEventsOnImportedClips.html
    For example ennemy attack is checking collision with player or other creature only when the animation event happens.

    3) Are flying creatures planned ? (flying at random positions within some radius area , withint some random height min and max , all with smooth curve flying)

    4) Are projectile ranged weapons or simple projectile attacks planned ?
    Like ranged weapons each doing different damage with different projectile prefab and effects.
    Also allow magic spells to launhc multiple projectiles at once.
    And be able to add those weapons to characters , turrets, or flying ennemies.

    5) Is there some melee weapons system creation ?
    Create weapons prefabs, attach some script for damage, and any character using the weapon will make damage based on weapon.

    6) Does the plugin have some option for pooling ?
    You can define the max creatures spawned around a specific spawn point, each creature no more needed will go to the pool and will be unpooled when needed.

    7) Can you make factions and define who faction is friendly, enney or neutral to another ?

    8) Can creatures be alerted whatever player is visible or not (raycast), when the player is within some minimum radius we could define ?
    This would be for sensible creatures or for emulating sound alert in a cheap way.

    9) Shields objects or AI able to use shield or a defense state cancelling or decreasing damage ?



    I know it's lot of features, but it's what i epxect from a plugin meaned to be multi purpose.
     
    Last edited: Oct 26, 2017
  35. BHS

    BHS

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

    I will answer these questions using Emerald 2.0, which will be out soon, since the current version of Emerald will no longer be used after the release of version 2.0.

    1) Emerald 2.0 does a great job with keeping AI evenly distributed. Below is an example of a gif I already had (from the beta documentation) that has 12 AI picking their targets.
    AI_Detection.gif

    2) Animation Events are supported for things like footsteps. Calculations for melee and ranged attacks are handled differently.

    3) Yes, what you have asked is the plan.

    4) Ranged attacks will be available on the release of 2.0. Emerald will support 3 different types of attacks each with their own projectile object, animations, timing, and damage. However, these can be altered programmatically if you'd like to have more. AI will also move to a better position if their ranged target is obstructed.

    5) This can't be done within the editor, but could be handled through custom code.

    6) Emerald is an AI system not a spawning system. If you want an AI spawning system with object pooling, check out Crux - Procedural AI Spawner.

    7) Yes, Emerald supports multiple types of target detection so this is certainly possible. This is handled through the editor and allows users to define what an AI considers a target.

    8) Yes, AI become alert when a target is within their detection radius, but will not set a target as their active target until it is visible. This allows players to hide behind objects and sneak up on AI.

    9) Not currently, but it's something that's planned after the release of Emerald 2.0.
     
    Last edited: Oct 27, 2017
  36. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    This is great , while i was meaning one player character as target and 10 ennemies around, how do they move to player ?

    Melee and ranged attacks could occur at a precise animation event, otherwise how do you stay precise ?
    www.youtube.com/watch?v=Yg8PBz45pD8

    I was meaning let us create our own weapons prefabs, but give us some ready to use script Emerald_MeleeWeapon
    we attach to the prefab and we configure with parameters and some damage colliders.

    I didn't like how it works and i was meaning some very basic pooling with some position reference to spawn with some radius to randomly spawn around.
    Anyway, some of us could code that sall feature and propose it i think.

    I hope we can check or uncheck visibility options.
    For example during a boss fight all creatures will be aware of the player whatever he is behind some obstacle or not.

    I'll wait for it then.

    The plugin is stated for any purpose, creatures and NPC, so this is what we can expect about characters AI.
     
    Last edited: Oct 27, 2017
  37. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I cant wait for Emerald 2.0! And crux is going into the shopping basket with it! This looks really good without sliding AI and other AI bugs.. I guess I could make animals too? Friendly deers that are afraid of player and a wolf that hunts them and hunts the player if you shoot it or hit it? ... what about the AI going inside of houses? And caves?

    Final IK support?
     
    Last edited: Oct 27, 2017
  38. Monarky

    Monarky

    Joined:
    Oct 2, 2010
    Posts:
    35
    -We have been trying to implement Emerald and so far im intrigued I was going through your setup tutorial on wiki and it talks about needing layers set up I can not find the layers anywhere under the tags options tab.
    -I am also getting this Error when the player gets in range of the Animal/Prey AI that I am trying to set up.
    -I have set up a tag for all Emerald objects but how does it know the player is an object? Is there a script that has to be on the player? Or does the player also just need to be in the emerald tag. I right now have a player tag and would like to keep that. I seen in the wiki that you can set that the player uses a different layer but i cant find that under the tag options tab. Thanks

    -One other thing is this the only way to contact you? Could not find a email/skype or anything anywhere I looked on your website.
     

    Attached Files:

  39. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    AI turning looks a bit robot and cluncly.
    It is possible to get the AI turning more smoothly along the path ? Or have some bezier curve option ?
     
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    AI can detect if objects are obstructing their line of sight to their target. By release, there will most likely be some type of pause or delay if an AI's target is obstructed by another AI.


    Currently. attacks are handled with seconds into the over all animation. So, the process is nearly the same. This is to make it as user friendly as possible. However, Animation Events can certainly be added to the Emerald Editor in the near future.


    This hasn't been done yet, but it's a great idea. It's certainly something that can be added. Damage isn't handled with colliders, it's handled through raycasts.


    I'm sorry to hear that. What specifically do you not like about Crux? It literally does exactly what you have explained and it also has a builtin object pooling system.


    When I explained the visibility previously, I was referring to an AI before they have visually seen a player. An will chase the player if they go and hide behind something. Ranged AI will also move closer or change position until they can get a clear shot of the player.


    I totally agree and thanks for the suggestions.



    Great to hear! Yes, you can make any kind of AI such as animals, NPCs, creatures, etc. Yes, there is an option for AI to either never attack a player, always attack a player, or only attack a player if the player hits them first. Emerald 2.0 has a builtin waypoint system which allows you to define an AI's path. You can also set an AI's destination and the AI will travel there. This can be updated as many times as needed so AI can have schedules. UniStorm support will also be added soon after release allowing AI to have schedules based of UniStorm's time of day. IK support isn't something that has been done yet, but AI will rotate to the angle of objects they're walking on, which performs well and looks great.


    The tag system is used to allow user to not be constricted to the Unity Tags. All you have to do is ensure all Emerald AI objects have the same Unity Tag and Layer such as "AI". In the AI's settings where you can define tags, you will need to set the Emerald Tag and Layer to the "AI" Layer and Unity Tag. This is needed so AI aren't wasting performance looking for objects that aren't relevant targets. The error you are getting is most likely because of not properly defining the Unity Tag and Layer. You have to use something other than Default. The Player can share the same Unity Tag as the AI or you can define its own Unity Tag and Layer such as "Player". If you need further clarification, just let me know.

    Sorry about that! The website wasn't properly displaying its header. It's been fixed. Yes, you can email me at Support@BlackHorizonStudios.com


    This is due to the sharpness that the points are placed. They can be smoothed out by providing a more gradual path. However, I do plan on having the turning while an AI is not in combat improved by the time of release.
     
  41. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Good.
    But get AI able to move aorund the target like to sides or backwars would allow more possibilities.
    It's just detecting if points around the player can be reached.

    For example if some AI get a speed power up item that speeds up their attacks animation speed, the timer with seconds handling won't work.
    Anyway using timer is good enought for most general usage.

    Why should we have to place more points to make it looks smooth ?
    Some bezier math option and the AI will follow points with curve movement. Or add some lerp option to have turning tweakable.



    About multi purpose the plugin looks very combat oriented instead of actions.

    1) How easy will it be possible to create custom actions :
    When see the player, npc will be climbing a wall movement from point A to point B with our animation.
    Or mining some silver rock action for example during some seconds.

    2) It is possiblecreate action sequences like :
    NPC detects an item, it will go to item, carry it , and go deposit the item in a house.

    3) Will plugin get Priority (Randomness values) for actions to get variety in behaviours
    Attack 1 = 60% chances to attack
    Special attack = 10%
    Pary and block = 30%
    Counter attack = 5% chances to counter
    With such priority or random percent, you can define AI with behaviours that will vary instead of having them doing only, idle-pursue-attack1

    4) Will plugin get some general system for attributes changes based on conditions.
    The condition could be some external message event, character stats, target stats
    For example :
    AI Health < 30% : Block move priority change value from 30% to 90%
    target health > 70% : special attack = 100%priority if mana avilable
    Item fire scroll in AI inventory available and player health > 70% and AI health < 30% : use magic scroll

    5) Virtual inventory and Item sript:
    Get AI able to stock item gameobjects in it's own virutal inventory (array).
    This could bring lot more gameplay possibilities, AI could grab potions , weapons.
    Or when AI encounters player , it gives to player the item from it's inventory.


    Some of those features are far beyond simple combat only AI, not sure if that will ge timplemented, but they could bring more gameplay and diversity.

    Anyway the new version looks cool, i'll wait for it to be released.
     
    Last edited: Oct 29, 2017
    lawsochi likes this.
  42. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Sound great! =) AI path... is there a randomizer so it updates itself randomly in game where the AI should walk?
     
  43. lawsochi

    lawsochi

    Joined:
    Oct 24, 2016
    Posts:
    107
    take my humble voice for these suggestions. this is not enough to create a full AI system, in my opinion. inventory, where Ai can collect different weapons, grenades, first-aid kits, food, use weapons according to distance and situation, use first-aid kits for themselves and their teammates ..... many different gameplay can be invented with a full inventory and ability to collect objects in the world. And the system of importance of actions will allow to emit reasonable behavior by a simple set of rules and a small RND. I can not imagine how hard it is to implement in the code, but if it is possible, it will be an AI system out of competition.
     
    BHS likes this.
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    Thanks for all the awesome suggestions. I completely agree. I plan on adding customized random combat actions as you have suggested, but shortly after the release of Emerald 2.0. Right now, I’m focusing on the writing Emerald’s core and its features. As for the inventory and other suggestions, I will see what I can do after Emerald 2.0 has been released.
     
    Last edited: Oct 30, 2017
    mattis89 likes this.
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    Yes, it also has an option to dynamically create waypoints for an AI to walk to during runtime.
     
    mattis89 likes this.
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,027
    Another option for pooling and spawning would be Core GameKit.
     
  47. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Or make your own, it's not very hard to manage a list of gameobjects you activate and deactivate.
     
    magique likes this.
  48. BHS

    BHS

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

    My apologies for the lack of status updates. Emerald 2.0 is coming along nicely. I've been finalizing the ranged combat system and built-in object pooling so they're available at the time of release. I will be posting a full status update explaining everything, and a new video demonstrating the new ranged combat system, later today. This video will show mages using magic effects and an archer using arrows demonstrating Emerald's new ranged combat system.
     
  49. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,748
    The post on the next page has the status update regarding Emerald's ranged combat.
     
  50. BHS

    BHS

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

    Over the past few weeks I've been working on Emerald's new ranged combat system. This ended up taking longer than expected, but I feel like it's turning out great. Emerald's ranged combat needed to be versatile, but easy enough to implement with any model and skill set. Setting up a ranged AI from start to finish takes less than 5 minutes. This includes applying all of the needed animations and other settings.

    Below is a video demonstrating 2 types of ranged AI, 2 mages using magic effects and 1 archer using arrows. These 3 AI are all on the same side trying to kill the Cyclops which is using melee. All the movements you see are dynamic making each battle unique.



    Below is a more detailed explanation of the capabilities of Emerald's ranged combat system.

    Obstruction Detection
    All AI, including melee, will use obstruction detection to ensure their target is not obstructed before sending a successful attack. Ranged AI will only fire if their target is currently visible. If a target becomes obstructed, the ranged AI will move its position until it can get a clear shot. However, this doesn't always guarantee an AI will always hit its target, such as an AI's target moving behind an object after it has fire its shot. This is to allow AI to feel fair and behave realistically.

    Object Pooling
    Emerald now has its own built-in object pooling system for all instantiated objects, such as blood effects and projectiles. This allows all objects to be reused instead of being created and destroyed to make things more efficient (which most of you already know).

    Intelligent Avoidance
    AI will now avoid other AI if they get too close. This is especially useful for ranged AI that need to avoid damage and have some distance in order to have a strategic advantage. AI that are avoiding other AI will back up to a safe position while still navigating the terrain. If their avoiding position becomes blocked, they will find a valid position to move to. An AI's movements are all dynamic making every battle unique.

    Integrated Magic Effects Support
    I've been working with the creator of the well know Magic Effects Pack (the ones used in the video above) to add integrated support with Emerald 2.0. This will allow users who own the magic effects packs to have Emerald automatically detect them and use them with all Emerald AI agents without the need of any additional coding. All users have to do is assign the magic effect they want in the projectile slot.

    Customization
    Emerald supports up to 3 attacks each with their own projectile, animations, and damage amounts. The damage amounts can either be a constant or randomized between a minimum and maximum amount. This also allows an AI the ability to have a special attack that does significantly more damage that its other attacks. An AI's attack distance is now a separate variable than an AI's stopping distance to allow further customization. An AI using ranged attacks will have its attack distance dynamically be adjusted based on its object obstruction. However, it will never be higher than the set value within the Editor.

    Ranged Settings

    Emerald also allows users to customize the transform where projectiles will spawn from allowing it to work well any model.

    Hand Transform:
    bandicam 2017-11-03 15-10-22-435.png

    Object (Bow) Transform:
    bandicam 2017-11-03 18-41-50-261.png

    Improved Editor
    Emerald's Editor has been completely redone to be as organized and simple as possible. Everything is self documented to provide users with all the information that's needed right within the editor.




     
    Last edited: Nov 12, 2017
    TeagansDad and llJIMBOBll like this.