Bow stopped working after updating FPC(ucc)

SOSolacex

Member
Hey guys, my bow stopped working after updating Opsive's First Person Controller asset.
I had to update this asset due to a dialogue system integration fix that I needed, but that fix would only work on the newest version of FPC.
Now the result of the update is that upon equipping the bow, it for some reason gives me like 50+ arrows to maximize the stack that is already in my inventory.
It also does equip the bow to some extent, as in the bow will show up in the hierarchy, but it doesn't do anything... It's invisible, it can't fire etc.

I did have to remove my UCC folder to accomodate the new update, so something that I needed might have been deleted there, but honestly I wouldn't know what.

Note that before the update, the bow worked perfectly.
After the new update, I am also getting an error upon clicking a blank spot in the inventory grid.
I also made sure to get the updated integration.

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterModifyAttributeItemAction.GetCharacterAttributeName (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/InventoryItemActions/CharacterModifyAttributeItemAction.cs:106)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterModifyAttributeItemAction.CanInvokeInternal (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, Opsive.UltimateInventorySystem.ItemActions.ItemUser itemUser) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/InventoryItemActions/CharacterModifyAttributeItemAction.cs:59)
Opsive.UltimateInventorySystem.ItemActions.ItemAction.CanInvokeInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/ItemActions/ItemAction.cs:41)
Opsive.UltimateInventorySystem.ItemActions.ActionElement.CanInvoke () (at Assets/Opsive/UltimateInventorySystem/Scripts/ItemActions/ActionElement.cs:63)
Opsive.UltimateInventorySystem.UI.Panels.ActionPanels.ActionPanel`1[T].OpenInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ActionPanels/ActionPanel.cs:66)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel.Open (Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel previousPanel, UnityEngine.UI.Selectable previousSelectable, System.Boolean selectDefault) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanel.cs:249)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotsContainerCategoryItemActionSetBinding.OpenItemAction (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo itemInfo, System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotsContainerCategoryItemActionSetBinding.cs:107)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotsContainerItemActionBindingBase.TriggerItemAction (Opsive.UltimateInventorySystem.UI.Item.ItemViewSlot itemViewSlot) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotsContainerItemActionBindingBase.cs:150)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotsContainerItemActionBindingBase.TriggerItemAction () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotsContainerItemActionBindingBase.cs:123)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotsContainerItemActionBindingBase.HandleItemClicked (Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotEventData eventdata) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotsContainerItemActionBindingBase.cs:106)
Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotsContainerBase+<>c__DisplayClass63_0.<Initialize>b__0 () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewSlotsContainerBase.cs:203)
Opsive.UltimateInventorySystem.UI.CompoundElements.ActionButton.Press () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/CompoundElements/ActionButton.cs:72)
Opsive.UltimateInventorySystem.UI.CompoundElements.ActionButton.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/CompoundElements/ActionButton.cs:123)
Opsive.UltimateInventorySystem.UI.Item.ItemViewSlot.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewSlot.cs:188)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/Program Files/Unity/Hub/Editor/2020.3.4f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at C:/Program Files/Unity/Hub/Editor/2020.3.4f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:262)
UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity/Hub/Editor/2020.3.4f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:385)
 
What integration version did you have before the update?
If it was a 1.X then you'll have a few changes to makes since V2.X works quite differently. The new integration requires the latest UCC and UIS version.

Have a look at this page for more information: https://opsive.com/support/document...oller/integrations/ultimate-inventory-system/

As for the error, it seems you are calling an ItemAction on an empty item slot. You can avoid that by changing the options on the Item Action Binding componentn of your Item View Slot Container.
I'll also add a null check for that specific item action such that this error never comes up again.
 
Thank you for sharing the videos. I think the issue is with your Item Set Rule and your Item Prefab.

On your Item Set Rule 3 'Bow' you have the RangeWeapon set on Slot 0, but on your item prefab you have your item set to SlotID 1.

If you are using the same Bow setup as in the demo scene, where the Bow is equipped on the left hand, then the ItemSet Rule should have the RangedWeapon on Slot 1. If you plan to add other ranged weapons that will be used with the right hand then splitcategories in two on for LeftHandRangedWeapons and another for RightHandRangedWeapons (or something similar)

I hope that solves your issue
 
Thank you for sharing the videos. I think the issue is with your Item Set Rule and your Item Prefab.

On your Item Set Rule 3 'Bow' you have the RangeWeapon set on Slot 0, but on your item prefab you have your item set to SlotID 1.

If you are using the same Bow setup as in the demo scene, where the Bow is equipped on the left hand, then the ItemSet Rule should have the RangedWeapon on Slot 1. If you plan to add other ranged weapons that will be used with the right hand then splitcategories in two on for LeftHandRangedWeapons and another for RightHandRangedWeapons (or something similar)

I hope that solves your issue

Oof, you're completely right.
After the update I had to reconvert my item rules.. seems like I did it wrong there.. :oops:

However, there is one issue remaining.
For some reason it still gives me like 50+ arrows that maximizes my stack upon equipping the bow.
 
Do you mean you have 50 arrows in your Inventory or 50 arrow in the Bow?
If it is in your inventory then it must be your Item Pickup.

If it is on the Bow itself then the issue might be with the item Prefab missing a WeaponWithAmmoBinding? Try comparing your Bow Item with the one from the Demo scene to see how it differs.

If the issue is the same in the Demo scene then perhaps there is an issue with your script execution order
 
Top