Error: Unable to find a Use ability with slot ID 0 and action ID 0

Hey. I have installed UCC, BD, BD-UCC integration, and BD movement in that order, and somehow the example behavior trees from the BD-UCC demos all have missing tree components (boxes that say "replace this component with something else"). I am suspecting that I did not install in the correct order, and that movement pack must have been installed before BD-UCC integration. Even if I tried to install BD-UCC integration later, that did not fix it. I am not sure if there is any reminder in any documentation to follow that order, but if that is really the case it would be nice to highlight that so others do not have the same issue.

Anyways, I have started trying to fix each one of the tree components with replacement requirements. Currently I have a 2.5D character that can patrol between two spots, and I have worked down through the see-and-attack component of the UCC example tree for melee. The current problem is that the game will freeze whenever my player character will come to attack distance. I tried to use the initial slot ID and action ID that came with AgentNolan, and then checked out the slot and action ID's under the sword that the character was trying to use to no vail. Given so many ID's for different purposes, I am trying to make sure I am looking at the correct ones:

Is the Slot ID the one under the Item Script that says "Slot ID"? That is showing as 0 for sword.
And is Action ID the one under Third Person Melee Properties that says "Action ID" ? That is also showing as 0. Or is it the ID directly under the Melee Weapon Script? Or is it found in animator states?

I totally appreciate the ID system, and I can see how it reduces all different animation references that were in TPC scripts. But it will take a while before I really can remember which ID was which.

Thank you :)

1538364805118.png
 
Is the Slot ID the one under the Item Script that says "Slot ID"? That is showing as 0 for sword.
And is Action ID the one under Third Person Melee Properties that says "Action ID" ? That is also showing as 0. Or is it the ID directly under the Melee Weapon Script? Or is it found in animator states?
These IDs are the IDs on the components and not found in the animator states so you are correct using a value of 0. Where are the component values listed that you are missing? I'd focused on getting that part fixed first so you have an example that you can use.
 
I think most of all movement pack components were missing. Could you confirm that we need the BD movement pack to be able to use BD-UCC integration example scene? I think components such as seek were missing, and I also saw several see and within distance components missing as well. I tried to delete those and recreate them using the documentation on the website, but since I could not see their inspectors, some of the values may have been messed up.

I will try to delete the movement pack and the integration folders, and install them in the logical order again, and see what happens.

Finally, could you confirm if we need to first install the movement pack, and then the UCC-BD integration?
 
You'll need to have the Movement Pack installed before you open the scene, but you can import everything in any order. In your case if you reimport the scene you should be good (the tree was probably serialized after the Movement Pack wasn't imported which will cause unknown tasks).
 
Ok, the issue seems to be fixed now when I deleted the movement pack and the integration, and installed movement pack first, and then the integration. I think the missing components are first generated if the integration is first installed without the movement pack, since there are no references for them, and not fixed if I install movement pack on top of that. The demo scene that did not work properly before now works. I will go ahead and test it on my scene to find out what happens.
 
Ok. So I copy/pasted NolanAgent (melee) into my scene, and as soon as I introduce the player in my 2.5D scene as the target, he seems to work perfectly.

Then I exported his behavior into a new file, and introduced this as an external behavior tree to my custom Morph3D / UCC AI character. The character can patrol, and successfully perform the other branches of the example tree. I get the following errors when he gets close enough to hit. He swings his sword once and then it breaks the game, my character becomes unable to move, and both wait in idle or loop their last action:

