Summary
When disabling item drop or item pickup through verse, it behaves weirdly. Custom items made from scratch and custom items made as child types of existing fortnite items also behave different, with fortnite-based items having much more problems.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Scene Graph
Steps to Reproduce
- Create 2 custom items, one from scratch with a blank entity, and another based on a existing fortnite weapon prefab.
- Add this debug item component to the entities (for the fortnite item, will need to replace the existing one):
debug_drop_pickup_actions_item_component<public> := class<final_super>(item_component):
@editable
AllowPickup<public> : logic = false
@editable
AllowDropping<public> : logic = false
OnReceive<override>(SceneEvent:scene_event):logic =
if (
RemoveItemQuery := remove_item_query_event[SceneEvent]
RemoveItemQuery.Item = Self and not AllowDropping?
):
RemoveItemQuery.AddError(remove_item_error{})
Print("Item is disallowed from being Dropped!")
if (
AddItemQuery := add_item_query_event[SceneEvent]
AddItemQuery.Item = Self and not AllowPickup?
):
AddItemQuery.AddError(add_item_error{})
Print("Item is disallowed from being picked up!")
(super:)OnReceive(SceneEvent)
- Make sure the “Allow Pickup” editable is disabled
- Start the game, try picking both items, and observe the behavior of each one
- End the game, change “Allow Pickup” to true, but keep “Allow Dropping” disabled
- Start the game again, pickup both items, then try dropping them, and observe the behavior of each one;
Expected Result
For custom items made from scratch (pickup disabled):
- No issues found (working as expected)
For custom items based on existing Fortnite items (pickup disabled):
- The in-world popup UI widget should show “can’t be picked up”, similar to other similar scenarios (such as when inventory is already full), preventing the interaction completely;
- When trying to interact to pickup, nothing should happen.
For custom items made from scratch (drop disabled):
- A “keylock” icon should appear when dragging the item to be dropped from the inventory screen, indicating that the action is not possible. The “Drop” button on the footer should also not be displayed.
For custom items based on existing Fortnite items (drop disabled):
- A “keylock” icon should appear when dragging the item to be dropped from the inventory screen. Currently, the wrong “drop” icon always appear, even when the action is not really possible;
- Item should be unable to be dropped and be kept in the inventory, without causing side effects or weird behaviors
Observed Result
For custom items made from scratch (pickup disabled):
- No issues found (working as expected)
For custom items based on existing Fortnite items (pickup disabled):
- The in-world popup UI widget wrongly show that item is able to be picked up without any warning or info message, which is not;
- When trying to interact to pickup, “pickup animation” plays, besides the item not really entering on the player inventory after the animation finishes.
For custom items made from scratch (drop disabled):
- The wrong “drop” icon always appear when trying to drag the item out of the player inventory, even when the action is not really possible. The “Drop” button on the footer also is displayed, besides not doing anything when clicked.
For custom items based on existing Fortnite items (drop disabled):
- The same issue with wrong icon and drop button described above, is also present here for fortnite-based custom items;
- When attempting to drop, the game enters in a weird state:
– The custom item is still on the inventory, but a copy of the (original fortnite item) is dropped into the world.
– The dropped copy does not receive the custom item properties, including descriptions, rarities and extra behaviors.
– The original item is correctly prevented from being dropped, still being on the inventory, but with different properties such as descriptions, rarity and other overriden data.
– The original item that is still on the inventory, can still be attempted to be dropped, repeating the behavior described above, causing the fortnite item being duplicated.
– The dropped items on the ground can also be picked up again, but causing more issues, they are usable but also can become “ghost items” consuming inventory slots forever for example when trying to drop and pickup several times.
Platform(s)
All (Server / Verse)
Upload an image
Video
Attached above are two videos showcasing the behaviors, one for “disallow pickup” and other for “disallow drop”
Additional Notes
The custom item made from scratch has less problems, and from what I think, looks like the player inventory does not properly check APIs such as “Inventory.CanRemoveItem(Item)” to update the icon and disabling the drop buttons accordingly when attempting to drop them.
All issues related to custom items made based on existing fortnite items, looks like to be much more complex and deeper. My first guess is that the communication and behaviors of the harcdoded fortnite item definition, plus the in-world pickup UI for them, not being properly connected with the itemization scene graph api, failing to check certain conditions, “acting on their own” and causing the conflicts described on the report.