Hi everyone,
I’m trying to have mod packager also compiles c++ modules as well along side with the contents.
SimpleUGC plugin from Epic does not support c++ module packaging, so I look it up from Odin ModKit for references and so far only find this
I tried to find the definition for PackageOdinPlugin but couldn’t, I believe there needs to be some sort of parameters passing to the BuildTool for it to compile c++.
Anyone has any idea how to package c++ module with mod contents, thank you!
There is a native feature in Unreal Engine that few people know about, called Gameplay Modules. It is where classes sectioned by module are compiled into DLLs, rather than one monolithic binary. I won’t bother condensing what is already explained in the UE documentation for it, since it is already quite short.
If a game is set to build modularly instead of monolithically, it can then load any other DLL inside of the Plugins/ folder, even in shipping builds. A modder can then create a C++ plugin inside of UE, where the entire core UE API is exposed, and they can load it as a “plugin mod” into the game. The plugin can do anything the game’s normal C++ can do – reference, change or create assets. For this reason, this method is by far the most flexible and opportunity-inducing out of any in all of UE mod support.
There is only one game that I know of that has ever used this method for community mod support – Satisfactory. Therefore, I was able to ask the developers of this game – Coffee Stain Studios (CSS) about any drawbacks that they observed:
Increased code size. In fact, executable size is decreased to nothing, but you get quite a lot of relatively small DLL files instead.
Slightly increased start-up time and memory footprint. Don’t expect any numbers there, but “it’s really insignificant”, according to CSS.
If you have not made any significant commits to the engine for your game, the bare minimum you can do to change to modular is changing LinkType = LinkType.Modular in the game target.
Then future actions depend on the severity of the changes. Changes that are binary compatible with the stock engine do not need to be shared. If there are changes affecting binary compatibility – e.g., adding new properties, changing or adding virtual functions – they need to be shared with modders. The only legal way to share your engine patches is to fork the UE repository on GitHub and commit your changes to the fork. But if your changes are binary compatible, you can potentially skip that.
If you would like to know more about this method, I highly recommend reaching out to the Satisfactory developers and asking them directly.
Hi Thanks for the reply! Yes I did figure about modularly compilation already even though still have some issues with certain plugins. Thanks for the update!