Version Release Notes - Black-Horizon-Studios/Emerald-AI GitHub Wiki

Emerald AI Version Release Notes

Here you can see all of Emerald AI's Release Notes starting from version 2.4.0.

Table of Contents

3.1.5.2

  • Fixed a bug that could stop an AI from dealing damage to a player if the player attacks an AI before it was detected.
  • Added a button to the Location Based Damage editor that takes the user to the Location Based Damage tutorial.

3.1.5.1

  • Fixed a miscalculation in the runtime Target Position Modifier code.

3.1.5

  • Improved the Target Position Modifier script to allow a character controller's collider to be used for positioning (with still allowing for a height offset). This allows for the hit point to reposition during runtime if a player crouches and the collider changes size.
  • Improved the way line of sight detects targets (both detected and undetected) by using the collider's bounds.
  • Improved some code in the SearchForTarget function.
  • Improved the way the movement blend trees use their movement turning animations so they're more likely to play during movement turns. This is especially noticeable for quadruped models with turning animations.
  • An option called Movement Turning Sensitivity has been added to AI's Settings>Movement>Turning Settings to adjust the above option. A value of 1 was the original amount and the new default is a value of 2.
  • Fixed a bug that could cause some character controllers to not reliably be detected.
  • Fixed a bug that wouldn't properly apply some ranged animations to an AI that was using the Both Weapon Types option.
  • Fixed a bug that could allow an AI to rotate towards non-combat position while playing an Emote Animation.
  • Fixed a bug that caused an error when killing an AI that hadn't yet detected a target.
  • Fixed a bug that allowed a hit effect to spawn on both the default hit position and the impact effect position when using Location Based Damage (This should only be played once from the impact effect position).

