Behaviour Designer Unable to find a Equip Unequip ability with category id -658542401

andreyakladov

New member
Once I've added "Start Equip Unquip" task I'm getting in the loop in logs: "Error: Unable to find a Equip Unequip ability with category id -658542401"
How do I fix this?
Screenshot 2020-04-28 at 21.55.46.png
 
If you set a breakpoint within StartEquipUnequip.OnStart what category ids can be found? None of them match the current category ID set on EquipUnequip?
 
I see that ability.ItemSetCategoryID = 3636424895, but self.m_CategoryID.value = -658542401.
How do I set correct category id into Start Equip Unequip action?
 
In inspector there is ‘items’ category selected, which is correct. However OnStart it sees that "-658542401", which looks not real
 
I see what happened. The int is overflowing when casting from uint (Behavior Designer doesn't support uint, but it does support int which is what the category ID was prior to 2.2. I am working on a new Behavior Designer release and will update the integration, but for now what you can do is switch the Unity inspector into Debug mode (the gear icon on the top right of the Unity inspector) and select the Items category underneath the Item Collection:

1588159009928.png

Change this ID to a smaller value, such as 10005. Get out of debug mode within the inspector and select your AI agent. This will update the ID on the abilities and Item Set Manager. Once you do that you can then go back to your behavior tree and click on the Start Equip Unequip task. This should then update that value and everything will match.

I plan on releasing a new BD version this week so you won't have to do this workaround for very long.
 
I see no warnings, tasks are being executed correctly, success returned, but I see no updates/animations on enemy character, it remains equipped all the time.
 
You can either equip a new ItemSet, or set the ItemSet index to -1 so that it will not have any ItemSets equipped for that category.

Alternatively you could remove the sword from the inventory's Default Loadout if it exists.
 
After Editor relaunch now I get "Error: Unable to find a Equip Unequip ability with category id 1046739944" and melee weapon disappeared from every character on the screen.
 
That looks like a similar error - did your category ID changes persist? For these changes you'll need to save the project rather than the scene.
 
Top