Search Unity

[ON SALE - 50% OFF!] Emerald AI 2.3 - The Ultimate Universal AAA Quality AI Solution

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

  1. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    288
    thank you :) is it the tame ai i need to integrate into mine ?
     
    magique likes this.
  2. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    94
    I did decrease the obstacle avoidance as well. That also seemed to help. It's now working about 90% of the time. I've got more tweaking to do but I on the right track. I'll post what I find out in case anyone else has this issue.
     
  3. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    652
    Unity 2018.3 and Emerald 2.3. This Stag gets stuck like this. What do I adjust to prevent this? Tipped Deer.PNG
     
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,680
    @BHS I have another request for the next release. After testing my Playmaker action for TameAI, I discovered that an AI can only be tamed if it is set to Cautious and either Brave or Foolhardy. It also won't work if it is set to Always Attack Player. I understand the logic behind this, but I don't think you should put any hard-coded restrictions on when and how an AI can be tamed. It would be nice to have at least a parameter to this function such as follows:

    public void TameAI(Transform target, bool force = false);

    If the force flag is on then it should just ignore any hard-coded conditions and Tame the AI anyway. That might include auto changing the temperament and other required values. That way, we could use it under any circumstances we want. Of course, I can always change the temperament and other parameters before calling TameAI as well, but this way it can be done with a single function call. Then I could have a spell attack that if successful could Tame an AI no matter what state it's in.

    Thanks.
     
    unity_7UFP4-iCkwsgjg likes this.
  5. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    288
    @MagiSoftworks when i click your image i get this
    "You do not have permission to view this page or perform this action."
     
  6. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    104
    Strange- Wanted to see what everyone is using for the process of exporting perfect EAI Generated Controllers from one project to another. I'm thinking how much time it would save to start a collection of perfect controllers for game scenarios per AI- Animals, etc. I exported a good one out, Imported in to new project but it doesn't populate the Animator Controller [Attached] with new imported controller. Thanks again
     

    Attached Files:

  7. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    104
    Hi Wood333- Did you by any chance change your AI "Rig" from Generic to "Humanoid" ?
     
  8. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    They should stop right when the player gets within the follower stopping distance. What character controller are you using? Are you using the right movement type for your animations?
     
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    The tags and layers are needed in order for your player to be properly detected. Ensure that your player's layer and tag are included within the AI's Tag Settings.
     
  10. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Thanks for the suggestion. I can certainly look into adding this.
     
  11. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Thanks for the suggestions. I'll see if I can add these improvements in with the 2.3.1 update.
     
  12. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Are you following the integration tutorial below? This should work with the newest version of Emerald AI.


    The damage function parameters are:
    Code (CSharp):
    1. Damage (int DamageAmount, TargetType AttackersTargetType, Transform YourTargetsTransform, int RagdollForce)
     
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Strange, I have never seen that before.

    Do you have Align AI enabled? Are you using the most recent version of Emerald AI? Are you missing any animations? Are you receiving any errors in the Unity Console?
     
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Great suggestion, I'll add it in.
     
    magique likes this.
  15. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    826
  16. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    104
    Hi BHS - Question on Exporting/Importing EAI controllers. I exported an EAI created controller, Copied to another Project then imported into that project which was successful but it does't drop in the active working Animator controller ? (Pic Below). I know I'm missing something. Your Wisdom is always appreciated. :) Thanks!
     

    Attached Files:

  17. xoodZ

    xoodZ

    Joined:
    Jan 8, 2018
    Posts:
    17
    Hello!
    I am considering your asset to buy.
    I have already developed a player spell system in my project.
    Please tell me how you can implement the following ideas in emerald (preferably using api):
    1. Slow down the speed of all enemy animations (for example, cooling). In the documentation I found only a traffic stop. I need to slow down all animations by a certain percentage. The speed in the animation controller will allow me to lower the speed of attack and rest, but I do not use root movement.
    2. (not actually, already found an answer on the forum) I need to receive incoming damage from the enemy and enemy abilities in my player script.
    3. Switching to the ragdoll during physical impact (for example, throwing the enemy), but the enemy remains alive. For example we replace AI with a rigidbody with a ragdoll, it flies like a physical object, after landing (or after time, or after stop moving) we change it again to an emerald, play animation of rising from the ground and again control NPC by animations and move through the emerald.

    If you say that it is possible to implement these ideas through the addition of your code, this is normal. I am confident in С#, but I need to know that such code improvements are allowed.
     
    Last edited: Nov 16, 2019
  18. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    652
    As I said, that tutorial worked with the prior version of Emerald, but not with the latest. The EmeraldAiPlayerDamage scrip has changed. To get it working, I had to ignore part of the tutorial.
     
  19. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    652
    I am out of town, and will check this next week. This may result from the stag walking over something.
     
  20. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    652
    Thanks Mag, I am out of town, but will check this next week.
     
  21. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    218
    I'm having a small error: The error says I don't have a Death Animation 1. I have put in 3 in the correct spot (I think), but the first one is never used. I have tried putting in different animations in that first slot many times, but I still get this error. Is there something I'm missing? Is there a melee death animation spot I'm not seeing?




    Also, attached another error I'm getting. This happens whenever an EAI agent attacks with a ranged weapon. I'm also using Game Kit Controller
     

    Attached Files:

    Last edited: Nov 18, 2019
  22. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    205
    You could use PuppetMaster for the "living ragdoll" thing. I have it on my player character but not sure how to go about getting it to work on my Emerald AI. I think @BHS mentioned he was planning on a tutorial, so I'd probably expect it for the future update that includes the damage via individual ragdoll colliders, rather than the box collider it uses right now.
     
    xoodZ and SickaGamer like this.
  23. Low_on_Mana

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    28
    Hello, I have an issue concerning combat with non-AI entities. Using the AI events, I have set the target of my AI to a non-AI object. They will approach it, as if they are going to attack it, but they never actually attack. Is there any way to get them to attack a non-AI object that they are targeting?
     
  24. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    652
    Rig is Generic
     
  25. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    It should be submitted by the end of the week.
     
  26. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    There are two options when importing an Animation Profile; option 1 to import the animations with the exported Animator Controller and option 2 to import the animations using the existing Animator Controller on the AI. If either Animator Controller is missing, which it looks like the AI's is missing in the screenshot as the Controller slot within the Animator is empty, then this would be what's causing your issue.

    Clear and then recreate the Animator Controller on your AI and then importing the animations from the Animation Profile should work, given that the animation references weren't lost. You can check this by selecting the Animation Profile within the Project tab.
     
  27. BHS

    BHS

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

    1) The movement animation speeds can be adjusted using the global Speed parameter within the Animator Controller, but it is also controlled through Emerald AI. So, you would need to add in your own float variable to the speed control to slow the speed. However, I've haven't tested this so I'm not sure how it would affect mechanics like Root Motion. The other animations, such as the attack animations, will need to have speed parameters added to the Animator Controller. I have plans to look into slowing mechanics using the Ability Objects with a future update.
    3) I would recommend using the PuppetMaster asset as it allows you to do this.
     
    xoodZ likes this.
  28. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Which part did you have to ignore?
     
  29. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    It looks like you are missing death animations from the melee weapon type and not the ranged death animations. Is your AI set to both ranged and melee or just ranged?
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Non-AI targets are intended to not be Emerald AI objects. The non-AI's tag and layer needs to also be added to the AI so it can be properly detected, if you haven't already done so. Which AI event are you using to do this?
     
  31. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    652
    endEmeraldDamage
    The large code section from your video tutorial,void DamageInvectorPlayer (int DamageAmount, Transform target), (which I cut and pasted in for the last Emerald version). I ignored that. Instead, I found new code in the EmeraldAiPlayerDamage script, eight (8) lines of void DamageInvector Player (int DamageAmount, Transform target) method, which I un-commented. Again, I needed to add the single line "DamageInvectorPlayer (DamageAmount, Target)" within the SendPlayerDamage method at the top of the script.

    I may be using the wrong DamageInvectorPlayer method, but my Player began taking damage.
     
  32. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    652
    I have enabled Align Ai, and will test that. I have most recent Emerald version, no missing animations, and no errors. I believe the stag gets flipped walking over a plank shaped cube in the scene, that is on the ground. I have never witnessed the flip.
     
  33. Low_on_Mana

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    28
    I had already set the non-ai tag and got them to target it, they just wouldn't attack it. This turned out to be a behavior issue on my end (as I am using your events to give my objects a natural interaction behavior and one of those interactions was stepping in when I was trying to attack).

    Thank you again for the quick response! Your asset has been integral to our development process and I can't wait to show you what we've been doing with it.
     
  34. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    288
    is there a way to add more then one destination so that the ai goes to the closest destination?
     
  35. AaronVictoria

    AaronVictoria

    Joined:
    Aug 21, 2010
    Posts:
    144
    Thanks buddy. Also, if possible see if you can squeeze the turn to face method in. We talked about it a while ago, but you may have forgot to document it. It would essentially allow the AI to stop movement and turn to face whoever or whatever has interacted with them. I hacked in a quick iteration for my project, and even added an event once the degree of rotation and head look angle are fulfilled. I use the event to trigger dialogue once the NPC is actually looking the player.

    Looking forward to your next release.
     
  36. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    218
    Just Ranged only, see attachment.


    ***Edit
    I've fixed the problem by setting it to Both (ranged and melee), inputting an animation in the melee deaths, then setting it back to ranged only. This got rid of that error, but the other errors still remain, regarding the 'missing components' part.
     

    Attached Files:

    Last edited: Nov 22, 2019
  37. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Is there a way to restrict AI to just water. eg. shark hovering on water... and not go on land with a terrain underneath for Navmesh?
     
    Last edited: Nov 23, 2019
  38. Low_on_Mana

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    28
    Hi! I'm sorry but I've tried applying your change to stopping distance to allow an AI to move entirely onto a set destination, but it still doesn't seem to do so. It's stopping about 5m out and we've set it to 0.25f as advised. Any ideas as to why it might be behaving this way? It's putting a frustrating wrench into some of the stuff we're doing. Thanks!
     
  39. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    288
    my ai when set to companion wont resume following after it has just attacked another ai any ideas ?
     
  40. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    219
    I can't find any documentation or demo's about this feature. Tried to explore Emerald AI component but couldnt find where do I define these?
     
  41. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    218
    Can EmeralAI make turret weapons? I don't have animations for my turrets, just want them to rotate left/right, and shoot. Any info?
     
  42. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    If I remember correctly, the full code is needed to properly send damage to the player, but it sounds like you have it working now, correct?

    The align system has angle caps to prevent an AI from over aligning. I'm not why it would align to an angle higher than the caps, but you can use the align layer mask to prevent the AI from aligning to certain objects, such as the plank shaped cube.
     
  43. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    No, currently there is only one destination the AI will travel to when using the Destination Wander Type. However, you can create a script to modify an AI's destination. You could use the Waypoints Wander Type and check the for the next nearest waypoint from the AI's current waypoint.
     
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    I do remember and it's a great feature, but I unfortunately ran short on time to add this feature in with the 2.3.1 update. I will make sure it's at the top of the list for the next update though.
     
    AaronVictoria likes this.
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Thanks for the workaround. I'll get this fixed added to the 2.3.1 update.
     
    SickaGamer likes this.
  46. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    288
    ah okies does emerald allow a guard object option?
     
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,045
    Not currently, but I do plan on adding an option to randomize the Base Offset for water based AI. For restricting movement to water, you may be able to use the NavMesh Areas and Costs, but it can be tricky with terrains: https://docs.unity3d.com/Manual/nav-AreasAndCosts.html You can also use waypoints.
     
    julianr likes this.
  48. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    826
    When are you going to add the ability for AI to sit ?
     
  49. keepthachange

    keepthachange

    Joined:
    Oct 15, 2014
    Posts:
    80
    Hey sorry to bug you but. My ai will not detect player inless i walk right up to it?
    I used the ones out of thoe box same thing?
    I have tags correct, distance is set to 20.
    Both trigger and fov do the same thing. Everything else works just detecting player beyond arms reach for ai is not?
    Could someone possibly point me in the right direction.
     
  50. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    218
    I made a ceiling turret that won't fire at other emerald ai agents unless i lower it down to about eye level. how can i fix this?