Version 3.0 Upgrade Guide - Black-Horizon-Studios/Emerald-AI GitHub Wiki

Version 3.0 Upgrade Guide

Before upgrading to version 3.0, it is recommended that users backup their projects. You can see all the changes made here: Version 3.0 Release Notes

The main thing you will need to do before trying out version 3.0 is upgrading pre-existing AI's Animator Controllers. If you are not coming from version 2.0, you can ignore this guide.

Upgrading the Animator Controller

First, you will need to go to the Animation tab. At the bottom, underneath Animation Profile, a new button has been added to assist in updating process. The Regenerate Animator Controller button allows user to update the selected AI's Animator Controller to the most current version. Pressing this button is all users have to do to update their Animator Controller to version 3.0. To make the process quicker, this feature supports multi-object selection.

This is very important. Not doing so will cause AI to act incorrectly during runtime. The rest of the guide talks about variable renames and changes which reset some variables to their default states or values.

Variable Name Changes

Several variables have also been renamed which means the settings' value has been reverted to the default. If you used these settings, you will need to reapply them.

EmeraldAIAbility

  • ArrowProjectile within the EmeraldAIAbility script has been changed to SticksIntoObject.
  • UseCastSound within the EmeraldAIAbility script has been changed to UseCreateSound.
  • CastSound within the EmeraldAIAbility script has been changed to CreateSoundsList.
  • UseCastEffect within the EmeraldAIAbility script has been changed to UseCreateEffect.
  • CastEffect within the EmeraldAIAbility script has been changed to CreateEffect.

EmeraldAISystem

  • UseBloodEffect within the EmeraldAISystem script has been changed to UseHitEffects.
  • UseRunAttack within the EmeraldAISystem script has been changed to UseRunAttacks.
  • AttackDistance within the EmeraldAISystem script has been changed to MeleeAttackDistance.
  • TooCloseDistance within the EmeraldAISystem script has been changed to MeleeTooCloseDistance.
  • MinAttackSpeed and MaxAttackSpeed with the EmeraldAISystem script have been made into two separate variables, one for each weapon type. These are MinMeleeAttackSpeed and MaxMeleeAttackSpeed and MinRangedAttackSpeed and MaxRangedAttackSpeed.

Integration Changes

All Emerald AI integrations should work the same as they did with version 2.0. However, if you are upgrading to Emerald AI 3.0, you will need to remodify the changes you made to the EmeraldAIPlayerDamage script as these will have been overwritten when importing Emerald AI 3.0.

Melee Attack Distance Changes with Root Motion

The way attack distance with Root Motion is calculate has been improved to stop more reliably. This means previous melee attack distances will likely be too large as AI stop a lot quicker than they did with previous versions. Due to the MeleeAttackDistance variable name change, the new default is a distance of 2.5 which means users will have this value applied to all AI who use melee. This is mentioned so users don't spend the time reapplying Attack Distance values that may now be too large.

Ragdoll Force Changes

Version 3.0 has changed the way force is applied to AI who use the Ragdoll Death Type. The force applied is now a lot more sensitive so the caps have been adjusted from (50 - 6000) to (5 - 1000). If your settings were higher than these caps, you will most likely need to adjust this value. If you see an AI's ragdoll move excessively or stretch unrealistically, this is another indicator that your Ragdoll Force may be too high.