Removing and readding the item_component on an entity prefab instance (created from a Fortnite item prefab class) loses the ItemDefinition reference. The new component comes in empty and generates a blank inline definition instead of keeping the original WID. This also broke the existing prefabs that used a subclass of item_component rather than the base one.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Scene Graph
Steps to Reproduce
Create a prefab from a Fortnite item type
remove the item component
add a subclass of the item component or just the base item component
Expected Result
The custom item prefab should have the default behavior of the parent Fortnite item
Observed Result
The custom item prefab acts like a default custom item without any behavior from it’s inherited parent
From what I analyzed, looks like the weapon details are now bounded to the item_component and gets lost when it is being replaced.
Before v41.10, this exact workflow of replacing the item_component worked all fine without any issues, and the parent weapon reference lived on the entity that was being subclassed into the new prefab, and not on the item_component at all, which avoided this type of problem.
The issue here is that this was not a thing before the update, and that caused a lot of breaking changes, some that are (almost) impossible to workaround, or absurdly time consuming to apply different “fixes”, redesigning systems all without guarantees that it will keep working in the future (since this happened now).
I know people that due to this would need to manually copy-paste over 500 component fields, editables and reconstructing the prefabs from scratch, since all these data can’t be “ported over” in a easy way…
We would expect that the “item_component” being only to provide custom interaction rules with inventories (both native fortnite inventories, or custom inventories). This being part of the itemization and how the items communicates with the inventories, and not expecting it holding other behaviors unrelated to these aspects.
It is ok to change the weapon reference from being from the entity to a component instead (I believe this was made to allow better validation, specially since some bad people were exploiting the internal data to do some sketchy/illegal usages).
BUT, what we would expect was at least it having a *new* “fort_weapon_definition_component” to hold that weapon reference now, with that internal weapon behavior working independently from the item_component itself as it should, instead of replacing and/or “inecting” that internal data on it directly.