First error given by Behavior Manager:

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Items.Actions.MeleeWeapon+MeleeHitbox.ResetPositionRotation () (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/MeleeWeapon.cs:90)
Opsive.UltimateCharacterController.Items.Actions.MeleeWeapon.StartItemUse () (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/MeleeWeapon.cs:381)
Opsive.UltimateCharacterController.Character.Abilities.Items.Use.AbilityStarted () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/Use.cs:449)
Opsive.UltimateCharacterController.Character.Abilities.Ability.StartAbility (Int32 index) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Ability.cs:363)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.TryStartAbility (Opsive.UltimateCharacterController.Character.Abilities.Items.ItemAbility itemAbility, Boolean ignoreCanStartCheck) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1074)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.TryStartAbility (Opsive.UltimateCharacterController.Character.Abilities.Items.ItemAbility itemAbility) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1010)
BehaviorDesigner.Runtime.Tasks.UltimateCharacterController.StartStopUse.OnUpdate () (at Assets/Behavior Designer/Integrations/UltimateCharacterController/Scripts/Tasks/StartStopUse.cs:108)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorTree behaviorTree, Int32 taskIndex, Int32 stackIndex, TaskStatus previousStatus)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorTree behaviorTree, Int32 taskIndex, System.Int32& stackIndex, TaskStatus status)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorTree behaviorTree, Int32 taskIndex, Int32 stackIndex, TaskStatus previousStatus)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorTree behaviorTree, Int32 taskIndex, System.Int32& stackIndex, TaskStatus status)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorTree behaviorTree, Int32 taskIndex, Int32 stackIndex, TaskStatus previousStatus)
BehaviorDesigner.Runtime.BehaviorManager.Tick (BehaviorDesigner.Runtime.BehaviorTree behaviorTree)
BehaviorDesigner.Runtime.BehaviorManager.Tick ()
BehaviorDesigner.Runtime.BehaviorManager.Update ()

and second error given by Deterministic Object Manager:

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Items.Actions.MeleeWeapon+MeleeHitbox.CanUse () (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/MeleeWeapon.cs:101)
Opsive.UltimateCharacterController.Items.Actions.MeleeWeapon.UseItemUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/MeleeWeapon.cs:410)
Opsive.UltimateCharacterController.Character.Abilities.Items.Use.LateUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/Use.cs:566)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.LateUpdateActiveAbilities (Opsive.UltimateCharacterController.Character.Abilities.Ability[] abilities, System.Int32& abilityCount) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:843)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.LateUpdateUltimateLocomotion () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:831)
Opsive.UltimateCharacterController.Character.CharacterLocomotion.Move (Single horizontalMovement, Single forwardMovement, Single deltaYawRotation) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:476)
Opsive.UltimateCharacterController.Game.DeterministicObjectManager+DeterministicCharacter.FixedMove () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:146)
Opsive.UltimateCharacterController.Game.DeterministicObjectManager.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:589)
 
On the same AI character, I am also getting the following error:

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Items.Actions.MeleeWeapon+MeleeHitbox.ResetPositionRotation () (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/MeleeWeapon.cs:90)
Opsive.UltimateCharacterController.Items.Actions.MeleeWeapon.OnChangePerspectives (Boolean firstPersonPerspective) (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/MeleeWeapon.cs:707)
Opsive.UltimateCharacterController.Events.InvokableAction`1[System.Boolean].Invoke (Boolean arg1) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/InvokableAction.cs:87)
Opsive.UltimateCharacterController.Events.EventHandler.ExecuteEvent[Boolean] (System.Object obj, System.String eventName, Boolean arg1) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/EventHandler.cs:392)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.OnAttachLookSource (ILookSource lookSource) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:463)
Opsive.UltimateCharacterController.Events.InvokableAction`1[Opsive.UltimateCharacterController.Character.ILookSource].Invoke (ILookSource arg1) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/InvokableAction.cs:87)
Opsive.UltimateCharacterController.Events.EventHandler.ExecuteEvent[ILookSource] (System.Object obj, System.String eventName, ILookSource arg1) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/EventHandler.cs:392)
Opsive.UltimateCharacterController.Character.LocalLookSource.OnDisable () (at
 
Alright, I have figured out the problem. The hitbox of the new sword for my custom character was not introduced in the Third Person Melee Weapon Properties, and that seemed to cause all three errors. The behavior tree seems to work really well now. Thank you for your help with this.
 
Top