3.1.2

  • Added the ability to import and export waypoint data so they can be shared between multiple AI. This can be found within the Waypoint Editor.
  • Added an external script (that's attached to an AI) to it the ability to cancel their current target if it becomes obstructed for a customizable amount of seconds (AI using this script must be using the Line of Sight Detection Type). This script is called AdvancedLineOfSight.
  • Fixed a bug that could cause the Obstruction Layers to not work correctly with the melee Weapon Type.
  • Fixed a few bugs that could cause a target to be incorrectly obstructed or detected. This is especially important for character controllers as the parent transform with a rigidbody could be grabbed as the target instead of the intended target with the collider.

3.1.1

  • Fixed a bug that didn't allow AI using Root Motion to correctly run.
  • Reduced the transition speed between idle and run so it happens more gradually rather than near instantly (Root Motion Only)
  • Fixed a bug that sometimes didn't allow ragdolls to be properly initialized on death.
  • Fixed 2 of the demo scenes that didn't correctly have a material applied.
  • Added a Companion Example scene.
  • Added an example script called SetCompanionFollower so users have an example for assigning a companion's follower through code.

3.1.0

  • Removed all previous demo scenes and files and replaced them with new Emerald AI demos and new models with root motion animations to better showcase Emerald AI's features and capabilities.
  • Completely restructured all demo files so they no longer have to be imported and so the folder structure is cleaner. While it's highly recommended users include the demo files and scenes, the Demo folder can now be excluding when initially importing Emerald AI.
  • Some previous unused scripts were removed.
  • Added new AI prefabs to help get users get started quicker.
  • Current Improvements
  • New Demos and demo models to better show Emerald AI's features and capabilities.
  • Big improvements to how Emerald AI's Root Motion is calculated which allows for much smoother transitions, more fluid movement, and stopping quicker. This is showcased in the new Emerald AI demos.
  • Allowed the WalkFootstepSound and RunFootstepSound to play when called from stationary turn animations so footstep sounds could be played while turning.
  • Added new AI prefabs to help get users get started quicker.
  • Added Force Walk Distance to the Emerald AI Editor (located under AI's Settings>Combat>Damage Settings) that allows users control the distance in which an AI will start walking instead of running as it approaches its target. This setting can also be set to 0 if users would like this feature disabled.
  • Current Fixes
  • Fixed a bug that allowed AI using Line of Sight to sometimes detect targets through the floors and walls both on the first time detecting a target and after kill one.
  • Fixed various bugs related to companion AI.
  • Fixed a bug that caused some EmeraldAIProjectiles script to not properly set the added sphere collider to (0,0,0) which resulted in incorrect projectile collisions.
  • Fixed a bug that caused foot sliding when using run animations.
  • Fixed a bug that could allow some AI to get stuck in a loop of their turning left and turning right animations.
  • Fixed a bug that sometimes allowed an AI to skip its second waypoint when using the Loop or Reverse Waypoint Types.
  • Fixed a bug that didn't allow an AI's Stopping Distance to be set to its Attack Distance when getting a target while in the process of reversing its waypoints.
  • Fixed a few warning messages from some of Emerald AI's scripts.
  • Stopped allowing warning messages to be displayed for setting up a faction and melee attacks/ranged abilities when using a non-combat Passive AI.
  • Added a check to ensure the file path of an Animator Controller exists before regenerating an Animator Controller (When pressing the Regenerate Animator Controller button). This previously lead to a lost reference to the AI's Animator Controller. Instead, this notifies users to just clear the Animator Controller and create a new one which will fix the missing reference and update the Animator Controller.

3.0.1

  • Fixed a bug that didn't allow the ResetAI API to work correctly.

3.0

Improvements/Features

  • Added the ability for projectile abilities to to stay stuck into targets based on the colliders hit allowing them to move with their current target, when Sticks Into Objects is enabled.
  • Added the ability for projectiles to be used with Location Based Damage AI so projectiles, such as arrows, stay stuck into the colliders of an AI's body that were hit.
  • Renamed Arrow Projectile to Sticks Into Object.
  • Added the ability for projectiles to use gravity with a customizable gravity amount.
  • Added a new component called TargetPositionModifier that allows non-AI and player targets to have their target position modified so AI can properly hit them. Users have had issues with AI aiming at the player's base which resulted in incorrect targeting and incorrect target obstructions. This new component resolves this and has an easy to use editor with visual indicators.
  • Completely rewrote the IK look at feature to be reliably smooth between targets.
  • Improved the way aiming offset is calculated as Unity's IK system will aim high at distant targets. The aiming offset is reduced as the target gets closer to the AI who is aiming. This also works for the IK look feature with non-combat targets.
  • When within the Emerald AI Editor, changed the visual line of sight center transform from the base of the AI to its head transform.
  • Added a gizmo to show an AI's attack distance when within the Unity Editor and the Emerald AI editor is active for that AI.
  • Renamed Head Look Speed to Non-Combat Look at Speed
  • Added a separate look at Speed for combat called Combat Aim Speed so users can have a faster aiming speed for combat and a slower look at speed for look at players (as well as other non-combat NPCs).
  • Added an event called OnDetectTargetEvent that triggers an event each time an AI successfully detects a target when while in combat.
  • Removed all look at code within the EmeraldAIDetection script and moved it to a separate script called EmeraldAILookAtController. This component is automatically added to an AI when they are created with the Setup Manager. For AI who are preexisting, this component is added upon initialization.
  • Improved the way turning animations are calculated as the previous method would sometimes allow an AI to play the wrong turning animation when an AI was rotating.
  • Reworked the way stationary turning speeds are handled by having separate settings for combat and non-combat. Also reworked the way moving turning speeds are handled by having separate settings for combat and non-combat. This all gives much more control over how the AI moves and turns, especially with AI who use Root Motion. This was tested significantly and allowed for the most polished looking AI turning movement both in and out of combat. It also allows AI to move between manual waypoints and dynamic waypoints more cleanly by better utilizing their turning animations.
  • Added a Refresh Animator Controller button that manually updates an AI's animations and reapplies an AI's Animator. This can sometimes happen (rarely) when updating to a newer version of Emerald AI.
  • Added a confirmation message to the Check for Missing animation if no missing animations are found.
  • Reworked the way player damage is handled with EmeraldAIPlayerDamage. The EmeraldAIPlayerDamage script is now integrated within all Emerald AI scripts so AI can detect when an player's health reaches 0. This also allows users to integrate custom character controllers or health systems, like what was done previously within EmeraldAIPlayerDamage, but the IsDead variable can be set with custom code that is then read within the Emerald AI code so AI will always know when a player has died. This is all handled in real-time so AI will know exactly when a player has died, even if they are mid attack or walking towards the player target. This means no more AI attacking dead players. All integration tutorials will be updated with these improvements by the release of version 3.0.
  • When a player dies, their transform is added to a static list of transforms called IgnoredTargetsList that stores all killed players so they cannot be retargeted. This is to avoid having to modify the player in anyway, such as changing a player's tag or layer. There is simple easy to use API to remove a selected player from the IgnoredTargetsList, or it can also be cleared, so it can be targeted again by AI. This is explained further below.
  • The IgnoredTargetsList can also be used for other mechanics so any target can be ignored if desired. API is available to set, remove, and clear the IgnoredTargetsList.
  • Reworked the way Non-AI damage is handled with EmeraldAINonAIDamage. This is similar to what was done with EmeraldAIPlayerDamage as explained above.
  • Added a function called ResetNonAITarget to EmeraldAINonAIDamage that resets a non-AI target to its default health, tag, and layer. This can be used to reset a non-AI target if users want to reuse the game object.
  • Added the ability to remove undesired colliders from an AI's Location Based Damage Collider List.
  • Added a button to the Animation tab called "Regenerate Animator Controller" that will regenerate the AI's current animator controller from the Emerald AI master version without having to resave or reapply any animations. This is useful when the master animator controller has been updated, like it has with this update, and users need a quick way to update to the current version of the animator controller. This also works with multiple objects so users can select as many AI at a time as needed.
  • Improved the way stationary turning is handled when AI are wandering. AI will now play and complete their turning animations according to their turn angle before moving. This allows AI to move much more naturally.
  • Added code that checks if an AI's Animator Controller has gone missing, which can happen if the Animator Controller has been overwritten with changes from another AI that shares said controller. When this happens, the user will be notified within the Emerald AI editor that the Animator Controller has gone missing and that it can attempt to recover it using the last known file path. If this file path hasn't changed, the Animator Controller will be recovered and reapplied. This seemed to be an issue that would happen occasionally with some users so now there's a failsafe method to possibly resolve it. If the controller cannot be found, the user will be notified to simply create a new Animator Controller.
  • Rewrote the backup state to be much more responsive and accurate when looking for obstacles while backing up. This allows an AI that's backing up to detect the distance of a collision and only backup until they're within their Stopping Distance + 1 unit away of said collision. AI will also no longer continuously attempt to backup when there's no space to do so.
  • Added a Backup Layer Mask to the Emerald AI Editor to ignore certain layers with the backup detection process.
  • Renamed UseCastSound within the EmeraldAIAbility script to UseCreateSound to generalize the name. This change means this variable has been reset.
  • Renamed CastSound within the EmeraldAIAbility script to CreateSoundsList. This was changed to a list of sounds that are randomly picked when an ability is created. This gives much more diversity when abilities are being created, especially for AI who use weapons like guns. This change means this variable has been reset.
  • Renamed UseCastEffect within the EmeraldAIAbility script to UseCreateEffect to generalize the name. This change means this variable has been reset.
  • Renamed CastEffect within the EmeraldAIAbility script to CreateEffect to generalize the name. This change means this variable has been reset.
  • Rewrote a lot of the EmeraldAIProjectile code so it referenced the passed EmeraldAIAbility data instead of having duplicated variables that were used for both.
  • Removed the initialization function within the EmeraldAISystem script for initializing Emerald AI Projectiles and move it within the EmeraldAIProjectile script.
  • Replaced all enums that used a separate Yes or No value with a global one used for all EmeraldAISystem enum variables. Due to a mistake on my part from many updates ago, the UseRunAttack enum and UseBloodEffect variables had reversed values so I had to rename them to avoid potential errors. All this means for users is that you will have to reapply the UseRunAttack setting or UseBloodEffect setting to what you had it prior to the 3.0 update. Renamed UseRunAttack to UseRunAttacks and UseBloodEffect to UseHitEffects.
  • Added an option to control whether or not projectiles will play their collision effect on targets.
  • Reworked all Draw Raycasts code so they run without the detection update "ticks". This allows them to be much smoother and accurate when using the Debugging Tools.
  • Rewrote the equip weapon system to be much easier and so it's no longer dependent on the Item List. This now consists of a held weapon object and a holstered weapon object both defined within the Emerald AI editor. When using the EquipWeapon Animation Event on an AI's equip animation, a string is also passed to define what weapon is being equipped. The exact opposite is done for unequipping a weapon using the UnequipWeapon. This works for both ranged and melee weapons and only needs 2 animation events, instead of 4 like what was done previously.
  • Rewrote the weapon drop system to work with the above system simply duplicating the currently equipped/held weapon and adding the needed components allowing it to fall.
  • Rewrote how the aggro system works to be more reliable. This improvement also stops the AI from reassigning the same target when the aggro system chooses a new target.
  • Rewrote the blocking system to be much more fluid with playing blocking and blocking impact animations. This also improves blocking angle detection by calculating the angle of each attacker so an attack is only blocked when the attacker is within the blocking angle limit.
  • Rewrote how Root Motion movement is calculated to be more responsive with AI stopping at destinations. This improvement also allows AI to transition to their walk animation (when using run) prior to arriving at their destination and allows for cleaner combat mechanics by preventing AI from getting too close to each other.
  • Changed Collision Sound on projectiles to a list of sounds that are randomly picked when an ability collides with an object or target. This gives much more diversity when abilities collide, especially for AI who use weapons like guns. This change means this variable has been reset.
  • Moved the Weapon Objects from AI's Settings>Combat>Combat Action to AI's Settings>Item.
  • Added a blood decal spawning system (not the blood decals themselves) for spawning blood decals with customizable decal objects, scales, angles, radius, and more. This is featured in Emerald AI 3.0's newest video. Using an open source asset called Dynamic Decals, users can have the decals as seen in the video.
  • Added a explosion damage system that applies damage and explosion force to surrounding AI with mitigated damage and mitigated force based on distance from an explosion.
  • Removed the Turn Animation Type setting as it is now handled automatically.
  • Removed the Ranged Attack Distance minimum cap when using both weapon types.
  • Added a new Switch Weapon Type condition for AI that use both weapon types. This one allows an AI to switch weapon types based on a random time within the minimum and maximum amount of seconds.

New API

  • Added CancelAttackAnimation() to the EmeraldAIEventsManager that allows the AI's current attack animation to be cancelled.
  • Added SetIgnoredTarget(Transform TargetTransform) to the EmeraldAIEventsManager that adds the specified ignored target to the static EmeraldAISystem IgnoredTargetsList.
  • Added ClearAllIgnoredTargets() to the EmeraldAIEventsManager that clears all irgnored targets from the static EmeraldAISystem IgnoredTargetsList.
  • Added ClearIgnoredTarget(Transform TargetTransform) to the EmeraldAIEventsManager that removes the specified target from the static EmeraldAISystem IgnoredTargetsList.
  • Added GetAttacker() to the EmeraldAIEventsManager that returns the transform that last attacked the AI.
  • Added ChangeDetectionType (EmeraldAISystem.DetectionType DetectionType) to the EmeraldAIEventsManager that changes the AI's Detection Type.
  • Added GetCombatTarget() to the EmeraldAIEventsManager that returns the transform that returns the AI's current target.
  • Added GetFaction() to the EmeraldAIEventsManager that returns the AI's current faction.
  • Added AddWaypoint(Transform Waypoint) to the EmeraldAIEventsManager that adds a waypoint to an AI's waypoint list via the position of the specified transform.
  • Added RemoveWaypoint(int WaypointIndex) to the EmeraldAIEventsManager that clears the specified waypoint using the index from the AI's waypoint list.
  • Added ClearAllWaypoints() to the EmeraldAIEventsManager that allows you to clear all of an AI's waypoints.
  • Added OverrideCombatTarget(Transform Target) to the EmeraldAIEventsManager that allows you to set a target the AI can move to and attack with no distance limitations.
  • Reworked SetCombatTarget(Transform Target) within the EmeraldAIEventsManager so it assigns a target that's within an AI's detection radius.

Bug Fixes

  • Fixed a bug that didn't allow the look at IK feature to work consistently that often lead to head and body jerking between targets. This has been fixed and greatly improved to be smooth and reliable.
  • Fixed a bug that didn't allow an AI's raycasts to be drawn at the center of non-AI and player targets, if they were rotated on the x or z axis.
  • Fixed a bug that didn't allow the AI's Hit Transform Point visual indicator to take rotations into account.
  • Fixed a bug that didn't allow AI to look at the correct point if a target was rotated on the x or z axis.
  • Fixed a bug that didn't allow an AI's projectile to continue its path if its target died before the projectile made it to the target.
  • Fixed a bug that would sometimes allow a target's projectile to hit its target and not cause damage (When not using Location Based Damage).
  • Fixed a bug that would sometimes allow a target's projectile to hit its target and not cause damage (When using Location Based Damage).
  • Fixed a bug that didn't allow ranged AI to shoot at targets that were on structures above them.
  • Fixed a bug that allowed an AI to not fire their ranged attack at the appropriate distance even if their target was unobstructed.
  • Fixed a bug that sometimes didn't allow AI that were using Line of Sight detection with the Random Pick Target Type to properly find a target.
  • Fixed a bug that would sometimes allow an AI to incorrectly set the target type when using Line of Sight detection type.
  • Fixed a bug that sometimes didn't allow the Random Pick Target Type to work properly with non-AI Targets.
  • Fixed a bug that didn’t allow ranged AI who used the Stationary Obstruction Action to move closer to their target if the target was obstructed and exceeded their attack distance. This bug caused AI to get stuck without ever moving to their target if the view remained obstructed.
  • Fixed a bug that allowed the check animations error to display with combat animations when using non-combat AI
  • Fixed a bug that allowed line of sight to still function when an AI was passive or a pet.
  • Fixed a bug that stops the LineOfSightDetection function from looping through potential targets once one has been successfully found.
  • Fixed the function name within EmeraldAIEventsManager from InstantlyRefillAIHeath to InstantlyRefillAIHealth as it was misspelled.
  • Fixed a bug that could make AI using Location Based Damage (LBD) be undetectable to other AI. This happened if LBD AI had gaps in their colliders that didn't provide a valid collision source for other AI. This was fixed by altering the Box Collider generated by Emerald AI during startup to be positioned right where an AI's Hit Transform is to ensure an AI always has a collision source for being detected.
  • Fixed a bug that allowed the Emerald AI progress bar to still be displayed if there was an issue with setting up.
  • Fixed an error that happened with the Setup Manager if Auto Optimize was set to No.
  • Fixed an error that would happen with melee AI if Run Attacks were enabled, but the Run Attack List was empty.
  • Fixed an error that would happen with ranged AI if Run Attacks were enabled, but the Ranged Run Attack List was empty.
  • Fixed a bug that stopped allowing AI to attack if they switched targets that were greater than 100 degrees while using an Attack Speed of 0.
  • Fixed a bug that would allow melee AI to successfully generate an attack even if they were not done rotating with their Combat Turning Angle. This resulted in AI rotating towards their target, generating an attack, then continuing to rotate the rest of the needed amount, which looked unnatural. Melee AI must now finish rotating before they can attack their targets.
  • Fixed a bug that allowed AI to keep attacking a dead player.
  • Fixed a bug that updated the an AI's wandering position and starting position when RestAI() was called (used for reusing a killed AI).
  • Fixed a bug that would disable an AI's internal colliders when RestAI() was called and the AI was using the Location Based Damage system. This resulted in an AI not being able to properly use Location Based Damage after being killed and reset.
  • Fixed a bug that would sometimes give a missing reference exception when an AI that was killed was despawned (being disabled).
  • Fixed a bug that didn't allow cast or fire effects to rotate with the AI.
  • Fixed a bug that didn't allow AI attacks to be cancelled. This required changes to the master Animator Controller which means animator controllers will need to be regenerated. A button has been added to update an animator controller to the current version right from within the Emerald AI editor. This is explained above.
  • Fixed an error that would happen if a projectile's target was destroyed while moving towards its target.
  • Fixed a bug that would allow an AI's Location Based Damage colliders to stop an AI's backup process.
  • Fixed a bug that allowed an AI's projectiles to collide with its own colliders when using Location Based Damage.
  • Fixed a bug that didn't allow the proper backup speed to be applied when switching between ranged and melee attacks.
  • Fixed a bug that allowed a melee attack's Impact Effects to spawn without being parented to a transform.
  • Fixed a bug that allowed AI to generate multiple attacks within a single attack sequence which sometimes allowed incorrect attack animations to play.
  • Fixed a bug that allowed multiple block animations to get triggered when getting hit while the current block animation was playing.
  • Removed the Player Offset Y Position and Head Look Y Offset from the EmeraldAIEditor as they are no longer used. The TargetPositionModifier component replaces this and allows for much better control for players and individual non-AI targets.
  • Added a warning message to Combat Turning Angle if it is below an AI's Max Firing Angle (for ranged and both weapon types) as having the Combat Turning Angle lower than the Max Firing Angle can result in an AI being unable to fire at its target.

2.4.2.1

Improvements

  • Added Dynamic Waypoint Wander Layers LayerMask to the Emerald AI Editor (Located under Temperament>Wander Type Settings) to choose which layers will be detected when generating dynamic waypoints. By default, this is set to Everything.
  • Added an error message that's displayed in the Unity Console if an AI has a Faction Relation of Enemy that is also their current Faction as this leads to incorrect target detection.
  • Added ChangeFaction to Emerald AI's API that can change an AI's faction, given that it exists in the Faction Manager.
  • Added CheckForPlayerDetection to Emerald AI's API that checks if the player is currently detected within the AI's detection radius.
  • Added DebugLogMessage to Emerald AI's API that allows users to pass a message that's visible within the Unity Console.
  • Added GetDistanceFromTarget to Emerald AI's API that gets the distance between the AI and its current target.
  • Reworked the OnAttack event to be OnAttackStart event. This fires an event when the AI's attack animation starts playing. This event often lead to confusion. This rework, along with the addition of OnAttackEnd, should increase functionality and make the two events more clear with what they do.
  • Added OnAttackEnd event. This fires an event when the AI's attack animation ends playing. Note: This event only works for Melee weapon types.

Bug Fixes

  • Stopped dynamic waypoints from detecting IsTrigger colliders as they often interfered with generating waypoints reliably.
  • Fixed an error that would sometimes happen when using the LocationBasedDamage component.
  • Fixed a bug that didn't allow an AI to take damage if it was the child of another object.
  • Fixed an issue that would sometimes happen if there was a rigidbody attached to an AI and the AI was using LocationBasedDamage.
  • Fixed a bug that would sometimes allow an AI's projectiles to collide with its own colliders, when using the LocationBasedDamage component.
  • Fixed a bug that stopped brave AI to not reset their behavior back to brave when returning to their starting position.
  • Updated the description of the Obstruction Ignore Layers setting.
  • Updated the description of the OnStartCombat event.

2.4.2

  • Added Location Based Damage which allows colliders within an AI to receive damage and have customizable damage multipliers, such as headshot doing more damage than hits to limbs. This is explained more in-depth here: Emerald AI Location Based Damage
  • Improved how the obstruction code works by ignoring all internal colliders. If the detected collider is a child of the target, it is no longer considered obstructed. This issue has lead to a lot of confusion, especially with character controllers that have hidden colliders.
  • Fixed a bug that didn't allow the Starting Distance Type to work correctly
  • Fixed a bug that didn’t allow an AI to return to their starting position correctly.

2.4.1.1

  • Fixed an issue with the Emerald AI editor not being displayed correctly with computers that use Linux
  • Improved the way Emerald AI's Editor width is calculated so they editor scales more evenly and looks better (this goes for all operating systems).
  • Upgraded the minimum version Emerald AI uses to Unity 2018.3 as Unity automatically upgrading the project sometimes caused issues.
  • Moved all Terrain Layers to proper folders so _TerrainAutoUpgrade isn't present upon importing.
  • Renamed all Terrain Layers.
  • Added Animator Culling Mode to the Emerald AI editor to control an AI's Animator's culling mode from within the Emerald AI editor. By default, this setting is set to Always Animate as Cull Update Transforms typically causes an issue with AI who die off-screen making them freeze in T-pose, when using animation deaths.
  • Added SetPlayerRelation to Emerald AI's API to change an AI's relation with the player during runtime.
  • Added ChangeOffsensiveAbilityObject to Emerald AI's API to change the ability object of the specified index within an AI's Offensive Abilities List.
  • Added ChangeSupportAbilityObject to Emerald AI's API to change the ability object of the specified index within an AI's Support Abilities List.
  • Added ChangeSummoningAbilityObject to Emerald AI's API to change the ability object of the specified index within an AI's Summoning Abilities List.
  • Added GetDistanceFromTarget to Emerald AI's API that returns the current distance between the AI and their current target. Added ReturnToDefaultState to Emerald AI's API that sets an AI back to its wandering Default State.
  • Fixed an issue with the Emerald AI editor not being displayed correctly with computers that use Linux.
  • Fixed a bug with Companion and Aggressive AI that would sometimes freeze if they were in combat and their target was destroyed or null.
  • Fixed a bug that would cause an AI to sometimes freeze in T-pose. The typical cause of this issue was when an AI's Animator was set to Cull Update Transforms and an AI would die off-screen.
  • Fixed a bug with the UpdateAIMeleeDamage function within the EmeraldAIEventsManager script.
  • Fixed a bug with the ReachedDestinationEvent that made it sometimes not trigger reliably.
  • Fixed a bug with an AI's projectiles that wouldn't set the projectiles collider radius properly with the first shot.
  • Fixed a bug that didn't allow AI who returned to their starting position, after exceeding the user set distance, to return correctly.
  • Fixed an issue that happened with the Playable Demo scene when updating from certain versions of Unity.

2.4.1

Features

  • Redid the AI's Name UI using Unity's UI system instead of the TextMesh system. This allows for further control and more customization.
  • Redid the AI's Level UI using Unity's UI system instead of the TextMesh system. This allows for further control and more customization.
  • Emerald AI's built-in UI system now supports Rich Text so users can utilize Unity's Markup Format system such as <size=6><color=yellow>AI's Title or AI's Name right from within the Emerald AI Editor. This also allows an AI title to be a different color than their name.
  • A button has been added to the Emerald AI Editor to copy an AI's non-combat movement animations to their combat movement animations, given that they use the same animations, to avoid having to manually reapply the same animations.
  • A button has been added to the Emerald AI Editor to check for any needed missing animations, while in the Unity Editor, and debug all missing animations to the Unity Console.
  • A button has been added to the Emerald AI Editor to take users to a tutorial for creating and using Attack Sounds. Since they are done through Animation Events, this often lead to confusion on how they were created. Clarification has also been added that Attack Sounds use Animation Events and do not automatically play.
  • A button has been added to the Emerald AI Editor to take users to a tutorial for creating and using Death Sounds (When using death animations). Since they are done through Animation Events, this often lead to confusion on how they were created. Clarification has also been added that Death Sounds (When using death animation) use Animation Events and do not automatically play.
  • A button has been added to the Emerald AI Editor to take users to a tutorial for creating and using Warning Sounds (When using the proper Behavior and Confidence Types). Since they are done through Animation Events, this often lead to confusion on how they were created. Clarification has also been added that Warning Sounds (When using the proper Behavior and Confidence Types) use Animation Events and do not automatically play.
  • Added an Attack Impact Effect to the Melee Attacks List so users no longer have to add one via OnAttackEvents. This allows each melee attack to have its own impact effect that plays at its target's location. If no effect is applied, this feature will be ignored. This feature is different to that of the effects within Hit Effect section.
  • Added an option within the UI tab to control the position of the AI's Level UI.
  • Added an option within the UI tab to control whether or not an AI's Name will use an outline effect.
  • Added an option within the UI tab to control whether or not an AI's Level will use an outline effect.
  • Added an option within the UI tab to control the Name UI's Outline Size.
  • Added an option within the UI tab to control the Name UI's Outline Color.
  • Added an option within the UI tab to control the Name UI's Font.
  • Added an option within the UI tab to control the Level UI's Outline Size.
  • Added an option within the UI tab to control the Level UI's Outline Color.
  • Added an option within the UI tab to control the Level UI's Font.
  • Added an option within the UI tab to control the line spacing between an AI's Name and Title.
  • Added an option within the UI tab to control the max size the UI will be scaled when a player is getting further away from an AI's UI.
  • Added an option to the Combat Text Manager that controls the target types that will be affected by the Combat Text System. This includes options to have the combat text only be displayed on AI (including non-AI targets), only on Players, or be displayed on both AI and players (the default setting).
  • Added an option to control the overall height of the text for the Combat Text System within the Combat Text Manager.
  • Increased the Combat Text Manager's Font Size cap to 50, up from 30.
  • Added full support of obstruction detection to the Debug Tools for melee attacks.
  • Added an AI's current target's Target Type to be displayed when using the Debug Log Targets option when using the Debug Log Tools.
  • Added an option within the Debugging Tools for projectiles to Debug Log the object they collided with to the Unity Console. This should help users who are unsure as to why an AI's projectile is not hitting their target. This is often a hidden collider on the player. Using this option will make this easier to identify.
  • Added a button to the Detection Options to automatically find an AI's head transform so users don't have to manually search through their AI for it. The effectiveness of this is largely dependent on how well the developer of the model named a model's transforms.
  • Added an option to adjust the overall text height to the Combat Text Manager.
  • Added an OnHealEvent to Emerald AI's Event tab that is called when an AI cast a healing ability.
  • Added an OnCtricalHitEvent to Emerald AI's Event than that is called when an AI successfully lands a critical hit.
  • Added Critical Hits Sound List to the Sounds tab. Critical hit sounds will play when an AI successfully lands a critical hit when using the Melee Weapon Type. This feature can be disabled by simply leaving the Critical Hits Sounds List empty.

Bug Fixes

  • Fixed an issue where Emerald AI would through incorrect "Missing Death Animation" warning message.
  • Fixed an issue with the First Detected option when using the Line of Sight Detection Type that would not properly detect the target.
  • Fixed an issue that resulted in the AI getting stuck at a speed of 0.05 when generating a destination to enclosed areas such as a room.
  • Fixed an issue that would allow an AI using non-Root Motion animations to sometimes briefly move while playing stationary attack animations.
  • Fixed an issue that stopped a Cautious non-Coward AI from being reverting to its original behavior after turning aggressive.
  • Fixed an issue that would make an AI skip the next ordered attack animation when using the Order Pick Type while using a min and max Attack Speed of 0.
  • Fixed an issue that would sometimes cause AI using Root Motion to stutter when arriving to their destinations.
  • Fixed some scripts that had inconsistent line endings messages.
  • Fixed a bug that caused run attacks to generate damage from stationary attacks.
  • Fixed an issue that would make make run attacks aim towards an incorrect destination, when using Root Motion.
  • Smoothed out transition of AI using Root Motion when transitioning between idling and moving animations.
  • Updated Ability Object editor so it properly serializes to allow undo and redo to work. This also allows changes to mark the scene as dirty, which could have lead to changes not being saved to Ability Objects.
  • Made the new default Behavior Type Aggressive when setting up a new AI since most users use this setting. This will help make things easier for newer users in case it's missed.
  • When Debugging Tools are enabled, all options are enabled by default (To Clarify, this does not affect AI who do not have Debugging Tools enabled).
  • Added full support of obstruction detection to melee attacks. This mostly worked prior to the this version, however, some users would run into issues with open and closeable doors.
  • Reduced capped Attack Distance from 1.5 to 0.5 within the Emerald AI Editor as some users were needing this value to be lower.
  • Improved use of turning animations when wandering.
  • Improved the Combat Text System's Animation Types' movements so they work with a wider range of camera angles/types.
  • Added a warning message to the Emerald AI Editor to create a Melee Run Attack if it's enabled and the Melee Run Attack List is empty.
  • Base Combat Text height is now based off of an AI's Hit Transform.

New API

  • Added UpdateHealth(int MaxHealth, int CurrentHealth) to EmeraldAIEventsManager to update the AI's Max Health, Current Health, and health bar, if it's enabled
  • Added SearchForClosestTarget() to EmeraldAIEventsManager to search for a new target that's closest to the AI within an its detection radius.
  • Added SearchForRandomTarget() to EmeraldAIEventsManager to search for a new random target that's within an AI's detection radius.
  • Added FleeFromTarget(Transform FleeTarget) to EmeraldAIEventsManager to allow an AI to flee from the specified target.
  • Added UpdateAIMeleeDamage(int MeleeAttackNumber, int MinDamage, int MaxDamage) to EmeraldAIEventsManager to update an AI's melee attack damage.
  • Added UpdateAIAttackSpeed (int MinAttackSpeed, int MaxAttackSpeed) to EmeraldAIEventsManager to update an AI's attack speed.
  • (A much needed feature) Added RotateAITowardsTarget(Transform Target, int Duration) to EmeraldAIEventsManager to allow AI to stop what they are doing and rotate to the specified Target parameter for the length of the Duration parameter. If a Duration of -1 is used, the length will be indefinite and can be canceled with CancelRotateAITowardsTarget().
  • Added RotateAITowardsPosition(Vector3 TargetPosition, int Duration) to EmeraldAIEventsManager. An alternative to RotateAITowardsTarget if for some reason a Transform can't be used. If a Duration of -1 is used, the length will be indefinite and can be canceled with CancelRotateAITowardsPosition().
  • Added CancelRotateAITowardsTarget() to EmeraldAIEventsManager to cancel RotateAITowardsTarget as explained above.
  • Added CancelRotateAITowardsPosition() to EmeraldAIEventsManager to cancel RotateAITowardsPosition as explained above.
  • Added RotateAIAwayFromTarget(Transform Target, int Duration) to EmeraldAIEventsManager to allow AI to stop what they are doing and rotate away from the specified Target parameter for the length of the Duration parameter. If a Duration of -1 is used, the length will be indefinite and can be canceled with CancelRotateAIAwayFromTarget().
  • Added RotateAIAwayFromPosition(Vector3 TargetPosition, int Duration) to EmeraldAIEventsManager. An alternative to RotateAIAwayFromTarget if for some reason a Transform can't be used. If a Duration of -1 is used, the length will be indefinite and can be canceled with CancelRotateAIAwayFromPosition().
  • Added CancelRotateAIAwayFromTarget() to EmeraldAIEventsManager to cancel RotateAIAwayFromTarget as explained above.
  • Added CancelRotateAIAwayFromPosition() to EmeraldAIEventsManager to cancel RotateAIAwayFromPosition as explained above.

2.4.0.1

Additions

  • Added GetAIRelation(EmeraldAISystem EmeraldTarget) to the EmeraldAIEventsManager to get an AI's current relation to the EmeraldTarget relation.
  • Added GetPlayerRelation() to the EmeraldAIEventsManager to get an AI's current relation to the player.

Fixes

  • Fixed an issue with the Run Attack Animation Event warning that would be displayed, even if the proper event was created.
  • Fixed an issue with the Faction Data not syncing or updating newly added factions properly.

2.4.0

Features

  • The Completely redesigned faction system has been improved to support as many faction relations as needed so users are no longer capped at 5. This new method also allows factions to be added, removed, and modified during runtime. New faction API has been added to the EmeraldAIEventsManager.
  • Redesigned the player relation system to 3 categories like the faction system; Enemy (An AI will react to the player according to their Behavior Type), Neutral (An AI will need to be hit by the player to react to their Behavior Type), and Friendly (An AI will not react to the player, even if they are damaged by them)
  • Added OnKillTargetEvent Emerald AI Unity Event to the Emerald AI Editor.
  • Added OnDoDamageEvent Emerald AI Unity Event to the Emerald AI Editor.
  • Put the faction options in its own tab called Faction Options to keep the Detection Options section less cluttered.
  • Added a Random option to the Target Picking setting. This allows an AI to pick a random targets from all available targets within an AI's detection radius upon entering combat. This helps the AI target picking to feel more dynamic and less precise so the same, most logical target, isn’t always picked.
  • Included a few more example systems such as damage AI by collision, another damage AI example system limiting the damage to customizable angle, a test event script that can be used to debug logs Emerald AI Unity Events.
  • New documentation - All Emerald AI documentation has been moved to the Official Emerald AI Wiki site. This site is better formatted so much more information can be covered.

Additional Animations Animations have been increased to the following. This brings the total up to about 100 usable animations. Note: This requires all Animator Controllers to be regenerated to utilize new animations.

  • 6 Melee Hit Animations, up from 3
  • 6 Melee Attack Animations, up from 3
  • 6 Melee Death Animations, up from 3
  • 6 Ranged Hit Animations, up from 3
  • 6 Ranged Attack Animations, up from 3
  • 6 Ranged Death Animations, up from 3
  • 6 Hit (non-combat) Animations, up from 3
  • 6 Idle Animations, up from 3
  • 10 Emote Animations, up from 3

Fixes

  • Fixed an issue with the GUILayout.SelectionGrid buttons' height in the Emerald AI editor and Unity 2019.3+
  • Fixed block angle calculations to be more accurate.
  • Fixed an issue that didn't allow ranged AI to move to their target when having low attack speed (near 0).
  • Fixed an issue that allowed a Cautious AI to play its warning animation while attempting to move to its wandering destination.
  • Fixed a rare issue that didn't allow the Animator Controller Updater to update some animations accurately.
  • Fixed the issue "ArgumentException: UnpackPrefabInstance must be called with a Prefab instance." that happened with newer version of Unity when using the Emerald AI Setup Manager and a non-prefab object.
  • Fixed an issue that applied the wrong speed settings to an AI's Backup state when using the Both Weapon Type setting.
  • Fixed an issue that allowed an AI to play a blocking sound if they were blocking than transitioning to its turn animations.
  • Fixed an issue that allowed an AI to get stuck in the SeachForTarget function for a few seconds when sometimes switching between targets.
  • Fixed a few Emerald AI console warning messages that happened even when the proper animations and animation events were applied.
  • Fixed an issue that caused the AI's look at feature to glitch when no targets were left and it was transitioning back to its default look at position.
  • Fixed an issue that made AI walk or run slow when using Root Motion movement type (This was related to the Rigidbody Component and some newer versions of Unity)
  • Removed the Rigidbody component from the Emerald AI system as it is no longer needed and caused issues with the Animator Controller in some newer versions of Unity. Improved the AI's look at feature to be smoother and more responsive when switching between targets.
⚠️ **GitHub.com Fallback** ⚠️