Placeables

Placeable Creation

This section is intended to contain some tips, tricks, and possible pitfalls when it comes to authoring new placeables in the modkit.

Placeable Replication

As of Patch 2.0, Placeables can currently enable or disable whether they want to opt in to a push model of replication, using the IsRepObjectSupported boolean. The benefit of this feature is that it generally significantly reduces the impact of processing a placeable for replication, as it means that a placeable will only be processed for replication if at least one of its properties has been updated, rather than always being processed. This should improve the performance of servers using the placeables that have this enabled, especially at higher placeable and player counts.

What Modders Need To Do

In general, as of Patch 2.0, most modders should not have to make any changes due to this change.

In Patch 2.0, every existing placeable in the game, including BP_Master_Placeables, has this enabled by default.

This means that any modded placeables will also have IsRepObjectSupported set to true.

If you’re worried about your own placeables, you can set IsRepObjectSupported to false, although it is also worth reading the next section for better understanding.

When This Should Be Enabled

It should be safe for any placeable to have IsRepObjectSupported set to true in almost every case. The only time that it is not safe to have IsRepObjectSupported set to true on a Placeable is if you add a replicated component with replicated variables defined and set in C++, that is not included in the following list:

  • UItemInventory (and all of its children)
  • USmartObjectSlotComponent (and all of its children)
  • UItemDistributorComponent (and all of its children)

As long as your placeable and its components are only defined in Blueprint, or are included in that list of compliant C++ components, you should be safe to have IsRepObjectSupported set to true.

Replicated variables defined in C++ but set to BlueprintReadWrite and written in Blueprint will also work automatically, with one exception:

There is a small bug in UE 5.6 - if you have a replicated array, calling functions that modify the array (such as Add, Remove, etc.) from an actor other than the one that owns the replicated array (or owns the component that owns the replicated array) will not properly mark it as dirty, therefore not replicating the changes. This can be resolved by calling Set on the array after making your changes, or setting IsRepObjectSupported to false on your placeable.

What Happens If Set Incorrectly

If IsRepObjectSupported is set to false for a placeable that could support it, there will be no change from the behaviour prior to Patch 2.0. However, any placeable that could support it that does not have it enabled is losing out on the optimization.

If IsRepObjectSupported is set to true for a placeable that cannot support it, the replicated state of any parts that don’t support it (ex. C++ defined components) will likely not be properly reflected to clients until something else triggers the placeable to replicate.

Last updated on