Constructing Actor Components in Construction Script of another Actor

I’m currently trying to set up a data structure for building ships from an assortment of module parts. So far, I have set the Ship to be an Actor and each Module to be an Actor Component, with subclasses of of the Module class defining specific types of modules. E.g. a radar module would provide information about scanning range, while an engine module would provide information about its maximum thrust, but every module has basic information like a name and weight (hence the common superclass).

Now, I want to construct a Ship Actor from a bunch of given module classes (thinking of them as the blueprint for what goes into the ship). For this, I want to construct an module object for each given class and keep references to these objects in the ship Actor. I’m trying to do this via use of ConstructObjectFromClass in the construction script of the Ship Actor like so:

However, this generates the following error on compile:

Cannot construct objects of type '/Game/ShadowWarfare/GameData/Module.Module_C' in Construct Object from Class

I think this could be due to the [this bug][2], but I do not understand the given workaround, as the type of each element is a Module Class Reference already.

My question would be, if there is a way to fix this or a better way to achieve the intended effect.

EDIT: I ended up changing all ActorComponents to plain Objects and now the above aproach works just fine, although I am still interested in whether or not ActorComponents in themselves were a good choice for the kind of task I wanted them to do.

First, create your custom actor component. Select Actor Component from the Blueprint Class menu by right-clicking in the Content Browser. Name it appropriately (e.g., MyCustomComponent).