Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey everyone! I’ve got some news on the huge upcoming update for Emerald AI and there is a lot to cover. I would appreciate feedback regarding this as I want to continue to move Emerald AI in the direction of the majority of its users and what they find beneficial.

    In order for Emerald AI to continue improving and evolving, it is in need of a proper code refactor. I have put this off for far too long because I know many of you are dependent on how Emerald AI currently is. I didn’t want to make any changes that would alter the AI you have created. However, this has made making updates difficult and more time consuming. This refactor will allow Emerald AI to be more flexible and make updates in the future easier. It also removes a lot of restrictions and limitations it had previously.

    Now, because this is such a substantial update, Emerald AI (2023) will be a new standalone asset with a small (to be decided) price to update (similar to what was done with version 3.0). Users who are owners of Emerald AI 3.0 will receive a large discount for Emerald AI (2023). Below, I will explain some of the main improvements, new features, and what I have been working on. I have focused on keeping the flow of what makes Emerald AI great, while improving or removing the things that limited or restricted it. Emerald AI 3.0 will remain on the Asset Store where I will continue to support it and release routine bug fix updates (as it is now).

    * Note: While this status update's examples show RPG and melee related combat, the same applies for ranged and shooter related AI. I will cover more information regarding this update (and showcase ranged AI) with the next status update. There's still a lot more improvements and new features to cover.

    Improved Combat Actions
    Emerald AI (2023) greatly improves combat by giving AI the more combat actions which makes them feel more reactive and intelligent. AI can also have their current animations interrupted by hit animations. Hit animations will always play reliably. Flags can be used to customize which animations/states can be interrupted by various actions (more on this with the next status update). Here's a list of the new combat actions:

    Reactive Dodging - The ability for AI to attempt detect and dodge incoming projectiles and melee attacks. This also works for player attacks.
    Strafing - The ability for AI to strafe around their targets and generate attacks helping them catch their targets off-guard.
    LZumqFx.gif

    Reactive Blocking - The ability for AI to attempt detect and block projectiles and melee attacks, when within range of an enemy.
    Hit Recoiling - The ability for an AI's attack to stop if its target is blocking and play a recoiling animation (requires a recoil animation).


    Emerald AI Animation Viewer
    The Animation Viewer is a new included extension that allows users to quickly see an AI's animations in real-time, right within their scene of the Unity Editor, with a timeline, slider, and various settings. The animations come from an AI's Animation Profile (explained below) where all their animations are stored. This extension also allows users to quickly create Animation Events using a list of Emerald AI preset events. When selecting the desired Animation Event, finding the desired time on the timeline, and pressing the Create Animation Event button, an event will be created and autofill in most of the information according to the selected event. Tooltips will also explain what each event does along with what the parameters are responsible for. This system is modular and can be expanded with more events as needed with future updates.

    (* Note: Pausing due to the gif)

    A list of all animations that can be previewed pulled from an AI's applied Animation Profile

    Current list of preset Emerald AI Animation Events

    Same settings as within Unity's inspector version, but allows the editing of multiple animations without having to reload the fbx assets. Once users click Apply Changes, every asset will be updated that was modified. A green gizmo highlights at the time of events for added convenience.


    Redesigned Setup Manager
    The Setup Manager has been redesigned from the ground up. It utilizes the decoupled components to allow users to specify the components they would like to add to their to be created AI. This consists of two lists; one of required components and one for optional components. This allows users to only use the features and components they would like to use so they don't have to manage or worry about the ones they are not. A tooltip, via the ? Icon, provides information of each component and its functionality/usage.



    AI Duplicator Manager
    The AI Duplicator Manager allows users to copy the settings from one AI and apply them others. This also utilizes the decoupled components to allow users to choose which components they want copied from the reference AI. This can be all components or a single component. For AI that have the same named bones, this also allows users to copy complex settings such as Inverse Kinematics and all of an AI's ragdoll components and colliders, if desired. Using this manager throughout development has personally saved me many hours of work.



    Decoupling
    All code has been categorized and decoupled so all functionality and settings are in individual scripts. This allows future features and systems to be separate components, rather than being a part of the main Emerald AI script. This also allows for scripts to not all be dependent on each other. Other than the core script, users have the options for which scripts/components they want on their AI. Here's the current list of the decoupled scripts.
    • Animations
    • Behaviors
    • Combat
    • Detection
    • Events
    • Health (more on this below)
    • Items
    • Inverse Kinematics
    • Movement
    • Optimization
    • Sounds
    • UI

    Editor Changes
    Emerald AI 3.0's editor houses all functionality. While this works, the editor has become overloaded with too many options making it tricky to navigate and the code within the editor is hard to maintain and add new features. With Emerald AI (2023), everything has been decoupled and put into their own editors. The flow of each editor is consistent across all editors with a title, foldout, description, and a link to the Emerald AI Wiki for that component (through the small ? Icon at the top right corner of the component). I have decided to go with foldout menus for each setting category which helps keep information focused and organized. Users can also collapse the foldouts when they are not using them to keep the editor length to a minimum. To further help keep editor lengths to a minimum, users can also minimize the script as a whole to hide all of its settings while keeping its title visible.



    Animation Changes
    Emerald AI (2023) reworks the way animations are applied and handled. This is now done through an Animation Profile scriptable object. This object can then be applied to any compatible AI that wants to use it through their EmeraldAIAnimation editor. This allows all AI sharing animations to use one single animation data object so the changes don't have to be made across all AI (like they were previously). All Animator Controller generation is handled and stored through Animation Profile object. Any AI using it will get the same Animator Controller when initialized during runtime. The editor for this has been restructured and is much more organized and fluid. Improvements have also been made so the Animator Controller will never get lost, even if it moves folders. Lastly, the Animation Profiles utilize Unity's new Properties feature allowing users to keep a reference to an Animation Profile open while applying and previewing animations.

    Animation Component

    Animation Profile - This can be opened independently of the main inspector so users can apply and preview animations while keeping a reference to the current Animation Profile.


    Undo and Redo Support (Animation Profile and Generation)
    Animator Controller Generation, through Animation Profile, now fully supports undo's and redo's. This wasn't present previously which could lead to desyncs between what's displayed in the editor and what's actually on the Animator Controller. This also allows for users to test out a series of animations applied to their Animation Profile, test them during runtime, then undo the applied animations, if needed.

    Sound Changes
    This works similarly to how it was previously, but now a scriptable object (Sound Profile) holds all the data. This allows users to share Sound Profiles between AI so the changes are made to all AI sharing the Sound Profile. The Sound Profiles also utilize Unity's new Properties feature allowing users to keep a reference to an Sound Profile open while applying and previewing sounds.

    Sound Component

    Sound Profile - This can be opened independently of the main inspector so users can apply and preview sounds while keeping a reference to the current Sound Profile.


    Faction Changes
    Emerald AI (2023) allows all objects to use the faction system, including players and non-AI targets, when using the FactionExtension component, which uses the new IFaction interface class type.



    Health Changes
    Emerald AI's health system has been reworked to use an interface class type. This allows an AI to send a damage call to be received by any script that uses the IDamageable interface. Emerald AI's health has been decoupled and is no longer a part of the main EmeraldAISystem script.

    Transitional Health Bars & UI Component
    When an AI receives damage, their health bar will now show the amount of damage dealt with one color, then transition the damage to its current health. The colors for this can be adjust through the new UI component.

    UI Component


    Item Component Changes
    Reworked how equippable weapons are handled to use a list. This allows users to better manage the items an AI is using and equipping. This also allows the support for as many weapons or items an AI has for each weapon type (such as a sword and shield or a sword in each hand). This has also been reworked to allow users to use a prefab object that will be dropped on death instead of instantiating a copy of the held item. This allows users to have better control over the item that’s dropped (custom scripts, mechanics, etc.).

    A Skeleton dropping two items on death

    Item Component


    Waypoint Improvements
    Waypoints have been improved with the following new features and improvements:
    • Added the ability to insert a waypoint in between two other points. The position for this is averaged so the point is automatically positioned between the desired two points to be adjusted as needed.
    • Improved waypoints with new GUI Handles that are easier to see and more visually appealing. These handles can now properly be obstructed by mesh making it easier to ensure they are not placed below surfaces.
    • Waypoints now have two circular indicators; one for the waypoint itself and one for the stopping range based on the AI’s Stopping Distance (from its Movement Settings).
    • Added the ability for waypoints to fully utilize Unity’s undo and redo. This works for adding, removing points, and changing a waypoint’s position.
    • Added the ability to highlight the currently selected waypoint.
    • Added the ability to delete the currently selected waypoint by pressing the Delete key.
    Undo and Delete Waypoints

    Add waypoints in between other waypoints.



    * Note: While this status update's examples show RPG and melee related combat, the same applies for ranged and shooter related AI. I will cover more information regarding this update (and showcase ranged AI) with the next status update. There's still a lot more improvements and new features to cover.

    Big thanks to these publishers and their models:
    Viking Model
    Skeleton
     
    Last edited: Jun 27, 2023
  2. iChuy

    iChuy

    Joined:
    Aug 26, 2017
    Posts:
    7
    HOLYYYY S***TTT
     
    BHS and ImminentWaffle like this.
  3. iChuy

    iChuy

    Joined:
    Aug 26, 2017
    Posts:
    7
    I purchased emerald 2.5 and 3.0, does the price will be $4.99 like the 3.0 for the upgrade?
     
  4. Mafutta

    Mafutta

    Joined:
    Sep 30, 2014
    Posts:
    46
    I would love to have RBG Builder integration with Emerald AI 2023
     
  5. techbots

    techbots

    Joined:
    Dec 3, 2017
    Posts:
    1
    Looks exciting. What is the expected release date for this?
     
    SickaGames1 likes this.
  6. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,272
    Nice job Will. Totally excited to get 2023!!
     
    BHS likes this.
  7. Dev_UHG

    Dev_UHG

    Joined:
    Jun 5, 2017
    Posts:
    28
    Looking forward for the Update! Will you also implement something for Offmesh Link handling, so AIs will play animations for that? Examples are climbing, jumbing, ... (I have done that on top of emerald and would of course switch to native Emerald, so to speak)
     
  8. Nikodemus

    Nikodemus

    Joined:
    Nov 28, 2014
    Posts:
    32
    WIll AI Pick Target Method be improved? It would be great seeing AI changing targets midway, if a opponent gets to close then the AI would switch up to target that AI instead. As it is right now the AI would only change target throu aggro, otherwise it has a fixed target and will walk past other enemy opponents on its way to that AI. So making the AI switch up targets depending on if another AI gets to close or is a more suitable target would be great.
     
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    The discounted update price will be more than $5, given the amount of improvements and features coming to the new version. I’m thinking of offering 75% off of Emerald AI 2023 for those who own Emerald AI 3.0, which should be $15 to update. However, the discount will be reduced as time goes on so it’s best to get it sooner than later (once it’s released).
     
    iChuy likes this.
  10. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I plan on doing all the integrations I can once the new version is released. This includes RPG Builder.
     
    christougher likes this.
  11. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    The ETA will most likely be near the end of next month (May).
     
  12. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, I have plans for this after the initial release of Emerald AI 2023.
     
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, I’m working on a solution for this. It will most likely be time based (checking every x amount of seconds) to be more performant and so an AI isn’t switching between targets too often.
     
    MorpheusXI likes this.
  14. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,272
    @BHS If you are waiting until end of May, does that mean stats will be applied? Did you ever add the ability to stop the attacking to then programatically run a function at a certin point, or perhaps a new attack tree/animation controller?
     
  15. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    27
    @BHS How can I slow down enemy?
    For example if i hit ai with freezing projectile how can I make him slow for x amount of seconds.

    I think you can add stats like some enemies will not get affected by some weapons type.
     
  16. trblst

    trblst

    Joined:
    Feb 18, 2015
    Posts:
    14
    Are there callbacks in place for when a NPC reaches each waypoint? I'm wondering if it's possible to stop moving and play animations (like a waiting/idle anim) when you reach any particular waypoint.
     
    timerace likes this.
  17. ImminentWaffle

    ImminentWaffle

    Joined:
    Oct 19, 2013
    Posts:
    8
    Upcoming update looks awesome! Upgrade price seems more than fair. Excited to see it coming (hopefully, all goes well) so soon. Love that AI will be able to strafe instead of just standing. Any plans to add "take cover" behavior?
     
  18. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    141
    @BHS Love the update but don't make the mistake of under selling this update. It's understood at this point that the asset store revenue model has to now be sold in new updates to make enough income to support properly. A discount for most recent version is great but not 75% that's crazy. Did you update 3.0 for a year? I think that's decent if so.

    I want a quality product, timely bug fixes and some level of reliable support when needed. Sell it for a rate that is reasonable but allows you to support it properly. What full price did you have in mind, I'm curious? $60? At that rate maybe giving a discount to 3.0 users of like 25% or less would be enough and a nice gesture. You need to produce these updates faster my man. Sell for what you need, hire an additional programmer or support person to allow this process to be faster. Easy to hire a Support person to answer emails who knows the tool well.

    Drop the oldest version, hire some Jr programmer to do basic support on the 3.0 version and focus your efforts on one quality package so the updates do not drag on for years. A discount is welcome but we appreciate your work. Do quality work, sell it for what you need to profit accordingly and support it according to the price model. =)

    I think at $60 a year of support in fixes and updates is good as long as you fix any major bugs asap and make sure we're moving forward properly.

    Thanks for your hard work!
     
  19. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I don't think stats will make it in with the end of May ETA. However, it will come soon after with an update.

    If you are referring to animation canceling for hits, then yes, any animation can be canceled by a hit using flags. Below, shows what this will look like. Any state that's active (checked) can be canceled by a hit animation. These flags can be customized by the user. The Animator Controller is also being completely reworked.

    AnimationStateFlags.png
     
    SickaGames1 likes this.
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Currently there's no built-in way to do this. You would need to add your own multiplier parameter to all your animation states that you want affected by the slowing effect. Setting the parameter to something like 0.5 would allow every state using it to play at half speed.

    SpeedModifier.png
     
  21. CaffeinatedCoolaid

    CaffeinatedCoolaid

    Joined:
    May 10, 2021
    Posts:
    59
    I was just about to check out the latest version, previously I was turned off of the asset by some of the issues mentioned but the next update sounds fantastic. On this upcoming version will components have virtual methods so Emerald can be safely extended without asset updates breaking work?
     
  22. Nikodemus

    Nikodemus

    Joined:
    Nov 28, 2014
    Posts:
    32
    Can u make it so that "Hit effects" on AI gets unparented? Right now the effect follows the AI, so for example blood decals move around on the floor following the AI's position. So making the effect get unparented from the AI, would look better.
     
  23. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,272
    @BHS I know you said that Stats will come after this update (can't wait unti the end of May), but will this be something you are starting on right away or will you be taking another break and picking it up later in the year/next year?
     
  24. Blackghost

    Blackghost

    Joined:
    Oct 2, 2012
    Posts:
    111
    In the update, would we be able to set multiple transforms on an AI that has multiple muzzle points, like a mech, for example?
     
  25. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    No, there's only an event for reaching a destination when using the Destination Wander Type. With Emerald AI 2023, a Waypoint Event has been added that's invoked for all other Wander Types when the AI reaches their destination, including individual waypoints.
     
  26. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks! I have plans for some type of take cover behavior after the initial release of the new update.
     
    MorpheusXI and ImminentWaffle like this.
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks, I appreciate your feedback.

    The Emerald AI 2023 discount will be similar to how certain Asset Store sales work with 3 tiers of discounts. The 75% discount will only last for the first x amount of users who update (or for a limited time, I haven’t decided yet). The discount will then be reduced to 50% and once this threshold has been met (or time has passed), the base discount for 3.0 users to update will remain at 25%. With that being said, I want to give those who are willing to update early on the best discount.

    Updates with Emerald AI 2023 will certainly come faster due to most functionality being in individual components. This was a big part of this rewrite as it makes maintenance/updates much easier. Emerald AI 2023 is far more flexible, customizable, and better documented. This should help reduce the amount of emails/support questions I receive which will also give me more time to focus on updates.
     
    Last edited: May 4, 2023
    MorpheusXI and ImminentWaffle like this.
  28. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I will be providing more information regarding this with the next status update as I'm still working on things, but there will be virtual methods that can be used to create custom functionality for combat related actions, abilities, and custom behaviors. Strafing, blocking, dodging, switching targets, and more were all created using modular actions. Users can do the same without updates breaking their custom actions, abilities, and behaviors.
     
    Last edited: May 6, 2023
    ImminentWaffle likes this.
  29. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    141
    @BHS Also please make this new emerald Update compatible with Unity 2019 still because some of us rely on other products that don't have continued support upwards please. =)
     
  30. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,272
    Lmao. At a certain point, you use new technology that won't work in certain Unity versions.
     
    iChuy likes this.
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, there will be a list for both weapon types. Passing the Transform's name through the EmeraldAttackEvent will allow that transform to be used during that attack.

    AttackTransformList.png
     
  32. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I will be starting the following update right away and release it as soon as possible.
     
    SickaGames1 likes this.
  33. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,272
    I see what you did with your coding! It makes much more sense to make each thing modular instead of one big chunk. I am even more excited than ever for your updates. You don't have to worry about breaking to much stuff now when adding new features as opposed to one big script.
     
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Unity 2020 will be the lowest version that will be supported. This is due to some needed functionality that isn’t available in Unity 2019 and older versions. It’s also worth noting that ~92% of users use Unity 2020 and higher.
     
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes :) users can create custom behaviors, actions, and abilities without having to modifying Emerald AI's core code.
     
  36. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,272
    Top wish list is after you get out the next update, get a RPG Builder integration!!!!
     
  37. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I’ll reach out to the developers of RPG Builder and see what I can do :)
     
    Last edited: May 11, 2023
  38. m0ds84

    m0ds84

    Joined:
    May 25, 2016
    Posts:
    18
    Hi there, a small strange issue I'm experiencing - I'm on Unity 2019.4.40 and giving the latest version a try... however, the player will not receive damage. It's as if "EmeraldAttackEvent" in the animations is not firing...

    But, if I remove the latest version of Emerald and copy + paste an older version (3.0 I think) from an older project, it works fine. The animation event "EmeraldAttackEvent" is triggering and I'm receiving damage.

    I'm stumped on why animation events won't fire, the only thing I can think of is that "EmeraldAttackEvent" is no longer the relevant command? Well, assuming it isn't a bug... but what am I missing? The old package works fine with "EmeraldAttackEvent" in 2019.4.40 but new version does not fire that event. This would suggest its not Unity 2019.4.40 issue but instead one with Emerald, but your suggestions would be appreciated. Perhaps I need to slip in an additional line of code somewhere in the newer version but not seen this mentioned in the docs.

    Thanks!
     
    Last edited: May 14, 2023
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there, I can confirm the EmeraldAttackEvent is working correctly with the most recent version.

    Are AI vs. AI able to receive damage or is this only with player targets?
     
  40. KingfisherWyvernStudio

    KingfisherWyvernStudio

    Joined:
    Oct 5, 2011
    Posts:
    324
    I vaguely remember asking this before, but I couldn't find the answer here in the forum:
    I know breeding was in an older version of Emerald AI (IIRC version 2.x). IIRC you said you might make a stand alone asset with breeding functionality instead of adding it to a new version of Emerald AI 2023. Do you still have plans for that?
     
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there, the breeding feature will be brought back as an standalone component, not a standalone asset (no eta at the moment). It will require Emerald AI 2023 to work. This will keep the functionality within the breeding component rather than being a part of the main system. This is similar to how other optional components will work with Emerald AI 2023 where they work with Emerald AI to add functionality. You can refer to my status update above to see what this will look like.
     
  42. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    27
    @BHS hello

    How can I setup turrets?
     
  43. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,272
    Really hoping for that RPG Builder integration! Still on track for the end of May?
     
    micuccio likes this.
  44. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    192
    Can we hope for more pathfinding systems like A*Pathfinding at Emerald AI 2023? Unity's Navmesh is simply unsuitable for worlds that change dynamically. A*Pathfinding, on the other hand, can be generated very well via runtime.
     
  45. netaliev97

    netaliev97

    Joined:
    Jan 5, 2020
    Posts:
    8
    how to make one Ai, inflict damage on another AI?
     
  46. Blackghost

    Blackghost

    Joined:
    Oct 2, 2012
    Posts:
    111
    Will the integration for Opsive, Invector, and Malbers be easliy implemented from initiation?
     
  47. iChuy

    iChuy

    Joined:
    Aug 26, 2017
    Posts:
    7
    Any news on the update?
     
    Blackghost likes this.
  48. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Turrets would be tricky because they are stationary and animations are required for Emerald AI. There's quite a few free scripts out there to make a simple turret. Just Google something like "turret script Github unity"
     
  49. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I own A* Pathfinding and I have plans to look into this after the new version of Emerald AI is released.
     
    MorpheusXI likes this.
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    This should happen automatically, given the AI have an enemy faction relation.